Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int __fastcall CallFunction(int Stack, struct_Function *Function, _DWORD *a3, void *Result)
- {
- struct_v4 *tFunction; // esi@1
- char v5; // zf@1
- struct_v6 *tStack; // edi@1
- int result; // eax@2
- int v8; // eax@3
- int v9; // eax@9
- int Frame; // ebx@10
- void *v11; // esp@11
- struct_Property *Property; // esi@12
- int PropertyFlags; // eax@13
- int tCode; // eax@13
- int tCodeP; // edx@13
- int v16; // ecx@13
- void *v17; // esp@14
- int v18; // eax@14
- int v19; // edx@16
- int v20; // ebx@16
- int v21; // ST0C_4@24
- void (__thiscall *v22)(_DWORD, _DWORD, _DWORD); // edx@29
- int v23; // ecx@32
- char v24; // al@32
- void *v25; // esp@34
- int v26; // edx@34
- void (__thiscall *v27)(_DWORD, _DWORD, _DWORD); // edx@37
- int v28; // ST0C_4@37
- int tCodeP2; // eax@38
- int v30; // ecx@39
- struct_Function *v31; // edi@40
- int i; // esi@40
- struct_Function *j; // esi@44
- int v34; // ecx@45
- __int16 v35; // ax@45
- unsigned int v36; // [sp-4h] [bp-470h]@1
- int v37; // [sp+0h] [bp-46Ch]@14
- int v38; // [sp+4h] [bp-468h]@14
- int v39; // [sp+8h] [bp-464h]@14
- char v40; // [sp+10h] [bp-45Ch]@12
- int v41; // [sp+2Ch] [bp-440h]@29
- int v42; // [sp+30h] [bp-43Ch]@24
- char v43; // [sp+38h] [bp-434h]@12
- struct_Function *v44; // [sp+40h] [bp-42Ch]@1
- int v45; // [sp+48h] [bp-424h]@10
- int v46; // [sp+50h] [bp-41Ch]@12
- void *tResult; // [sp+54h] [bp-418h]@1
- int v48; // [sp+58h] [bp-414h]@1
- char Buffer; // [sp+5Ch] [bp-410h]@4
- unsigned int v50; // [sp+45Ch] [bp-10h]@1
- int v51; // [sp+468h] [bp-4h]@12
- int v52; // [sp+46Ch] [bp+0h]@1
- v50 = (unsigned int)&v52 ^ __security_cookie;
- v36 = (unsigned int)&v52 ^ __security_cookie;
- tFunction = (struct_v4 *)Function;
- v5 = Function->iNative == 0; // is (Function->iNative)?
- v48 = (int)a3;
- tStack = (struct_v6 *)Stack;
- tResult = Result;
- v44 = Function;
- if ( v5 )
- {
- v8 = Function->FunctionFlags; // Function->FunctionFlags
- if ( v8 & 0x400 ) // IsNative? ( & FUNC_Native != 0)
- {
- if ( (*(int (__thiscall **)(_DWORD *, struct_Function *, char *, int))(*a3 + 292))(a3, Function, &Buffer, Stack) )
- result = (int)sub_4522B0(tStack, tResult, (int)tFunction);
- else
- result = tFunction->Func(a3, tStack, tResult);
- }
- else
- {
- if ( v8 & 2 )
- {
- v9 = Function->PropertiesSize;
- if ( v9 )
- {
- v11 = alloca(v9);
- v45 = (int)&v36;
- Frame = (int)&v36;
- }
- else
- {
- Frame = 0;
- v45 = 0;
- }
- memset((void *)Frame, 0, Function->PropertiesSize);
- sub_454CB0((int)&v40, (int)tFunction, v48, 0, Frame, (int)tStack);
- v51 = 0;
- v5 = *(_BYTE *)tStack->Code == 22;
- Property = (struct_Property *)tFunction->Children;
- v46 = (int)&v43;
- if ( !v5 )
- {
- do
- {
- PropertyFlags = Property->PropertyFlags;
- dword_1A7F79C &= 0xFFFFFFFDu;
- v5 = (PropertyFlags & 0x100) == 0; // Is CPF_OutParam
- tCode = tStack->Code;
- tCodeP = *(_BYTE *)tCode;
- LODWORD(GPropAddr) = 0;
- GPropObject = 0;
- v16 = tStack->dword18;
- if ( v5 ) // If (Property->PropertyFlags & CPF_OutParm)
- {
- v20 = v42 + Property->Offset;
- v21 = v42 + Property->Offset;
- tStack->Code = tCode + 1;
- ((void (__thiscall *)(int, struct_v6 *, int))*(&dword_193AAA0 + tCodeP))(v16, tStack, v21);
- }
- else
- {
- tStack->Code = tCode + 1;
- ((void (__thiscall *)(int, struct_v6 *, _DWORD, unsigned int, int, int, int))*(&dword_193AAA0 + tCodeP))(
- v16,
- tStack,
- 0,
- v36,
- v37,
- v38,
- v39);
- v17 = alloca(16);
- v18 = LODWORD(GPropAddr);
- if ( !LODWORD(GPropAddr) )
- v18 = Frame + Property->Offset;
- v19 = v46;
- v37 = v18;
- v36 = (unsigned int)Property;
- v20 = v18;
- if ( *(_DWORD *)v46 )
- {
- *(_DWORD *)(*(_DWORD *)v46 + 8) = &v36;
- v46 = *(_DWORD *)v19 + 8;
- }
- else
- {
- *(_DWORD *)v46 = &v36;
- }
- if ( GPropObject && GProperty && *(_DWORD *)(GProperty + 80) & 0x20 && !(Property->PropertyFlags & 2) )
- (*(void (__thiscall **)(int, int))(*(_DWORD *)GPropObject + 216))(GPropObject, GProperty);
- }
- if ( Property->PropertyFlags & 0x10 )
- {
- if ( dword_1A7F79C & 2 && *(_DWORD *)(Property->dword34 + 172) & 0x100000 )
- sub_490AF0((int)Property, v20);
- v22 = (void (__thiscall *)(_DWORD, _DWORD, _DWORD))*(&dword_193AAA0 + *(_BYTE *)v41++);
- v22(v48, &v40, v20);
- }
- Property = (struct_Property *)Property->Next;
- Frame = v45;
- }
- while ( *(_BYTE *)tStack->Code != 22 );
- }
- ++tStack->Code;
- for ( ; Property; Property = (struct_Property *)Property->Next )
- {
- v23 = Property->PropertyFlags;
- v24 = Property->PropertyFlags;
- v45 = Property->dword54;
- if ( !(v24 & 0x10) )
- break;
- LODWORD(GPropAddr) = 0;
- GPropObject = 0;
- if ( v23 & 0x100 )
- {
- v25 = alloca(16);
- v26 = v46;
- v37 = Frame + Property->Offset;
- v36 = (unsigned int)Property;
- if ( *(_DWORD *)v46 )
- {
- *(_DWORD *)(*(_DWORD *)v46 + 8) = &v36;
- v46 = *(_DWORD *)v26 + 8;
- }
- else
- {
- *(_DWORD *)v46 = &v36;
- }
- }
- v27 = (void (__thiscall *)(_DWORD, _DWORD, _DWORD))*(&dword_193AAA0 + *(_BYTE *)v41);
- v28 = Frame + Property->Offset;
- ++v41;
- v27(v48, &v40, v28);
- }
- tCodeP2 = tStack->Code;
- if ( *(_BYTE *)tCodeP2 == 0x41 )
- {
- v30 = tStack->dword18;
- tStack->Code = tCodeP2 + 1;
- dword_193ABA4(v30, tStack, 0);
- }
- v31 = v44;
- for ( i = *(_DWORD *)&v44[1].f0[6]; i; i = *(_DWORD *)(i + 64) )
- {
- if ( *(_DWORD *)(*(_DWORD *)(i + 52) + 172) & 0x100000 )
- sub_490AF0(i, v42 + *(_DWORD *)(i + 104));
- }
- result = sub_4527F0(&v40, tResult);
- for ( j = *(struct_Function **)&v31->f4C[28]; j; j = *(struct_Function **)&j->f4C[40] )
- {
- v34 = *(_DWORD *)&j->f4C[4];
- v35 = *(_DWORD *)&j->f4C[4];
- v44 = *(struct_Function **)&j->f4C[8];
- if ( v35 & 0x100 )
- {
- result = 0;
- if ( !(v34 & 0x10) )
- continue;
- }
- result = (*(int (__thiscall **)(struct_Function *, int))(*(_DWORD *)&j->f0[0] + 412))(
- j,
- v42 + *(_DWORD *)&j->f4C[28]);
- }
- }
- else
- {
- (*(void (__thiscall **)(_DWORD *, struct_Function *, char *, int))(*a3 + 292))(a3, Function, &Buffer, Stack);
- result = (int)sub_4522B0(tStack, tResult, (int)tFunction);
- }
- }
- }
- else
- {
- result = Function->Func((int)a3, Stack, Result);
- }
- dword_1A7F79C &= 0xFFFFFFFDu;
- return result;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement