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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x41e718
mov eax, dword fs:[0]
push eax
sub esp, 0x60
mov eax, dword [0x426304]
xor eax, esp
mov dword [esp + 0x58], eax
push ebx
push esi
push edi
mov eax, dword [0x426304]
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 0x403600
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 0x403801
lea eax, [esp + 0x2c]
push eax
mov ecx, ebx
call fcn.00402db0
mov dword [esp + 0x78], 0
mov edi, eax
call fcn.00405dc0
mov dword [esp + 0x20], eax
mov dword [esp + 0x78], 0xffffffff
mov esi, dword [esp + 0x2c]
test esi, esi
je 0x40367a
push 0
lea ecx, [esp + 0x18]
call fcn.00418a2d
mov dword [esp + 0x78], 1
mov eax, dword [esi + 4]
test eax, eax
je 0x403652
cmp eax, 0xffffffff
jae 0x403652
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.00418a55
and edi, esi
je 0x40367a
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 0x4036e0
call fcn.00404dc0
mov byte [esp + 0x78], 3
mov edi, eax
lea esi, [esp + 0x30]
call fcn.00401360
mov byte [esp + 0x78], 2
cmp dword [esp + 0x60], 8
jb 0x4036d6
mov eax, dword [esp + 0x4c]
push eax
call fcn.00406e29
add esp, 4
xor edi, edi
mov dword [esp + 0x5c], edi
xor ecx, ecx
jmp 0x40371a
call fcn.00404d60
mov byte [esp + 0x78], 4
mov edi, eax
lea esi, [esp + 0x30]
call fcn.00401360
mov byte [esp + 0x78], 2
cmp dword [esp + 0x60], 8
jb 0x40370e
mov eax, dword [esp + 0x4c]
push eax
call fcn.00406e29
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 0x40374d
jg 0x40373b
cmp eax, edi
jbe 0x40374d
mov dword [esp + 0x18], ecx
cmp eax, edx
jbe 0x40374d
sub eax, edx
mov dword [esp + 0x18], ecx
mov esi, eax
jmp 0x40374f
xor esi, esi
mov eax, dword [ebx + 0x14]
and eax, 0x1c0
cmp eax, 0x40
je 0x403788
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.00404cf0
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 0x403797
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.00404c80
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.00404cf0
add esp, 0x1c
mov dword [esp + 0x78], 0xffffffff
cmp dword [esp + 0x44], 8
jb 0x4037ec
mov edx, dword [esp + 0x30]
push edx
call fcn.00406e29
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.004063c1
mov esp, ebp
pop ebp
ret 0x18