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

Disassembly:
mov eax, dword [esp + 0x1c]
sub esp, 0x5c
test eax, eax
jne 0x10002904
mov eax, 1
add esp, 0x5c
ret
push esi
mov esi, dword [esp + 0x64]
mov dword [eax], 0
test esi, esi
je 0x10002d61
push esi
call sym.leptonlib.dll_numaGetRefcount
add esp, 4
cmp eax, 8
jne 0x10002d61
push esi
call sym.leptonlib.dll_pixGetColormap
add esp, 4
test eax, eax
jne 0x10002d61
push edi
mov edi, dword [esp + 0x6c]
test edi, edi
je 0x1000295c
push edi
call sym.leptonlib.dll_numaGetRefcount
add esp, 4
cmp eax, 1
je 0x1000295c
pop edi
mov eax, 1
pop esi
add esp, 0x5c
ret
mov ecx, dword [esp + 0x70]
cmp ecx, 4
push ebp
jl 0x10002ce6
mov ebp, dword [esp + 0x78]
cmp ebp, 4
jl 0x10002ce6
imul ecx, ebp
cmp dword [esp + 0x80], ecx
jle 0x10002998
mov eax, 0x55555556
imul ecx
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [esp + 0x80], eax
mov dword [esp + 0x38], 0
test edi, edi
je 0x100029f0
push edi
push 0
call sym.leptonlib.dll_pixInvert
lea ecx, [esp + 0x20]
push ecx
push eax
mov dword [esp + 0x64], eax
call sym.leptonlib.dll_pixZero
lea edx, [esp + 0x64]
push edx
call sym.leptonlib.dll_pixDestroy
add esp, 0x14
cmp dword [esp + 0x18], 0
jne 0x10002ce6
lea eax, [esp + 0x18]
push eax
push edi
call sym.leptonlib.dll_pixZero
add esp, 8
cmp dword [esp + 0x18], 0
jne 0x100029f0
mov dword [esp + 0x38], 1
mov ecx, dword [esp + 0x7c]
push ebx
push ecx
push esi
call sym.leptonlib.dll_pixThresholdToBinary
push 0
push 0x10142248
push eax
mov dword [esp + 0x70], eax
call sym.leptonlib.dll_pixMorphSequence
lea edx, [esp + 0x70]
push edx
mov dword [esp + 0x50], eax
call sym.leptonlib.dll_pixDestroy
push esi
call sym.leptonlib.dll_pixGetWidth
push esi
mov edi, eax
call sym.leptonlib.dll_pixGetHeight
mov ebx, eax
lea eax, [ebx + ebp - 1]
cdq
idiv ebp
mov ecx, dword [esp + 0x98]
push 8
push eax
lea eax, [edi + ecx - 1]
cdq
idiv ecx
push eax
call sym.leptonlib.dll_pixCreate
mov dword [esp + 0x3c], eax
mov eax, edi
cdq
idiv dword [esp + 0xa4]
push esi
mov dword [esp + 0x44], eax
mov eax, ebx
cdq
idiv ebp
mov dword [esp + 0x48], eax
call sym.leptonlib.dll_dpixGetRefcount
push esi
mov dword [esp + 0x78], eax
call sym.leptonlib.dll_pixGetData
mov esi, eax
mov eax, dword [esp + 0x44]
push eax
call sym.leptonlib.dll_dpixGetRefcount
mov ecx, dword [esp + 0x48]
push ecx
mov edi, eax
call sym.leptonlib.dll_pixGetData
mov edx, dword [esp + 0x74]
push edx
mov ebx, eax
call sym.leptonlib.dll_dpixGetRefcount
mov dword [esp + 0x80], eax
mov eax, dword [esp + 0x78]
add esp, 0x40
push eax
call sym.leptonlib.dll_pixGetData
mov ecx, dword [esp + 0x1c]
add esp, 4
test ecx, ecx
jle 0x10002bd6
lea edx, [edi*4]
mov edi, dword [esp + 0x44]
mov dword [esp + 0x68], edx
imul edi, ebp
mov edx, dword [esp + 0x40]
imul edx, ebp
add edx, edx
add edx, edx
add edi, edi
add edi, edi
mov dword [esp + 0x34], ebx
mov dword [esp + 0x60], edx
mov dword [esp + 0x64], edi
mov dword [esp + 0x30], eax
mov dword [esp + 0x2c], esi
mov dword [esp + 0x50], ecx
xor esi, esi
cmp dword [esp + 0x14], esi
mov dword [esp + 0x4c], esi
jle 0x10002bbb
mov dword [esp + 0x28], esi
xor ecx, ecx
cmp ebp, ecx
mov dword [esp + 0x24], ecx
mov dword [esp + 0x20], ecx
jle 0x10002b7d
mov edi, dword [esp + 0x2c]
mov ebx, dword [esp + 0x30]
mov dword [esp + 0x48], ebp
mov eax, dword [esp + 0x78]
test eax, eax
jle 0x10002b5a
mov esi, dword [esp + 0x28]
mov ebp, eax
push esi
push ebx
call sym.leptonlib.dll_l_getDataBit
add esp, 8
test eax, eax
jne 0x10002b50
push esi
push edi
call sym.leptonlib.dll_l_getDataByte
add dword [esp + 0x2c], eax
add esp, 8
inc dword [esp + 0x20]
inc esi
sub ebp, 1
jne 0x10002b30
mov ebp, dword [esp + 0x7c]
mov eax, dword [esp + 0x40]
add eax, eax
add eax, eax
add ebx, eax
mov eax, dword [esp + 0x44]
add eax, eax
add eax, eax
add edi, eax
sub dword [esp + 0x48], 1
jne 0x10002b22
mov esi, dword [esp + 0x4c]
mov ecx, dword [esp + 0x20]
cmp ecx, dword [esp + 0x84]
jl 0x10002b9c
mov eax, dword [esp + 0x24]
cdq
idiv ecx
push eax
mov eax, dword [esp + 0x38]
push esi
push eax
call sym.leptonlib.dll_l_setDataByte
add esp, 0xc
mov ecx, dword [esp + 0x78]
add dword [esp + 0x28], ecx
inc esi
cmp esi, dword [esp + 0x14]
mov dword [esp + 0x4c], esi
jl 0x10002b08
mov edx, dword [esp + 0x60]
mov edi, dword [esp + 0x64]
mov eax, dword [esp + 0x68]
add dword [esp + 0x2c], edi
add dword [esp + 0x30], edx
add dword [esp + 0x34], eax
sub dword [esp + 0x50], 1
jne 0x10002af4
lea ecx, [esp + 0x38]
push ecx
call sym.leptonlib.dll_pixDestroy
mov edi, dword [esp + 0x78]
xor ebx, ebx
add esp, 4
mov dword [esp + 0x54], ebx
cmp edi, ebx
je 0x10002cbb
cmp dword [esp + 0x3c], ebx
je 0x10002cbb
push edi
call sym.leptonlib.dll_pixGetWidth
push edi
mov dword [esp + 0x6c], eax
call sym.leptonlib.dll_pixGetHeight
push edi
mov dword [esp + 0x74], eax
call sym.leptonlib.dll_pixGetData
push edi
mov esi, eax
call sym.leptonlib.dll_dpixGetRefcount
add esp, 0x10
cmp dword [esp + 0x18], ebx
mov ecx, eax
jle 0x10002cbb
mov eax, ebp
cdq
sub eax, edx
mov edx, ecx
imul edx, ebp
sar eax, 1
add edx, edx
mov dword [esp + 0x30], eax
add edx, edx
imul eax, ecx
lea eax, [esi + eax*4]
mov dword [esp + 0x50], edx
mov dword [esp + 0x34], eax
mov ecx, dword [esp + 0x30]
cmp ecx, dword [esp + 0x68]
jge 0x10002cbb
xor esi, esi
cmp dword [esp + 0x14], esi
jle 0x10002cac
mov eax, dword [esp + 0x78]
cdq
sub eax, edx
mov edi, eax
sar edi, 1
nop
cmp edi, dword [esp + 0x64]
jge 0x10002ca4
mov edx, dword [esp + 0x34]
push edi
push edx
call sym.leptonlib.dll_l_getDataBit
add esp, 8
test eax, eax
je 0x10002c99
mov eax, dword [esp + 0x10]
push 0
push ebx
push esi
push eax
call sym.leptonlib.dll_pixSetPixel
add esp, 0x10
add edi, dword [esp + 0x78]
inc esi
cmp esi, dword [esp + 0x14]
jl 0x10002c70
mov edx, dword [esp + 0x50]
mov edi, dword [esp + 0x74]
add dword [esp + 0x34], edx
add dword [esp + 0x30], ebp
inc ebx
cmp ebx, dword [esp + 0x18]
jl 0x10002c52
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
push 2
push ecx
push edx
push eax
call sym.leptonlib.dll_pixFillMapHoles
add esp, 0x10
pop ebx
test eax, eax
je 0x10002cf2
lea ecx, [esp + 0xc]
push ecx
call sym.leptonlib.dll_pixDestroy
add esp, 4
pop ebp
pop edi
mov eax, 1
pop esi
add esp, 0x5c
ret
test edi, edi
je 0x10002d4b
cmp dword [esp + 0x38], 0
je 0x10002d4b
fild dword [esp + 0x78]
sub esp, 8
fld1
fld st(0)
fdivrp st(2)
fxch st(1)
fstp dword [esp + 0x6c]
fld dword [esp + 0x6c]
fstp dword [esp + 4]
fidiv dword [esp + 0x7c]
fstp dword [esp + 0x6c]
fld dword [esp + 0x6c]
fstp dword [esp]
push edi
call sym.leptonlib.dll_pixScaleBySampling
mov edx, dword [esp + 0x18]
push 2
push eax
push edx
mov dword [esp + 0x68], eax
call sym.leptonlib.dll_pixSmoothConnectedRegions
lea eax, [esp + 0x68]
push eax
call sym.leptonlib.dll_pixDestroy
add esp, 0x1c
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 0x84]
pop ebp
pop edi
mov dword [edx], ecx
xor eax, eax
pop esi
add esp, 0x5c
ret
mov eax, 1
pop esi
add esp, 0x5c
ret