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

Disassembly:
sub esp, 0x58
push edi
mov edi, dword [esp + 0x64]
test edi, edi
jne 0x10083083
xor eax, eax
pop edi
add esp, 0x58
ret
push esi
mov esi, dword [esp + 0x64]
test esi, esi
je 0x100830de
push esi
call sym.leptonlib.dll_pixGetColormap
add esp, 4
test eax, eax
jne 0x100830de
lea eax, [esp + 0x30]
push eax
lea ecx, [esp + 0x40]
push ecx
lea edx, [esp + 0x40]
push edx
push esi
call sym.leptonlib.dll_pixGetDimensions
mov eax, dword [esp + 0x40]
add esp, 0x10
cmp eax, 8
je 0x100830bf
cmp eax, 0x20
jne 0x100830de
lea eax, [esp + 0x34]
push eax
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x20]
push edx
push edi
call sym.leptonlib.dll_pixGetDimensions
add esp, 0x10
cmp dword [esp + 0x34], 1
je 0x100830e9
pop esi
mov eax, 1
pop edi
add esp, 0x58
ret
push ebx
mov ebx, dword [esp + 0x70]
test ebx, ebx
jl 0x100833a4
mov esi, dword [esp + 0x74]
test esi, esi
jl 0x100833a4
push ebp
mov ebp, dword [esp + 0x7c]
cmp ebp, 1
jl 0x100831c1
mov eax, dword [esp + 0x80]
cmp eax, 1
je 0x10083125
cmp eax, 2
jne 0x100831c1
mov eax, dword [esp + 0x40]
cmp dword [esp + 0x20], eax
mov ecx, dword [esp + 0x44]
jl 0x1008314a
cmp dword [esp + 0x1c], ecx
jl 0x1008314a
push edi
push 0
call sym.leptonlib.dll_pixCopy
add esp, 8
mov dword [esp + 0x70], eax
jmp 0x10083176
push 1
push ecx
push eax
call sym.leptonlib.dll_pixCreate
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x2c]
push 0
push 0
push edi
push 0x18
push ecx
push edx
push esi
push ebx
push eax
mov dword [esp + 0xa0], eax
call sym.leptonlib.dll_pixRasterop
add esp, 0x30
mov ecx, dword [esp + 0x70]
push 8
lea eax, [esp + 0x14]
push eax
push ecx
call sym.leptonlib.dll_pixConnComp
mov edx, dword [esp + 0x1c]
push edx
mov dword [esp + 0x40], eax
call sym.leptonlib.dll_boxaGetCount
mov ebx, eax
xor esi, esi
add esp, 0x10
cmp ebx, esi
jne 0x100831ce
lea eax, [esp + 0x70]
push eax
call sym.leptonlib.dll_pixDestroy
lea ecx, [esp + 0x14]
push ecx
call sym.leptonlib.dll_pixaDestroy
lea edx, [esp + 0x38]
push edx
call sym.leptonlib.dll_boxaDestroy
add esp, 0xc
pop ebp
pop ebx
pop esi
mov eax, 1
pop edi
add esp, 0x58
ret
mov eax, dword [esp + 0x70]
push eax
push eax
call sym.leptonlib.dll_pixInvert
mov ecx, dword [esp + 0x78]
xor eax, eax
cmp ebp, 0x100
setge al
push 1
lea eax, [eax*8 + 8]
push eax
push 4
push ecx
call sym.leptonlib.dll_pixDistanceFunction
lea edx, [esp + 0x88]
push edx
mov dword [esp + 0x48], eax
call sym.leptonlib.dll_pixDestroy
add esp, 0x1c
cmp ebx, esi
mov dword [esp + 0x34], esi
jle 0x10083377
lea ebx, [ebx]
mov eax, dword [esp + 0x10]
push 2
push esi
push eax
call sym.leptonlib.dll_pixaGetPix
mov ecx, dword [esp + 0x1c]
push 2
push esi
push ecx
mov dword [esp + 0x2c], eax
call sym.leptonlib.dll_pixaGetBox
lea edx, [esp + 0x3c]
push edx
lea ecx, [esp + 0x44]
push ecx
lea edx, [esp + 0x74]
push edx
lea ecx, [esp + 0x7c]
push ecx
push eax
mov dword [esp + 0x44], eax
call sym.leptonlib.dll_boxGetGeometry
mov eax, dword [esp + 0x54]
mov ecx, dword [esp + 0x50]
add esp, 0x2c
cmp eax, ecx
jl 0x1008326d
mov eax, ecx
cmp eax, ebp
jb 0x10083273
mov eax, ebp
lea edx, [esp + 0x4c]
push edx
lea ecx, [esp + 0x54]
push ecx
mov ecx, dword [esp + 0x34]
lea edx, [esp + 0x50]
push edx
push eax
mov eax, dword [esp + 0x90]
push eax
mov eax, dword [esp + 0x2c]
push ecx
call fcn.10081fe0
mov eax, dword [esp + 0x60]
add esp, 0x18
mov ecx, ebp
cmp ebp, eax
jb 0x100832a8
mov ecx, eax
cmp ecx, 1
jge 0x100832d1
lea edx, [esp + 0x14]
push edx
call sym.leptonlib.dll_pixDestroy
lea eax, [esp + 0x1c]
push eax
call sym.leptonlib.dll_boxDestroy
add esp, 8
mov dword [esp + 0x34], 1
jmp 0x1008336e
mov edx, dword [esp + 0x50]
push ecx
push ecx
mov ecx, dword [esp + 0x54]
shr eax, 1
sub ecx, eax
push ecx
sub edx, eax
push edx
call sym.leptonlib.dll_boxCreate
mov edi, dword [esp + 0x7c]
push 0
push eax
push edi
mov dword [esp + 0x80], eax
call sym.leptonlib.dll_pixClipRectangle
mov ecx, dword [esp + 0x40]
mov edx, dword [esp + 0x44]
push ecx
push edx
push eax
mov dword [esp + 0x84], eax
call sym.leptonlib.dll_pixMirroredTiling
mov ecx, dword [esp + 0x7c]
mov edx, dword [esp + 0x80]
push ecx
mov ecx, dword [esp + 0x40]
push edx
push ecx
push eax
push edi
mov dword [esp + 0x9c], eax
call sym.leptonlib.dll_pixCombineMaskedGeneral
lea edx, [esp + 0x50]
push edx
call sym.leptonlib.dll_pixDestroy
lea eax, [esp + 0x9c]
add esp, 0x40
push eax
call sym.leptonlib.dll_pixDestroy
lea ecx, [esp + 0x64]
push ecx
call sym.leptonlib.dll_pixDestroy
lea edx, [esp + 0x20]
push edx
call sym.leptonlib.dll_boxDestroy
lea eax, [esp + 0x70]
push eax
call sym.leptonlib.dll_boxDestroy
add esp, 0x10
inc esi
cmp esi, ebx
jl 0x10083220
lea ecx, [esp + 0x2c]
push ecx
call sym.leptonlib.dll_pixDestroy
lea edx, [esp + 0x14]
push edx
call sym.leptonlib.dll_pixaDestroy
lea eax, [esp + 0x38]
push eax
call sym.leptonlib.dll_boxaDestroy
mov eax, dword [esp + 0x40]
add esp, 0xc
pop ebp
pop ebx
pop esi
pop edi
add esp, 0x58
ret
pop ebx
pop esi
mov eax, 1
pop edi
add esp, 0x58
ret