Function at 0x5116c0
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
add ebx, 0xffffffff
cmp ebx, esi
mov dword [esp + 0x28], edi
jle 0x511708
jmp 0x5116f0
mov ecx, dword [eax + esi*4 - 4]
cmp ecx, dword [eax + esi*4]
jbe 0x511701
call fcn.00562671
mov eax, dword [ebp + 0x10]
add esi, 1
cmp esi, ebx
jl 0x5116f0
push 0
push 0
call fcn.00523560
add esp, 8
test eax, eax
mov dword [esp + 0x38], eax
jne 0x511726
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [edi + 0x30]
fld qword [0x5cce28]
mov edi, dword [edi + 0x2c]
fstp qword [esp + 0x58]
fldz
imul edi, edi, 0x204
fstp qword [esp + 0x60]
add edi, eax
cmp eax, edi
mov dword [esp + 0x20], edi
mov dword [esp + 0x18], eax
je 0x5118cc
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]
cmp eax, ecx
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x10], eax
je 0x5118b5
jmp 0x511780
mov eax, dword [esp + 0x10]
cmp dword [eax + 0x34], 0
je 0x5118a0
mov ecx, eax
mov eax, dword [ecx + 0x34]
mov ecx, dword [ecx + 0x30]
lea ecx, [ecx + ecx*8]
lea ecx, [eax + ecx*4]
cmp eax, ecx
mov dword [esp + 0x34], ecx
mov dword [esp + 0x14], eax
je 0x5118a0
lea esp, [esp]
mov edx, dword [esp + 0x14]
cmp dword [edx + 4], 0
je 0x51188b
mov ecx, dword [esp + 0x10]
cmp dword [ecx + 0x20], 0
mov eax, edx
mov eax, dword [eax]
mov dword [esp + 0x24], 0
jle 0x51188b
lea ebx, [eax + 0x1c]
jmp 0x5117e0
cmp dword [ebx], 0
je 0x511870
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 0x511870
lea esp, [esp]
push esi
call fcn.00511440
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 0x511869
fldz
fld qword [esp + 0x60]
fld qword [esp + 0x58]
jmp 0x511826
fxch st(2)
fxch st(2)
fcom qword [ecx + 0x28]
fnstsw ax
test ah, 5
jp 0x511858
fxch st(2)
fcom qword [ecx + 0x28]
fnstsw ax
test ah, 0x41
jne 0x511843
fstp st(0)
fld qword [ecx + 0x28]
fxch st(1)
fcom qword [ecx + 0x28]
fnstsw ax
test ah, 5
jp 0x511854
fstp st(0)
fld qword [ecx + 0x28]
fxch st(1)
fxch st(2)
add ecx, 0x48
cmp ecx, edx
jne 0x511824
fstp st(0)
fstp qword [esp + 0x60]
fstp qword [esp + 0x58]
add esi, 0x3c
cmp esi, edi
jne 0x511800
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x10]
add eax, 1
add ebx, 0x34
cmp eax, dword [ecx + 0x20]
mov dword [esp + 0x24], eax
jl 0x5117e0
mov eax, dword [esp + 0x14]
add eax, 0x24
cmp eax, dword [esp + 0x34]
mov dword [esp + 0x14], eax
jne 0x5117b0
mov eax, dword [esp + 0x10]
add eax, 0x3c
cmp eax, dword [esp + 0x1c]
mov dword [esp + 0x10], eax
jne 0x511780
mov eax, dword [esp + 0x18]
add eax, 0x204
cmp eax, dword [esp + 0x20]
mov dword [esp + 0x18], eax
jne 0x511754
call fcn.00526580
test eax, eax
je 0x5118f4
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.00526590
add esp, 0x14
mov edx, dword [ebp + 8]
push 1
push edx
call fcn.00528490
add esp, 8
cmp dword [ebp + 0xc], 0
mov dword [esp + 0x2c], 0
jle 0x511f20
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 0x51193c
fxch st(1)
mov eax, dword [ebp + 0x10]
mov ecx, dword [esp + 0x2c]
mov eax, dword [eax + ecx*4]
cmp eax, 0xffffffff
mov dword [esp + 0x48], eax
je 0x511c73
mov edx, dword [ebp + 8]
faddp st(1)
push edx
fmul qword [0x5aafe8]
fstp qword [esp + 0x6c]
call fcn.00528250
mov eax, dword [esp + 0x3c]
push eax
call fcn.00522b90
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
cmp eax, ecx
mov dword [esp + 0x20], ecx
mov dword [esp + 0x18], eax
je 0x511af7
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]
cmp eax, ecx
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x10], eax
je 0x511ade
mov eax, dword [esp + 0x10]
cmp dword [eax + 0x34], 0
je 0x511ac9
mov ecx, eax
mov eax, dword [ecx + 0x34]
mov ecx, dword [ecx + 0x30]
lea ecx, [ecx + ecx*8]
lea ecx, [eax + ecx*4]
cmp eax, ecx
mov dword [esp + 0x34], ecx
mov dword [esp + 0x14], eax
je 0x511ac9
mov edx, dword [esp + 0x14]
cmp dword [edx + 4], 0
je 0x511ab4
mov ecx, dword [esp + 0x10]
cmp dword [ecx + 0x20], 0
mov eax, edx
mov eax, dword [eax]
mov dword [esp + 0x24], 0
jle 0x511ab4
add eax, 0x1c
mov dword [esp + 0x3c], eax
mov edx, dword [esp + 0x3c]
cmp dword [edx], 0
je 0x511a97
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]
cmp edi, eax
mov dword [esp + 0x44], eax
je 0x511a97
mov ebx, dword [edi + 0x28]
test ebx, ebx
je 0x511a8e
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 0x511a69
fcom qword [ecx + 0x28]
fnstsw ax
test ah, 0x41
jp 0x511a62
lea edx, [ecx + 0x48]
add ecx, 0x48
cmp ecx, esi
jne 0x511a55
mov eax, ebx
cmp eax, edx
je 0x511a7d
mov ecx, dword [esp + 0x2c]
mov dword [eax + 0x20], ecx
add eax, 0x48
cmp eax, edx
jne 0x511a73
cmp eax, esi
je 0x511a8e
or ecx, 0xffffffff
mov dword [eax + 0x20], ecx
add eax, 0x48
cmp eax, esi
jne 0x511a84
add edi, 0x3c
cmp edi, dword [esp + 0x44]
jne 0x511a3b
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x10]
add dword [esp + 0x3c], 0x34
add eax, 1
cmp eax, dword [ecx + 0x20]
mov dword [esp + 0x24], eax
jl 0x511a19
mov eax, dword [esp + 0x14]
add eax, 0x24
cmp eax, dword [esp + 0x34]
mov dword [esp + 0x14], eax
jne 0x5119ea
mov eax, dword [esp + 0x10]
add eax, 0x3c
cmp eax, dword [esp + 0x1c]
mov dword [esp + 0x10], eax
jne 0x5119be
mov eax, dword [esp + 0x18]
add eax, 0x204
cmp eax, dword [esp + 0x20]
mov dword [esp + 0x18], eax
jne 0x51199b
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
cmp esi, ecx
mov dword [esp + 0x20], ecx
je 0x511bb6
mov eax, dword [esi]
mov edi, dword [esi + 4]
mov edx, eax
shl edx, 4
sub edx, eax
lea eax, [edi + edx*4]
cmp edi, eax
mov dword [esp + 0x1c], eax
je 0x511ba8
cmp dword [edi + 0x34], 0
je 0x511b9b
xor ebx, ebx
cmp dword [edi + 0x20], ebx
jle 0x511b9b
lea esp, [esp]
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.00527b60
add esp, 0x18
test eax, eax
jne 0x51171c
add ebx, 1
cmp ebx, dword [edi + 0x20]
jl 0x511b40
add edi, 0x3c
cmp edi, dword [esp + 0x1c]
jne 0x511b2c
mov ecx, dword [esp + 0x20]
add esi, 0x204
cmp esi, ecx
jne 0x511b15
mov edi, dword [esp + 0x38]
push edi
call fcn.00522b90
fld qword [esp + 0x6c]
mov ebx, dword [esp + 0x4c]
mov esi, eax
add esp, 4
cmp esi, ebx
jle 0x511bd7
fstp qword [esp + 0x78]
jmp 0x511bff
cmp dword [esp + 0x30], 0
fst qword [esp + 0x70]
je 0x511bef
fld qword [esp + 0x50]
fcomp st(1)
fnstsw ax
test ah, 0x41
jne 0x511bfd
fstp qword [esp + 0x50]
mov dword [esp + 0x30], 1
jmp 0x511bff
fstp st(0)
mov eax, dword [ebp + 8]
push eax
call fcn.00528370
mov ecx, dword [esp + 0x50]
push 0
push ecx
push edi
call fcn.005234f0
add esp, 0x10
test eax, eax
jge 0x511c21
call fcn.00562671
call fcn.00526580
test eax, eax
je 0x511c43
fld qword [esp + 0x68]
sub esp, 8
fstp qword [esp]
push esi
push ebx
push 0x5ccdd8
call fcn.00526590
add esp, 0x14
fld qword [esp + 0x70]
add dword [esp + 0x40], 1
fld qword [0x5ccdd0]
fsubr st(1)
fld qword [esp + 0x78]
fcom st(1)
fnstsw ax
fstp st(1)
test ah, 5
jp 0x511c8b
cmp dword [esp + 0x40], 0x20
jge 0x511c8b
mov esi, dword [esp + 0x28]
jmp 0x51193a
fstp st(0)
mov dword [esp + 0x30], 1
fstp st(0)
fld qword [0x5ad1c0]
fstp qword [esp + 0x50]
jmp 0x511ca3
cmp dword [esp + 0x30], 0
fstp st(1)
fstp st(0)
jne 0x511ca3
push str.warning:_empty_layer_generated_n
call fcn.00526590
add esp, 4
call fcn.00526580
test eax, eax
je 0x511cc8
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.00526590
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
cmp ecx, eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x18], ecx
je 0x511e51
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]
cmp eax, ecx
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x10], eax
je 0x511e38
mov eax, dword [esp + 0x10]
cmp dword [eax + 0x34], 0
je 0x511e23
mov ecx, eax
mov eax, dword [ecx + 0x34]
mov ecx, dword [ecx + 0x30]
lea ecx, [ecx + ecx*8]
lea ecx, [eax + ecx*4]
cmp eax, ecx
mov dword [esp + 0x34], ecx
mov dword [esp + 0x14], eax
je 0x511e23
mov edx, dword [esp + 0x14]
cmp dword [edx + 4], 0
je 0x511e0e
mov ecx, dword [esp + 0x10]
cmp dword [ecx + 0x20], 0
mov eax, edx
mov eax, dword [eax]
mov dword [esp + 0x24], 0
jle 0x511e0e
add eax, 0x1c
mov dword [esp + 0x3c], eax
mov edx, dword [esp + 0x3c]
cmp dword [edx], 0
je 0x511df1
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]
cmp ebx, eax
mov dword [esp + 0x44], eax
je 0x511df1
mov edi, dword [ebx + 0x28]
test edi, edi
je 0x511de8
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 0x511dc3
mov ecx, edi
cmp ecx, edx
je 0x511dc3
fcom qword [ecx + 0x28]
fnstsw ax
test ah, 0x41
jp 0x511dbc
lea esi, [ecx + 0x48]
add ecx, 0x48
cmp ecx, edx
jne 0x511daf
mov eax, edi
cmp eax, esi
je 0x511dd7
mov ecx, dword [esp + 0x2c]
mov dword [eax + 0x20], ecx
add eax, 0x48
cmp eax, esi
jne 0x511dcd
cmp eax, edx
je 0x511de8
or ecx, 0xffffffff
mov dword [eax + 0x20], ecx
add eax, 0x48
cmp eax, edx
jne 0x511dde
add ebx, 0x3c
cmp ebx, dword [esp + 0x44]
jne 0x511d8e
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x10]
add dword [esp + 0x3c], 0x34
add eax, 1
cmp eax, dword [ecx + 0x20]
mov dword [esp + 0x24], eax
jl 0x511d6c
mov eax, dword [esp + 0x14]
add eax, 0x24
cmp eax, dword [esp + 0x34]
mov dword [esp + 0x14], eax
jne 0x511d3d
mov eax, dword [esp + 0x10]
add eax, 0x3c
cmp eax, dword [esp + 0x1c]
mov dword [esp + 0x10], eax
jne 0x511d11
mov eax, dword [esp + 0x18]
add eax, 0x204
cmp eax, dword [esp + 0x20]
mov dword [esp + 0x18], eax
jne 0x511cee
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
cmp esi, ecx
mov dword [esp + 0x20], ecx
je 0x511f0c
nop
mov eax, dword [esi]
mov edi, dword [esi + 4]
mov edx, eax
shl edx, 4
sub edx, eax
lea eax, [edi + edx*4]
cmp edi, eax
mov dword [esp + 0x1c], eax
je 0x511efe
cmp dword [edi + 0x34], 0
je 0x511ef7
xor ebx, ebx
cmp dword [edi + 0x20], ebx
jle 0x511ef7
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.00527b60
add esp, 0x18
test eax, eax
jne 0x51171c
add ebx, 1
cmp ebx, dword [edi + 0x20]
jl 0x511e94
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x20]
add edi, 0x3c
cmp edi, eax
jne 0x511e87
add esi, 0x204
cmp esi, ecx
jne 0x511e70
mov eax, dword [esp + 0x2c]
add eax, 1
cmp eax, dword [ebp + 0xc]
mov dword [esp + 0x2c], eax
jl 0x511914
call fcn.00526580
cmp eax, 5
jl 0x511f36
mov eax, dword [ebp + 8]
push eax
call fcn.00511510
add esp, 4
mov ecx, dword [esp + 0x38]
push ecx
call fcn.005234c0
add esp, 4
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret