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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x453228
mov eax, dword fs:[0]
push eax
sub esp, 0x60
mov eax, dword [0x46c664]
xor eax, esp
mov dword [esp + 0x58], eax
push ebx
push esi
push edi
mov eax, dword [0x46c664]
xor eax, esp
push eax
lea eax, [esp + 0x70]
mov dword fs:[0], eax
movzx eax, word [ebp + 0x18]
mov ebx, dword [ebp + 0x14]
test dword [ebx + 0x14], 0x4000
mov esi, dword [ebp + 8]
mov dword [esp + 0x28], esi
mov dword [esp + 0x24], eax
jne 0x40b600
movzx edi, byte [ebp + 0x1c]
mov edx, dword [ecx]
mov edx, dword [edx + 0x1c]
push edi
push eax
mov eax, dword [ebp + 0x10]
push ebx
push eax
mov eax, dword [ebp + 0xc]
push eax
push esi
call edx
mov eax, esi
jmp 0x40b801
lea eax, [esp + 0x2c]
push eax
mov ecx, ebx
call fcn.0040c520
mov dword [esp + 0x78], 0
mov edi, eax
call fcn.0040b110
mov dword [esp + 0x20], eax
mov dword [esp + 0x78], 0xffffffff
mov esi, dword [esp + 0x2c]
test esi, esi
je 0x40b67a
push 0
lea ecx, [esp + 0x18]
call fcn.004306a3
mov dword [esp + 0x78], 1
mov eax, dword [esi + 4]
test eax, eax
je 0x40b652
cmp eax, 0xffffffff
jae 0x40b652
dec eax
mov dword [esi + 4], eax
mov edi, dword [esi + 4]
neg edi
sbb edi, edi
not edi
mov dword [esp + 0x78], 0xffffffff
lea ecx, [esp + 0x14]
call fcn.004306cb
and edi, esi
je 0x40b67a
mov edx, dword [edi]
mov eax, dword [edx]
push 1
mov ecx, edi
call eax
xor ecx, ecx
mov dword [esp + 0x44], 7
mov dword [esp + 0x40], 0
mov word [esp + 0x30], cx
mov dword [esp + 0x78], 2
cmp byte [ebp + 0x1c], 0
mov ecx, dword [esp + 0x20]
lea edx, [esp + 0x4c]
push edx
je 0x40b6e0
call fcn.0040b2f0
mov byte [esp + 0x78], 3
mov edi, eax
lea esi, [esp + 0x30]
call fcn.0040b350
mov byte [esp + 0x78], 2
cmp dword [esp + 0x60], 8
jb 0x40b6d6
mov eax, dword [esp + 0x4c]
push eax
call fcn.0043266a
add esp, 4
xor edi, edi
mov dword [esp + 0x5c], edi
xor ecx, ecx
jmp 0x40b71a
call fcn.0040b450
mov byte [esp + 0x78], 4
mov edi, eax
lea esi, [esp + 0x30]
call fcn.0040b350
mov byte [esp + 0x78], 2
cmp dword [esp + 0x60], 8
jb 0x40b70e
mov eax, dword [esp + 0x4c]
push eax
call fcn.0043266a
add esp, 4
xor ecx, ecx
mov dword [esp + 0x5c], 0
xor edi, edi
mov eax, dword [ebx + 0x20]
mov edx, dword [esp + 0x40]
mov word [esp + 0x4c], cx
mov ecx, dword [ebx + 0x24]
mov dword [esp + 0x60], 7
cmp ecx, edi
jl 0x40b74d
jg 0x40b73b
cmp eax, edi
jbe 0x40b74d
mov dword [esp + 0x18], ecx
cmp eax, edx
jbe 0x40b74d
sub eax, edx
mov dword [esp + 0x18], ecx
mov esi, eax
jmp 0x40b74f
xor esi, esi
mov eax, dword [ebx + 0x14]
and eax, 0x1c0
cmp eax, 0x40
je 0x40b788
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp + 0xc]
push edx
push eax
lea ecx, [esp + 0x1c]
mov eax, esi
mov esi, dword [esp + 0x2c]
push ecx
call fcn.0040b520
mov edx, dword [eax]
mov dword [ebp + 0xc], edx
mov eax, dword [eax + 4]
mov edx, dword [esp + 0x4c]
add esp, 0xc
mov dword [ebp + 0x10], eax
xor esi, esi
cmp dword [esp + 0x44], 8
mov eax, dword [esp + 0x30]
jae 0x40b797
lea eax, [esp + 0x30]
mov ecx, dword [ebp + 0x10]
push edx
mov edx, dword [ebp + 0xc]
push ecx
push edx
lea ecx, [esp + 0x20]
push ecx
call fcn.0040b4b0
mov ecx, dword [eax]
mov dword [ebp + 0xc], ecx
mov eax, dword [eax + 4]
push eax
mov dword [ebx + 0x20], edi
mov dword [ebx + 0x24], edi
mov ebx, dword [esp + 0x3c]
mov dword [ebp + 0x10], eax
push ecx
mov eax, esi
mov esi, dword [esp + 0x3c]
push ebx
call fcn.0040b520
add esp, 0x1c
mov dword [esp + 0x78], 0xffffffff
cmp dword [esp + 0x44], 8
jb 0x40b7ec
mov edx, dword [esp + 0x30]
push edx
call fcn.0043266a
add esp, 4
xor eax, eax
mov word [esp + 0x30], ax
mov dword [esp + 0x44], 7
mov dword [esp + 0x40], edi
mov eax, ebx
mov ecx, dword [esp + 0x70]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x58]
xor ecx, esp
call fcn.00432675
mov esp, ebp
pop ebp
ret 0x18