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

Disassembly:
sub esp, 0x38
mov eax, dword [esp + 0x3c]
push ebx
push ebp
mov ebp, dword [esp + 0x48]
mov eax, dword [eax]
push esi
mov esi, ecx
mov dword [esp + 0x1c], eax
mov ebp, dword [ebp]
mov dword [esp + 0x14], esi
push edi
cmp ebp, 1
jb 0x59883a
mov ecx, dword [esi + 0x2c]
dec ebp
mov edi, dword [esi + 0x20]
mov ebx, dword [esi + 0x30]
mov dword [esp + 0x14], ecx
mov cl, byte [eax]
inc eax
mov byte [esp + 0x13], cl
mov dword [esp + 0x20], eax
mov dword [esp + 0x28], ebp
cmp edi, 5
jl 0x597fe5
movzx eax, cl
and eax, 4
mov dword [esp + 0x24], eax
jmp 0x597fed
mov dword [esp + 0x24], 0
movzx eax, cl
xor edx, edx
cmp edi, 5
mov dword [esp + 0x30], eax
mov ecx, eax
mov eax, dword [esp + 0x60]
setl dl
shr ecx, 2
add edx, 0xe
sar eax, 3
and ecx, edx
and eax, edx
cmp ecx, eax
jne 0x59883a
mov edx, dword [esp + 0x24]
mov edi, dword [esp + 0x68]
test edx, edx
je 0x59802b
test edi, edi
je 0x59883a
mov al, byte [esp + 0x13]
mov ecx, dword [esp + 0x30]
and al, 3
shr ecx, 6
mov byte [esp + 0x13], al
cmp al, 2
jne 0x59814f
mov ecx, dword [esp + 0x58]
mov edx, dword [esp + 0x5c]
cmp ecx, edx
jge 0x59881a
mov eax, dword [esp + 0x14]
mov esi, dword [esp + 0x60]
imul eax, ecx
mov ebp, dword [esp + 0x64]
add esi, eax
mov eax, ebx
imul eax, dword [esp + 0x14]
mov dword [esp + 0x6c], esi
mov dword [esp + 0x68], eax
mov eax, esi
imul eax, ebx
add eax, dword [esp + 0x54]
add eax, edi
mov edi, dword [esp + 0x14]
sub edx, ecx
mov dword [esp + 0x5c], eax
mov dword [esp + 0x58], edx
mov ecx, edx
mov edx, dword [esp + 0x68]
nop dword [eax]
nop word [eax + eax]
mov eax, dword [esp + 0x5c]
cmp dword [esp + 0x60], ebp
jge 0x59812d
mov edi, ebp
mov ebp, eax
sub edi, dword [esp + 0x60]
cmp dword [esp + 0x24], 0
je 0x5980f0
nop dword [eax]
mov eax, dword [esp + 0x18]
mov ecx, esi
and ecx, 7
mov edx, 0x80
sar edx, cl
mov ecx, esi
sar ecx, 3
mov eax, dword [eax + 0x14]
test byte [ecx + eax], dl
jbe 0x5980e3
mov al, byte [ebp - 1]
mov byte [ebp], al
inc esi
add ebp, ebx
sub edi, 1
jne 0x5980c0
jmp 0x598119
mov eax, dword [esp + 0x18]
mov ecx, esi
and ecx, 7
mov edx, 0x80
sar edx, cl
mov ecx, esi
sar ecx, 3
mov eax, dword [eax + 0x14]
test byte [ecx + eax], dl
jbe 0x598111
mov byte [ebp], 0
inc esi
add ebp, ebx
sub edi, 1
jne 0x5980f0
mov edi, dword [esp + 0x14]
mov ebp, dword [esp + 0x64]
mov edx, dword [esp + 0x68]
mov ecx, dword [esp + 0x58]
mov eax, dword [esp + 0x5c]
mov esi, dword [esp + 0x6c]
add eax, edx
add esi, edi
mov dword [esp + 0x5c], eax
sub ecx, 1
mov dword [esp + 0x6c], esi
mov dword [esp + 0x58], ecx
jne 0x5980a0
jmp 0x59881a
test al, al
jne 0x598254
test edx, edx
jne 0x59883a
mov eax, dword [esp + 0x20]
mov ebp, dword [esp + 0x58]
mov dword [esp + 0x6c], eax
xor eax, eax
mov dword [esp + 0x68], eax
mov dword [esp + 0x2c], ebp
cmp ebp, dword [esp + 0x5c]
jge 0x59824b
mov ecx, dword [esp + 0x14]
mov edx, ebx
imul edx, dword [esp + 0x14]
imul ecx, ebp
mov dword [esp + 0x30], edx
mov dword [esp + 0x58], ecx
add ecx, dword [esp + 0x60]
mov edx, ecx
mov dword [esp + 0x24], ecx
imul edx, ebx
add edx, dword [esp + 0x54]
add edx, edi
mov edi, dword [esp + 0x60]
mov dword [esp + 0x54], edx
mov esi, ecx
cmp edi, dword [esp + 0x64]
jge 0x598226
mov edi, ecx
mov ebp, edx
sub edi, dword [esp + 0x58]
mov eax, dword [esp + 0x18]
mov ecx, esi
and ecx, 7
mov edx, 0x80
sar edx, cl
mov ecx, esi
sar ecx, 3
mov eax, dword [eax + 0x14]
test byte [ecx + eax], dl
jbe 0x598208
mov edx, dword [esp + 0x28]
cmp edx, 1
jb 0x59883a
mov ecx, dword [esp + 0x6c]
dec edx
mov al, byte [ecx]
inc ecx
mov byte [ebp], al
mov eax, dword [esp + 0x68]
inc eax
mov dword [esp + 0x6c], ecx
mov dword [esp + 0x28], edx
mov dword [esp + 0x68], eax
jmp 0x59820c
mov eax, dword [esp + 0x68]
inc edi
inc esi
add ebp, ebx
cmp edi, dword [esp + 0x64]
jl 0x5981c0
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x54]
mov ebp, dword [esp + 0x2c]
mov edi, dword [esp + 0x60]
mov esi, dword [esp + 0x14]
inc ebp
add edx, dword [esp + 0x30]
add ecx, esi
add dword [esp + 0x58], esi
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x24], ecx
mov dword [esp + 0x54], edx
cmp ebp, dword [esp + 0x5c]
jl 0x5981b0
add dword [esp + 0x20], eax
jmp 0x59881a
test edx, edx
je 0x598263
cmp dword [esi + 0x48], 6
mov eax, 4
jl 0x598266
mov eax, dword [esi + 0x48]
push ecx
push eax
call fcn.005bb2f0
add esp, 8
mov dword [esp + 0x30], eax
cmp eax, 8
je 0x59883a
push eax
call fcn.005bb2a0
add esp, 4
mov dword [esp + 0x2c], eax
cmp ebp, eax
jb 0x59883a
push dword [esp + 0x30]
lea eax, [esp + 0x24]
push eax
call fcn.005bbe00
sub ebp, dword [esp + 0x34]
add esp, 8
mov edx, dword [esi + 0x20]
mov dword [esp + 0x28], ebp
fstp qword [esp + 0x40]
cmp edx, 4
jl 0x5982c9
cmp ebx, 1
jle 0x5982c9
mov eax, dword [esi + 0xb4]
movsd xmm0, qword [eax + edi*8]
jmp 0x5982ce
movsd xmm0, qword [esi + 0x60]
cmp byte [esp + 0x13], 3
movsd qword [esp + 0x38], xmm0
jne 0x59840b
mov ecx, dword [esp + 0x58]
mov ebp, dword [esp + 0x5c]
cmp ecx, ebp
jge 0x59881a
mov esi, dword [esp + 0x14]
mov edx, ebx
imul edx, dword [esp + 0x14]
movsd xmm2, qword [esp + 0x40]
imul esi, ecx
mov dword [esp + 0x5c], edx
mov eax, edx
add esi, dword [esp + 0x60]
mov edx, esi
mov dword [esp + 0x68], esi
imul edx, ebx
add edx, dword [esp + 0x54]
add edx, edi
sub ebp, ecx
mov dword [esp + 0x54], edx
mov ecx, ebp
mov dword [esp + 0x58], ebp
nop dword [eax + eax]
cmp dword [esp + 0x24], 0
mov ebp, dword [esp + 0x64]
jne 0x59837d
mov eax, dword [esp + 0x60]
cmp eax, ebp
jge 0x5983dd
mov edi, edx
sub ebp, eax
nop dword [eax + eax]
mov eax, dword [esp + 0x18]
mov ecx, esi
and ecx, 7
mov edx, 0x80
sar edx, cl
mov ecx, esi
sar ecx, 3
mov eax, dword [eax + 0x14]
test byte [ecx + eax], dl
jbe 0x598373
cvttsd2si eax, xmm2
mov byte [edi], al
inc esi
add edi, ebx
sub ebp, 1
jne 0x598350
jmp 0x5983d5
cmp dword [esp + 0x60], ebp
jge 0x5983e1
sub ebp, dword [esp + 0x60]
mov edi, edx
nop dword [eax]
mov eax, dword [esp + 0x18]
mov ecx, esi
and ecx, 7
mov edx, 0x80
sar edx, cl
mov ecx, esi
sar ecx, 3
mov eax, dword [eax + 0x14]
test byte [ecx + eax], dl
jbe 0x5983c7
movzx eax, byte [edi - 1]
movd xmm1, eax
cvtdq2pd xmm1, xmm1
addsd xmm1, xmm2
minsd xmm0, xmm1
cvttsd2si eax, xmm0
mov byte [edi], al
movsd xmm0, qword [esp + 0x38]
inc esi
add edi, ebx
sub ebp, 1
jne 0x598390
mov ecx, dword [esp + 0x58]
mov edx, dword [esp + 0x54]
mov eax, dword [esp + 0x5c]
mov esi, dword [esp + 0x68]
add edx, eax
add esi, dword [esp + 0x14]
sub ecx, 1
movsd xmm0, qword [esp + 0x38]
mov dword [esp + 0x68], esi
mov dword [esp + 0x54], edx
mov dword [esp + 0x58], ecx
jne 0x598330
jmp 0x59881a
mov eax, dword [esp + 0x58]
mov ecx, dword [esp + 0x5c]
mov ebp, dword [esp + 0x6c]
sub ecx, eax
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x64]
sub eax, dword [esp + 0x60]
mov dword [esp + 0x2c], eax
imul eax, ecx
push edx
mov dword [esp + 0x20], ecx
lea ecx, [esi + 0x78]
push eax
mov dword [esp + 0x3c], eax
lea eax, [esp + 0x30]
push ebp
push eax
lea eax, [esp + 0x30]
push eax
call fcn.005bf220
test al, al
je 0x59883a
mov eax, dword [ebp + 4]
mov edi, dword [ebp]
sub eax, edi
movsd xmm3, qword [esi + 0x50]
mov ecx, dword [esp + 0x58]
addsd xmm3, xmm3
sar eax, 2
cmp eax, dword [esp + 0x34]
jne 0x598579
cmp ecx, dword [esp + 0x5c]
jge 0x59881a
mov edx, dword [esp + 0x14]
mov esi, ebx
movsd xmm2, qword [esp + 0x40]
movsd xmm4, qword [esp + 0x38]
mov eax, dword [esp + 0x1c]
mov ebp, dword [esp + 0x2c]
imul esi, edx
imul edx, ecx
mov ecx, dword [esp + 0x60]
add edx, ecx
imul edx, ebx
add edx, dword [esp + 0x54]
add edx, dword [esp + 0x68]
mov dword [esp + 0x14], edx
cmp dword [esp + 0x24], 0
jne 0x5984fe
cmp ecx, dword [esp + 0x64]
jge 0x598561
mov ecx, edx
mov edx, ebp
mov eax, dword [edi]
movaps xmm0, xmm4
add edi, 4
movd xmm1, eax
cvtdq2pd xmm1, xmm1
shr eax, 0x1f
addsd xmm1, qword [eax*8 + 0x8b6930]
mulsd xmm1, xmm3
addsd xmm1, xmm2
minsd xmm0, xmm1
cvttsd2si eax, xmm0
mov byte [ecx], al
add ecx, ebx
sub edx, 1
jne 0x5984c7
jmp 0x598555
cmp ecx, dword [esp + 0x64]
jge 0x598561
mov ecx, edx
mov edx, ebp
nop dword [eax + eax]
mov eax, dword [edi]
add edi, 4
movd xmm1, eax
cvtdq2pd xmm1, xmm1
shr eax, 0x1f
addsd xmm1, qword [eax*8 + 0x8b6930]
movzx eax, byte [ecx - 1]
mulsd xmm1, xmm3
movd xmm0, eax
cvtdq2pd xmm0, xmm0
addsd xmm1, xmm2
addsd xmm1, xmm0
movaps xmm0, xmm4
minsd xmm0, xmm1
cvttsd2si eax, xmm0
mov byte [ecx], al
add ecx, ebx
sub edx, 1
jne 0x598510
mov ecx, dword [esp + 0x60]
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x1c]
add edx, esi
sub eax, 1
mov dword [esp + 0x14], edx
mov dword [esp + 0x1c], eax
jne 0x5984b2
jmp 0x59881a
mov eax, esi
cmp dword [eax + 0x20], 2
jle 0x5986fb
cmp ecx, dword [esp + 0x5c]
jge 0x59881a
mov esi, dword [esp + 0x14]
mov eax, ebx
imul eax, dword [esp + 0x14]
movsd xmm2, qword [esp + 0x40]
movsd xmm4, qword [esp + 0x38]
mov ebp, dword [esp + 0x14]
imul esi, ecx
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x58], eax
mov edx, eax
add esi, dword [esp + 0x60]
mov eax, esi
mov dword [esp + 0x6c], esi
imul eax, ebx
add eax, dword [esp + 0x54]
add eax, dword [esp + 0x68]
mov dword [esp + 0x5c], eax
cmp dword [esp + 0x24], 0
mov eax, dword [esp + 0x60]
jne 0x59864b
cmp eax, dword [esp + 0x64]
mov eax, dword [esp + 0x5c]
jge 0x5986d9
mov ebp, eax
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x54], eax
mov eax, dword [esp + 0x18]
mov ecx, esi
and ecx, 7
mov edx, 0x80
sar edx, cl
mov ecx, esi
sar ecx, 3
mov eax, dword [eax + 0x14]
test byte [ecx + eax], dl
jbe 0x59863f
mov eax, dword [edi]
movaps xmm0, xmm4
movd xmm1, eax
cvtdq2pd xmm1, xmm1
shr eax, 0x1f
add edi, 4
addsd xmm1, qword [eax*8 + 0x8b6930]
mulsd xmm1, xmm3
addsd xmm1, xmm2
minsd xmm0, xmm1
cvttsd2si eax, xmm0
mov byte [ebp], al
inc esi
add ebp, ebx
sub dword [esp + 0x54], 1
jne 0x5985f3
jmp 0x5986c9
cmp eax, dword [esp + 0x64]
mov eax, dword [esp + 0x5c]
jge 0x5986d9
mov ebp, eax
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x54], eax
mov eax, dword [esp + 0x18]
mov ecx, esi
and ecx, 7
mov edx, 0x80
sar edx, cl
mov ecx, esi
sar ecx, 3
mov eax, dword [eax + 0x14]
test byte [ecx + eax], dl
jbe 0x5986bf
mov eax, dword [edi]
movd xmm1, eax
cvtdq2pd xmm1, xmm1
shr eax, 0x1f
add edi, 4
addsd xmm1, qword [eax*8 + 0x8b6930]
movzx eax, byte [ebp - 1]
mulsd xmm1, xmm3
movd xmm0, eax
cvtdq2pd xmm0, xmm0
addsd xmm1, xmm2
addsd xmm1, xmm0
movaps xmm0, xmm4
minsd xmm0, xmm1
cvttsd2si eax, xmm0
mov byte [ebp], al
inc esi
add ebp, ebx
sub dword [esp + 0x54], 1
jne 0x598663
mov ebp, dword [esp + 0x14]
mov edx, dword [esp + 0x58]
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x5c]
mov esi, dword [esp + 0x6c]
add eax, edx
add esi, ebp
mov dword [esp + 0x5c], eax
sub ecx, 1
mov dword [esp + 0x6c], esi
mov dword [esp + 0x1c], ecx
jne 0x5985d0
jmp 0x59881a
mov dword [esp + 0x2c], 0
cmp ecx, dword [esp + 0x5c]
jge 0x59881a
mov edi, dword [esp + 0x14]
mov ebp, ebx
imul ebp, dword [esp + 0x14]
mov edx, dword [esp + 0x60]
movsd xmm2, qword [esp + 0x40]
movsd xmm4, qword [esp + 0x38]
imul edi, ecx
mov dword [esp + 0x34], ebp
add edx, edi
mov dword [esp + 0x58], edi
mov ebp, edx
mov dword [esp + 0x24], edx
imul ebp, ebx
add ebp, dword [esp + 0x54]
add ebp, dword [esp + 0x68]
mov dword [esp + 0x54], ebp
nop word [eax + eax]
mov eax, dword [esp + 0x60]
mov esi, edx
cmp eax, dword [esp + 0x64]
mov eax, dword [esp + 0x18]
jge 0x5987f3
mov edi, edx
sub edi, dword [esp + 0x58]
nop word [eax + eax]
mov eax, dword [eax + 0x14]
mov ecx, esi
and ecx, 7
mov edx, 0x80
sar edx, cl
mov ecx, esi
sar ecx, 3
test byte [ecx + eax], dl
jbe 0x5987d5
mov eax, dword [esp + 0x6c]
mov edx, dword [esp + 0x2c]
mov ecx, dword [eax]
mov eax, dword [eax + 4]
sub eax, ecx
sar eax, 2
cmp edx, eax
je 0x59883a
mov eax, dword [ecx + edx*4]
movaps xmm0, xmm4
movd xmm1, eax
cvtdq2pd xmm1, xmm1
shr eax, 0x1f
inc edx
mov dword [esp + 0x2c], edx
addsd xmm1, qword [eax*8 + 0x8b6930]
mulsd xmm1, xmm3
addsd xmm1, xmm2
minsd xmm0, xmm1
cvttsd2si eax, xmm0
mov byte [ebp], al
mov eax, dword [esp + 0x18]
inc edi
inc esi
add ebp, ebx
cmp edi, dword [esp + 0x64]
jl 0x598770
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x24]
mov ebp, dword [esp + 0x54]
mov edi, dword [esp + 0x58]
add edi, dword [esp + 0x14]
inc ecx
add edx, dword [esp + 0x14]
add ebp, dword [esp + 0x34]
mov dword [esp + 0x30], ecx
mov dword [esp + 0x58], edi
mov dword [esp + 0x24], edx
mov dword [esp + 0x54], ebp
cmp ecx, dword [esp + 0x5c]
jl 0x598750
mov ecx, dword [esp + 0x4c]
mov eax, dword [esp + 0x20]
pop edi
pop esi
mov dword [ecx], eax
mov ecx, dword [esp + 0x48]
mov eax, dword [esp + 0x20]
pop ebp
pop ebx
mov dword [ecx], eax
mov al, 1
add esp, 0x38
ret 0x24
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x38
ret 0x24