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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xffffffc0
sub esp, 0x74
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edi, dword [eax + 0xc]
mov eax, dword [ebp + 0x10]
mov esi, 1
dec ebx
cmp ebx, esi
mov dword [esp + 0x28], edi
jle 0x1016e3fc
mov ecx, dword [eax + esi*4 - 4]
cmp ecx, dword [eax + esi*4]
jbe 0x1016e3f7
call fcn.10105849
mov eax, dword [ebp + 0x10]
inc esi
cmp esi, ebx
jl 0x1016e3e6
push 0
push 0
call fcn.10167030
add esp, 8
mov dword [esp + 0x38], eax
test eax, eax
jne 0x1016e41a
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [edi + 0x30]
fld qword [0x101d0650]
mov edi, dword [edi + 0x2c]
fstp qword [esp + 0x58]
fldz
imul edi, edi, 0x204
fstp qword [esp + 0x60]
add edi, eax
mov dword [esp + 0x20], edi
mov dword [esp + 0x18], eax
cmp eax, edi
je 0x1016e5ca
jmp 0x1016e450
mov ecx, dword [esp + 0x18]
mov eax, dword [ecx + 4]
mov ecx, dword [ecx]
mov edx, ecx
shl edx, 4
sub edx, ecx
lea ecx, [eax + edx*4]
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x10], eax
cmp eax, ecx
je 0x1016e5b3
jmp 0x1016e480
mov eax, dword [esp + 0x10]
cmp dword [eax + 0x34], 0
je 0x1016e59e
mov ecx, eax
mov eax, dword [ecx + 0x34]
mov ecx, dword [ecx + 0x30]
lea ecx, [ecx + ecx*8]
lea ecx, [eax + ecx*4]
mov dword [esp + 0x34], ecx
mov dword [esp + 0x14], eax
cmp eax, ecx
je 0x1016e59e
lea esp, [esp]
mov edx, dword [esp + 0x14]
cmp dword [edx + 4], 0
je 0x1016e589
mov ecx, dword [esp + 0x10]
cmp dword [ecx + 0x20], 0
mov eax, edx
mov eax, dword [eax]
mov dword [esp + 0x24], 0
jle 0x1016e589
lea ebx, [eax + 0x1c]
jmp 0x1016e4e0
cmp dword [ebx], 0
je 0x1016e570
mov eax, dword [ebx - 4]
mov esi, dword [ebx]
mov edx, eax
shl edx, 4
sub edx, eax
lea edi, [esi + edx*4]
cmp esi, edi
je 0x1016e570
lea esp, [esp]
push esi
call fcn.1016e150
mov eax, dword [esi]
mov ecx, dword [esi + 4]
lea eax, [eax + eax*8]
lea edx, [ecx + eax*8]
add esp, 4
cmp ecx, edx
je 0x1016e569
fldz
fld qword [esp + 0x60]
fld qword [esp + 0x58]
jmp 0x1016e526
fxch st(2)
fxch st(2)
fcom qword [ecx + 0x28]
fnstsw ax
test ah, 5
jp 0x1016e558
fxch st(2)
fcom qword [ecx + 0x28]
fnstsw ax
test ah, 0x41
jne 0x1016e543
fstp st(0)
fld qword [ecx + 0x28]
fxch st(1)
fcom qword [ecx + 0x28]
fnstsw ax
test ah, 5
jp 0x1016e554
fstp st(0)
fld qword [ecx + 0x28]
fxch st(1)
fxch st(2)
add ecx, 0x48
cmp ecx, edx
jne 0x1016e524
fstp st(0)
fstp qword [esp + 0x60]
fstp qword [esp + 0x58]
add esi, 0x3c
cmp esi, edi
jne 0x1016e500
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x10]
inc eax
add ebx, 0x34
cmp eax, dword [ecx + 0x20]
mov dword [esp + 0x24], eax
jl 0x1016e4e0
mov eax, dword [esp + 0x14]
add eax, 0x24
mov dword [esp + 0x14], eax
cmp eax, dword [esp + 0x34]
jne 0x1016e4b0
mov eax, dword [esp + 0x10]
add eax, 0x3c
mov dword [esp + 0x10], eax
cmp eax, dword [esp + 0x1c]
jne 0x1016e480
mov eax, dword [esp + 0x18]
add eax, 0x204
mov dword [esp + 0x18], eax
cmp eax, dword [esp + 0x20]
jne 0x1016e450
call fcn.1017b4f0
test eax, eax
je 0x1016e5f2
fld qword [esp + 0x60]
sub esp, 0x10
fstp qword [esp + 8]
fld qword [esp + 0x68]
fstp qword [esp]
push str.min_rdslope___f_max_rdslope___f_n
call fcn.1017b500
add esp, 0x14
mov edx, dword [ebp + 8]
push 1
push edx
call fcn.1017d3e0
add esp, 8
cmp dword [ebp + 0xc], 0
mov dword [esp + 0x2c], 0
jle 0x1016ec0c
fld qword [esp + 0x58]
mov esi, dword [esp + 0x28]
fst qword [esp + 0x78]
xor eax, eax
fld qword [esp + 0x60]
mov dword [esp + 0x30], eax
fst qword [esp + 0x70]
mov dword [esp + 0x40], eax
fldz
fstp qword [esp + 0x50]
jmp 0x1016e63a
fxch st(1)
mov eax, dword [ebp + 0x10]
mov ecx, dword [esp + 0x2c]
mov eax, dword [eax + ecx*4]
mov dword [esp + 0x48], eax
cmp eax, 0xffffffff
je 0x1016e965
mov edx, dword [ebp + 8]
faddp st(1)
push edx
fmul qword [0x1026bd40]
fstp qword [esp + 0x6c]
call fcn.1017d1a0
mov eax, dword [esp + 0x3c]
push eax
call fcn.10166520
mov ecx, dword [esi + 0x2c]
imul ecx, ecx, 0x204
mov dword [esp + 0x54], eax
mov eax, dword [esi + 0x30]
add ecx, eax
add esp, 8
mov dword [esp + 0x20], ecx
mov dword [esp + 0x18], eax
cmp eax, ecx
je 0x1016e7f3
fld qword [esp + 0x68]
mov ecx, dword [esp + 0x18]
mov eax, dword [ecx + 4]
mov ecx, dword [ecx]
mov edx, ecx
shl edx, 4
sub edx, ecx
lea ecx, [eax + edx*4]
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x10], eax
cmp eax, ecx
je 0x1016e7da
mov eax, dword [esp + 0x10]
cmp dword [eax + 0x34], 0
je 0x1016e7c5
mov ecx, eax
mov eax, dword [ecx + 0x34]
mov ecx, dword [ecx + 0x30]
lea ecx, [ecx + ecx*8]
lea ecx, [eax + ecx*4]
mov dword [esp + 0x34], ecx
mov dword [esp + 0x14], eax
cmp eax, ecx
je 0x1016e7c5
mov edx, dword [esp + 0x14]
cmp dword [edx + 4], 0
je 0x1016e7b0
mov ecx, dword [esp + 0x10]
cmp dword [ecx + 0x20], 0
mov eax, edx
mov eax, dword [eax]
mov dword [esp + 0x24], 0
jle 0x1016e7b0
add eax, 0x1c
mov dword [esp + 0x3c], eax
mov edx, dword [esp + 0x3c]
cmp dword [edx], 0
je 0x1016e795
mov eax, edx
mov edi, dword [eax]
mov eax, dword [eax - 4]
mov ecx, eax
shl ecx, 4
sub ecx, eax
lea eax, [edi + ecx*4]
mov dword [esp + 0x44], eax
cmp edi, eax
je 0x1016e795
mov ebx, dword [edi + 0x28]
test ebx, ebx
je 0x1016e78c
mov eax, dword [edi]
lea edx, [eax + eax*8]
mov eax, dword [edi + 4]
lea esi, [eax + edx*8]
mov edx, ebx
mov ecx, edx
cmp ecx, esi
je 0x1016e767
fcom qword [ecx + 0x28]
fnstsw ax
test ah, 0x41
jp 0x1016e760
lea edx, [ecx + 0x48]
add ecx, 0x48
cmp ecx, esi
jne 0x1016e753
mov eax, ebx
cmp eax, edx
je 0x1016e77b
mov ecx, dword [esp + 0x2c]
mov dword [eax + 0x20], ecx
add eax, 0x48
cmp eax, edx
jne 0x1016e771
cmp eax, esi
je 0x1016e78c
or ecx, 0xffffffff
mov dword [eax + 0x20], ecx
add eax, 0x48
cmp eax, esi
jne 0x1016e782
add edi, 0x3c
cmp edi, dword [esp + 0x44]
jne 0x1016e739
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x10]
add dword [esp + 0x3c], 0x34
inc eax
cmp eax, dword [ecx + 0x20]
mov dword [esp + 0x24], eax
jl 0x1016e717
mov eax, dword [esp + 0x14]
add eax, 0x24
mov dword [esp + 0x14], eax
cmp eax, dword [esp + 0x34]
jne 0x1016e6e8
mov eax, dword [esp + 0x10]
add eax, 0x3c
mov dword [esp + 0x10], eax
cmp eax, dword [esp + 0x1c]
jne 0x1016e6bc
mov eax, dword [esp + 0x18]
add eax, 0x204
mov dword [esp + 0x18], eax
cmp eax, dword [esp + 0x20]
jne 0x1016e699
fstp st(0)
mov eax, dword [esp + 0x28]
mov ecx, dword [eax + 0x2c]
mov esi, dword [eax + 0x30]
imul ecx, ecx, 0x204
add ecx, esi
mov dword [esp + 0x20], ecx
cmp esi, ecx
je 0x1016e8a9
mov eax, dword [esi]
mov edi, dword [esi + 4]
mov edx, eax
shl edx, 4
sub edx, eax
lea eax, [edi + edx*4]
mov dword [esp + 0x1c], eax
cmp edi, eax
je 0x1016e89b
cmp dword [edi + 0x34], 0
je 0x1016e88e
xor ebx, ebx
cmp dword [edi + 0x20], ebx
jle 0x1016e88e
mov eax, dword [esp + 0x2c]
push eax
mov ecx, edi
sub ecx, dword [esi + 4]
mov eax, 0x88888889
imul ecx
add edx, ecx
sar edx, 5
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
mov edx, dword [esp + 0x2c]
push ebx
push ecx
mov ecx, esi
sub ecx, dword [edx + 0x30]
mov eax, 0xfe03f81
imul ecx
mov ecx, dword [esp + 0x44]
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
mov edx, dword [ebp + 8]
push eax
push ecx
push edx
call fcn.1017caa0
add esp, 0x18
test eax, eax
jne 0x1016e410
inc ebx
cmp ebx, dword [edi + 0x20]
jl 0x1016e835
add edi, 0x3c
cmp edi, dword [esp + 0x1c]
jne 0x1016e828
mov ecx, dword [esp + 0x20]
add esi, 0x204
cmp esi, ecx
jne 0x1016e811
mov edi, dword [esp + 0x38]
push edi
call fcn.10166520
fld qword [esp + 0x6c]
mov ebx, dword [esp + 0x4c]
mov esi, eax
add esp, 4
cmp esi, ebx
jle 0x1016e8ca
fstp qword [esp + 0x78]
jmp 0x1016e8f2
cmp dword [esp + 0x30], 0
fst qword [esp + 0x70]
je 0x1016e8e2
fld qword [esp + 0x50]
fcomp st(1)
fnstsw ax
test ah, 0x41
jne 0x1016e8f0
fstp qword [esp + 0x50]
mov dword [esp + 0x30], 1
jmp 0x1016e8f2
fstp st(0)
mov eax, dword [ebp + 8]
push eax
call fcn.1017d2c0
mov ecx, dword [esp + 0x50]
push 0
push ecx
push edi
call fcn.10166fc0
add esp, 0x10
test eax, eax
jge 0x1016e914
call fcn.10105849
call fcn.1017b4f0
test eax, eax
je 0x1016e936
fld qword [esp + 0x68]
sub esp, 8
fstp qword [esp]
push esi
push ebx
push str.maxlen_08ld_actuallen_08ld_thresh_f_n
call fcn.1017b500
add esp, 0x14
fld qword [esp + 0x70]
inc dword [esp + 0x40]
fld qword [0x1026bf88]
fsubr st(1)
fld qword [esp + 0x78]
fcom st(1)
fnstsw ax
fstp st(1)
test ah, 5
jp 0x1016e97d
cmp dword [esp + 0x40], 0x20
jge 0x1016e97d
mov esi, dword [esp + 0x28]
jmp 0x1016e638
fstp st(0)
mov dword [esp + 0x30], 1
fstp st(0)
fld qword [0x1026bd18]
fstp qword [esp + 0x50]
jmp 0x1016e995
cmp dword [esp + 0x30], 0
fstp st(1)
fstp st(0)
jne 0x1016e995
push str.warning:_empty_layer_generated_n
call fcn.1017b500
add esp, 4
call fcn.1017b4f0
test eax, eax
je 0x1016e9ba
fld qword [esp + 0x50]
mov edx, dword [esp + 0x30]
sub esp, 8
fstp qword [esp]
push edx
push str.success__d_goodthresh__f_n
call fcn.1017b500
add esp, 0x10
mov eax, dword [esp + 0x28]
mov ecx, dword [eax + 0x30]
mov eax, dword [eax + 0x2c]
imul eax, eax, 0x204
add eax, ecx
mov dword [esp + 0x20], eax
mov dword [esp + 0x18], ecx
cmp ecx, eax
je 0x1016eb41
fld qword [esp + 0x50]
mov ecx, dword [esp + 0x18]
mov eax, dword [ecx + 4]
mov ecx, dword [ecx]
mov edx, ecx
shl edx, 4
sub edx, ecx
lea ecx, [eax + edx*4]
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x10], eax
cmp eax, ecx
je 0x1016eb28
mov eax, dword [esp + 0x10]
cmp dword [eax + 0x34], 0
je 0x1016eb13
mov ecx, eax
mov eax, dword [ecx + 0x34]
mov ecx, dword [ecx + 0x30]
lea ecx, [ecx + ecx*8]
lea ecx, [eax + ecx*4]
mov dword [esp + 0x34], ecx
mov dword [esp + 0x14], eax
cmp eax, ecx
je 0x1016eb13
mov edx, dword [esp + 0x14]
cmp dword [edx + 4], 0
je 0x1016eafe
mov ecx, dword [esp + 0x10]
cmp dword [ecx + 0x20], 0
mov eax, edx
mov eax, dword [eax]
mov dword [esp + 0x24], 0
jle 0x1016eafe
add eax, 0x1c
mov dword [esp + 0x3c], eax
mov edx, dword [esp + 0x3c]
cmp dword [edx], 0
je 0x1016eae3
mov eax, edx
mov ebx, dword [eax]
mov eax, dword [eax - 4]
mov ecx, eax
shl ecx, 4
sub ecx, eax
lea eax, [ebx + ecx*4]
mov dword [esp + 0x44], eax
cmp ebx, eax
je 0x1016eae3
mov edi, dword [ebx + 0x28]
test edi, edi
je 0x1016eada
cmp dword [esp + 0x30], 0
mov eax, dword [ebx]
lea edx, [eax + eax*8]
mov eax, dword [ebx + 4]
lea edx, [eax + edx*8]
mov esi, edi
je 0x1016eab5
mov ecx, edi
cmp ecx, edx
je 0x1016eab5
fcom qword [ecx + 0x28]
fnstsw ax
test ah, 0x41
jp 0x1016eaae
lea esi, [ecx + 0x48]
add ecx, 0x48
cmp ecx, edx
jne 0x1016eaa1
mov eax, edi
cmp eax, esi
je 0x1016eac9
mov ecx, dword [esp + 0x2c]
mov dword [eax + 0x20], ecx
add eax, 0x48
cmp eax, esi
jne 0x1016eabf
cmp eax, edx
je 0x1016eada
or ecx, 0xffffffff
mov dword [eax + 0x20], ecx
add eax, 0x48
cmp eax, edx
jne 0x1016ead0
add ebx, 0x3c
cmp ebx, dword [esp + 0x44]
jne 0x1016ea80
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x10]
add dword [esp + 0x3c], 0x34
inc eax
cmp eax, dword [ecx + 0x20]
mov dword [esp + 0x24], eax
jl 0x1016ea5e
mov eax, dword [esp + 0x14]
add eax, 0x24
mov dword [esp + 0x14], eax
cmp eax, dword [esp + 0x34]
jne 0x1016ea2f
mov eax, dword [esp + 0x10]
add eax, 0x3c
mov dword [esp + 0x10], eax
cmp eax, dword [esp + 0x1c]
jne 0x1016ea03
mov eax, dword [esp + 0x18]
add eax, 0x204
mov dword [esp + 0x18], eax
cmp eax, dword [esp + 0x20]
jne 0x1016e9e0
fstp st(0)
mov eax, dword [esp + 0x28]
mov ecx, dword [eax + 0x2c]
mov esi, dword [eax + 0x30]
imul ecx, ecx, 0x204
add ecx, esi
mov dword [esp + 0x20], ecx
cmp esi, ecx
je 0x1016ebfa
nop
mov eax, dword [esi]
mov edi, dword [esi + 4]
mov edx, eax
shl edx, 4
sub edx, eax
lea eax, [edi + edx*4]
mov dword [esp + 0x1c], eax
cmp edi, eax
je 0x1016ebec
cmp dword [edi + 0x34], 0
je 0x1016ebe5
xor ebx, ebx
cmp dword [edi + 0x20], ebx
jle 0x1016ebe5
mov eax, dword [esp + 0x2c]
push eax
mov ecx, edi
sub ecx, dword [esi + 4]
mov eax, 0x88888889
imul ecx
add edx, ecx
sar edx, 5
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
mov edx, dword [esp + 0x2c]
push ebx
push ecx
mov ecx, esi
sub ecx, dword [edx + 0x30]
mov eax, 0xfe03f81
imul ecx
mov ecx, dword [esp + 0x44]
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
mov edx, dword [ebp + 8]
push eax
push ecx
push edx
call fcn.1017caa0
add esp, 0x18
test eax, eax
jne 0x1016e410
inc ebx
cmp ebx, dword [edi + 0x20]
jl 0x1016eb84
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x20]
add edi, 0x3c
cmp edi, eax
jne 0x1016eb77
add esi, 0x204
cmp esi, ecx
jne 0x1016eb60
mov eax, dword [esp + 0x2c]
inc eax
cmp eax, dword [ebp + 0xc]
mov dword [esp + 0x2c], eax
jl 0x1016e612
call fcn.1017b4f0
cmp eax, 5
jl 0x1016ec22
mov eax, dword [ebp + 8]
push eax
call fcn.1016e220
add esp, 4
mov ecx, dword [esp + 0x38]
push ecx
call fcn.10166f20
add esp, 4
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret