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

Disassembly:
sub esp, 0x5c
push esi
mov esi, dword [esp + 0x64]
test esi, esi
jne 0x1002e363
xor eax, eax
pop esi
add esp, 0x5c
ret
push esi
call sym.leptonlib.dll_pixGetColormap
add esp, 4
test eax, eax
jne 0x1002e35c
lea eax, [esp + 0x2c]
push eax
lea ecx, [esp + 0x50]
push ecx
lea edx, [esp + 0x50]
push edx
push esi
call sym.leptonlib.dll_pixGetDimensions
mov eax, dword [esp + 0x3c]
add esp, 0x10
cmp eax, 8
je 0x1002e39b
cmp eax, 0x10
je 0x1002e39b
cmp eax, 0x20
jne 0x1002e35c
mov eax, dword [esp + 0x68]
test eax, eax
je 0x1002e35c
push eax
call sym.leptonlib.dll_kernelInvert
lea ecx, [esp + 0x48]
push ecx
lea edx, [esp + 0x48]
push edx
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x28]
push edx
push eax
mov dword [esp + 0x3c], eax
call sym.leptonlib.dll_boxGetGeometry
add esp, 0x18
cmp dword [esp + 0x70], 0
je 0x1002e3e6
fld1
mov eax, dword [esp + 0x24]
push ecx
fstp dword [esp]
push eax
call sym.leptonlib.dll_kernelNormalize
add esp, 8
jmp 0x1002e3f3
mov ecx, dword [esp + 0x24]
push ecx
call sym.leptonlib.dll_kernelCopy
add esp, 4
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x10]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x40]
sub edx, eax
push edx
push eax
mov eax, dword [esp + 0x4c]
sub ecx, eax
push ecx
push eax
push esi
call sym.leptonlib.dll_pixAddMirroredBorder
add esp, 0x14
mov dword [esp + 0x28], eax
test eax, eax
je 0x1002e35c
mov ecx, dword [sym.leptonlib.dll_ConvolveSamplingFactX]
mov edx, dword [esp + 0x48]
lea eax, [ecx + edx - 1]
cdq
idiv ecx
mov ecx, dword [sym.leptonlib.dll_ConvolveSamplingFactY]
push ebx
push ebp
push edi
mov ebx, eax
mov eax, dword [esp + 0x58]
lea eax, [ecx + eax - 1]
cdq
idiv ecx
mov ecx, dword [esp + 0x78]
push ecx
mov dword [esp + 0x64], ebx
mov esi, eax
push esi
push ebx
call sym.leptonlib.dll_pixCreate
mov edx, dword [esp + 0x40]
mov ebp, eax
push edx
mov dword [esp + 0x74], ebp
call sym.leptonlib.dll_pixGetData
push ebp
mov dword [esp + 0x70], eax
call sym.leptonlib.dll_pixGetData
mov edi, eax
mov eax, dword [esp + 0x48]
push eax
call sym.leptonlib.dll_dpixGetRefcount
push ebp
mov dword [esp + 0x60], eax
call sym.leptonlib.dll_dpixGetRefcount
add esp, 0x1c
mov dword [esp + 0x2c], 0
test esi, esi
jle 0x1002e69c
lea ecx, [eax*4]
mov dword [esp + 0x68], ecx
mov dword [esp + 0x14], edi
mov dword [esp + 0x48], esi
xor esi, esi
cmp ebx, esi
mov dword [esp + 0x10], esi
mov dword [esp + 0x28], esi
jle 0x1002e67f
fldz
xor ebx, ebx
cmp dword [esp + 0x24], ebx
fstp dword [esp + 0x70]
mov dword [esp + 0x3c], ebx
jle 0x1002e5f3
mov edx, dword [esp + 0x2c]
imul edx, dword [esp + 0x44]
mov eax, dword [esp + 0x5c]
mov ebp, dword [esp + 0x18]
lea edi, [eax + edx*4]
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x38]
cmp ecx, 8
jne 0x1002e53f
xor esi, esi
test eax, eax
jle 0x1002e5b8
mov ecx, dword [esp + 0x10]
lea edx, [esi + ecx]
push edx
push edi
call sym.leptonlib.dll_l_getDataByte
mov ebp, dword [esp + 0x20]
mov dword [esp + 0x28], eax
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax + ebx]
fld dword [ecx + esi*4]
mov eax, dword [esp + 0x24]
fimul dword [esp + 0x28]
inc esi
add esp, 8
cmp esi, eax
fadd dword [esp + 0x70]
fstp dword [esp + 0x70]
jl 0x1002e506
jmp 0x1002e5b8
cmp ecx, 0x10
jne 0x1002e589
xor esi, esi
test eax, eax
jle 0x1002e5b8
lea ebx, [ebx]
mov edx, dword [esp + 0x10]
lea eax, [esi + edx]
push eax
push edi
call sym.leptonlib.dll_l_getDataTwoBytes
mov ebp, dword [esp + 0x20]
mov ecx, dword [ebp + 0x10]
mov edx, dword [ecx + ebx]
fld dword [edx + esi*4]
mov dword [esp + 0x28], eax
fimul dword [esp + 0x28]
mov eax, dword [esp + 0x24]
inc esi
add esp, 8
cmp esi, eax
fadd dword [esp + 0x70]
fstp dword [esp + 0x70]
jl 0x1002e550
jmp 0x1002e5b8
test eax, eax
jle 0x1002e5b8
mov ecx, dword [ebp + 0x10]
mov edx, dword [esp + 0x10]
mov ecx, dword [ebx + ecx]
lea edx, [edi + edx*4]
mov esi, eax
lea esp, [esp]
fild dword [edx]
add ecx, 4
add edx, 4
sub esi, 1
fmul dword [ecx - 4]
fadd dword [esp + 0x70]
fstp dword [esp + 0x70]
jne 0x1002e5a0
mov ecx, dword [esp + 0x44]
mov edx, dword [esp + 0x3c]
add ecx, ecx
add ecx, ecx
inc edx
add edi, ecx
add ebx, 4
cmp edx, dword [esp + 0x24]
mov dword [esp + 0x3c], edx
jl 0x1002e4f3
fldz
mov esi, dword [esp + 0x28]
fld dword [esp + 0x70]
fcom st(1)
fnstsw ax
fstp st(1)
test ah, 5
jp 0x1002e5f7
fchs
fstp dword [esp + 0x70]
fld dword [esp + 0x70]
mov eax, dword [esp + 0x78]
fadd qword [0x10142230]
cmp eax, 8
jne 0x1002e61c
call fcn.10140710
push eax
mov eax, dword [esp + 0x18]
push esi
push eax
call sym.leptonlib.dll_l_setDataByte
add esp, 0xc
jmp 0x1002e660
cmp eax, 0x10
jne 0x1002e637
call fcn.10140710
mov ecx, dword [esp + 0x14]
push eax
push esi
push ecx
call sym.leptonlib.dll_l_setDataTwoBytes
add esp, 0xc
jmp 0x1002e660
fnstcw word [esp + 0x70]
movzx eax, word [esp + 0x70]
or eax, 0xc00
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x14]
fldcw word [esp + 0x3c]
fistp qword [esp + 0x3c]
mov edx, dword [esp + 0x3c]
mov dword [eax + esi*4], edx
fldcw word [esp + 0x70]
mov ecx, dword [sym.leptonlib.dll_ConvolveSamplingFactX]
mov ebx, dword [esp + 0x60]
add dword [esp + 0x10], ecx
inc esi
cmp esi, ebx
mov dword [esp + 0x28], esi
jl 0x1002e4c5
mov ebp, dword [esp + 0x64]
mov edx, dword [sym.leptonlib.dll_ConvolveSamplingFactY]
mov eax, dword [esp + 0x68]
add dword [esp + 0x2c], edx
add dword [esp + 0x14], eax
sub dword [esp + 0x48], 1
jne 0x1002e4b3
lea ecx, [esp + 0x30]
push ecx
call sym.leptonlib.dll_kernelDestroy
lea edx, [esp + 0x1c]
push edx
call sym.leptonlib.dll_kernelDestroy
lea eax, [esp + 0x3c]
push eax
call sym.leptonlib.dll_pixDestroy
add esp, 0xc
pop edi
mov eax, ebp
pop ebp
pop ebx
pop esi
add esp, 0x5c
ret