Function at 0x405020
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x443205
mov eax, dword fs:[0]
push eax
sub esp, 0x138
mov eax, dword [0x456214]
xor eax, esp
mov dword [esp + 0x130], eax
push ebx
push esi
push edi
mov eax, dword [0x456214]
xor eax, esp
push eax
lea eax, [esp + 0x148]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov edi, edx
xor ebx, ebx
cmp dword [edi], ebx
mov dword [esp + 0x50], eax
mov eax, dword [ebp + 0x14]
mov dword [esp + 0x54], edi
jne 0x4050a1
mov eax, 0x80004005
mov ecx, dword [esp + 0x148]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x130]
xor ecx, esp
call fcn.004321f0
mov esp, ebp
pop ebp
ret 0x10
mov dword [edi + 4], ecx
mov byte [esp + 0x17], 1
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x38], ebx
cmp eax, ebx
mov dword [esp + 0x150], ebx
je 0x4051e3
lea ecx, [esp + 0x2c]
push ecx
push 0x3b
mov ebx, eax
mov byte [esp + 0x1f], 0
call fcn.0040d70d
and dword [esp + 0x24], 0
pop ecx
pop ecx
lea eax, [esp + 0x2c]
call fcn.00403eb7
test eax, eax
jbe 0x405135
push dword [esp + 0x1c]
lea esi, [esp + 0x30]
call fcn.00403ecd
mov esi, eax
push 0x446e08
push esi
mov ebx, 0x446d9c
call fcn.0040be19
push 0x5c
push 0x2f
call fcn.0040be6e
push 0x446dfc
mov eax, esi
call fcn.0040befb
add esp, 0x14
inc dword [esp + 0x1c]
lea eax, [esp + 0x2c]
call fcn.00403eb7
cmp dword [esp + 0x1c], eax
jb 0x4050eb
mov esi, dword [esp + 0x30]
cmp esi, dword [esp + 0x34]
jbe 0x405144
call fcn.00432845
lea eax, [esp + 0x2c]
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], esi
mov esi, dword [esp + 0x34]
cmp dword [esp + 0x30], esi
jbe 0x40515f
call fcn.00432845
cmp dword [esp + 0x24], 0
je 0x405170
lea eax, [esp + 0x2c]
cmp dword [esp + 0x24], eax
je 0x405175
call fcn.00432845
mov ebx, dword [esp + 0x28]
cmp ebx, esi
je 0x4051c6
lea esi, [esp + 0x24]
call fcn.00403fa9
cmp dword [eax + 0x14], 0
jne 0x4051bb
mov esi, dword [esp + 0x24]
push ebx
push dword [esp + 0x38]
lea eax, [ebx + 0x1c]
call fcn.004060f7
mov eax, dword [esp + 0x3c]
pop ecx
pop ecx
push eax
add eax, 0xffffffe4
call fcn.0040418c
sub dword [esp + 0x34], 0x1c
mov dword [esp + 0x24], esi
mov dword [esp + 0x28], ebx
jmp 0x405150
lea esi, [esp + 0x24]
call fcn.00403fc6
jmp 0x405150
lea eax, [esp + 0x2c]
call fcn.00403eb7
test eax, eax
jne 0x4051e1
lea esi, [esp + 0x2c]
call fcn.00403e5e
jmp 0x405076
xor ebx, ebx
mov eax, dword [esp + 0x50]
lea esi, [esp + 0xd8]
call fcn.00403f4c
mov byte [esp + 0x150], 1
cmp dword [esp + 0xec], ebx
je 0x405210
mov eax, esi
push 0x10
push eax
call fcn.0040ca8b
pop ecx
pop ecx
mov esi, dword [edi]
cmp esi, ebx
mov dword [esp + 0x1c], esi
je 0x405221
mov eax, esi
call fcn.0040d81a
add edi, 8
call fcn.00414279
mov edi, eax
xor eax, eax
cmp edi, eax
mov dword [esp + 0x24], edi
jne 0x40526b
cmp esi, eax
mov byte [esp + 0x150], 1
je 0x405246
call fcn.0040d825
mov edi, 0x80004005
push 0
push 1
lea esi, [esp + 0xe0]
call fcn.004012b5
lea esi, [esp + 0x2c]
call fcn.00403e5e
mov eax, edi
jmp 0x40507b
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], eax
mov byte [esp + 0x150], 3
lea ecx, [esp + 0x3c]
mov dword [esp + 0x3c], eax
mov eax, dword [edi]
push ecx
mov ecx, edi
call dword [eax + 0x18]
mov ebx, eax
xor eax, eax
cmp ebx, eax
je 0x4052b9
lea esi, [esp + 0x40]
call fcn.00426eef
mov byte [esp + 0x150], 1
mov esi, dword [esp + 0x1c]
test esi, esi
je 0x4052b5
call fcn.0040d825
mov edi, ebx
jmp 0x40524b
cmp dword [esp + 0x3c], eax
jne 0x4052e4
lea esi, [esp + 0x40]
call fcn.00426eef
mov byte [esp + 0x150], 1
mov esi, dword [esp + 0x1c]
test esi, esi
je 0x4052dd
call fcn.0040d825
xor edi, edi
jmp 0x40524b
cmp dword [esp + 0x3c], eax
mov dword [esp + 0x18], eax
jbe 0x405420
lea eax, [esp + 0x94]
mov byte [esp + 0x23], 0
call fcn.0040d846
lea ecx, [esp + 0x94]
push ecx
mov byte [esp + 0x154], 4
mov eax, dword [edi]
push 6
push dword [esp + 0x20]
mov ecx, edi
call dword [eax + 0x1c]
mov ebx, eax
test ebx, ebx
jne 0x405641
lea eax, [esp + 0x94]
call fcn.0041415a
cmp eax, 4
jne 0x405350
lea eax, [esp + 0x94]
call fcn.0040d889
test al, al
je 0x405350
mov byte [esp + 0x23], 1
lea eax, [esp + 0x94]
call fcn.0040d870
mov eax, dword [edi]
lea ecx, [esp + 0x94]
push ecx
push 3
push dword [esp + 0x20]
mov ecx, edi
call dword [eax + 0x1c]
mov ebx, eax
test ebx, ebx
jne 0x405641
lea eax, [esp + 0x94]
call fcn.004312af
lea esi, [esp + 0xbc]
call fcn.00403f4c
cmp byte [esp + 0x17], bl
mov byte [esp + 0x150], 5
je 0x4055ba
mov esi, dword [esp + 0x54]
mov eax, dword [esi + 0x94]
add esi, 0x90
mov dword [esp + 0x74], eax
lea eax, [esp + 0x60]
push eax
lea ebx, [esp + 0x1c]
mov dword [esp + 0x74], esi
call fcn.00413f31
lea edi, [esp + 0x70]
mov esi, eax
call fcn.0041200a
test al, al
je 0x4053e6
mov eax, ebx
push eax
lea eax, [esp + 0x44]
call fcn.0040575f
mov edi, dword [esp + 0x24]
push 0
push 1
lea esi, [esp + 0xc4]
call fcn.004012b5
lea eax, [esp + 0x94]
mov byte [esp + 0x150], 3
call fcn.0040d85f
inc dword [esp + 0x18]
mov eax, dword [esp + 0x18]
cmp eax, dword [esp + 0x3c]
jb 0x4052f2
xor edi, edi
cmp dword [esp + 0x44], edi
je 0x4052bf
mov eax, dword [esp + 0x48]
sub eax, dword [esp + 0x44]
sar eax, 2
je 0x4052bf
push 0x130
call fcn.00432273
pop ecx
mov dword [esp + 0x18], eax
cmp eax, edi
mov byte [esp + 0x150], 6
je 0x405460
push eax
call fcn.0040f468
mov edi, eax
mov ecx, edi
neg ecx
lea eax, [edi + 8]
sbb ecx, ecx
and ecx, eax
lea esi, [esp + 0x18]
mov byte [esp + 0x150], 3
call fcn.00424e1b
movzx eax, byte [ebp + 0x10]
movzx edx, byte [ebp + 0xc]
push eax
mov ecx, edi
mov byte [esp + 0x154], 7
call fcn.0040f9da
lea eax, [esp + 0xf4]
call fcn.0040dadd
mov ebx, dword [esp + 0x54]
push eax
lea eax, [ebx + 0x74]
push eax
mov byte [esp + 0x158], 8
call fcn.0040daa7
pop ecx
pop ecx
mov eax, 0x446d9c
lea ecx, [esp + 0x78]
call fcn.00401221
xor eax, eax
mov dword [esp + 0x64], eax
mov dword [esp + 0x68], eax
mov dword [esp + 0x6c], eax
lea ecx, [esp + 0xf4]
mov byte [esp + 0x150], 0xa
call fcn.0040d882
push edx
push eax
mov eax, ecx
call fcn.00415d66
push eax
lea eax, [esp + 0x84]
push eax
lea eax, [esp + 0x70]
push eax
push dword [esp + 0x64]
mov eax, dword [ebx + 0x70]
push dword [esp + 0x3c]
push edi
call fcn.0040f8aa
lea esi, [esp + 0x60]
call fcn.00403e5e
push 0
push 1
lea esi, [esp + 0x80]
mov byte [esp + 0x158], 8
call fcn.004012b5
cmp byte [esp + 0x17], 0
je 0x40554a
cmp dword [ebx + 0x98], 0
jne 0x40554a
lea eax, [esp + 0x40]
call fcn.004057b9
mov esi, dword [esp + 0x24]
mov edi, dword [esi]
lea eax, [esp + 0x18]
call fcn.0041415a
push eax
push 0
lea eax, [esp + 0x48]
push eax
mov ecx, esi
call dword [edi + 0x20]
test eax, eax
mov dword [esp + 0x50], eax
jne 0x405652
cmp byte [esp + 0x17], al
jne 0x405652
xor esi, esi
cmp dword [esp + 0x44], 0
je 0x405652
mov eax, dword [esp + 0x48]
sub eax, dword [esp + 0x44]
sar eax, 2
cmp esi, eax
jae 0x405652
mov eax, dword [esp + 0x44]
lea eax, [eax + esi*4]
push eax
add ebx, 0x90
lea edi, [esp + 0x64]
call fcn.004056a4
mov ebx, dword [esp + 0x54]
inc esi
jmp 0x40557e
cmp byte [esp + 0x23], 0
jne 0x4053ea
mov esi, dword [esp + 0x30]
cmp esi, dword [esp + 0x34]
jbe 0x4055d4
call fcn.00432845
lea eax, [esp + 0x2c]
mov dword [esp + 0x58], eax
mov dword [esp + 0x5c], esi
mov esi, dword [esp + 0x34]
cmp dword [esp + 0x30], esi
jbe 0x4055ef
call fcn.00432845
cmp dword [esp + 0x58], 0
je 0x405600
lea eax, [esp + 0x2c]
cmp dword [esp + 0x58], eax
je 0x405605
call fcn.00432845
cmp dword [esp + 0x5c], esi
je 0x4053ea
lea esi, [esp + 0x58]
call fcn.00403fa9
lea ecx, [esp + 0xbc]
call fcn.0040bd5a
test eax, eax
jne 0x405636
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x44]
call fcn.0040575f
lea esi, [esp + 0x58]
call fcn.00403fc6
jmp 0x4055e0
lea eax, [esp + 0x94]
call fcn.0040d85f
jmp 0x405297
lea eax, [esp + 0xf4]
call fcn.0040db0b
lea eax, [esp + 0x18]
mov byte [esp + 0x150], 3
call fcn.00431e2c
lea esi, [esp + 0x40]
call fcn.00426eef
mov byte [esp + 0x150], 1
mov esi, dword [esp + 0x1c]
test esi, esi
je 0x40568d
call fcn.0040d825
mov edi, dword [esp + 0x50]
jmp 0x40524b