Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void __cdecl ReinitDesignerVariables(AI_tdstMind_ *mind)
- {
- AI_tdstMind_ *mind_; // ebp@1
- dsgMem *dsgMem; // eax@2
- int memBuffer; // ecx@3
- int memBufferInitial; // eax@3
- struct_AIModel *aiModel; // edx@6
- int offset; // esi@7
- struct_dsgVarInfo *dsgVarInfo; // ecx@7
- int type; // edi@7
- int offset_; // ebx@8
- unsigned int size; // eax@9
- int memBufferInitial_; // [sp+10h] [bp-8h]@4
- int memBuffer_; // [sp+14h] [bp-4h]@3
- unsigned __int8 counter; // [sp+1Ch] [bp+4h]@6
- mind_ = mind;
- if ( mind )
- {
- dsgMem = mind->dsgMem;
- if ( dsgMem )
- {
- memBuffer = dsgMem->memBuffer;
- memBufferInitial = dsgMem->memBufferInitial;
- memBuffer_ = memBuffer;
- memBufferInitial_ = memBufferInitial ? memBufferInitial : mind->aiModel->dsgVar->dsgMemBuffer;
- aiModel = mind->aiModel;
- counter = 0;
- if ( LOBYTE(aiModel->dsgVar->amountOfInfos) )
- {
- do
- {
- offset = counter;
- dsgVarInfo = (*mind_->dsgMem->dsgVar)->dsgVarInfo;
- type = dsgVarInfo[offset].type;
- if ( dsgVarInfo[offset].initType )
- {
- offset_ = dsgVarInfo[offset].offset;// offset = offset in membuffer
- if ( fn_getDsgVarType(type) == 41 )
- {
- size = fn_ulSizeOfDsgVar(
- type,
- *(_BYTE *)((*mind_->dsgMem->dsgVar)->dsgVarInfo[offset].offset
- + mind_->aiModel->dsgVar->dsgMemBuffer
- + 4));
- }
- else
- {
- size = fn_ulSizeOfDsgVar(type, 0);
- }
- qmemcpy((void *)(offset_ + memBuffer_), (const void *)(offset_ + memBufferInitial_), size);
- }
- ++counter;
- }
- while ( counter < LOBYTE(mind_->aiModel->dsgVar->amountOfInfos) );
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment