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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xffffffc0
sub esp, 0x74
mov edx, dword [ebp + 0x14]
xorps xmm0, xmm0
push ebx
push esi
push edi
mov eax, dword [edx + 0xfd0]
mov edi, dword [ebp + 0x18]
movlpd qword [esp + 0x58], xmm0
movlpd qword [esp + 0x50], xmm0
mov eax, dword [eax]
movlpd qword [esp + 0x48], xmm0
movsx eax, byte [eax + 0x14]
mov dword [esp + 0x64], eax
cmp edi, dword [ebp + 0x1c]
jg 0x101621a6
mov eax, dword [esp + 0x5c]
mov ecx, dword [esp + 0x54]
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x58]
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x4c]
mov dword [esp + 0x44], ecx
mov ecx, dword [esp + 0x50]
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x48]
mov dword [esp + 0x40], ecx
mov dword [esp + 0x30], eax
test edi, edi
je 0x10161e1e
cmp byte [edx + 0xc], 0
je 0x10162185
imul eax, edi, 0x538
mov dword [esp + 0x48], eax
mov ebx, dword [eax + edx + 0x14]
mov ecx, dword [eax + edx + 0x18]
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x50], ebx
lea eax, [ebx + eax*2]
lea eax, [ecx + eax*2]
mov esi, dword [eax*4 + 0x106341d0]
lea eax, [edi + edi*8]
mov dword [esp + 0x24], eax
mov eax, dword [edx + 0xffc]
mov dword [esp + 0x58], esi
movzx ebx, byte [esi + 0x10808274]
movzx esi, byte [esi + 0x1080825c]
test eax, eax
jns 0x10161e7b
add ecx, 3
sar eax, cl
add eax, ebx
jns 0x10161e74
xor ebx, ebx
jmp 0x10161e7b
cmp eax, ebx
cmovg eax, ebx
mov ebx, eax
mov eax, dword [edx + 0xff4]
test eax, eax
jns 0x10161e9d
mov ecx, dword [esp + 0x50]
add ecx, 3
sar eax, cl
add eax, esi
jns 0x10161e96
xor esi, esi
jmp 0x10161e9d
cmp eax, esi
cmovg eax, esi
mov esi, eax
mov eax, dword [edx + 0x1a78]
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x48]
push ebx
push esi
mov ecx, dword [eax + edx + 0x2c]
mov eax, dword [eax + edx + 0x1c]
mov edx, dword [ebp + 0x14]
mov dword [esp + 0x58], eax
push ecx
mov ecx, dword [ebp + 0x10]
mov eax, dword [edx + 0x1008]
mov edx, dword [esp + 0x30]
push dword [esp + 0x5c]
test byte [eax + 0x8c], 8
mov eax, dword [ecx + edx*8 + 0x28]
push eax
mov eax, dword [ecx + edx*8 + 0x18]
push eax
je 0x10161ee9
call dword [0x10b48fbc]
jmp 0x10161eef
call dword [0x10b48da0]
mov ecx, dword [esp + 0x44]
add esp, 0x18
mov dword [esp + 0x50], eax
mov eax, 1
mov dword [esp + 0x48], edx
lea ecx, [ecx*2 - 0x10]
shl eax, cl
sar eax, 1
cdq
add eax, dword [esp + 0x50]
adc edx, dword [esp + 0x48]
call fcn.10511c50
mov dword [esp + 0x2c], eax
mov eax, dword [ebp + 0x10]
imul esi, ebx
mov dword [esp + 0x28], edx
mov ecx, dword [eax + 0x10e8]
test byte [ecx + 0x8c], 8
je 0x10161f44
mov ecx, dword [eax + 0x1b58]
sub ecx, 5
jmp 0x10161f49
mov ecx, 3
mov ebx, dword [esp + 0x24]
movzx ecx, cx
mov dword [esp + 0x50], ecx
mov eax, dword [eax + ebx*8 + 0x44]
movzx ebx, word [eax + 2]
mov eax, ebx
sar ax, cl
cmp ax, 1
jle 0x10161f6e
movsx ebx, bx
sar ebx, cl
jmp 0x10161f73
mov ebx, 1
mov ecx, dword [esp + 0x2c]
mov eax, ecx
or eax, edx
jne 0x10161f97
xorps xmm0, xmm0
mov dword [esp + 0x24], eax
movlpd qword [esp + 0x68], xmm0
mov ebx, dword [esp + 0x6c]
mov esi, dword [esp + 0x68]
jmp 0x101620e5
call fcn.10511ed0
movd xmm1, esi
sub esp, 8
cvtdq2pd xmm1, xmm1
movd xmm2, ebx
divsd xmm0, xmm1
cvtdq2pd xmm2, xmm2
movaps xmm1, xmm0
movsd qword [esp + 0x58], xmm0
mulsd xmm2, xmm2
divsd xmm1, xmm2
movsd qword [esp], xmm1
call fcn.1051f90e
add esp, 8
lea eax, [esp + 0x78]
fstp qword [esp + 0x48]
movsd xmm0, qword [esp + 0x48]
push eax
lea eax, [esp + 0x74]
push eax
sub esp, 0x10
movsd qword [esp + 8], xmm0
movsd xmm0, qword [esp + 0x68]
movsd qword [esp], xmm0
push dword [esp + 0x70]
call fcn.1007f7d0
movd xmm2, esi
xorps xmm1, xmm1
cvtdq2pd xmm2, xmm2
add esp, 0x1c
movaps xmm0, xmm2
mulsd xmm0, qword [esp + 0x70]
maxsd xmm1, xmm0
xorps xmm0, xmm0
addsd xmm1, qword [0x1058db20]
cvttsd2si eax, xmm1
movsd xmm1, qword [esp + 0x78]
mulsd xmm1, qword [esp + 0x50]
mov dword [esp + 0x24], eax
mulsd xmm1, xmm2
maxsd xmm0, xmm1
addsd xmm0, qword [0x1058db20]
call fcn.10511dd0
mov esi, eax
mov ebx, edx
mov eax, dword [esp + 0x24]
test eax, eax
jne 0x10162072
mov ecx, dword [esp + 0x2c]
mov esi, ecx
mov edx, dword [esp + 0x28]
mov ebx, edx
shld ebx, esi, 4
shl esi, 4
jmp 0x101620e5
mov ecx, dword [ebp + 0x10]
imul dword [ecx + 0x31cc]
mov ecx, ebx
add eax, 0x100
adc edx, 0
shrd eax, edx, 9
mov dword [esp + 0x50], eax
mov eax, esi
shld ecx, eax, 7
sar edx, 9
shl eax, 7
add dword [esp + 0x50], eax
mov eax, dword [esp + 0x28]
adc edx, ecx
mov ecx, dword [esp + 0x2c]
shld eax, ecx, 0xb
shl ecx, 0xb
mov dword [esp + 0x48], ecx
mov ecx, dword [esp + 0x2c]
cmp edx, eax
jl 0x101620dd
jg 0x101620c6
mov eax, dword [esp + 0x48]
cmp dword [esp + 0x50], eax
jb 0x101620dd
mov edx, dword [esp + 0x28]
mov esi, ecx
mov ebx, edx
xor eax, eax
shld ebx, esi, 4
mov dword [esp + 0x24], eax
shl esi, 4
jmp 0x101620e5
mov eax, dword [esp + 0x24]
mov edx, dword [esp + 0x28]
mov edi, dword [ebp + 0x18]
test edi, edi
jne 0x1016212e
test edx, edx
jg 0x101620fd
jl 0x101620f7
cmp ecx, 0xffffffff
jae 0x101620fd
mov dword [esp + 0x50], ecx
jmp 0x1016210d
mov dword [esp + 0x50], 0xffffffff
mov dword [esp + 0x5c], 0
mov ecx, dword [ebp + 0x10]
mov edi, dword [esp + 0x64]
mov edx, dword [esp + 0x50]
mov eax, dword [esp + 0x24]
mov dword [ecx + edi*4 + 0x243b8], edx
mov edi, dword [ebp + 0x18]
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x28]
add dword [esp + 0x30], ecx
adc dword [esp + 0x34], edx
cdq
add dword [esp + 0x38], eax
adc dword [esp + 0x3c], edx
add dword [esp + 0x40], esi
mov edx, dword [ebp + 0x30]
adc dword [esp + 0x44], ebx
test edx, edx
je 0x10162155
mov eax, dword [esp + 0x24]
mov dword [edx + edi*4], eax
mov edx, dword [ebp + 0x34]
test edx, edx
je 0x10162167
mov eax, dword [esp + 0x28]
mov dword [edx + edi*8], ecx
mov dword [edx + edi*8 + 4], eax
mov eax, dword [ebp + 0x38]
test eax, eax
je 0x10162175
mov dword [eax + edi*8], esi
mov dword [eax + edi*8 + 4], ebx
mov edx, dword [ebp + 0x14]
inc edi
mov dword [ebp + 0x18], edi
cmp edi, dword [ebp + 0x1c]
jle 0x10161e10
mov edi, dword [esp + 0x3c]
mov edx, dword [esp + 0x38]
mov esi, dword [esp + 0x34]
mov ebx, dword [esp + 0x30]
mov ecx, dword [ebp + 0x28]
test ecx, ecx
je 0x101621cc
mov eax, edx
or eax, edi
jne 0x101621c8
mov al, 1
jmp 0x101621ca
mov eax, dword [esp + 0x54]
mov edi, dword [esp + 0x5c]
mov edx, dword [esp + 0x58]
mov esi, dword [esp + 0x4c]
mov ebx, dword [esp + 0x48]
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0x50]
mov dword [esp + 0x40], eax
jmp 0x10162195
xor al, al
mov byte [ecx], al
mov eax, dword [ebp + 0x2c]
test eax, eax
je 0x101621df
shld esi, ebx, 4
shl ebx, 4
mov dword [eax], ebx
mov dword [eax + 4], esi
mov eax, dword [ebp + 0x20]
mov ecx, dword [esp + 0x40]
pop edi
pop esi
mov dword [eax], edx
mov eax, dword [ebp + 0x24]
pop ebx
mov dword [eax], ecx
mov ecx, dword [esp + 0x38]
mov dword [eax + 4], ecx
mov esp, ebp
pop ebp
ret