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

Disassembly:
sub esp, 0x60
mov eax, dword [esp + 0x64]
push ebp
mov ebp, dword [esp + 0x6c]
mov edx, ebp
push esi
mov esi, dword [eax + 0x3d5c]
movzx ecx, byte [eax + 4]
mov eax, dword [esp + 0x74]
sar eax, cl
sar edx, cl
imul edx, dword [esi + 0x30]
mov dword [esp + 0x44], ecx
mov ecx, dword [esp + 0x7c]
push edi
add edx, eax
imul edi, edx, 0xc8
lea eax, [ecx + ecx*4]
add eax, eax
add edi, dword [esi + eax*8 + 4]
mov al, byte [edi + 0xc1]
not al
shr al, 7
mov byte [esp + 0x70], al
mov eax, dword [esp + 0x84]
mov al, byte [edi + eax + 0xc0]
test al, al
js 0x10161113
push ebx
movsx ebx, al
lea eax, [ecx + ecx*4]
lea eax, [ebx + eax*4]
mov eax, dword [esi + eax*4 + 0x10]
lea ecx, [eax + eax*4]
shl ecx, 4
add ecx, esi
mov dword [esp + 0x2c], ecx
mov ecx, dword [ecx + 4]
mov dword [esp + 0x54], ecx
test eax, eax
js 0x10161112
movzx edx, word [edi + ebx*4 + 0xa4]
movzx esi, word [edi + ebx*4 + 0xa6]
mov eax, edx
not eax
mov ebx, 4
movzx ecx, ax
shr ecx, 0xf
add ecx, 3
movsx eax, dx
add eax, ecx
sar eax, 3
cwde
lea edx, [eax + ebp*4]
mov eax, esi
not eax
mov dword [esp + 0x3c], edx
movzx ecx, ax
mov ebp, ebx
shr ecx, 0xf
add ecx, 3
movsx eax, si
add eax, ecx
mov ecx, dword [esp + 0x7c]
sar eax, 3
cwde
lea esi, [eax + ecx*4]
mov eax, dword [esp + 0x80]
mov dword [esp + 0x28], esi
movzx ecx, byte [eax + 0x107fab40]
shl ebp, cl
movzx ecx, byte [eax + 0x107fab58]
shl ebx, cl
movzx ecx, byte [eax + 0x107fab88]
movzx eax, byte [eax + 0x107fab70]
mov dword [esp + 0x50], eax
mov eax, ebx
imul eax, ebp
mov dword [esp + 0x24], ebp
mov dword [esp + 0x38], ebx
mov dword [esp + 0x48], ecx
mov dword [esp + 0x30], eax
mov eax, edx
test edx, edx
jns 0x10160ce1
not eax
cdq
idiv ebx
not eax
jmp 0x10160ce4
cdq
idiv ebx
mov dword [esp + 0x78], eax
mov eax, esi
test esi, esi
jns 0x10160cf7
not eax
cdq
idiv ebp
not eax
jmp 0x10160cfa
cdq
idiv ebp
cmp byte [esp + 0x74], 0
mov dword [esp + 0x7c], eax
je 0x10160d43
mov edx, dword [esp + 0x88]
xor ecx, ecx
test edx, edx
sete cl
lea ecx, [ecx*8 + 0x30]
mov eax, dword [ecx + edi]
mov dword [esp + 0x74], eax
mov eax, dword [ecx + edi + 4]
mov dword [esp + 0x88], eax
xor eax, eax
test edx, edx
sete al
lea eax, [eax*4 + 0x9c]
mov esi, dword [eax + edi]
mov eax, dword [esp + 0x74]
jmp 0x10160d5a
mov eax, dword [edi + 8]
mov ecx, dword [edi + 0xc]
mov esi, dword [edi + 0x90]
mov dword [esp + 0x74], eax
mov dword [esp + 0x88], ecx
mov ecx, dword [edi + 0x18]
mov edx, dword [edi + 0x1c]
mov dword [esp + 0x84], ecx
shl esi, 4
sub dword [esp + 0x84], eax
mov eax, edx
sbb eax, dword [esp + 0x88]
mov dword [esp + 0x34], eax
call fcn.10511ed0
mov edx, dword [esp + 0x34]
mov ecx, dword [esp + 0x84]
movsd qword [esp + 0x68], xmm0
call fcn.10511ed0
divsd xmm0, qword [esp + 0x68]
mov edx, dword [edi + 0x4c]
mov ecx, dword [edi + 0x48]
movsd qword [esp + 0x60], xmm0
call fcn.10511ed0
mulsd xmm0, qword [esp + 0x60]
call fcn.10511dd0
mov dword [esp + 0x58], eax
mov eax, dword [edi + 0x94]
shl eax, 4
mov dword [esp + 0x5c], edx
cdq
mov ecx, eax
mov dword [esp + 0x20], edx
mov eax, esi
mov esi, dword [edi + 0x40]
mov edi, dword [edi + 0x44]
cdq
sub ecx, eax
mov dword [esp + 0x10], esi
mov dword [esp + 0x60], ecx
sbb dword [esp + 0x20], edx
mov edx, dword [esp + 0x88]
mov ecx, dword [esp + 0x74]
mov dword [esp + 0x18], edi
call fcn.10511ed0
cmp dword [esp + 0x88], 0
divsd xmm0, qword [esp + 0x68]
movsd qword [esp + 0x68], xmm0
jg 0x10160e28
jl 0x10160f83
cmp dword [esp + 0x74], 0x80
jbe 0x10160f83
shrd esi, edi, 0xd
sar edi, 0xd
mov ecx, esi
mov edx, edi
call fcn.10511ed0
mov esi, dword [esp + 0x30]
movd xmm1, esi
cvtdq2pd xmm1, xmm1
divsd xmm0, xmm1
movsd qword [esp + 0x18], xmm0
movsd xmm0, qword [esp + 0x68]
call fcn.10526310
movaps xmm1, xmm0
movsd xmm0, qword [0x1059ba78]
movsd qword [esp + 0x40], xmm1
call fcn.10526310
movsd xmm1, qword [esp + 0x40]
divsd xmm1, xmm0
movsd xmm0, qword [esp + 0x18]
addsd xmm0, xmm0
addsd xmm1, xmm0
movsd xmm0, qword [0x105e46e8]
movsd qword [esp + 0x40], xmm1
call fcn.10526310
movsd qword [esp + 0x18], xmm0
movsd xmm0, qword [0x1059ba78]
call fcn.10526310
movsd xmm1, qword [esp + 0x18]
divsd xmm1, xmm0
movsd xmm0, qword [0x1059ba78]
movsd qword [esp + 0x18], xmm1
call fcn.10526310
movsd xmm1, qword [esp + 0x40]
comisd xmm1, xmmword [esp + 0x18]
movsd qword [esp + 0x10], xmm0
jbe 0x10160f1f
movsd xmm0, qword [0x1059ba70]
divsd xmm0, qword [esp + 0x68]
call fcn.10526310
movd xmm1, esi
cvtdq2pd xmm1, xmm1
mulsd xmm0, xmm1
divsd xmm0, qword [esp + 0x10]
mulsd xmm0, qword [0x1058db20]
call fcn.10511dd0
mov esi, eax
shld edx, esi, 0xd
shl esi, 0xd
mov dword [esp + 0x10], esi
jmp 0x10160f7f
movsd xmm0, qword [0x1059ba78]
call fcn.105205c0
movsd xmm3, qword [esp + 0x68]
movaps xmm1, xmm0
movsd xmm2, qword [0x1059ba70]
subsd xmm2, xmm3
mulsd xmm1, xmm3
mulsd xmm2, xmm3
addsd xmm2, xmm1
divsd xmm0, xmm2
call fcn.10526310
xorps xmm1, xmm1
cvtsi2sd xmm1, esi
mulsd xmm0, xmm1
divsd xmm0, qword [esp + 0x10]
mulsd xmm0, qword [0x1058db20]
call fcn.10511dd0
shld edx, eax, 0xd
shl eax, 0xd
mov dword [esp + 0x10], eax
mov dword [esp + 0x18], edx
mov eax, dword [esp + 0x7c]
xor ecx, ecx
mov edx, dword [esp + 0x78]
mov dword [esp + 0x74], ecx
mov esi, ecx
mov edi, ecx
shr esi, 1
and edi, 1
add esi, edx
add edi, eax
imul esi, ebx
imul edi, ebp
test esi, esi
js 0x10161104
mov edx, dword [esp + 0x2c]
mov eax, dword [edx + 0x3c]
shl eax, 2
cmp esi, eax
jge 0x101610fc
test edi, edi
js 0x101610fc
mov eax, dword [edx + 0x40]
shl eax, 2
cmp edi, eax
jge 0x101610fc
mov ebp, dword [esp + 0x3c]
lea ecx, [esi + ebx]
cmp esi, ebp
mov eax, ebp
mov edx, esi
cmovg eax, esi
mov dword [esp + 0x88], eax
lea eax, [ebx + ebp]
cmp ecx, eax
cmovge edx, ebp
lea ebp, [edx + ebx]
mov edx, dword [esp + 0x28]
mov ebx, dword [esp + 0x24]
cmp edi, edx
mov eax, edx
cmovg eax, edi
mov dword [esp + 0x40], eax
lea eax, [ebx + edx]
mov edx, edi
lea ecx, [edi + ebx]
cmp ecx, eax
mov ecx, dword [esp + 0x88]
cmovge edx, dword [esp + 0x28]
add ebx, edx
cmp ecx, ebp
jge 0x10161036
mov eax, dword [esp + 0x40]
cmp eax, ebx
jge 0x10161036
sub ebx, eax
sub ebp, ecx
imul ebx, ebp
jmp 0x10161038
xor ebx, ebx
mov eax, esi
mov ecx, dword [esp + 0x4c]
cdq
idiv dword [esp + 0x38]
mov esi, eax
mov eax, edi
cdq
idiv dword [esp + 0x24]
imul esi, dword [esp + 0x48]
imul eax, dword [esp + 0x50]
sar esi, cl
mov ecx, dword [esp + 0x2c]
imul esi, dword [ecx + 0x30]
mov ecx, dword [esp + 0x4c]
sar eax, cl
mov ecx, dword [esp + 0x5c]
add esi, eax
imul eax, esi, 0xc8
mov esi, dword [esp + 0x58]
add eax, dword [esp + 0x54]
add esi, dword [esp + 0x84]
mov dword [esp + 0x88], eax
mov eax, ebx
adc ecx, dword [esp + 0x34]
cdq
mov edi, edx
mov ebx, eax
mov eax, dword [esp + 0x30]
push edi
push ebx
cdq
push ecx
push esi
mov dword [esp + 0x50], eax
mov ebp, edx
call fcn.10511b50
mov esi, dword [esp + 0x40]
push ebp
push esi
push edx
push eax
call fcn.10511aa0
mov ecx, dword [esp + 0x88]
push edi
push ebx
add dword [ecx + 0x48], eax
mov eax, dword [esp + 0x20]
adc dword [ecx + 0x4c], edx
mov ecx, dword [esp + 0x18]
add ecx, dword [esp + 0x68]
adc eax, dword [esp + 0x28]
push eax
push ecx
call fcn.10511b50
push ebp
push esi
push edx
push eax
call fcn.10511aa0
mov ecx, dword [esp + 0x88]
mov ebx, dword [esp + 0x38]
mov ebp, dword [esp + 0x24]
add dword [ecx + 0x40], eax
adc dword [ecx + 0x44], edx
mov ecx, dword [esp + 0x74]
mov edx, dword [esp + 0x78]
mov eax, dword [esp + 0x7c]
inc ecx
mov dword [esp + 0x74], ecx
cmp ecx, 4
jl 0x10160f91
pop ebx
pop edi
pop esi
pop ebp
add esp, 0x60
ret