Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .text:004523F0 ; int __fastcall CallFunction(int Stack, struct_Function *Function, _DWORD *a3, void *Result)
- .text:004523F0 CallFunction proc near ; CODE XREF: .text:00441800p
- .text:004523F0 ; .text:0044184Ap
- .text:004523F0 ; sub_441860+1Dp
- .text:004523F0 ; .text:004418C3p
- .text:004523F0 ; sub_4418D0+D2p
- .text:004523F0 ; sub_4418D0+112p
- .text:004523F0
- .text:004523F0 var_45C = byte ptr -45Ch
- .text:004523F0 var_440 = dword ptr -440h
- .text:004523F0 var_43C = dword ptr -43Ch
- .text:004523F0 var_434 = byte ptr -434h
- .text:004523F0 var_42C = dword ptr -42Ch
- .text:004523F0 var_424 = dword ptr -424h
- .text:004523F0 var_41C = dword ptr -41Ch
- .text:004523F0 tResult = dword ptr -418h
- .text:004523F0 var_414 = dword ptr -414h
- .text:004523F0 Buffer = byte ptr -410h
- .text:004523F0 var_10 = dword ptr -10h
- .text:004523F0 var_C = dword ptr -0Ch
- .text:004523F0 var_4 = dword ptr -4
- .text:004523F0 arg_0 = dword ptr 8
- .text:004523F0 Result = dword ptr 0Ch
- .text:004523F0
- .text:004523F0 push ebp
- .text:004523F1 mov ebp, esp
- .text:004523F3 push 0FFFFFFFFh
- .text:004523F5 push 11B934Bh
- .text:004523FA mov eax, large fs:0
- .text:00452400 push eax
- .text:00452401 sub esp, 454h
- .text:00452407 mov eax, ___security_cookie ; jumptable 0043E033 cases 2,6,10,14
- .text:00452407 ; jumptable 00AD19AD case 13
- .text:00452407 ; jumptable 00E1B46B case 8
- .text:0045240C xor eax, ebp
- .text:0045240E mov [ebp+var_10], eax
- .text:00452411 push ebx
- .text:00452412 push esi
- .text:00452413 push edi
- .text:00452414 push eax
- .text:00452415 lea eax, [ebp+var_C]
- .text:00452418 mov large fs:0, eax
- .text:0045241E mov ebx, [ebp+arg_0]
- .text:00452421 mov eax, [ebp+Result]
- .text:00452424 mov esi, edx
- .text:00452426 cmp word ptr [esi+8Ch], 0
- .text:0045242E mov [ebp+var_414], ebx
- .text:00452434 mov edi, ecx
- .text:00452436 mov [ebp+tResult], eax
- .text:0045243C mov [ebp+var_42C], esi
- .text:00452442 jz short loc_452455
- .text:00452444 push eax
- .text:00452445 mov eax, [esi+84h]
- .text:0045244B push edi
- .text:0045244C mov ecx, ebx
- .text:0045244E call eax
- .text:00452450 jmp loc_4527C5
- .text:00452455 ; ---------------------------------------------------------------------------
- .text:00452455
- .text:00452455 loc_452455: ; CODE XREF: CallFunction+52j
- .text:00452455 mov eax, [esi+88h]
- .text:0045245B test eax, 400h
- .text:00452460 jz short loc_4524A0
- .text:00452462 mov edx, [ebx]
- .text:00452464 mov edx, [edx+124h]
- .text:0045246A push edi
- .text:0045246B lea eax, [ebp+Buffer]
- .text:00452471 push eax
- .text:00452472 push esi
- .text:00452473 mov ecx, ebx
- .text:00452475 call edx
- .text:00452477 test eax, eax
- .text:00452479 mov eax, [ebp+tResult]
- .text:0045247F jnz short loc_452492
- .text:00452481 mov edx, [esi+84h]
- .text:00452487 push eax
- .text:00452488 push edi
- .text:00452489 mov ecx, ebx
- .text:0045248B call edx
- .text:0045248D jmp loc_4527C5
- .text:00452492 ; ---------------------------------------------------------------------------
- .text:00452492
- .text:00452492 loc_452492: ; CODE XREF: CallFunction+8Fj
- .text:00452492 push esi ; int
- .text:00452493 push eax ; Dst
- .text:00452494 mov ecx, edi
- .text:00452496 call sub_4522B0
- .text:0045249B jmp loc_4527C5
- .text:004524A0 ; ---------------------------------------------------------------------------
- .text:004524A0
- .text:004524A0 loc_4524A0: ; CODE XREF: CallFunction+70j
- .text:004524A0 test al, 2
- .text:004524A2 jnz short loc_4524CD
- .text:004524A4 mov edx, [ebx]
- .text:004524A6 mov edx, [edx+124h]
- .text:004524AC push edi
- .text:004524AD lea eax, [ebp+Buffer]
- .text:004524B3 push eax
- .text:004524B4 push esi
- .text:004524B5 mov ecx, ebx
- .text:004524B7 call edx
- .text:004524B9 mov eax, [ebp+tResult]
- .text:004524BF push esi ; int
- .text:004524C0 push eax ; Dst
- .text:004524C1 mov ecx, edi
- .text:004524C3 call sub_4522B0
- .text:004524C8 jmp loc_4527C5
- .text:004524CD ; ---------------------------------------------------------------------------
- .text:004524CD
- .text:004524CD loc_4524CD: ; CODE XREF: CallFunction+B2j
- .text:004524CD mov eax, [esi+48h]
- .text:004524D0 test eax, eax
- .text:004524D2 jnz short loc_4524DE
- .text:004524D4 xor ebx, ebx
- .text:004524D6 mov [ebp+var_424], ebx
- .text:004524DC jmp short loc_4524F1
- .text:004524DE ; ---------------------------------------------------------------------------
- .text:004524DE
- .text:004524DE loc_4524DE: ; CODE XREF: CallFunction+E2j
- .text:004524DE add eax, 7
- .text:004524E1 and eax, 0FFFFFFF8h
- .text:004524E4 call __alloca_probe_16
- .text:004524E9 mov [ebp+var_424], esp
- .text:004524EF mov ebx, esp
- .text:004524F1
- .text:004524F1 loc_4524F1: ; CODE XREF: CallFunction+ECj
- .text:004524F1 mov eax, [esi+48h]
- .text:004524F4 push eax ; Size
- .text:004524F5 push 0 ; Val
- .text:004524F7 push ebx ; Dst
- .text:004524F8 call memset
- .text:004524FD mov ecx, [ebp+var_414]
- .text:00452503 add esp, 0Ch
- .text:00452506 push edi
- .text:00452507 push ebx
- .text:00452508 push 0
- .text:0045250A push ecx
- .text:0045250B mov ecx, esi
- .text:0045250D lea eax, [ebp+var_45C]
- .text:00452513 call sub_454CB0
- .text:00452518 mov [ebp+var_4], 0
- .text:0045251F mov eax, [edi+1Ch]
- .text:00452522 cmp byte ptr [eax], 16h
- .text:00452525 mov esi, [esi+44h]
- .text:00452528 lea edx, [ebp+var_434]
- .text:0045252E mov [ebp+var_41C], edx
- .text:00452534 jz loc_452678
- .text:0045253A lea ebx, [ebx+0]
- .text:00452540
- .text:00452540 loc_452540: ; CODE XREF: CallFunction+282j
- .text:00452540 mov eax, [esi+50h]
- .text:00452543 and dword_1A7F79C, 0FFFFFFFDh
- .text:0045254A xor ecx, ecx
- .text:0045254C and eax, 100h
- .text:00452551 or eax, ecx
- .text:00452553 mov eax, [edi+1Ch]
- .text:00452556 movzx edx, byte ptr [eax]
- .text:00452559 mov GPropAddr, ecx
- .text:0045255F mov GPropObject, ecx
- .text:00452565 mov ecx, [edi+18h]
- .text:00452568 jz loc_4525FA
- .text:0045256E inc eax
- .text:0045256F push 0
- .text:00452571 mov [edi+1Ch], eax
- .text:00452574 mov edx, dword_193AAA0[edx*4]
- .text:0045257B push edi
- .text:0045257C call edx ; dword_193AAA0
- .text:0045257E mov eax, 10h
- .text:00452583 call __alloca_probe
- .text:00452588 mov eax, GPropAddr
- .text:0045258D mov ecx, esp
- .text:0045258F test eax, eax
- .text:00452591 jnz short loc_452598
- .text:00452593 mov eax, [esi+68h]
- .text:00452596 add eax, ebx
- .text:00452598
- .text:00452598 loc_452598: ; CODE XREF: CallFunction+1A1j
- .text:00452598 mov edx, [ebp+var_41C]
- .text:0045259E mov [ecx+4], eax
- .text:004525A1 mov [ecx], esi
- .text:004525A3 mov ebx, eax
- .text:004525A5 mov eax, [edx]
- .text:004525A7 test eax, eax
- .text:004525A9 jz short loc_4525BB
- .text:004525AB mov [eax+8], ecx
- .text:004525AE mov eax, [edx]
- .text:004525B0 add eax, 8
- .text:004525B3 mov [ebp+var_41C], eax
- .text:004525B9 jmp short loc_4525BD
- .text:004525BB ; ---------------------------------------------------------------------------
- .text:004525BB
- .text:004525BB loc_4525BB: ; CODE XREF: CallFunction+1B9j
- .text:004525BB mov [edx], ecx
- .text:004525BD
- .text:004525BD loc_4525BD: ; CODE XREF: CallFunction+1C9j
- .text:004525BD cmp GPropObject, 0
- .text:004525C4 jz short loc_452612
- .text:004525C6 mov ecx, GProperty
- .text:004525CC test ecx, ecx
- .text:004525CE jz short loc_452612
- .text:004525D0 mov eax, [ecx+50h]
- .text:004525D3 and eax, 20h
- .text:004525D6 xor edx, edx
- .text:004525D8 or eax, edx
- .text:004525DA jz short loc_452612
- .text:004525DC mov eax, [esi+50h]
- .text:004525DF and eax, 2
- .text:004525E2 or eax, edx
- .text:004525E4 jnz short loc_452612
- .text:004525E6 mov eax, GPropObject
- .text:004525EB mov edx, [eax]
- .text:004525ED push ecx
- .text:004525EE mov ecx, eax
- .text:004525F0 mov eax, [edx+0D8h]
- .text:004525F6 call eax
- .text:004525F8 jmp short loc_452612
- .text:004525FA ; ---------------------------------------------------------------------------
- .text:004525FA
- .text:004525FA loc_4525FA: ; CODE XREF: CallFunction+178j
- .text:004525FA mov ebx, [esi+68h]
- .text:004525FD add ebx, [ebp+var_43C]
- .text:00452603 inc eax
- .text:00452604 push ebx
- .text:00452605 mov [edi+1Ch], eax
- .text:00452608 mov edx, dword_193AAA0[edx*4]
- .text:0045260F push edi
- .text:00452610 call edx ; dword_193AAA0
- .text:00452612
- .text:00452612 loc_452612: ; CODE XREF: CallFunction+1D4j
- .text:00452612 ; CallFunction+1DEj
- .text:00452612 ; CallFunction+1EAj
- .text:00452612 ; CallFunction+1F4j
- .text:00452612 ; CallFunction+208j
- .text:00452612 mov eax, [esi+50h]
- .text:00452615 and eax, 10h
- .text:00452618 xor ecx, ecx
- .text:0045261A or eax, ecx
- .text:0045261C jz short loc_452663
- .text:0045261E test byte ptr dword_1A7F79C, 2
- .text:00452625 jz short loc_45263C
- .text:00452627 mov eax, [esi+34h]
- .text:0045262A test dword ptr [eax+0ACh], 100000h
- .text:00452634 jz short loc_45263C
- .text:00452636 push ebx
- .text:00452637 call sub_490AF0
- .text:0045263C ; ---------------------------------------------------------------------------
- .text:0045263C
- .text:0045263C loc_45263C: ; CODE XREF: CallFunction+235j
- .text:0045263C ; CallFunction+244j
- .text:0045263C mov eax, [ebp+var_440]
- .text:00452642 movzx edx, byte ptr [eax]
- .text:00452645 mov edx, dword_193AAA0[edx*4]
- .text:0045264C push ebx
- .text:0045264D lea ecx, [ebp+var_45C]
- .text:00452653 inc eax
- .text:00452654 push ecx
- .text:00452655 mov ecx, [ebp+var_414]
- .text:0045265B mov [ebp+var_440], eax
- .text:00452661 call edx ; dword_193AAA0
- .text:00452663
- .text:00452663 loc_452663: ; CODE XREF: CallFunction+22Cj
- .text:00452663 mov eax, [edi+1Ch]
- .text:00452666 cmp byte ptr [eax], 16h
- .text:00452669 mov esi, [esi+40h]
- .text:0045266C mov ebx, [ebp+var_424]
- .text:00452672 jnz loc_452540
- .text:00452678
- .text:00452678 loc_452678: ; CODE XREF: CallFunction+144j
- .text:00452678 inc dword ptr [edi+1Ch]
- .text:0045267B test esi, esi
- .text:0045267D jz loc_452719
- .text:00452683
- .text:00452683 loc_452683: ; CODE XREF: CallFunction+323j
- .text:00452683 mov ecx, [esi+50h]
- .text:00452686 mov edx, [esi+54h]
- .text:00452689 mov eax, ecx
- .text:0045268B mov [ebp+var_424], edx
- .text:00452691 and eax, 10h
- .text:00452694 xor edx, edx
- .text:00452696 or eax, edx
- .text:00452698 jz short loc_452719
- .text:0045269A xor eax, eax
- .text:0045269C and ecx, 100h
- .text:004526A2 or ecx, eax
- .text:004526A4 mov GPropAddr, eax
- .text:004526A9 mov GPropObject, eax
- .text:004526AE jz short loc_4526E2
- .text:004526B0 lea eax, [edx+10h]
- .text:004526B3 call __alloca_probe
- .text:004526B8 mov ecx, [esi+68h]
- .text:004526BB mov edx, [ebp+var_41C]
- .text:004526C1 add ecx, ebx
- .text:004526C3 mov eax, esp
- .text:004526C5 mov [eax+4], ecx
- .text:004526C8 mov [eax], esi
- .text:004526CA mov ecx, [edx]
- .text:004526CC test ecx, ecx
- .text:004526CE jz short loc_4526E0
- .text:004526D0 mov [ecx+8], eax
- .text:004526D3 mov edx, [edx]
- .text:004526D5 add edx, 8
- .text:004526D8 mov [ebp+var_41C], edx
- .text:004526DE jmp short loc_4526E2
- .text:004526E0 ; ---------------------------------------------------------------------------
- .text:004526E0
- .text:004526E0 loc_4526E0: ; CODE XREF: CallFunction+2DEj
- .text:004526E0 mov [edx], eax
- .text:004526E2
- .text:004526E2 loc_4526E2: ; CODE XREF: CallFunction+2BEj
- .text:004526E2 ; CallFunction+2EEj
- .text:004526E2 mov eax, [esi+68h]
- .text:004526E5 mov ecx, [ebp+var_440]
- .text:004526EB movzx edx, byte ptr [ecx]
- .text:004526EE mov edx, dword_193AAA0[edx*4]
- .text:004526F5 add eax, ebx
- .text:004526F7 inc ecx
- .text:004526F8 push eax
- .text:004526F9 lea eax, [ebp+var_45C]
- .text:004526FF mov [ebp+var_440], ecx
- .text:00452705 mov ecx, [ebp+var_414]
- .text:0045270B push eax
- .text:0045270C call edx ; dword_193AAA0
- .text:0045270E mov esi, [esi+40h]
- .text:00452711 test esi, esi
- .text:00452713 jnz loc_452683
- .text:00452719
- .text:00452719 loc_452719: ; CODE XREF: CallFunction+28Dj
- .text:00452719 ; CallFunction+2A8j
- .text:00452719 mov eax, [edi+1Ch]
- .text:0045271C cmp byte ptr [eax], 41h
- .text:0045271F jnz short loc_452731
- .text:00452721 mov ecx, [edi+18h] ; _DWORD
- .text:00452724 push 0 ; _DWORD
- .text:00452726 inc eax
- .text:00452727 push edi ; _DWORD
- .text:00452728 mov [edi+1Ch], eax
- .text:0045272B call dword_193ABA4
- .text:00452731
- .text:00452731 loc_452731: ; CODE XREF: CallFunction+32Fj
- .text:00452731 mov edi, [ebp+var_42C]
- .text:00452737 mov esi, [edi+94h]
- .text:0045273D test esi, esi
- .text:0045273F jz short loc_452766
- .text:00452741
- .text:00452741 loc_452741: ; CODE XREF: CallFunction+374j
- .text:00452741 mov eax, [esi+34h]
- .text:00452744 test dword ptr [eax+0ACh], 100000h
- .text:0045274E jz short loc_45275F
- .text:00452750 mov ecx, [esi+68h]
- .text:00452753 add ecx, [ebp+var_43C]
- .text:00452759 push ecx
- .text:0045275A call sub_490AF0
- .text:0045275F ; ---------------------------------------------------------------------------
- .text:0045275F
- .text:0045275F loc_45275F: ; CODE XREF: CallFunction+35Ej
- .text:0045275F mov esi, [esi+40h]
- .text:00452762 test esi, esi
- .text:00452764 jnz short loc_452741
- .text:00452766
- .text:00452766 loc_452766: ; CODE XREF: CallFunction+34Fj
- .text:00452766 mov edx, [ebp+tResult]
- .text:0045276C mov ecx, [ebp+var_414]
- .text:00452772 push edx
- .text:00452773 lea eax, [ebp+var_45C]
- .text:00452779 push eax
- .text:0045277A call sub_4527F0
- .text:0045277F mov esi, [edi+68h]
- .text:00452782 test esi, esi
- .text:00452784 jz short loc_4527C5
- .text:00452786
- .text:00452786 loc_452786: ; CODE XREF: CallFunction+3D3j
- .text:00452786 mov ecx, [esi+50h]
- .text:00452789 mov edx, [esi+54h]
- .text:0045278C mov eax, ecx
- .text:0045278E mov [ebp+var_42C], edx
- .text:00452794 and eax, 100h
- .text:00452799 xor edx, edx
- .text:0045279B or eax, edx
- .text:0045279D jz short loc_4527A8
- .text:0045279F and ecx, 10h
- .text:004527A2 xor eax, eax
- .text:004527A4 or ecx, eax
- .text:004527A6 jz short loc_4527BE
- .text:004527A8
- .text:004527A8 loc_4527A8: ; CODE XREF: CallFunction+3ADj
- .text:004527A8 mov ecx, [esi+68h]
- .text:004527AB add ecx, [ebp+var_43C]
- .text:004527B1 mov eax, [esi]
- .text:004527B3 mov edx, [eax+19Ch]
- .text:004527B9 push ecx
- .text:004527BA mov ecx, esi
- .text:004527BC call edx
- .text:004527BE
- .text:004527BE loc_4527BE: ; CODE XREF: CallFunction+3B6j
- .text:004527BE mov esi, [esi+74h]
- .text:004527C1 test esi, esi
- .text:004527C3 jnz short loc_452786
- .text:004527C5
- .text:004527C5 loc_4527C5: ; CODE XREF: CallFunction+60j
- .text:004527C5 ; CallFunction+9Dj
- .text:004527C5 ; CallFunction+ABj
- .text:004527C5 ; CallFunction+D8j
- .text:004527C5 ; CallFunction+394j
- .text:004527C5 and dword_1A7F79C, 0FFFFFFFDh
- .text:004527CC lea esp, [ebp-470h]
- .text:004527D2 mov ecx, [ebp+var_C]
- .text:004527D5 mov large fs:0, ecx
- .text:004527DC pop ecx
- .text:004527DD pop edi
- .text:004527DE pop esi
- .text:004527DF pop ebx
- .text:004527E0 mov ecx, [ebp+var_10]
- .text:004527E3 xor ecx, ebp
- .text:004527E5 call @__security_check_cookie@4 ; __security_check_cookie(x)
- .text:004527EA mov esp, ebp
- .text:004527EC pop ebp
- .text:004527ED retn 8
- .text:004527ED CallFunction endp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement