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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x64
push ebx
push esi
mov esi, ecx
mov dword [esp + 0x58], 0
push edi
mov dword [esp + 0x54], esi
cmp dword [esi + 0x1c], 0
mov eax, dword [esi + 8]
mov ecx, dword [esi + 4]
mov edx, dword [esi + 0xc]
mov ebx, dword [esi + 0x10]
mov dword [esp + 0x44], eax
mov eax, dword [esi + 0x14]
mov dword [esp + 0x40], ecx
mov dword [esp + 0x28], edx
mov dword [esp + 0x48], ebx
mov dword [esp + 0x4c], eax
jle 0x5977e9
xor edi, edi
mov dword [esp + 0x58], edi
cmp dword [esi + 0x18], edi
jle 0x597799
mov ecx, ebx
mov ebx, dword [esp + 0x44]
sub ebx, eax
mov dword [esp + 0x38], ecx
sub eax, dword [esp + 0x48]
mov dword [esp + 0x68], ebx
mov dword [esp + 0x6c], eax
nop
add eax, ecx
mov bl, byte [eax + ebx]
test bl, bl
je 0x597772
cmp dword [esp + 0x4c], 0
mov dword [esp + 0x2c], 0xff
je 0x5971db
movzx eax, byte [eax]
mov dword [esp + 0x2c], eax
test eax, eax
je 0x597772
mov ecx, dword [esi + 0x30]
movzx eax, bl
imul eax, ecx
cdq
and edx, 0xff
lea ebx, [edx + eax]
sar ebx, 8
cmp dword [esi + 0x74], 0
mov dword [esp + 0x18], ebx
je 0x597247
mov eax, dword [esp + 0x2c]
cmp dword [esi + 0x78], eax
ja 0x597243
cmp dword [esi + 0x54], 2
jne 0x59725c
cmp dword [esi + 0x70], 0
mov eax, dword [esi + 0x68]
je 0x59722b
imul ecx, ebx
shr ecx, 8
cmp ecx, eax
sbb ebx, ebx
and ebx, 0xffffff01
add ebx, 0xff
jmp 0x597258
cmp ebx, eax
sbb ebx, ebx
and ebx, 0xffffff01
add ebx, 0xff
imul ebx, ecx
shr ebx, 8
jmp 0x597258
xor ebx, ebx
jmp 0x597258
imul ebx, dword [esp + 0x2c]
mov eax, 0x80808081
mul ebx
mov ebx, edx
shr ebx, 7
mov dword [esp + 0x18], ebx
cmp dword [esi + 0x6c], 0
je 0x597277
cmp ebx, dword [esi + 0x68]
sbb ebx, ebx
and ebx, 0xffffff01
add ebx, 0xff
mov dword [esp + 0x18], ebx
lea eax, [esp + 0x34]
mov ecx, esi
push eax
lea eax, [esp + 0x34]
push eax
lea eax, [esp + 0x44]
push eax
mov eax, dword [esi + 0xa4]
imul eax, edi
push eax
push dword [esp + 0x50]
call fcn.00589cd0
mov ecx, dword [esp + 0x38]
mov al, byte [ecx]
mov byte [esp + 0xf], al
test al, al
je 0x59774c
mov ecx, dword [esp + 0x28]
movzx eax, byte [ecx + edi*4 + 1]
movzx edx, byte [ecx + edi*4 + 2]
mov dword [esp + 0x2c], eax
movzx eax, byte [ecx + edi*4]
mov edi, dword [esp + 0x3c]
mov dword [esp + 0x20], edx
mov dword [esp + 0x24], eax
cmp edi, 0x80
jae 0x597309
lea eax, [edi + edi]
mov ecx, 0xff
sub ecx, eax
mov eax, 0xff
sub eax, edx
imul ecx, eax
mov eax, 0x81018203
imul ecx, edx
add ecx, 0x7f00
mul ecx
mov eax, dword [esp + 0x20]
shr edx, 0xf
sub eax, edx
jmp 0x5973b1
cmp edx, 0x40
jae 0x597343
mov ecx, edx
lea eax, [edi*2 - 0xff]
shl ecx, 4
sub ecx, 0xbf4
imul ecx, edx
add ecx, 0x2fa03
imul ecx, eax
mov eax, 0x103060a1
imul ecx, edx
add ecx, 0x7e817f
mul ecx
mov eax, edx
shr eax, 0x14
jmp 0x5973ad
movd xmm0, edx
mov eax, edx
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
xorps xmm1, xmm1
addsd xmm0, qword [eax*8 + 0x661aa0]
mulsd xmm0, qword [0x669e58]
ucomisd xmm1, xmm0
movsd qword [esp + 0x60], xmm0
ja 0x597376
sqrtsd xmm0, xmm0
jmp 0x59737b
call sub.api_ms_win_crt_math_l1_1_0.dll__libm_sse2_sqrt_precise
subsd xmm0, qword [esp + 0x60]
lea eax, [edi*2 - 0xff]
movd xmm1, eax
cvtdq2pd xmm1, xmm1
shr eax, 0x1f
addsd xmm1, qword [eax*8 + 0x661aa0]
mulsd xmm0, xmm1
addsd xmm0, qword [0x662238]
call fcn.005a5445
add eax, dword [esp + 0x20]
mov edi, dword [esp + 0x2c]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x30]
cmp eax, 0x80
jae 0x5973f3
add eax, eax
mov ecx, 0xff
sub ecx, eax
mov eax, 0xff
sub eax, edi
imul ecx, eax
mov eax, 0x81018203
imul ecx, edi
add ecx, 0x7f00
mul ecx
mov eax, edi
shr edx, 0xf
sub eax, edx
jmp 0x59749d
cmp edi, 0x40
jae 0x59742d
mov ecx, edi
lea eax, [eax*2 - 0xff]
shl ecx, 4
sub ecx, 0xbf4
imul ecx, edi
add ecx, 0x2fa03
imul ecx, eax
mov eax, 0x103060a1
imul ecx, edi
add ecx, 0x7e817f
mul ecx
mov eax, edx
shr eax, 0x14
jmp 0x59749b
movd xmm0, edi
mov eax, edi
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
xorps xmm1, xmm1
addsd xmm0, qword [eax*8 + 0x661aa0]
mulsd xmm0, qword [0x669e58]
ucomisd xmm1, xmm0
movsd qword [esp + 0x60], xmm0
ja 0x597460
sqrtsd xmm0, xmm0
jmp 0x597465
call sub.api_ms_win_crt_math_l1_1_0.dll__libm_sse2_sqrt_precise
mov eax, dword [esp + 0x30]
subsd xmm0, qword [esp + 0x60]
lea eax, [eax*2 - 0xff]
movd xmm1, eax
cvtdq2pd xmm1, xmm1
shr eax, 0x1f
addsd xmm1, qword [eax*8 + 0x661aa0]
mulsd xmm0, xmm1
addsd xmm0, qword [0x662238]
call fcn.005a5445
add eax, edi
mov edi, dword [esp + 0x24]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x34]
cmp eax, 0x80
jae 0x5974e1
add eax, eax
mov ecx, 0xff
sub ecx, eax
mov eax, 0xff
sub eax, edi
imul ecx, eax
mov eax, 0x81018203
imul ecx, edi
add ecx, 0x7f00
mul ecx
shr edx, 0xf
sub edi, edx
mov dword [esp + 0x1c], edi
jmp 0x59759b
cmp edi, 0x40
jae 0x597523
mov ecx, edi
lea eax, [eax*2 - 0xff]
shl ecx, 4
sub ecx, 0xbf4
imul ecx, edi
add ecx, 0x2fa03
imul ecx, eax
mov eax, 0x103060a1
imul ecx, edi
add ecx, 0x7e817f
mul ecx
mov eax, edx
shr eax, 0x14
add eax, edi
mov dword [esp + 0x1c], eax
mov edi, eax
jmp 0x59759b
movd xmm0, edi
mov eax, edi
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
xorps xmm1, xmm1
addsd xmm0, qword [eax*8 + 0x661aa0]
mulsd xmm0, qword [0x669e58]
ucomisd xmm1, xmm0
movsd qword [esp + 0x60], xmm0
ja 0x597556
sqrtsd xmm0, xmm0
jmp 0x59755b
call sub.api_ms_win_crt_math_l1_1_0.dll__libm_sse2_sqrt_precise
mov eax, dword [esp + 0x34]
subsd xmm0, qword [esp + 0x60]
lea eax, [eax*2 - 0xff]
movd xmm1, eax
cvtdq2pd xmm1, xmm1
shr eax, 0x1f
addsd xmm1, qword [eax*8 + 0x661aa0]
mulsd xmm0, xmm1
addsd xmm0, qword [0x662238]
call fcn.005a5445
mov edi, eax
add edi, dword [esp + 0x24]
mov dword [esp + 0x1c], edi
mov al, byte [esp + 0xf]
cmp al, 0xff
jae 0x5976c1
cmp dword [esi + 0x34], 0
je 0x5976c1
movzx eax, al
mov ecx, 0xff
mov dword [esp + 0x50], eax
sub ecx, ebx
imul ecx, eax
mov esi, 0x8000
imul eax, ebx, 0xff
add eax, 0x7f
add ecx, eax
mov eax, 0x80808081
mul ecx
mov eax, ebx
shl eax, 0xf
mov ecx, edx
shr ecx, 7
xor edx, edx
div ecx
mov dword [esp + 0x60], ecx
mov edi, eax
sub esi, edi
mov ecx, edi
imul ecx, dword [esp + 0x10]
mov eax, esi
imul eax, dword [esp + 0x2c]
mov ebx, esi
imul esi, dword [esp + 0x24]
mov edx, edi
imul edx, dword [esp + 0x14]
imul edi, dword [esp + 0x1c]
imul ebx, dword [esp + 0x20]
add ecx, 0x4000
add eax, ecx
shr eax, 0xf
mov dword [esp + 0x2c], eax
add edx, 0x4000
lea eax, [esi + 0x4000]
add ebx, edx
add eax, edi
shr ebx, 0xf
shr eax, 0xf
xor edx, edx
mov dword [esp + 0x24], eax
mov esi, 0x8000
mov eax, dword [esp + 0x50]
shl eax, 0xf
div dword [esp + 0x60]
mov edi, eax
sub esi, edi
mov edx, edi
imul edx, ebx
mov eax, esi
imul eax, dword [esp + 0x3c]
mov ecx, edi
imul ecx, dword [esp + 0x2c]
imul edi, dword [esp + 0x24]
add eax, 0x4000
add eax, edx
add ecx, 0x4000
shr eax, 0xf
mov edx, 0xff
mov dword [esp + 0x14], eax
mov eax, esi
imul esi, dword [esp + 0x34]
imul eax, dword [esp + 0x30]
add eax, ecx
mov ecx, dword [esp + 0x18]
add ecx, dword [esp + 0x50]
lea ebx, [esi + 0x4000]
shr eax, 0xf
mov esi, dword [esp + 0x54]
add ebx, edi
mov dword [esp + 0x10], eax
shr ebx, 0xf
cmp ecx, edx
movzx eax, cl
cmovb edx, eax
mov eax, dword [esp + 0x38]
mov byte [eax], dl
jmp 0x59772b
cmp ebx, 0xff
jae 0x597727
imul esi, ebx, 0x101
mov edx, 0x8000
inc esi
shr esi, 1
sub edx, esi
mov ecx, esi
imul ecx, dword [esp + 0x14]
mov eax, edx
imul eax, dword [esp + 0x20]
add ecx, 0x4000
add eax, ecx
mov ecx, esi
imul ecx, dword [esp + 0x10]
shr eax, 0xf
mov dword [esp + 0x14], eax
mov eax, edx
imul eax, dword [esp + 0x2c]
imul edx, dword [esp + 0x24]
imul esi, edi
add eax, 0x4000
add eax, ecx
shr eax, 0xf
lea ebx, [esi + 0x4000]
mov esi, dword [esp + 0x54]
add ebx, edx
shr ebx, 0xf
jmp 0x59772f
mov ebx, dword [esp + 0x1c]
mov eax, dword [esp + 0x10]
mov edi, dword [esp + 0x58]
mov edx, dword [esp + 0x28]
mov ecx, dword [esp + 0x14]
mov byte [edx + edi*4 + 2], cl
mov ecx, dword [esp + 0x38]
mov byte [edx + edi*4 + 1], al
mov byte [edx + edi*4], bl
jmp 0x597772
cmp dword [esi + 0x34], 0
mov edx, dword [esp + 0x28]
je 0x597772
movzx eax, byte [esp + 0x3c]
mov byte [edx + edi*4 + 2], al
movzx eax, byte [esp + 0x30]
mov byte [edx + edi*4 + 1], al
movzx eax, byte [esp + 0x34]
mov byte [edx + edi*4], al
mov byte [ecx], bl
mov ebx, dword [esp + 0x68]
inc edi
mov eax, dword [esp + 0x6c]
inc ecx
mov dword [esp + 0x58], edi
mov dword [esp + 0x38], ecx
cmp edi, dword [esi + 0x18]
jl 0x5971b0
mov eax, dword [esp + 0x4c]
mov ecx, dword [esp + 0x40]
mov ebx, dword [esp + 0x48]
test ecx, ecx
je 0x5977a7
add ecx, dword [esi + 0x90]
mov dword [esp + 0x40], ecx
mov edi, dword [esp + 0x44]
add edi, dword [esi + 0x94]
add edx, dword [esi + 0x98]
add ebx, dword [esi + 0x9c]
mov dword [esp + 0x44], edi
mov dword [esp + 0x28], edx
mov dword [esp + 0x48], ebx
test eax, eax
je 0x5977d7
add eax, dword [esi + 0xa0]
mov dword [esp + 0x4c], eax
mov edi, dword [esp + 0x5c]
inc edi
mov dword [esp + 0x5c], edi
cmp edi, dword [esi + 0x1c]
jl 0x597187
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret