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

Disassembly:
sub esp, 0x30
push ebx
mov ebx, dword [esp + 0x38]
test ebx, ebx
jne 0x10009ef3
xor eax, eax
pop ebx
add esp, 0x30
ret
push esi
mov esi, dword [esp + 0x40]
cmp esi, 2
jl 0x10009f02
cmp esi, 0x14
jle 0x10009f07
mov esi, 0xa
mov ecx, dword [esp + 0x44]
cmp ecx, 1
jl 0x10009f15
cmp ecx, 8
jle 0x10009f21
mov dword [esp + 0x44], 2
mov ecx, dword [esp + 0x44]
mov eax, dword [esp + 0x48]
cmp eax, 1
jl 0x10009f2e
cmp eax, ecx
jle 0x10009f36
mov dword [esp + 0x48], 1
fldz
fcom dword [esp + 0x4c]
fnstsw ax
test ah, 0x44
jp 0x10009f4d
fld dword [0x10142d8c]
fstp dword [esp + 0x4c]
fcom dword [esp + 0x50]
fnstsw ax
test ah, 0x44
jp 0x10009f5e
fld1
fstp dword [esp + 0x50]
fcomp dword [esp + 0x54]
fnstsw ax
test ah, 0x44
jp 0x10009f73
fld dword [0x10142d94]
fstp dword [esp + 0x54]
push ebp
push edi
push ebx
call sym.leptonlib.dll_pixGetHeight
mov edi, eax
push ebx
mov dword [esp + 0x28], edi
call sym.leptonlib.dll_pixGetWidth
mov dword [esp + 0x34], eax
mov eax, edi
cdq
idiv esi
mov ebp, eax
mov dword [esp + 0x20], ebp
fild dword [esp + 0x20]
fmul qword [0x10142230]
call fcn.10140710
push esi
mov ebx, eax
call sym.leptonlib.dll_ptaCreate
add esp, 0xc
mov dword [esp + 0x10], eax
test esi, esi
jle 0x1000a0a6
mov edi, ebx
neg edi
add ebp, ebx
mov dword [esp + 0x1c], esi
mov ebx, dword [esp + 0x20]
xor eax, eax
test edi, edi
setl al
dec ebx
dec eax
and eax, edi
cmp ebx, ebp
mov esi, eax
jl 0x10009fdd
mov ebx, ebp
mov edx, dword [esp + 0x2c]
mov ecx, ebx
sub ecx, esi
inc ecx
push ecx
push edx
push esi
push 0
call sym.leptonlib.dll_boxCreate
push 0
push eax
mov dword [esp + 0x54], eax
mov eax, dword [esp + 0x5c]
push eax
call sym.leptonlib.dll_pixClipRectangle
fld dword [esp + 0x78]
mov ecx, dword [esp + 0x6c]
fstp dword [esp + 0x18]
fld dword [esp + 0x74]
mov edx, dword [esp + 0x68]
add esp, 0x10
fstp dword [esp + 4]
mov dword [esp + 0x44], eax
fld dword [esp + 0x60]
fstp dword [esp]
push ecx
push edx
lea ecx, [esp + 0x44]
push ecx
lea edx, [esp + 0x2c]
push edx
push eax
call sym.leptonlib.dll_pixFindSkewSweepAndSearch
fld dword [0x10142d9c]
fcomp dword [esp + 0x50]
add esp, 0x20
fnstsw ax
test ah, 5
jp 0x1000a078
fld dword [esp + 0x14]
lea eax, [ebx + esi]
cdq
sub eax, edx
sar eax, 1
sub esp, 8
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x18]
fstp dword [esp + 4]
fild dword [esp + 0x3c]
fstp dword [esp]
push eax
call sym.leptonlib.dll_ptaAddPt
add esp, 0xc
lea ecx, [esp + 0x38]
push ecx
call sym.leptonlib.dll_pixDestroy
lea edx, [esp + 0x40]
push edx
call sym.leptonlib.dll_boxDestroy
mov eax, dword [esp + 0x20]
add esp, 8
add edi, eax
add ebp, eax
sub dword [esp + 0x1c], 1
jne 0x10009fc6
mov edi, dword [esp + 0x20]
mov eax, dword [esp + 0x10]
push eax
call sym.leptonlib.dll_boxaGetCount
add esp, 4
cmp eax, 2
jge 0x1000a0cf
lea ecx, [esp + 0x10]
push ecx
call sym.leptonlib.dll_ptaDestroy
add esp, 4
pop edi
pop ebp
pop esi
xor eax, eax
pop ebx
add esp, 0x30
ret
mov ecx, dword [esp + 0x10]
push 0
lea edx, [esp + 0x2c]
push edx
lea eax, [esp + 0x2c]
push eax
push ecx
call sym.leptonlib.dll_ptaGetLinearLSF
mov eax, dword [esp + 0x70]
add esp, 0x10
test eax, eax
je 0x1000a0f6
fld dword [esp + 0x24]
fstp dword [eax]
mov eax, dword [esp + 0x64]
test eax, eax
je 0x1000a104
fld dword [esp + 0x28]
fstp dword [eax]
push edi
call sym.leptonlib.dll_numaCreate
xor esi, esi
add esp, 4
mov ebx, eax
mov dword [esp + 0x44], esi
test edi, edi
jle 0x1000a14a
lea esp, [esp]
fild dword [esp + 0x44]
push ecx
fmul dword [esp + 0x28]
fadd dword [esp + 0x2c]
fstp dword [esp + 0x18]
fld dword [esp + 0x18]
fstp dword [esp]
push ebx
call sym.leptonlib.dll_numaAddNumber
inc esi
add esp, 8
cmp esi, edi
mov dword [esp + 0x44], esi
jl 0x1000a120
lea edx, [esp + 0x10]
push edx
call sym.leptonlib.dll_ptaDestroy
add esp, 4
pop edi
pop ebp
pop esi
mov eax, ebx
pop ebx
add esp, 0x30
ret