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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0x90
mov ecx, dword [ebp + 0xc]
mov eax, dword [0x808040]
xor eax, ebp
mov dword [esp + 0x88], eax
xorpd xmm0, xmm0
test ecx, ecx
je 0x58571a
mov eax, dword [ebp + 0x10]
lea edx, [eax + ecx]
movsd xmm1, qword [0x795a58]
cmp edx, 0x135
jg 0x585c4a
cmp edx, 0xfffffebd
jl 0x58571a
cmp ecx, 0xf
jg 0x585806
cmp eax, 0xffffffea
jb 0x585742
neg eax
mov dword [esp + 0x20], eax
test ecx, ecx
jle 0x58570d
xor eax, eax
mov edi, 1
xor ecx, ecx
mov edx, dword [ebp + 8]
movsx ebx, byte [edx + edi - 1]
mov esi, ebx
mov edx, 0xa
mul edx
sar esi, 0x1f
add eax, ebx
mov ebx, dword [ebp + 0xc]
lea ecx, [ecx + ecx*4]
lea ecx, [edx + ecx*2]
adc ecx, esi
add eax, 0xffffffd0
adc ecx, 0xffffffff
cmp edi, ebx
jge 0x5856e5
inc edi
mov edx, 0x99999999
cmp eax, edx
mov edx, ecx
mov esi, 0x19999999
sbb edx, esi
jb 0x5856a7
movd xmm1, eax
movd xmm0, ecx
punpckldq xmm1, xmm0
punpckldq xmm1, xmmword [0x782050]
subpd xmm1, xmmword [0x782060]
movapd xmm0, xmm1
unpckhpd xmm0, xmm1
addsd xmm0, xmm1
mov eax, dword [esp + 0x20]
divsd xmm0, qword [eax*8 + 0x79c7f8]
movsd qword [esp + 0x58], xmm0
fld qword [esp + 0x58]
fstp xword [esp + 0x20]
mov ecx, dword [esp + 0x88]
xor ecx, ebp
call fcn.005c6b46
fld xword [esp + 0x20]
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
cmp eax, 0x16
ja 0x585caf
test ecx, ecx
jle 0x5857be
xor eax, eax
mov edi, 1
xor ecx, ecx
mov edx, dword [ebp + 8]
movsx ebx, byte [edx + edi - 1]
mov esi, ebx
mov edx, 0xa
mul edx
sar esi, 0x1f
add eax, ebx
mov ebx, dword [ebp + 0xc]
lea ecx, [ecx + ecx*4]
lea ecx, [edx + ecx*2]
adc ecx, esi
add eax, 0xffffffd0
adc ecx, 0xffffffff
cmp edi, ebx
jge 0x585796
inc edi
mov edx, 0x99999999
cmp eax, edx
mov edx, ecx
mov esi, 0x19999999
sbb edx, esi
jb 0x585758
movd xmm1, eax
movd xmm0, ecx
punpckldq xmm1, xmm0
punpckldq xmm1, xmmword [0x782050]
subpd xmm1, xmmword [0x782060]
movapd xmm0, xmm1
unpckhpd xmm0, xmm1
addsd xmm0, xmm1
mov eax, dword [ebp + 0x10]
mulsd xmm0, qword [eax*8 + 0x79c7f8]
jmp 0x58571a
xor ecx, ecx
add ebx, 0x3a98000
setb cl
mov dword [esp + 0x14], 0xe
jmp 0x585958
xor ecx, ecx
add ebx, 0x5b8d8000
setb cl
mov dword [esp + 0x14], 0x14
jmp 0x585958
mov eax, ecx
jmp 0x5858a1
mov dword [esp + 0x10], edx
xor edx, edx
xor ecx, ecx
xor edi, edi
mov eax, dword [ebp + 8]
movsx ebx, byte [eax + edi]
inc edi
mov esi, ebx
mov eax, edx
mov edx, 0xa
mul edx
mov dword [esp + 0x20], edx
sar esi, 0x1f
mov edx, eax
add edx, ebx
lea eax, [ecx + ecx*4]
mov ecx, dword [esp + 0x20]
lea ecx, [ecx + eax*2]
adc ecx, esi
add edx, 0xffffffd0
adc ecx, 0xffffffff
cmp edi, dword [ebp + 0xc]
jge 0x585857
mov eax, 0x99999999
cmp edx, eax
mov eax, ecx
mov esi, 0x19999999
sbb eax, esi
jb 0x585810
mov dword [esp + 0xc], edx
mov ebx, dword [ebp + 0xc]
cmp edi, ebx
jne 0x585d53
mov edx, dword [ebp + 0x10]
xor edi, edi
test ecx, 0xffc00000
mov ebx, 0
jne 0x5857ff
xor ebx, ebx
mov eax, ecx
mov esi, dword [esp + 0xc]
shld eax, esi, 0xa
shl esi, 0xa
mov dword [esp + 0xc], esi
add ebx, 0xfffffff6
mov esi, edx
mov edx, edi
mov edi, 0x1000
cmp ecx, edi
mov edi, edx
mov edx, esi
mov ecx, eax
jb 0x58587c
test eax, eax
mov ecx, eax
mov eax, edi
js 0x585ca6
mov esi, dword [esp + 0xc]
shld ecx, esi, 1
add esi, esi
dec ebx
test ecx, ecx
jns 0x5858b1
mov edi, ecx
mov dword [esp + 0xc], esi
mov dword [esp + 0x1c], ebx
mov ecx, ebx
neg cl
xor ebx, ebx
mov esi, eax
shld ebx, eax, cl
shl esi, cl
xor eax, eax
test cl, 0x20
cmovne ebx, esi
mov dword [esp + 0x20], ebx
cmovne esi, eax
mov dword [esp + 0x18], esi
cmp edx, 0xfffffea4
jl 0x58571a
movapd xmm0, xmmword [0x78b580]
lea eax, [esp + 0x78]
movupd xmmword [eax], xmm0
lea esi, [esp + 0x74]
mov dword [esi], 0xffffffff
push esi
push eax
push edx
mov ebx, edx
call fcn.00514e70
mov eax, ebx
add esp, 0xc
sub eax, dword [esi]
je 0x585c99
mov dword [esp + 0x10], eax
dec eax
cmp eax, 6
ja case.default.0x58593e
xor ecx, ecx
mov ebx, 0x98968000
lea edx, [ebx + 0x7698000]
jmp dword [eax*4 + 0x79c8b0]
xor ecx, ecx
add ebx, 0x2ab98000
setb cl
mov dword [esp + 0x14], 0x11
mov esi, ecx
imul esi, edi
mov eax, ebx
mul edi
mov dword [esp + 0x38], eax
mov eax, ebx
mov ebx, dword [esp + 0xc]
imul ecx, ebx
mov edi, edx
mul ebx
add ecx, edx
mov edx, dword [esp + 0x14]
add dword [esp + 0x1c], edx
and eax, 0x80000000
add ecx, dword [esp + 0x38]
adc edi, esi
add eax, 0x80000000
adc ecx, 0
adc edi, 0
mov dword [esp + 0x14], edi
mov eax, 0x13
sub eax, dword [ebp + 0xc]
mov edx, dword [esp + 0x18]
mov edi, edx
add edi, 4
mov ebx, dword [esp + 0x20]
mov esi, ebx
adc esi, 0
cmp eax, dword [esp + 0x10]
cmovl ebx, esi
mov dword [esp + 0x20], ebx
cmovl edx, edi
mov dword [esp + 0x18], edx
mov ebx, ecx
mov ecx, dword [esp + 0x7c]
mov eax, ecx
mov esi, dword [esp + 0x14]
mul esi
mov dword [esp + 0x38], edx
mov dword [esp + 0xc], eax
mov eax, ecx
mul ebx
mov dword [esp + 0x3c], eax
mov dword [esp + 0x10], edx
mov ecx, dword [esp + 0x78]
mov eax, ecx
mul esi
mov edi, edx
mov esi, eax
mov eax, ecx
mul ebx
xor ecx, ecx
add edx, esi
mov esi, dword [esp + 0x38]
setb cl
add edx, dword [esp + 0x3c]
adc ecx, 0
add edi, dword [esp + 0xc]
adc esi, 0
add edi, dword [esp + 0x10]
adc esi, 0
add edx, 0x80000000
mov edx, edi
mov eax, dword [esp + 0x80]
mov edi, dword [esp + 0x1c]
lea eax, [edi + eax + 0x40]
mov dword [esp + 0xc], eax
adc edx, ecx
adc esi, 0
xor ebx, ebx
mov eax, dword [esp + 0x18]
mov ecx, eax
mov edi, dword [esp + 0x20]
or ecx, edi
sete bl
xor ebx, 9
add ebx, eax
mov dword [esp + 0x40], 0x400000
adc edi, 0
mov dword [esp + 0x20], edi
cmp esi, 0x400000
jb 0x585cf4
mov ecx, dword [esp + 0xc]
mov eax, ecx
mov dword [esp + 0xc], esi
test esi, esi
js 0x585c53
mov esi, eax
mov eax, dword [esp + 0xc]
shld eax, edx, 1
add edx, edx
dec esi
mov dword [esp + 0xc], eax
test eax, eax
jns 0x585a79
mov dword [esp + 0x10], edx
sub ecx, esi
mov edi, dword [esp + 0x20]
shld edi, ebx, cl
shl ebx, cl
xor edx, edx
test cl, 0x20
cmovne edi, ebx
cmovne ebx, edx
lea eax, [esi + 0x472]
cmp esi, 0xfffffb8f
cmovl eax, edx
mov dword [esp + 0x1c], esi
cmp esi, 0xfffffbc3
mov edx, 0x35
cmovl edx, eax
cmp edx, 3
jle 0x585dac
mov dword [esp + 0x18], ebx
mov dword [esp + 0x20], edi
mov eax, 0x40
sub eax, edx
mov edx, dword [esp + 0xc]
mov ebx, edx
mov ecx, eax
shr ebx, cl
test al, 0x20
mov ecx, ebx
mov esi, 0
cmovne ecx, esi
mov dword [esp + 0x3c], ecx
mov esi, dword [esp + 0x10]
mov edi, esi
mov ecx, eax
shrd edi, edx, cl
test al, 0x20
cmovne edi, ebx
mov dword [esp + 0x38], edi
xor ebx, ebx
dec ebx
mov edi, edx
shl ebx, cl
test al, 0x20
mov edx, ebx
mov ecx, 0
cmovne edx, ecx
mov ecx, 0xffffffff
cmove ebx, ecx
not edx
and edx, esi
not ebx
and ebx, edi
mov ecx, eax
dec cl
mov esi, 8
xor edi, edi
shld edi, esi, cl
shld ebx, edx, 3
shl edx, 3
shl esi, cl
test cl, 0x20
cmovne edi, esi
mov ecx, 0
cmovne esi, ecx
add dword [esp + 0x1c], eax
mov dword [esp + 0x14], esi
mov eax, esi
mov esi, ebx
mov ebx, dword [esp + 0x3c]
add eax, dword [esp + 0x18]
mov ecx, edi
adc ecx, dword [esp + 0x20]
mov dword [esp + 0xc], edx
mov dword [esp + 0x44], eax
cmp edx, eax
mov dword [esp + 0x4c], esi
mov eax, esi
mov dword [esp + 0x48], ecx
sbb eax, ecx
setae al
movzx esi, al
add esi, dword [esp + 0x38]
adc ebx, 0
cmp ebx, 0x200000
jae 0x585d16
mov ecx, ebx
mov ebx, dword [esp + 0x1c]
cmp ebx, 0x3cb
jg 0x585cda
mov dword [esp + 0x10], edi
cmp ebx, 0xfffffbce
jl 0x585df9
xor edi, edi
dec edi
add edi, 1
mov edx, 0
adc edx, 0xfffff
and edx, ecx
sete al
cmp ebx, 0xfffffbce
je 0x585be6
or edi, edx
je 0x585d76
mov edi, dword [esp + 0x20]
cmp ebx, 0xfffffbce
sete dl
shl ebx, 0x14
add ebx, 0x43300000
test dl, al
mov edx, 0
cmovne ebx, edx
xor edx, edx
dec edx
and esi, edx
mov edx, 0xfffff
and ecx, edx
or ecx, ebx
movd xmm0, ecx
movd xmm1, esi
mov edx, dword [esp + 0x14]
sub edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x10]
sbb ecx, edi
mov eax, dword [esp + 0xc]
cmp edx, eax
mov edx, dword [esp + 0x4c]
sbb ecx, edx
punpckldq xmm1, xmm0
jae 0x585c4a
cmp eax, dword [esp + 0x44]
sbb edx, dword [esp + 0x48]
jb 0x585d36
movapd xmm0, xmm1
jmp 0x58571a
mov esi, eax
jmp 0x585a8c
xor ecx, ecx
add ebx, 0x61698000
setb cl
mov dword [esp + 0x14], 0xa
jmp 0x585958
xor ecx, ecx
add ebx, 0x2f698000
setb cl
mov dword [esp + 0x14], 7
jmp 0x585958
mov ebx, edx
mov dword [esp + 0x14], 4
jmp 0x585958
mov ebx, dword [esp + 0xc]
mov dword [esp + 0x14], edi
jmp 0x5859c4
mov esi, dword [esp + 0xc]
jmp 0x5858bc
mov dword [esp + 0x10], edx
test eax, eax
jns 0x585f36
mov eax, dword [ebp + 0xc]
test eax, eax
mov edx, dword [esp + 0x10]
jg 0x585806
xor edi, edi
xor edx, edx
xor ecx, ecx
jmp 0x585857
call fcn.006b3610
movsd xmm0, qword [0x795a58]
jmp 0x58571a
mov dword [esp + 0x14], 0x18
jmp 0x585958
mov ecx, dword [esp + 0xc]
mov eax, ecx
mov edi, esi
shld esi, edx, 0xa
shl edx, 0xa
add eax, 0xfffffff6
test edi, 0xfffff000
mov edi, esi
jne 0x585a6b
jmp 0x585cfc
dec dword [esp + 0x40]
mov edx, ebx
mov ecx, ebx
shrd esi, edx, 1
shr ecx, 1
inc dword [esp + 0x1c]
cmp dword [esp + 0x40], edx
mov edx, ecx
jae 0x585ba0
jmp 0x585d1e
movsd xmm0, qword [0x795a58]
movdqa xmmword [esp + 0x20], xmm1
ucomisd xmm1, xmm0
jae 0x58571a
jmp 0x585e37
xor eax, eax
mov edx, dword [ebp + 8]
cmp byte [edx + edi], 0x35
setge al
add dword [esp + 0xc], eax
adc ecx, 0
mov edx, dword [esp + 0x10]
sub edx, edi
mov edi, 4
jmp 0x58586b
mov edi, dword [esp + 0x20]
mov eax, ecx
shld ecx, esi, 1
add esi, esi
and eax, 0x80000
sete dl
cmp ebx, 0xfffffbd0
lea ebx, [ebx - 1]
jge 0x585da0
mov edi, dword [esp + 0x20]
mov eax, edx
jmp 0x585bea
test eax, eax
mov eax, edx
jne 0x585bea
jmp 0x585d7a
mov ecx, 4
sub ecx, edx
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0xc]
shrd eax, edx, cl
shr edx, cl
shrd ebx, edi, cl
add dword [esp + 0x1c], ecx
shr edi, cl
test cl, 0x20
cmovne eax, edx
mov dword [esp + 0x10], eax
mov eax, 0
cmovne edx, eax
cmovne ebx, edi
cmovne edi, eax
add ebx, 9
mov dword [esp + 0x18], ebx
adc edi, 0
mov dword [esp + 0x20], edi
mov eax, 0x3c
jmp 0x585ae3
mov ecx, dword [esp + 0x14]
sub ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x10]
sbb eax, dword [esp + 0x20]
cmp ecx, dword [esp + 0xc]
mov edx, dword [esp + 0x4c]
sbb eax, edx
xorpd xmm0, xmm0
movapd xmmword [esp + 0x20], xmm0
jae 0x58571a
mov ecx, edx
mov eax, dword [esp + 0x44]
cmp dword [esp + 0xc], eax
sbb ecx, dword [esp + 0x48]
jae 0x58571a
movaps xmm0, xmmword [esp + 0x20]
movsd qword [esp + 0x50], xmm0
mov ecx, dword [esp + 0x50]
mov ebx, dword [esp + 0x54]
mov eax, ebx
shr eax, 0x14
and eax, 0x7ff
add eax, 0xfffffbcc
lea edx, [ecx + ecx]
mov esi, ebx
mov dword [esp + 0xc], ecx
shld esi, ecx, 1
and esi, 0x1fffff
and edx, 0xfffffffe
mov dword [esp + 0x18], edx
add edx, 0xfffffffe
mov edi, esi
adc edi, 0x1fffff
add edx, 2
adc edi, 0
test ebx, 0x7ff00000
mov ecx, 0xfffffbcd
cmovne ecx, eax
cmove edi, esi
cmove edx, dword [esp + 0x18]
mov dword [esp + 0x64], edi
or edx, 1
mov dword [esp + 0x60], edx
mov dword [esp + 0x68], ecx
mov dword [esp + 0x6c], 0xffffffff
sub esp, 0x14
movupd xmm0, xmmword [esp + 0x74]
movupd xmmword [esp + 4], xmm0
mov eax, dword [ebp + 0x10]
mov dword [esp], eax
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
call fcn.006e5bf0
add esp, 0x14
test eax, eax
js 0x585fd3
je 0x585fe7
lea eax, [ebx - 0x80000000]
or eax, dword [esp + 0xc]
je 0x585fde
mov eax, ebx
xor eax, 0x7ff00000
or eax, dword [esp + 0xc]
movsd xmm0, qword [0x795a58]
je 0x58571a
test ebx, ebx
js 0x585f1b
mov eax, dword [esp + 0xc]
add eax, 1
adc ebx, 0
jmp 0x585f25
mov eax, dword [esp + 0xc]
add eax, 0xffffffff
adc ebx, 0xffffffff
movd xmm1, ebx
movd xmm0, eax
punpckldq xmm0, xmm1
jmp 0x58571a
mov ecx, 0xf
sub ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
mov dword [esp + 0x20], ecx
sub edx, ecx
mov dword [esp + 0xc], edx
cmp edx, 0x16
jg 0x585cbb
cmp dword [ebp + 0xc], 0
jle 0x585fbd
xor eax, eax
xor ecx, ecx
inc ecx
xor esi, esi
mov edx, dword [ebp + 8]
movsx ebx, byte [edx + ecx - 1]
mov edi, ebx
mov edx, 0xa
mul edx
sar edi, 0x1f
add eax, ebx
lea esi, [esi + esi*4]
lea esi, [edx + esi*2]
adc esi, edi
add eax, 0xffffffd0
adc esi, 0xffffffff
cmp ecx, dword [ebp + 0xc]
jge 0x585f9d
inc ecx
mov edx, 0x99999999
cmp eax, edx
mov edx, esi
mov edi, 0x19999999
sbb edx, edi
jb 0x585f61
movd xmm0, eax
movd xmm1, esi
punpckldq xmm0, xmm1
punpckldq xmm0, xmmword [0x782050]
subpd xmm0, xmmword [0x782060]
haddpd xmm0, xmm0
mov eax, dword [esp + 0x20]
mulsd xmm0, qword [eax*8 + 0x79c7f8]
mov eax, dword [esp + 0xc]
jmp 0x5857c1
movapd xmm0, xmmword [esp + 0x20]
jmp 0x58571a
xorpd xmm0, xmm0
jmp 0x58571a
test byte [esp + 0xc], 1
je 0x585fd3
mov eax, ebx
xor eax, 0x7ff00000
or eax, dword [esp + 0xc]
movsd xmm0, qword [0x795a58]
je 0x58571a
test ebx, ebx
sets al
xorpd xmm0, xmm0
movapd xmm1, xmmword [esp + 0x20]
ucomisd xmm1, xmm0
setnp cl
sete dl
and dl, cl
test dl, al
jne 0x58571a
jmp 0x585f0b