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

Disassembly:
sub esp, 0x54
push esi
mov esi, dword [esp + 0x5c]
test esi, esi
jne 0x100ca583
xor eax, eax
pop esi
add esp, 0x54
ret
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x10]
push ecx
lea edx, [esp + 0x58]
push edx
push esi
call sym.leptonlib.dll_pixGetDimensions
add esp, 0x10
cmp dword [esp + 0x10], 1
je 0x100ca57c
push esi
call sym.leptonlib.dll_pixGetColormap
mov ecx, dword [esp + 0x14]
add esp, 4
cmp ecx, 8
je 0x100ca5bd
cmp ecx, 0x20
je 0x100ca5bd
test eax, eax
je 0x100ca57c
push ebx
mov ebx, dword [esp + 0x64]
cmp ebx, 1
je 0x100ca5cc
cmp ebx, 2
jne 0x100ca63b
mov ecx, dword [esp + 0x70]
cmp ecx, 1
je 0x100ca5da
cmp ecx, 2
jne 0x100ca63b
cmp dword [esp + 0x68], 0
jne 0x100ca5f9
cmp dword [esp + 0x6c], 0
jne 0x100ca5f9
push esi
push 0
call sym.leptonlib.dll_pixCopy
add esp, 8
pop ebx
pop esi
add esp, 0x54
ret
test eax, eax
je 0x100ca60a
push 3
push esi
call sym.leptonlib.dll_pixRemoveColormap
add esp, 8
jmp 0x100ca613
push esi
call sym.leptonlib.dll_boxClone
add esp, 4
push eax
mov dword [esp + 0xc], eax
call sym.leptonlib.dll_numaGetRefcount
add esp, 4
mov dword [esp + 0x14], eax
cmp eax, 8
je 0x100ca643
cmp eax, 0x20
je 0x100ca643
lea eax, [esp + 8]
push eax
call sym.leptonlib.dll_pixDestroy
add esp, 4
pop ebx
xor eax, eax
pop esi
add esp, 0x54
ret
mov ecx, dword [esp + 8]
push ebp
push edi
push ecx
call sym.leptonlib.dll_pixCreateTemplate
push 1
push eax
mov dword [esp + 0x30], eax
call sym.leptonlib.dll_pixSetBlackOrWhite
mov edx, dword [esp + 0x1c]
push edx
call sym.leptonlib.dll_pixGetData
mov dword [esp + 0x58], eax
mov eax, dword [esp + 0x34]
push eax
call sym.leptonlib.dll_pixGetData
mov ecx, dword [esp + 0x24]
push ecx
mov dword [esp + 0x58], eax
call sym.leptonlib.dll_dpixGetRefcount
mov edx, dword [esp + 0x3c]
mov esi, eax
push edx
mov dword [esp + 0x68], esi
call sym.leptonlib.dll_dpixGetRefcount
fild dword [esp + 0x34]
fld1
mov ecx, dword [esp + 0x78]
mov ebp, dword [esp + 0x34]
fld st(0)
fdivrp st(2)
lea edx, [ebp - 1]
mov dword [esp + 0x6c], eax
lea eax, [ecx - 1]
mov dword [esp + 0x30], edx
mov edx, eax
xor edi, edi
add esp, 0x1c
mov dword [esp + 0x54], edi
imul edx, eax
fxch st(1)
fstp dword [esp + 0x44]
mov dword [esp + 0x68], edx
fidiv dword [esp + 0x68]
fstp dword [esp + 0x38]
test ecx, ecx
jle 0x100caa0e
fld dword [esp + 0x38]
lea ecx, [esi*4]
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x58], eax
cmp ebx, 1
jne 0x100ca718
imul eax, eax
mov ecx, eax
imul ecx, dword [esp + 0x70]
imul eax, dword [esp + 0x74]
mov dword [esp + 0x68], ecx
fild dword [esp + 0x68]
mov dword [esp + 0x68], eax
fmul st(1)
fstp dword [esp + 0x2c]
fild dword [esp + 0x68]
jmp 0x100ca744
cmp ebx, 2
jne 0x100ca74a
mov eax, edi
imul eax, edi
mov edx, eax
imul edx, dword [esp + 0x70]
imul eax, dword [esp + 0x74]
mov dword [esp + 0x68], edx
fild dword [esp + 0x68]
mov dword [esp + 0x68], eax
fmul st(1)
fstp dword [esp + 0x2c]
fild dword [esp + 0x68]
fmul st(1)
fstp dword [esp + 0x30]
mov eax, dword [esp + 0x1c]
cmp eax, 8
je 0x100ca8db
cmp eax, 0x20
jne 0x100caa27
mov dword [esp + 0x68], 0
test ebp, ebp
jle 0x100ca9ef
mov eax, dword [esp + 0x14]
fstp st(0)
mov ecx, dword [esp + 0x40]
xor ebp, ebp
mov dword [esp + 0x34], ebp
mov dword [esp + 0x28], eax
mov dword [esp + 0x20], ecx
jmp 0x100ca790
fild dword [esp + 0x28]
fmul dword [esp + 0x2c]
fild dword [esp + 0x68]
fmul dword [esp + 0x30]
faddp st(1)
fmul dword [esp + 0x44]
fstp dword [esp + 0x60]
fld dword [esp + 0x60]
fmul qword [0x10149d50]
call fcn.10140710
sub ebp, eax
mov eax, ebp
cdq
and edx, 0x3f
add eax, edx
sar eax, 6
and ebp, 0x3f
test eax, eax
jl 0x100ca8a4
mov ecx, dword [esp + 0x14]
cmp eax, ecx
jg 0x100ca8a4
mov ebx, dword [esp + 0x48]
mov edx, eax
imul edx, esi
lea edx, [ebx + edx*4]
cmp eax, ecx
mov ecx, dword [edx + edi*4]
jge 0x100ca89d
mov eax, dword [esp + 0x3c]
mov esi, dword [eax + edx]
mov edx, dword [esp + 0x20]
lea eax, [edx + edi*4]
push eax
mov eax, ecx
shr eax, 8
and eax, 0xff
mov edx, esi
shr edx, 8
and edx, 0xff
imul edx, ebp
mov ebx, 0x3f
sub ebx, ebp
imul eax, ebx
lea edi, [edx + eax + 0x1f]
mov eax, 0x4104105
mul edi
sub edi, edx
shr edi, 1
add edi, edx
mov eax, ecx
shr eax, 0x10
mov edx, esi
shr edx, 0x10
and eax, 0xff
and edx, 0xff
imul eax, ebx
imul edx, ebp
shr edi, 5
push edi
lea edi, [edx + eax + 0x1f]
shr ecx, 0x18
mov eax, 0x4104105
imul ecx, ebx
mul edi
shr esi, 0x18
imul esi, ebp
sub edi, edx
lea ecx, [esi + ecx + 0x1f]
shr edi, 1
add edi, edx
mov eax, 0x4104105
mul ecx
sub ecx, edx
shr ecx, 1
add ecx, edx
shr edi, 5
shr ecx, 5
push edi
push ecx
call sym.leptonlib.dll_composeRGBPixel
mov edi, dword [esp + 0x64]
mov esi, dword [esp + 0x5c]
add esp, 0x10
jmp 0x100ca8a4
mov edx, dword [esp + 0x20]
mov dword [edx + edi*4], ecx
mov eax, dword [esp + 0x50]
mov ecx, dword [esp + 0x68]
mov ebp, dword [esp + 0x34]
dec dword [esp + 0x28]
add eax, eax
add eax, eax
add dword [esp + 0x20], eax
inc ecx
add ebp, 0x40
cmp ecx, dword [esp + 0x18]
mov dword [esp + 0x68], ecx
mov dword [esp + 0x34], ebp
jl 0x100ca790
mov ebp, dword [esp + 0x18]
jmp 0x100ca9e7
xor eax, eax
cmp ebp, eax
mov dword [esp + 0x68], eax
jle 0x100ca9ef
mov ecx, dword [esp + 0x40]
fstp st(0)
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x14]
mov dword [esp + 0x28], eax
mov dword [esp + 0x34], ecx
nop
fild dword [esp + 0x28]
fmul dword [esp + 0x2c]
fild dword [esp + 0x68]
fmul dword [esp + 0x30]
faddp st(1)
fmul dword [esp + 0x44]
fstp dword [esp + 0x60]
fld dword [esp + 0x60]
fmul qword [0x10149d50]
call fcn.10140710
mov ecx, dword [esp + 0x20]
sub ecx, eax
mov eax, ecx
cdq
and edx, 0x3f
add eax, edx
sar eax, 6
and ecx, 0x3f
mov ebx, ecx
test eax, eax
jl 0x100ca9c1
cmp eax, dword [esp + 0x14]
jg 0x100ca9c1
mov ecx, dword [esp + 0x48]
mov edx, eax
imul edx, esi
cmp eax, dword [esp + 0x14]
lea ebp, [ecx + edx*4]
push edi
jge 0x100ca9a5
lea eax, [esi*4]
add eax, ebp
push eax
call sym.leptonlib.dll_l_getDataByte
mov esi, eax
push edi
imul esi, ebx
push ebp
call sym.leptonlib.dll_l_getDataByte
mov edx, 0x3f
sub edx, ebx
imul eax, edx
lea ecx, [eax + esi + 0x1f]
mov esi, dword [esp + 0x5c]
mov eax, 0x82082083
imul ecx
add edx, ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add esp, 0x10
add eax, edx
jmp 0x100ca9ae
push ebp
call sym.leptonlib.dll_l_getDataByte
add esp, 8
push eax
mov eax, dword [esp + 0x38]
push edi
push eax
call sym.leptonlib.dll_l_setDataByte
mov ebp, dword [esp + 0x24]
add esp, 0xc
mov eax, dword [esp + 0x50]
mov ecx, dword [esp + 0x68]
dec dword [esp + 0x28]
add dword [esp + 0x20], 0x40
add eax, eax
add eax, eax
add dword [esp + 0x34], eax
inc ecx
cmp ecx, ebp
mov dword [esp + 0x68], ecx
jl 0x100ca900
mov ebx, dword [esp + 0x6c]
fld dword [esp + 0x38]
mov eax, dword [esp + 0x58]
add dword [esp + 0x3c], 4
inc edi
dec eax
cmp edi, dword [esp + 0x5c]
mov dword [esp + 0x54], edi
mov dword [esp + 0x58], eax
jl 0x100ca6ec
fstp st(0)
lea eax, [esp + 0x10]
push eax
call sym.leptonlib.dll_pixDestroy
mov eax, dword [esp + 0x28]
add esp, 4
pop edi
pop ebp
pop ebx
pop esi
add esp, 0x54
ret
lea ecx, [esp + 0x10]
fstp st(0)
push ecx
call sym.leptonlib.dll_pixDestroy
lea edx, [esp + 0x28]
push edx
call sym.leptonlib.dll_pixDestroy
add esp, 8
pop edi
pop ebp
pop ebx
xor eax, eax
pop esi
add esp, 0x54
ret