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

Disassembly:
mov ecx, dword fs:[0x14]
mov ecx, dword [ecx]
cmp esp, dword [ecx + 8]
jbe 0x59221a
sub esp, 0x70
mov eax, dword [esp + 0x78]
mov ecx, dword [eax + 4]
test ecx, ecx
je 0x591f81
cmp ecx, 1
je 0x591f19
cmp ecx, 0x10
jne 0x591eb1
mov eax, dword [esp + 0x74]
mov dword [esp + 0x60], eax
mov dword [esp + 0x64], 4
mov dword [esp + 0x68], 0
mov dword [esp + 0x6c], 0
lea ecx, [0x69c3a0]
mov dword [esp], ecx
lea ecx, [esp + 0x60]
mov dword [esp + 4], ecx
call fcn.00408750
mov eax, dword [esp + 8]
lea ecx, [0x895b64]
mov edx, eax
mov eax, dword [esp + 0x78]
jmp 0x591f85
mov dword [esp + 0x50], 0
mov dword [esp + 0x54], 0
mov dword [esp + 0x58], 0
mov dword [esp + 0x5c], 0
mov eax, dword [esp + 0x74]
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], 0
mov dword [esp + 0x58], 0
mov dword [esp + 0x5c], 0
lea ecx, [0x69c420]
mov dword [esp], ecx
lea ecx, [esp + 0x50]
mov dword [esp + 4], ecx
call fcn.00408750
mov eax, dword [esp + 8]
lea ecx, [0x895bdc]
mov edx, eax
mov eax, dword [esp + 0x78]
jmp 0x591f85
mov dword [esp + 0x60], 0
mov dword [esp + 0x64], 0
mov dword [esp + 0x68], 0
mov dword [esp + 0x6c], 0
mov eax, dword [esp + 0x74]
mov dword [esp + 0x60], eax
mov dword [esp + 0x64], 1
mov dword [esp + 0x68], 0
mov dword [esp + 0x6c], 0
lea ecx, [0x69c3a0]
mov dword [esp], ecx
lea ecx, [esp + 0x60]
mov dword [esp + 4], ecx
call fcn.00408750
mov eax, dword [esp + 8]
lea ecx, [0x895b64]
mov edx, eax
mov eax, dword [esp + 0x78]
jmp 0x591f85
xor ecx, ecx
xor edx, edx
test ecx, ecx
jne 0x5920e7
mov ecx, dword [esp + 0x7c]
test ecx, ecx
je 0x591ff9
mov edx, dword [ecx + 4]
test edx, edx
je 0x591ff9
mov edx, dword [esp + 0x74]
mov dword [esp], edx
mov dword [esp + 4], eax
mov dword [esp + 8], ecx
call fcn.005919e0
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 0x10]
test eax, eax
jne 0x591fc6
mov eax, dword [esp + 0x78]
jmp 0x591ff9
mov dword [esp + 0x80], 0
mov dword [esp + 0x84], 0
mov dword [esp + 0x88], 0
mov dword [esp + 0x8c], ecx
mov dword [esp + 0x90], edx
add esp, 0x70
ret
mov ecx, dword [eax + 0x10]
mov eax, dword [eax + 0xc]
mov dword [esp], ecx
mov dword [esp + 4], eax
call fcn.005916f0
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
mov ebx, dword [esp + 0xc]
mov ebp, dword [esp + 0x10]
mov esi, dword [esp + 8]
test eax, eax
jne 0x5920b4
test ebx, ebx
je 0x59205a
mov dword [esp + 0x4c], esi
mov dword [esp + 0x40], ebp
mov dword [esp + 0x3c], ebx
lea eax, [ebp - 1]
neg eax
sar eax, 0x1f
and eax, 4
add eax, esi
mov dword [esp + 0x48], eax
lea ecx, [ebx - 1]
mov dword [esp + 0x38], ecx
xor edx, edx
jmp 0x59211b
lea eax, [0x687ca0]
mov dword [esp], eax
call fcn.0040af90
mov eax, dword [esp + 4]
mov dword [eax + 4], 0x3d
lea ecx, [0x6cb9b0]
mov dword [eax], ecx
mov dword [esp + 0x80], 0
mov dword [esp + 0x84], 0
mov dword [esp + 0x88], 0
lea ecx, [0x895704]
mov dword [esp + 0x8c], ecx
mov dword [esp + 0x90], eax
add esp, 0x70
ret
mov dword [esp + 0x80], 0
mov dword [esp + 0x84], 0
mov dword [esp + 0x88], 0
mov dword [esp + 0x8c], ecx
mov dword [esp + 0x90], edx
add esp, 0x70
ret
mov dword [esp + 0x80], 0
mov dword [esp + 0x84], 0
mov dword [esp + 0x88], 0
mov dword [esp + 0x8c], ecx
mov dword [esp + 0x90], edx
add esp, 0x70
ret
inc edx
cmp edx, ecx
jge 0x5921eb
mov edi, dword [eax + edx*4]
cmp dword [edi + 0x4c], 3
jne 0x59211a
mov dword [esp + 0x34], edx
mov eax, dword [esi + edx*4]
mov ecx, dword [eax + 0x48]
mov ebx, dword [eax + 0xc]
mov ebp, dword [eax + 0x10]
mov esi, dword [eax + 0x14]
mov edx, dword [eax + 0x3c]
mov dword [esp + 0x44], edx
mov edx, dword [eax + 0x40]
mov eax, dword [eax + 0x44]
mov dword [esp + 0x30], eax
mov eax, dword [edi + 0x50]
mov edi, dword [edi + 0x54]
mov dword [esp], ecx
mov dword [esp + 4], ebx
mov dword [esp + 8], ebp
mov dword [esp + 0xc], esi
mov ecx, dword [esp + 0x44]
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], edx
mov ecx, dword [esp + 0x30]
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], edi
mov byte [esp + 0x24], 1
call fcn.00598b90
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x2c]
test eax, eax
jne 0x5921b8
mov eax, dword [esp + 0x48]
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x34]
mov ebx, dword [esp + 0x3c]
mov ebp, dword [esp + 0x40]
mov esi, dword [esp + 0x4c]
jmp 0x59211a
mov dword [esp + 0x80], 0
mov dword [esp + 0x84], 0
mov dword [esp + 0x88], 0
mov dword [esp + 0x8c], ecx
mov dword [esp + 0x90], edx
add esp, 0x70
ret
mov dword [esp + 0x80], esi
mov dword [esp + 0x84], ebx
mov dword [esp + 0x88], ebp
mov dword [esp + 0x8c], 0
mov dword [esp + 0x90], 0
add esp, 0x70
ret
call fcn.0045e260
jmp fcn.00591e30