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

Disassembly:
sub esp, 0x34
push ebx
push ebp
push esi
xor eax, eax
push edi
mov edi, dword [esp + 0x48]
mov esi, eax
mov dword [esp + 0x10], eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x28], eax
movzx ecx, word [edi + 0x42]
mov eax, ecx
and ecx, 0xfe00
and eax, 1
shl eax, 0x10
add eax, ecx
push edi
mov dword [esp + 0x4c], eax
call fcn.00591bb7
mov ebx, dword [edi + 0x44]
mov ebp, eax
pop ecx
mov dword [esp + 0x24], ebp
cmp dword [ebp], ebx
jae 0x591981
mov eax, dword [edi + 0x48]
xor ebp, ebp
mov ecx, dword [esp + 0x54]
inc ebp
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x24]
add eax, 8
mov dword [esp + 0x14], ecx
mov dword [esp + 0x18], eax
mov eax, dword [eax]
push edi
mov dword [esp + 0x24], eax
call fcn.00555d6d
pop ecx
cmp ebx, dword [esp + 0x20]
jbe 0x591715
push 1
lea eax, [ebp + 3]
push eax
push dword [esp + 0x60]
push dword [esp + 0x20]
push edi
call fcn.00591612
mov esi, eax
add esp, 0x14
test esi, esi
jne 0x591703
mov edx, dword [esp + 0x18]
or ecx, 0xffffffff
cmp ebp, 1
push edi
cmove ecx, ebx
mov dword [edx], ecx
call fcn.00555d6d
push 1
lea eax, [ebp + 3]
push eax
push edi
call fcn.0059370d
add esp, 0x10
jmp 0x591715
cmp esi, 5
jne 0x5919fa
mov ebx, dword [esp + 0x20]
and dword [esp + 0x14], 0
mov eax, dword [esp + 0x18]
inc ebp
add eax, 4
mov dword [esp + 0x18], eax
cmp ebp, 5
jl 0x5916ad
mov ebp, dword [esp + 0x24]
cmp dword [ebp], ebx
jae 0x591968
lea eax, [esp + 0x10]
push eax
push dword [ebp]
push edi
call fcn.00592da8
add esp, 0xc
mov esi, eax
cmp dword [esp + 0x10], 0
je 0x591968
push 1
push 3
push dword [esp + 0x60]
push dword [esp + 0x20]
push edi
call fcn.00591612
mov esi, eax
add esp, 0x14
test esi, esi
jne 0x591968
mov eax, dword [ebp]
push edi
mov dword [esp + 0x28], eax
mov dword [ebp + 0x20], ebx
call fcn.00555d6d
mov eax, dword [esp + 0x60]
sar eax, 2
and eax, 3
push eax
push dword [edi + 8]
mov dword [esp + 0x68], eax
call fcn.0056d943
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x591902
push esi
push dword [esp + 0x4c]
push esi
push dword [esp + 0x38]
call fcn.0059da60
push esi
push 0x27
push dword [edi + 4]
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], edx
call fcn.0056d853
mov eax, dword [edi + 4]
lea edx, [esp + 0x48]
push edx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x18]
mov esi, eax
add esp, 0x14
test esi, esi
jne 0x591902
mov eax, dword [esp + 0x38]
cmp dword [esp + 0x40], eax
jg 0x59184e
jl 0x5917f7
mov eax, dword [esp + 0x3c]
cmp eax, dword [esp + 0x34]
jae 0x59184e
push 0
push dword [esp + 0x4c]
push 0
push dword [edi + 0x44]
call fcn.0059da60
add eax, dword [esp + 0x3c]
adc edx, dword [esp + 0x40]
add eax, 0x10000
adc edx, 0
cmp edx, dword [esp + 0x38]
jg 0x59183c
jl 0x591825
cmp eax, dword [esp + 0x34]
jae 0x59183c
push 0x104c8
call fcn.0055ed8e
mov esi, eax
pop ecx
test esi, esi
jne 0x591902
jmp 0x59184e
lea eax, [esp + 0x34]
push eax
push 5
push dword [edi + 4]
call fcn.0056d871
add esp, 0xc
lea eax, [esp + 0x28]
push eax
lea eax, [esp + 0x20]
push eax
push dword [esp + 0x18]
call fcn.00592f07
add esp, 0xc
test eax, eax
jne 0x591902
push edi
call fcn.00555d6d
mov eax, dword [esp + 0x50]
pop ecx
cmp dword [eax + 0x128], 0
jne 0x5918f5
mov ecx, dword [esp + 0x28]
cmp ecx, dword [esp + 0x24]
jbe 0x5918eb
cmp ecx, ebx
ja 0x5918eb
mov eax, dword [esp + 0x2c]
cmp dword [esp + 0x1c], eax
ja 0x5918eb
mov esi, dword [esp + 0x48]
dec ecx
lea eax, [esi + 0x18]
mul ecx
add eax, 0x38
adc edx, 0
push edx
push eax
push esi
push dword [esp + 0x6c]
push dword [edi + 8]
call fcn.0056d90c
mov esi, eax
add esp, 0x14
test esi, esi
jne 0x591902
mov eax, dword [esp + 0x1c]
push esi
mov esi, dword [esp + 0x4c]
dec eax
push esi
push 0
push eax
call fcn.0059da60
push edx
push eax
push esi
push dword [esp + 0x6c]
push dword [edi + 4]
call fcn.0056d98e
mov esi, eax
add esp, 0x14
test esi, esi
jne 0x591902
test esi, esi
je 0x59184e
jmp 0x591902
cmp byte [eax + 0x57], 0
push 9
pop esi
push 7
pop ecx
cmovne esi, ecx
push 0
push 0x25
push dword [edi + 4]
call fcn.0056d853
add esp, 0xc
test esi, esi
jne 0x59195b
push edi
call fcn.0059252b
pop ecx
mov eax, dword [eax + 0x10]
cmp ebx, eax
jne 0x591951
mov eax, dword [edi + 0x48]
mul dword [esp + 0x48]
push edx
push eax
push dword [edi + 4]
call fcn.0056d95e
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x59195b
push dword [esp + 0x5c]
push dword [edi + 4]
call fcn.0056d943
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x59195b
push edi
mov dword [ebp], ebx
call fcn.00555d6d
pop ecx
push 1
push 3
push edi
call fcn.0059370d
add esp, 0xc
mov eax, esi
cmp esi, 5
je 0x591977
test eax, eax
jne 0x5919fa
xor esi, esi
cmp eax, 5
cmovne esi, eax
jmp 0x591989
mov eax, dword [esp + 0x54]
mov dword [esp + 0x14], eax
mov ebx, dword [esp + 0x50]
test ebx, ebx
je 0x5919fa
push edi
call fcn.00555d6d
mov eax, dword [ebp]
pop ecx
cmp eax, dword [edi + 0x44]
jae 0x5919a5
push 5
pop esi
jmp 0x5919fa
cmp ebx, 2
jl 0x5919fa
lea eax, [esp + 0x30]
push eax
push 4
pop ebp
push ebp
call fcn.00531ada
push ebp
push ebp
push dword [esp + 0x68]
push dword [esp + 0x28]
push edi
call fcn.00591612
mov esi, eax
add esp, 0x1c
test esi, esi
jne 0x5919fa
cmp ebx, 3
jne 0x5919ef
push dword [esp + 0x30]
push edi
call fcn.0059326a
push esi
push esi
push dword [edi + 8]
call fcn.0056d95e
add esp, 0x14
mov esi, eax
push ebp
push ebp
push edi
call fcn.0059370d
add esp, 0xc
and dword [edi + 0x78], 0
cmp dword [esp + 0x10], 0
je 0x591a5e
cmp dword [0x6631a8], 0
je 0x591a53
mov eax, dword [0x666550]
test eax, eax
je 0x591a1f
push eax
call dword [0x6631f8]
pop ecx
push dword [esp + 0x10]
call dword [0x6631d4]
sub dword [0x6664e8], eax
push dword [esp + 0x14]
dec dword [0x66650c]
call dword [0x6631cc]
mov eax, dword [0x666550]
pop ecx
pop ecx
test eax, eax
je 0x591a5e
push eax
call dword [0x663200]
jmp 0x591a5d
push dword [esp + 0x10]
call dword [0x6631cc]
pop ecx
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x34
ret