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

Disassembly:
sub esp, 0x1a4
mov eax, dword [0x767500]
xor eax, esp
mov dword [esp + 0x1a0], eax
push esi
mov esi, dword [esp + 0x1ac]
cmp dword [esi + 0x58], 2
jge 0x589cad
mov eax, 0xffffff7d
pop esi
mov ecx, dword [esp + 0x1a0]
xor ecx, esp
call fcn.0055d4e2
add esp, 0x1a4
ret
cmp dword [esi + 4], 0
jne 0x589cce
mov eax, 0xffffff76
pop esi
mov ecx, dword [esp + 0x1a0]
xor ecx, esp
call fcn.0055d4e2
add esp, 0x1a4
ret
push ebx
mov ebx, dword [esp + 0x1b8]
test ebx, ebx
push edi
jl 0x589fa9
mov edi, dword [esp + 0x1b8]
jg 0x589cf0
test edi, edi
jb 0x589fa9
cmp ebx, dword [esi + 0x14]
jg 0x589fa9
jl 0x589d04
cmp edi, dword [esi + 0x10]
ja 0x589fa9
mov ecx, dword [esi + 0x5c]
or eax, 0xffffffff
push ebp
mov dword [esi + 0x50], eax
mov dword [esi + 0x54], eax
lea eax, [esi + 0x78]
push ecx
push eax
call fcn.005e8c80
lea edx, [esi + 0x1e0]
push edx
call fcn.005ea0d0
push ebx
push edi
mov eax, esi
call fcn.00588eb0
mov eax, dword [esi + 0x5c]
push eax
lea ecx, [esp + 0x60]
xor edi, edi
push ecx
mov dword [esp + 0x30], edi
mov dword [esp + 0x2c], edi
call fcn.005e8450
lea edx, [esp + 0x64]
push edx
call fcn.005e8c30
mov ebp, dword [esp + 0x30]
add esp, 0x20
lea esp, [esp]
mov ebx, 3
cmp dword [esi + 0x58], ebx
jl 0x589e0f
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x4c]
push ecx
call fcn.005e8db0
add esp, 8
test eax, eax
jle 0x589e0f
mov edx, dword [esi + 0x60]
mov eax, dword [esi + 0x48]
shl edx, 5
add eax, edx
cmp dword [eax + 0x1c], 0
je 0x589e01
lea ecx, [esp + 0x28]
push ecx
push eax
call fcn.005e98c0
mov ebx, eax
add esp, 8
test ebx, ebx
jge 0x589dbf
lea eax, [esi + 0x78]
push 0
push eax
call fcn.005e8db0
add esp, 8
xor ebx, ebx
jmp 0x589de1
test ebp, ebp
je 0x589dd3
lea eax, [esi + 0x78]
push 0
push eax
call fcn.005e8db0
add esp, 8
jmp 0x589de1
test edi, edi
je 0x589de1
lea edx, [ebx + edi]
sar edx, 2
add dword [esp + 0x10], edx
mov edi, dword [esp + 0x38]
mov ecx, dword [esp + 0x3c]
mov eax, edi
and eax, ecx
cmp eax, 0xffffffff
jne 0x589ef0
mov dword [esp + 0x14], ebx
mov edi, ebx
jmp 0x589d60
lea eax, [esi + 0x78]
push 0
push eax
call fcn.005e8db0
add esp, 8
test edi, edi
jne 0x589f87
push 0xffffffffffffffff
lea ecx, [esp + 0x1c]
push 0xffffffffffffffff
push ecx
call fcn.00588ef0
add esp, 0xc
test edx, edx
jl 0x589f39
jg 0x589e3a
test eax, eax
jb 0x589f39
cmp dword [esi + 0x58], ebx
jl 0x589e68
lea edx, [esp + 0x18]
push edx
call fcn.005e83f0
add esp, 4
cmp dword [esi + 0x5c], eax
je 0x589e63
call fcn.00589780
lea eax, [esp + 0x48]
push eax
call fcn.005e84c0
add esp, 4
cmp dword [esi + 0x58], ebx
jge 0x589ebf
lea ecx, [esp + 0x18]
push ecx
call fcn.005e83f0
mov edi, dword [esi + 0x34]
add esp, 4
xor ecx, ecx
test edi, edi
mov dword [esi + 0x5c], eax
jle 0x589e92
mov edx, dword [esi + 0x40]
cmp dword [edx], eax
je 0x589e92
add ecx, 1
add edx, 4
cmp ecx, edi
jl 0x589e84
cmp ecx, edi
je 0x589f49
push eax
lea eax, [esi + 0x78]
push eax
mov dword [esi + 0x60], ecx
call fcn.005e8c80
mov edx, dword [esi + 0x5c]
push edx
lea eax, [esp + 0x54]
push eax
call fcn.005e8c80
mov edi, dword [esp + 0x24]
add esp, 0x10
mov dword [esi + 0x58], ebx
lea ecx, [esp + 0x18]
push ecx
lea eax, [esi + 0x78]
push eax
call fcn.005e8980
lea edx, [esp + 0x20]
push edx
lea eax, [esp + 0x54]
push eax
call fcn.005e8980
lea ecx, [esp + 0x28]
push ecx
call fcn.005e8350
add esp, 0x14
mov ebp, eax
jmp 0x589d60
mov ebx, dword [esi + 0x60]
mov edx, dword [esi + 0x44]
mov eax, ebx
shl eax, 4
sub edi, dword [eax + edx]
sbb ecx, dword [eax + edx + 4]
test ecx, ecx
jg 0x589f10
jl 0x589f0c
test edi, edi
jae 0x589f10
xor edi, edi
xor ecx, ecx
test ebx, ebx
jle 0x589f28
lea eax, [edx + 8]
mov edx, dword [eax]
add edi, edx
mov edx, dword [eax + 4]
adc ecx, edx
add eax, 0x10
sub ebx, 1
jne 0x589f17
mov eax, dword [esp + 0x10]
cdq
sub edi, eax
sbb ecx, edx
mov dword [esi + 0x50], edi
mov dword [esi + 0x54], ecx
jmp 0x589f90
push 0xffffffffffffffff
push esi
call fcn.00589b80
add esp, 8
mov dword [esi + 0x54], edx
jmp 0x589f8d
lea eax, [esp + 0x48]
push eax
mov dword [esi + 0x50], 0xffffffff
mov dword [esi + 0x54], 0xffffffff
call fcn.005e84c0
add esp, 4
call fcn.00589780
mov eax, 0xffffff77
pop ebp
pop edi
pop ebx
pop esi
mov ecx, dword [esp + 0x1a0]
xor ecx, esp
call fcn.0055d4e2
add esp, 0x1a4
ret
or eax, 0xffffffff
mov dword [esi + 0x54], eax
mov dword [esi + 0x50], eax
lea ecx, [esp + 0x48]
push ecx
call fcn.005e84c0
fldz
fst qword [esi + 0x68]
add esp, 4
fstp qword [esi + 0x70]
xor eax, eax
jmp 0x589f6e
mov ecx, dword [esp + 0x1ac]
pop edi
pop ebx
pop esi
xor ecx, esp
mov eax, 0xffffff7d
call fcn.0055d4e2
add esp, 0x1a4
ret