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

Disassembly:
sub esp, 0x70
mov edx, dword [esp + 0x74]
test edx, edx
push esi
mov esi, ecx
mov dword [esp + 4], 0
mov dword [esp + 0x2c], 0
mov dword [esp + 0x30], 0
mov dword [esp + 0x34], 0
mov dword [esp + 0x20], 0
mov dword [esp + 0x24], 0
mov dword [esp + 0x28], 0
je 0x5d0684
mov ecx, dword [edx + 0x90]
test ecx, ecx
mov dword [esp + 0x14], ecx
je 0x5d0684
mov eax, dword [edx + 0x8c]
test eax, eax
je 0x5d0684
push ebp
push edi
mov edi, dword [ecx]
mov dword [esp + 0x64], edi
mov edi, dword [ecx + 4]
mov dword [esp + 0x68], edi
mov edi, dword [esp + 0x64]
mov dword [esp + 0x34], edi
mov edi, dword [esp + 0x68]
mov dword [esp + 0x6c], 0
mov dword [esp + 0x38], edi
mov edi, dword [esp + 0x6c]
mov ebp, 2
cmp eax, ebp
mov dword [esp + 0x3c], edi
jle 0x5d0535
push ebx
mov dword [esp + 0x7c], 0
nop
fld dword [ecx + ebp*4]
mov edx, dword [esp + 0x7c]
fstp dword [esp + 0x74]
mov eax, dword [esp + 0x74]
fld dword [ecx + ebp*4 + 4]
mov dword [esp + 0x2c], eax
fstp dword [esp + 0x78]
mov ecx, dword [esp + 0x78]
mov dword [esp + 0x30], ecx
mov dword [esp + 0x34], edx
mov dword [esp + 0x44], 0
mov dword [esp + 0x48], 0
mov dword [esp + 0x4c], 0
xor edi, edi
lea ebx, [esi + 0xc]
lea eax, [edi + 1]
fld dword [esp + 0x38]
fsub dword [ebx - 8]
mov dword [esp + 0x28], eax
cdq
fld dword [esp + 0x3c]
fsub dword [ebx - 4]
mov ecx, 6
idiv ecx
fld dword [esp + 0x40]
fsub dword [ebx]
fld dword [esp + 0x38]
mov dword [esp + 0x24], 1
lea edx, [edx + edx*2]
fsub dword [esi + edx*4 + 4]
lea ecx, [esi + edx*4 + 4]
xor edx, edx
fstp dword [esp + 0x50]
fld dword [esp + 0x3c]
fsub dword [ecx + 4]
fstp dword [esp + 0x54]
fld dword [esp + 0x40]
fsub dword [ecx + 8]
fstp dword [esp + 0x58]
fld dword [esp + 0x2c]
fsub dword [ebx - 8]
fstp dword [esp + 0x5c]
fld dword [esp + 0x30]
fsub dword [ebx - 4]
fstp dword [esp + 0x60]
fld dword [esp + 0x34]
fsub dword [ebx]
fstp dword [esp + 0x64]
fld dword [esp + 0x2c]
fsub dword [ecx]
fstp dword [esp + 0x68]
fld dword [esp + 0x30]
fsub dword [ecx + 4]
fstp dword [esp + 0x6c]
fld dword [esp + 0x34]
fsub dword [ecx + 8]
fstp dword [esp + 0x70]
fld st(0)
fmul st(1)
fld st(2)
fmul st(3)
faddp st(1)
fld st(3)
fmul st(4)
faddp st(1)
fcomp dword [0x73d708]
fstp st(0)
fnstsw ax
fstp st(0)
test ah, 5
fstp st(0)
jnp 0x5d0311
mov dword [esp + 0x24], edx
fld dword [esp + 0x58]
mov dword [esp + 0x14], 1
fmul dword [esp + 0x58]
fld dword [esp + 0x54]
fmul dword [esp + 0x54]
faddp st(1)
fld dword [esp + 0x50]
fmul dword [esp + 0x50]
faddp st(1)
fcomp dword [0x73d708]
fnstsw ax
test ah, 5
jnp 0x5d0346
mov dword [esp + 0x14], edx
fld dword [esp + 0x64]
mov dword [esp + 0x18], 1
fmul dword [esp + 0x64]
fld dword [esp + 0x60]
fmul dword [esp + 0x60]
faddp st(1)
fld dword [esp + 0x5c]
fmul dword [esp + 0x5c]
faddp st(1)
fcomp dword [0x73d708]
fnstsw ax
test ah, 5
jnp 0x5d037b
mov dword [esp + 0x18], edx
fld dword [esp + 0x70]
mov dword [esp + 0x1c], 1
fmul dword [esp + 0x70]
fld dword [esp + 0x6c]
fmul dword [esp + 0x6c]
faddp st(1)
fld dword [esp + 0x68]
fmul dword [esp + 0x68]
faddp st(1)
fcomp dword [0x73d708]
fnstsw ax
test ah, 5
jnp 0x5d03b0
mov dword [esp + 0x1c], edx
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
add edx, eax
add edx, dword [esp + 0x14]
mov eax, dword [esp + 0x24]
add edx, eax
cmp edx, 2
jl 0x5d0446
mov edx, dword [esp + 0x10]
test edx, edx
jne 0x5d0409
test eax, eax
jne 0x5d03dd
mov eax, dword [esp + 0x14]
test eax, eax
je 0x5d0409
mov eax, ebp
cdq
sub eax, edx
mov edx, dword [esp + 0x38]
sar eax, 1
mov dword [esi + 0x60], eax
lea eax, [esi + 0x68]
mov dword [eax], edx
mov edx, dword [esp + 0x3c]
mov dword [eax + 4], edx
mov edx, dword [esp + 0x40]
mov dword [esi + 0x64], edi
mov dword [eax + 8], edx
mov dword [esp + 0x10], 1
mov eax, dword [esp + 0x18]
test eax, eax
jne 0x5d0419
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x5d0446
mov eax, ebp
cdq
sub eax, edx
mov edx, dword [esp + 0x2c]
sar eax, 1
mov dword [esi + 0x60], eax
lea eax, [esi + 0x68]
mov dword [eax], edx
mov edx, dword [esp + 0x30]
mov dword [eax + 4], edx
mov edx, dword [esp + 0x34]
mov dword [eax + 8], edx
mov eax, dword [esp + 0x10]
inc eax
mov dword [esi + 0x64], edi
mov dword [esp + 0x10], eax
lea eax, [esp + 0x44]
push eax
push ecx
lea eax, [ebx - 8]
push eax
lea ecx, [esp + 0x38]
push ecx
lea edx, [esp + 0x48]
push edx
call fcn.004ac340
add esp, 0x14
test eax, eax
je 0x5d0473
mov eax, dword [esp + 0x10]
test eax, eax
je 0x5d0485
cmp eax, 1
jge 0x5d04b0
mov edi, dword [esp + 0x28]
add ebx, 0xc
cmp edi, 6
jl 0x5d0254
jmp 0x5d04fe
mov ecx, dword [esp + 0x44]
mov eax, ebp
cdq
sub eax, edx
mov edx, dword [esp + 0x48]
sar eax, 1
mov dword [esi + 0x60], eax
lea eax, [esi + 0x68]
mov dword [eax], ecx
mov ecx, dword [esp + 0x4c]
mov dword [eax + 4], edx
mov dword [eax + 8], ecx
mov dword [esp + 0x10], 1
jmp 0x5d04fb
mov eax, dword [esi + 0x60]
mov edx, dword [esi + 0x64]
mov dword [esi + 0x4c], eax
lea ecx, [esi + 0x68]
mov dword [esi + 0x50], edx
mov eax, ecx
mov ebx, dword [eax]
lea edx, [esi + 0x54]
mov dword [edx], ebx
mov ebx, dword [eax + 4]
mov eax, dword [eax + 8]
mov dword [edx + 4], ebx
mov dword [edx + 8], eax
mov eax, ebp
cdq
sub eax, edx
mov edx, dword [esp + 0x44]
sar eax, 1
mov dword [esi + 0x60], eax
mov eax, dword [esp + 0x48]
mov dword [ecx], edx
mov edx, dword [esp + 0x4c]
mov dword [ecx + 4], eax
mov eax, dword [esp + 0x10]
inc eax
mov dword [ecx + 8], edx
mov dword [esp + 0x10], eax
mov dword [esi + 0x64], edi
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x34]
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x84]
mov dword [esp + 0x3c], ecx
mov ecx, dword [eax + 0x8c]
add ebp, 2
cmp ebp, ecx
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x40], edx
jl 0x5d0210
mov edx, eax
pop ebx
mov eax, dword [esi + 0x50]
or ebp, 0xffffffff
cmp eax, ebp
jne 0x5d05f4
cmp dword [esi + 0x64], ebp
jne 0x5d0555
xor edi, edi
mov eax, edi
pop edi
pop ebp
pop esi
add esp, 0x70
ret 4
cmp eax, ebp
jne 0x5d05f4
mov eax, dword [edx + 0x9c]
lea edi, [eax - 1]
cmp edi, 1
jge 0x5d0570
mov edi, 1
add eax, 0xfffffffe
xor edx, edx
test eax, eax
setl dl
mov dword [esp + 0x78], 0
dec edx
and eax, edx
fld dword [ecx + eax*4]
lea eax, [esp + 0x70]
fstp dword [esp + 0x70]
push eax
fld dword [ecx + edi*4]
mov ecx, esi
fstp dword [esp + 0x78]
call fcn.005cfae0
mov edx, dword [esp + 0x80]
mov ecx, eax
mov dword [esi + 0x50], ecx
mov eax, dword [edx + 0x9c]
sub eax, 2
cdq
sub eax, edx
sar eax, 1
xor edx, edx
test eax, eax
setle dl
dec edx
and eax, edx
mov dword [esi + 0x4c], eax
lea eax, [ecx + ecx*2]
lea ecx, [esi + eax*4 + 4]
mov eax, dword [ecx]
lea edx, [esi + 0x54]
mov dword [edx], eax
mov eax, dword [ecx + 4]
mov dword [edx + 4], eax
mov eax, dword [esp + 0xc]
mov ecx, dword [ecx + 8]
mov dword [edx + 8], ecx
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x80]
inc eax
mov dword [esp + 0xc], eax
cmp dword [esi + 0x64], ebp
jne 0x5d065b
mov eax, dword [edx + 0x8c]
fld dword [ecx + eax*4 - 8]
lea edx, [esp + 0x70]
fstp dword [esp + 0x70]
push edx
fld dword [ecx + eax*4 - 4]
mov ecx, esi
fstp dword [esp + 0x78]
mov dword [esp + 0x7c], 0
call fcn.005cfae0
mov ecx, eax
mov eax, dword [esp + 0x80]
mov dword [esi + 0x64], ecx
mov eax, dword [eax + 0x8c]
cdq
sub eax, edx
sar eax, 1
mov dword [esi + 0x60], eax
lea ecx, [ecx + ecx*2]
lea edx, [esi + ecx*4 + 4]
mov ecx, dword [edx]
lea eax, [esi + 0x68]
mov dword [eax], ecx
mov ecx, dword [edx + 4]
mov dword [eax + 4], ecx
mov edx, dword [edx + 8]
mov dword [eax + 8], edx
inc dword [esp + 0xc]
mov edi, dword [esp + 0xc]
xor eax, eax
cmp edi, 2
setge al
lea ecx, [esi + 0x54]
push ecx
add esi, 0x68
push esi
mov edi, eax
call fcn.004aa980
add esp, 8
mov eax, edi
pop edi
pop ebp
pop esi
add esp, 0x70
ret 4
xor eax, eax
pop esi
add esp, 0x70
ret 4