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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x13c
mov eax, dword [0x44c4e8]
xor eax, esp
mov dword [esp + 0x138], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, ecx
xor ecx, ecx
cmp dword [ebx], ecx
push esi
mov dword [esp + 0x54], eax
mov eax, dword [ebp + 0x14]
push edi
mov dword [esp + 0x54], ebx
jne 0x405a10
mov eax, 0x80004005
mov ecx, dword [esp + 0x144]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0042f5f3
mov esp, ebp
pop ebp
ret 0x10
cmp eax, ecx
mov dword [ebx + 4], edx
mov byte [esp + 0x12], 1
mov dword [esp + 0x24], ecx
mov dword [esp + 0x28], ecx
mov dword [esp + 0x2c], ecx
je 0x405b40
mov byte [esp + 0x12], cl
lea ecx, [esp + 0x20]
push ecx
push 0x3b
mov ebx, eax
call fcn.0040d583
pop ecx
pop ecx
lea eax, [esp + 0x20]
xor edi, edi
call fcn.004010a2
test eax, eax
jbe 0x405a90
push edi
lea esi, [esp + 0x24]
call fcn.004010b8
mov esi, eax
push 0x440ed8
push esi
mov ebx, 0x440db0
call fcn.0040c2ef
push 0x5c
push 0x2f
call fcn.0040c344
push 0x440ecc
push esi
call fcn.0040c3bf
add esp, 0x18
lea eax, [esp + 0x20]
inc edi
call fcn.004010a2
cmp edi, eax
jb 0x405a4f
mov ebx, dword [esp + 0x24]
cmp ebx, dword [esp + 0x28]
jbe 0x405a9f
call fcn.0042f4e0
lea eax, [esp + 0x20]
mov dword [esp + 0x30], eax
mov dword [esp + 0x38], eax
mov esi, dword [esp + 0x28]
cmp dword [esp + 0x24], esi
mov dword [esp + 0x34], ebx
jbe 0x405abe
call fcn.0042f4e0
mov dword [esp + 0x3c], esi
lea edi, [esp + 0x38]
lea esi, [esp + 0x30]
call fcn.004049a4
test al, al
je 0x405b21
call fcn.00404987
cmp dword [eax + 0x14], 0
mov esi, dword [esp + 0x30]
jne 0x405b09
push ebx
push dword [esp + 0x2c]
lea eax, [ebx + 0x1c]
call fcn.00406a30
mov eax, dword [esp + 0x30]
pop ecx
pop ecx
push eax
add eax, 0xffffffe4
call fcn.00404b4a
sub dword [esp + 0x28], 0x1c
mov dword [esp + 0x30], esi
jmp 0x405aab
test esi, esi
jne 0x405b12
call fcn.0042f4e0
cmp ebx, dword [esi + 8]
jb 0x405b1c
call fcn.0042f4e0
add ebx, 0x1c
jmp 0x405aab
lea eax, [esp + 0x20]
call fcn.004010a2
test eax, eax
jne 0x405b3c
lea esi, [esp + 0x20]
call fcn.004048aa
jmp 0x4059f4
mov ebx, dword [esp + 0x54]
mov eax, dword [esp + 0x58]
lea esi, [esp + 0xc0]
call fcn.00401083
cmp dword [esp + 0xd4], 0
je 0x405b66
mov eax, esi
push 0x10
push eax
call fcn.0040cbad
pop ecx
pop ecx
mov eax, dword [ebx]
test eax, eax
mov dword [esp + 0x18], eax
je 0x405b75
call fcn.0040d6ae
lea eax, [ebx + 8]
call fcn.00415075
mov edi, eax
xor esi, esi
cmp edi, esi
mov dword [esp + 0x30], edi
jne 0x405bbd
cmp dword [esp + 0x18], esi
je 0x405b98
mov esi, dword [esp + 0x18]
call fcn.0040d6bb
mov edi, 0x80004005
push 0
push 1
lea esi, [esp + 0xc8]
call fcn.0040115f
lea esi, [esp + 0x20]
call fcn.004048aa
mov eax, edi
jmp 0x4059f9
lea ecx, [esp + 0x40]
mov dword [esp + 0x48], esi
mov dword [esp + 0x4c], esi
mov dword [esp + 0x50], esi
mov dword [esp + 0x40], esi
mov eax, dword [edi]
push ecx
mov ecx, edi
call dword [eax + 0x18]
cmp eax, esi
mov dword [esp + 0x1c], eax
je 0x405bfd
lea esi, [esp + 0x44]
call fcn.0041441e
mov esi, dword [esp + 0x18]
test esi, esi
je 0x405bf7
call fcn.0040d6bb
mov edi, dword [esp + 0x1c]
jmp 0x405b9d
cmp dword [esp + 0x40], esi
jne 0x405c1d
lea esi, [esp + 0x44]
call fcn.0041441e
mov esi, dword [esp + 0x18]
test esi, esi
je 0x405c19
call fcn.0040d6bb
xor edi, edi
jmp 0x405b9d
cmp dword [esp + 0x40], esi
mov dword [esp + 0x14], esi
jbe 0x405d42
lea eax, [esp + 0x98]
mov byte [esp + 0x13], 0
call fcn.0040dcf4
mov eax, dword [edi]
lea ecx, [esp + 0x98]
push ecx
push 6
push dword [esp + 0x1c]
mov ecx, edi
call dword [eax + 0x1c]
cmp eax, esi
mov dword [esp + 0x1c], eax
jne 0x405e23
lea eax, [esp + 0x98]
call fcn.00415075
cmp eax, 4
jne 0x405c83
lea eax, [esp + 0x98]
call fcn.0040dd30
test al, al
je 0x405c83
mov byte [esp + 0x13], 1
lea eax, [esp + 0x98]
call fcn.0040dd1e
mov eax, dword [edi]
lea ecx, [esp + 0x98]
push ecx
push 3
push dword [esp + 0x1c]
mov ecx, edi
call dword [eax + 0x1c]
cmp eax, esi
mov dword [esp + 0x1c], eax
jne 0x405e23
lea eax, [esp + 0x98]
call fcn.0040ddb8
lea esi, [esp + 0xdc]
call fcn.00401083
cmp byte [esp + 0x12], 0
je 0x405d7e
lea esi, [ebx + 0x2c]
mov eax, dword [esi + 4]
mov dword [esp + 0x70], eax
lea eax, [esp + 0x5c]
push eax
lea ebx, [esp + 0x18]
mov dword [esp + 0x70], esi
call fcn.0040603f
lea edi, [esp + 0x6c]
mov esi, eax
call fcn.00403137
test al, al
je 0x405d0a
mov eax, ebx
push eax
lea eax, [esp + 0x48]
call fcn.004060a7
push 0
push 1
lea esi, [esp + 0xe4]
call fcn.0040115f
lea eax, [esp + 0x98]
call fcn.0040dd0d
mov edi, dword [esp + 0x30]
mov ebx, dword [esp + 0x54]
inc dword [esp + 0x14]
mov eax, dword [esp + 0x14]
xor esi, esi
cmp eax, dword [esp + 0x40]
jb 0x405c2b
cmp dword [esp + 0x48], esi
je 0x405c03
mov eax, dword [esp + 0x4c]
sub eax, dword [esp + 0x48]
sar eax, 2
je 0x405c03
push 0x140
call fcn.0042f589
cmp eax, esi
pop ecx
je 0x405e34
mov ebx, eax
call fcn.00411460
mov edi, eax
jmp 0x405e36
cmp byte [esp + 0x13], 0
je 0x405da3
push 0
push 1
lea esi, [esp + 0xe4]
call fcn.0040115f
lea eax, [esp + 0x98]
call fcn.0040dd0d
jmp 0x405d2e
mov esi, dword [esp + 0x24]
cmp esi, dword [esp + 0x28]
jbe 0x405db2
call fcn.0042f4e0
lea eax, [esp + 0x20]
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], esi
mov dword [esp + 0x74], eax
mov esi, dword [esp + 0x28]
cmp dword [esp + 0x24], esi
jbe 0x405dd1
call fcn.0042f4e0
mov dword [esp + 0x78], esi
lea edi, [esp + 0x74]
lea esi, [esp + 0x38]
call fcn.004049a4
test al, al
je 0x405d0a
call fcn.00404987
lea ecx, [esp + 0xdc]
call fcn.0040c230
test eax, eax
jne 0x405e0d
lea eax, [esp + 0x14]
push eax
lea eax, [esp + 0x48]
call fcn.004060a7
mov eax, dword [esp + 0x3c]
cmp eax, dword [esp + 0x28]
jb 0x405e1c
call fcn.0042f4e0
add dword [esp + 0x3c], 0x1c
jmp 0x405dc2
lea eax, [esp + 0x98]
call fcn.0040dd0d
jmp 0x405be1
xor edi, edi
mov ecx, edi
neg ecx
lea eax, [edi + 8]
sbb ecx, ecx
and ecx, eax
lea esi, [esp + 0x14]
call fcn.0041f81e
movzx eax, byte [ebp + 0x10]
push eax
movzx eax, byte [ebp + 0xc]
call fcn.00411a09
lea eax, [esp + 0xf8]
call fcn.0040d8b1
mov ebx, dword [esp + 0x54]
push eax
lea eax, [ebx + 0x10]
push eax
call fcn.0040d884
pop ecx
pop ecx
mov eax, 0x440db0
lea ecx, [esp + 0x7c]
call fcn.00401592
xor eax, eax
lea ecx, [esp + 0xf8]
mov dword [esp + 0x60], eax
mov dword [esp + 0x64], eax
mov dword [esp + 0x68], eax
call fcn.0040d98b
push edx
push eax
mov eax, ecx
call fcn.0040d987
push eax
lea eax, [esp + 0x88]
push eax
lea eax, [esp + 0x6c]
push eax
push dword [esp + 0x6c]
mov eax, dword [ebx + 0xc]
push dword [esp + 0x48]
push edi
call fcn.004118d9
lea esi, [esp + 0x5c]
call fcn.004048aa
push 0
push 1
lea esi, [esp + 0x84]
call fcn.0040115f
cmp byte [esp + 0x12], 0
je 0x405ef3
cmp dword [ebx + 0x34], 0
jne 0x405ef3
lea eax, [esp + 0x44]
call fcn.00406101
mov esi, dword [esp + 0x30]
mov edi, dword [esi]
lea eax, [esp + 0x14]
call fcn.00415075
push eax
push 0
lea eax, [esp + 0x4c]
push eax
mov ecx, esi
call dword [edi + 0x20]
test eax, eax
mov dword [esp + 0x1c], eax
jne 0x405f4c
cmp byte [esp + 0x12], al
jne 0x405f4c
xor esi, esi
cmp dword [esp + 0x48], 0
je 0x405f4c
mov eax, dword [esp + 0x4c]
sub eax, dword [esp + 0x48]
sar eax, 2
cmp esi, eax
jae 0x405f4c
mov eax, dword [esp + 0x48]
lea eax, [eax + esi*4]
push eax
lea eax, [ebx + 0x2c]
lea edi, [esp + 0x60]
call fcn.00405f9b
inc esi
jmp 0x405f1f
lea eax, [esp + 0xf8]
call fcn.0040d8df
lea eax, [esp + 0x14]
call fcn.0042ef96
jmp 0x405be1