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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x445fe5
mov eax, dword fs:[0]
push eax
sub esp, 0x130
mov eax, dword [0x458210]
xor eax, esp
mov dword [esp + 0x128], eax
push ebx
push esi
push edi
mov eax, dword [0x458210]
xor eax, esp
push eax
lea eax, [esp + 0x140]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov edi, edx
xor ebx, ebx
cmp dword [edi], ebx
mov dword [esp + 0x34], edi
mov dword [esp + 0x3c], eax
jne 0x405a2c
mov eax, 0x80004005
mov ecx, dword [esp + 0x140]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x128]
xor ecx, esp
call fcn.004357cb
mov esp, ebp
pop ebp
ret 0x10
mov eax, dword [ebp + 0x14]
mov dword [edi + 4], eax
mov byte [esp + 0x12], 1
mov dword [esp + 0x28], ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], ebx
cmp ecx, ebx
mov dword [esp + 0x148], ebx
je 0x405b72
lea eax, [esp + 0x24]
push eax
push 0x3b
mov byte [esp + 0x1a], 0
call fcn.0040ed30
pop ecx
pop ecx
lea eax, [esp + 0x24]
mov dword [esp + 0x14], ebx
call fcn.004048ab
test eax, eax
jbe 0x405ac4
push dword [esp + 0x14]
lea esi, [esp + 0x28]
call fcn.00408a87
push 0x448dac
mov ebx, 0x448e18
mov edi, eax
call fcn.0040ccb0
pop ecx
push 0x5c
push 0x2f
call fcn.0040cd60
push 0x448e0c
mov eax, edi
call fcn.0040ce30
add esp, 0xc
inc dword [esp + 0x14]
mov eax, esi
call fcn.004048ab
cmp dword [esp + 0x14], eax
jb 0x405a76
mov edi, dword [esp + 0x34]
xor ebx, ebx
mov esi, dword [esp + 0x28]
cmp esi, dword [esp + 0x2c]
jbe 0x405ad3
call fcn.00435ef5
lea eax, [esp + 0x24]
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], esi
mov esi, dword [esp + 0x2c]
cmp dword [esp + 0x28], esi
jbe 0x405aee
call fcn.00435ef5
cmp dword [esp + 0x18], ebx
je 0x405afe
lea eax, [esp + 0x24]
cmp dword [esp + 0x18], eax
je 0x405b03
call fcn.00435ef5
cmp dword [esp + 0x1c], esi
je 0x405b57
lea esi, [esp + 0x18]
call fcn.0040497e
cmp dword [eax + 0x14], ebx
jne 0x405b4c
mov ebx, dword [esp + 0x1c]
mov esi, dword [esp + 0x18]
push ebx
push dword [esp + 0x30]
lea eax, [ebx + 0x1c]
call fcn.00406a70
mov eax, dword [esp + 0x34]
pop ecx
pop ecx
push eax
add eax, 0xffffffe4
call fcn.00404b61
sub dword [esp + 0x2c], 0x1c
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x18], esi
xor ebx, ebx
jmp 0x405adf
lea esi, [esp + 0x18]
call fcn.0040499b
jmp 0x405adf
lea eax, [esp + 0x24]
call fcn.004048ab
test eax, eax
jne 0x405b72
lea esi, [esp + 0x24]
call fcn.0040486c
jmp 0x405a01
mov eax, dword [esp + 0x3c]
lea esi, [esp + 0xd0]
call fcn.00404921
mov byte [esp + 0x148], 1
cmp dword [esp + 0xe4], ebx
je 0x405b9d
push 0x10
mov ecx, esi
call fcn.0040db50
pop ecx
mov esi, dword [edi]
cmp esi, ebx
mov dword [esp + 0x14], esi
je 0x405bae
mov eax, esi
call fcn.0040f040
add edi, 8
call fcn.00416cf9
mov ebx, eax
xor eax, eax
cmp ebx, eax
mov dword [esp + 0x18], ebx
jne 0x405bf8
cmp esi, eax
mov byte [esp + 0x148], 1
je 0x405bd3
call fcn.0040fba0
mov ebx, 0x80004005
push 0
push 1
lea esi, [esp + 0xd8]
call fcn.00401eb6
lea esi, [esp + 0x24]
call fcn.0040486c
mov eax, ebx
jmp 0x405a06
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], eax
mov byte [esp + 0x148], 3
lea ecx, [esp + 0x38]
mov dword [esp + 0x38], eax
mov eax, dword [ebx]
push ecx
mov ecx, ebx
call dword [eax + 0x18]
mov edi, eax
xor eax, eax
cmp edi, eax
je 0x405c46
lea esi, [esp + 0x40]
call fcn.00429a28
mov byte [esp + 0x148], 1
mov esi, dword [esp + 0x14]
test esi, esi
je 0x405c42
call fcn.0040fba0
mov ebx, edi
jmp 0x405bd8
cmp dword [esp + 0x38], eax
jne 0x405c71
lea esi, [esp + 0x40]
call fcn.00429a28
mov byte [esp + 0x148], 1
mov esi, dword [esp + 0x14]
test esi, esi
je 0x405c6a
call fcn.0040fba0
xor ebx, ebx
jmp 0x405bd8
cmp dword [esp + 0x38], eax
mov dword [esp + 0x20], eax
jbe 0x405db9
lea eax, [esp + 0x8c]
mov byte [esp + 0x13], 0
call fcn.0040f060
lea ecx, [esp + 0x8c]
push ecx
mov byte [esp + 0x14c], 4
mov eax, dword [ebx]
push 6
push dword [esp + 0x28]
mov ecx, ebx
call dword [eax + 0x1c]
mov edi, eax
xor esi, esi
cmp edi, esi
jne 0x405fd1
cmp dword [esp + 0x8c], 4
jne 0x405cd8
mov eax, dword [esp + 0xac]
or eax, dword [esp + 0xb0]
je 0x405cd8
mov byte [esp + 0x13], 1
lea eax, [esp + 0x90]
mov dword [esp + 0x8c], esi
mov dword [esp + 0xac], esi
mov dword [esp + 0xb0], esi
call fcn.0040892b
mov eax, dword [ebx]
lea ecx, [esp + 0x8c]
push ecx
push 3
push dword [esp + 0x28]
mov ecx, ebx
call dword [eax + 0x1c]
mov edi, eax
cmp edi, esi
jne 0x405fd1
lea eax, [esp + 0x90]
lea esi, [esp + 0xb4]
call fcn.00404921
cmp byte [esp + 0x12], 0
mov byte [esp + 0x148], 5
je 0x405f4a
mov esi, dword [esp + 0x34]
mov eax, dword [esi + 0x94]
add esi, 0x90
mov dword [esp + 0x6c], eax
lea eax, [esp + 0x58]
push eax
lea ebx, [esp + 0x24]
mov dword [esp + 0x6c], esi
call fcn.00416970
lea edi, [esp + 0x68]
mov esi, eax
call fcn.0040615a
test al, al
je 0x405d7f
mov eax, ebx
push eax
lea eax, [esp + 0x44]
call fcn.004060ca
mov ebx, dword [esp + 0x18]
push 0
push 1
lea esi, [esp + 0xbc]
call fcn.00401eb6
lea esi, [esp + 0x8c]
mov byte [esp + 0x148], 3
call fcn.0040f080
inc dword [esp + 0x20]
mov eax, dword [esp + 0x20]
cmp eax, dword [esp + 0x38]
jb 0x405c7f
xor edi, edi
cmp dword [esp + 0x44], edi
je 0x405c4c
mov eax, dword [esp + 0x48]
sub eax, dword [esp + 0x44]
sar eax, 2
je 0x405c4c
push 0x130
call fcn.00435ac3
pop ecx
mov dword [esp + 0x18], eax
cmp eax, edi
mov byte [esp + 0x148], 6
je 0x405df9
push eax
call fcn.00411b83
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 + 0x148], 3
call fcn.0042a1fb
movzx eax, byte [ebp + 0x10]
movzx edx, byte [ebp + 0xc]
push eax
mov ecx, edi
mov byte [esp + 0x14c], 7
call fcn.004120f3
lea eax, [esp + 0xec]
call fcn.0040f340
mov esi, dword [esp + 0x34]
push eax
lea eax, [esi + 0x74]
push eax
mov byte [esp + 0x150], 8
call fcn.0040f2a0
pop ecx
pop ecx
mov eax, 0x448dac
lea ecx, [esp + 0x70]
call fcn.00401e22
xor eax, eax
mov dword [esp + 0x5c], eax
mov dword [esp + 0x60], eax
mov dword [esp + 0x64], eax
mov byte [esp + 0x148], 0xa
push dword [esp + 0x110]
lea eax, [esp + 0x108]
push dword [esp + 0x110]
push eax
lea eax, [esp + 0x7c]
push eax
lea eax, [esp + 0x68]
push eax
push dword [esp + 0x50]
mov eax, dword [esi + 0x70]
push ebx
push edi
call fcn.00411fc3
lea esi, [esp + 0x58]
call fcn.0040486c
push 0
push 1
lea esi, [esp + 0x78]
mov byte [esp + 0x150], 8
call fcn.00401eb6
cmp byte [esp + 0x12], 0
je 0x405ede
mov eax, dword [esp + 0x34]
cmp dword [eax + 0x98], 0
jne 0x405ede
lea eax, [esp + 0x40]
call fcn.00406124
mov esi, dword [ebx]
lea eax, [esp + 0x18]
call fcn.00422d3c
push eax
push 0
lea eax, [esp + 0x48]
push eax
mov ecx, ebx
call dword [esi + 0x20]
test eax, eax
mov dword [esp + 0x3c], eax
jne 0x405fe2
cmp byte [esp + 0x12], al
jne 0x405fe2
xor esi, esi
cmp dword [esp + 0x44], 0
je 0x405fe2
mov eax, dword [esp + 0x48]
sub eax, dword [esp + 0x44]
sar eax, 2
cmp esi, eax
jae 0x405fe2
mov eax, dword [esp + 0x44]
mov ebx, dword [esp + 0x34]
lea eax, [eax + esi*4]
push eax
add ebx, 0x90
lea edi, [esp + 0x5c]
call fcn.00406026
inc esi
jmp 0x405f0e
cmp byte [esp + 0x13], 0
jne 0x405d83
mov esi, dword [esp + 0x28]
cmp esi, dword [esp + 0x2c]
jbe 0x405f64
call fcn.00435ef5
lea eax, [esp + 0x24]
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], esi
mov esi, dword [esp + 0x2c]
cmp dword [esp + 0x28], esi
jbe 0x405f7f
call fcn.00435ef5
cmp dword [esp + 0x50], 0
je 0x405f90
lea eax, [esp + 0x24]
cmp dword [esp + 0x50], eax
je 0x405f95
call fcn.00435ef5
cmp dword [esp + 0x54], esi
je 0x405d83
lea esi, [esp + 0x50]
call fcn.0040497e
lea esi, [esp + 0xb4]
call fcn.0040cbe0
test eax, eax
jne 0x405fc6
lea eax, [esp + 0x20]
push eax
lea eax, [esp + 0x44]
call fcn.004060ca
lea esi, [esp + 0x50]
call fcn.0040499b
jmp 0x405f70
lea esi, [esp + 0x8c]
call fcn.0040f080
jmp 0x405c24
lea esi, [esp + 0xec]
call fcn.0040f370
lea eax, [esp + 0x18]
mov byte [esp + 0x148], 3
call fcn.004154f9
lea esi, [esp + 0x40]
call fcn.00429a28
mov byte [esp + 0x148], 1
mov esi, dword [esp + 0x14]
test esi, esi
je 0x40601d
call fcn.0040fba0
mov ebx, dword [esp + 0x3c]
jmp 0x405bd8