Function at 0x5976d0
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 0x597f7a
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 0x597725
movzx eax, cl
and eax, 4
mov dword [esp + 0x24], eax
jmp 0x59772d
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 0x597f7a
mov edx, dword [esp + 0x24]
mov edi, dword [esp + 0x68]
test edx, edx
je 0x59776b
test edi, edi
je 0x597f7a
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 0x59788f
mov ecx, dword [esp + 0x58]
mov edx, dword [esp + 0x5c]
cmp ecx, edx
jge 0x597f5a
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 0x59786d
mov edi, ebp
mov ebp, eax
sub edi, dword [esp + 0x60]
cmp dword [esp + 0x24], 0
je 0x597830
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 0x597823
mov al, byte [ebp - 1]
mov byte [ebp], al
inc esi
add ebp, ebx
sub edi, 1
jne 0x597800
jmp 0x597859
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 0x597851
mov byte [ebp], 0
inc esi
add ebp, ebx
sub edi, 1
jne 0x597830
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 0x5977e0
jmp 0x597f5a
test al, al
jne 0x597994
test edx, edx
jne 0x597f7a
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 0x59798b
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 0x597966
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 0x597948
mov edx, dword [esp + 0x28]
cmp edx, 1
jb 0x597f7a
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 0x59794c
mov eax, dword [esp + 0x68]
inc edi
inc esi
add ebp, ebx
cmp edi, dword [esp + 0x64]
jl 0x597900
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 0x5978f0
add dword [esp + 0x20], eax
jmp 0x597f5a
test edx, edx
je 0x5979a3
cmp dword [esi + 0x48], 6
mov eax, 4
jl 0x5979a6
mov eax, dword [esi + 0x48]
push ecx
push eax
call fcn.005bb2f0
add esp, 8
mov dword [esp + 0x30], eax
cmp eax, 8
je 0x597f7a
push eax
call fcn.005bb2a0
add esp, 4
mov dword [esp + 0x2c], eax
cmp ebp, eax
jb 0x597f7a
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 0x597a09
cmp ebx, 1
jle 0x597a09
mov eax, dword [esi + 0xb4]
movsd xmm0, qword [eax + edi*8]
jmp 0x597a0e
movsd xmm0, qword [esi + 0x60]
cmp byte [esp + 0x13], 3
movsd qword [esp + 0x38], xmm0
jne 0x597b4b
mov ecx, dword [esp + 0x58]
mov ebp, dword [esp + 0x5c]
cmp ecx, ebp
jge 0x597f5a
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 0x597abd
mov eax, dword [esp + 0x60]
cmp eax, ebp
jge 0x597b1d
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 0x597ab3
cvttsd2si eax, xmm2
mov byte [edi], al
inc esi
add edi, ebx
sub ebp, 1
jne 0x597a90
jmp 0x597b15
cmp dword [esp + 0x60], ebp
jge 0x597b21
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 0x597b07
movsx 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 0x597ad0
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 0x597a70
jmp 0x597f5a
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 0x597f7a
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 0x597cb9
cmp ecx, dword [esp + 0x5c]
jge 0x597f5a
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 0x597c3e
cmp ecx, dword [esp + 0x64]
jge 0x597ca1
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 0x597c07
jmp 0x597c95
cmp ecx, dword [esp + 0x64]
jge 0x597ca1
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]
movsx 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 0x597c50
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 0x597bf2
jmp 0x597f5a
mov eax, esi
cmp dword [eax + 0x20], 2
jle 0x597e3b
cmp ecx, dword [esp + 0x5c]
jge 0x597f5a
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 0x597d8b
cmp eax, dword [esp + 0x64]
mov eax, dword [esp + 0x5c]
jge 0x597e19
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 0x597d7f
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 0x597d33
jmp 0x597e09
cmp eax, dword [esp + 0x64]
mov eax, dword [esp + 0x5c]
jge 0x597e19
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 0x597dff
mov eax, dword [edi]
movd xmm1, eax
cvtdq2pd xmm1, xmm1
shr eax, 0x1f
add edi, 4
addsd xmm1, qword [eax*8 + 0x8b6930]
movsx 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 0x597da3
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 0x597d10
jmp 0x597f5a
mov dword [esp + 0x2c], 0
cmp ecx, dword [esp + 0x5c]
jge 0x597f5a
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 0x597f33
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 0x597f15
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 0x597f7a
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 0x597eb0
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 0x597e90
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