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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x84
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
test ebx, ebx
je 0x1003f341
lea eax, [esp + 0x48]
push eax
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x1c]
push edx
push ebx
call sym.leptonlib.dll_pixGetDimensions
add esp, 0x10
cmp dword [esp + 0x48], 8
jne 0x1003f341
push ebx
call sym.leptonlib.dll_pixGetColormap
add esp, 4
test eax, eax
jne 0x1003f341
fldz
fcomp dword [ebp + 0x10]
fnstsw ax
test ah, 1
je 0x1003f331
mov esi, dword [ebp + 0xc]
test esi, esi
jle 0x1003f331
cmp esi, 1
je 0x1003edb7
cmp esi, 2
jne 0x1003f341
push esi
push esi
push esi
push esi
push ebx
push 0
call sym.leptonlib.dll_pixCopyBorder
mov edi, eax
push edi
mov dword [esp + 0x60], edi
call sym.leptonlib.dll_pixGetData
push edi
mov dword [esp + 0x3c], eax
call sym.leptonlib.dll_dpixGetRefcount
push ebx
mov dword [esp + 0x48], eax
call sym.leptonlib.dll_pixGetData
mov edi, eax
push ebx
mov dword [esp + 0x74], edi
call sym.leptonlib.dll_dpixGetRefcount
add esp, 0x28
mov ebx, eax
mov dword [esp + 0x20], ebx
cmp esi, 1
jne 0x1003f080
fld dword [ebp + 0x10]
mov eax, dword [esp + 0x18]
fld st(0)
dec eax
cmp eax, esi
fchs
fld qword [0x10143e90]
mov dword [esp + 0x10], esi
fdiv st(1), st(0)
fxch st(1)
fstp dword [esp + 0x3c]
fld dword [esp + 0x3c]
fst dword [esp + 0x6c]
fst dword [esp + 0x70]
fst dword [esp + 0x74]
fst dword [esp + 0x78]
fst dword [esp + 0x80]
fst dword [esp + 0x84]
fst dword [esp + 0x88]
fstp dword [esp + 0x8c]
fxch st(1)
fmul qword [0x10143e88]
fdivrp st(1)
fadd qword [0x10142240]
fstp dword [esp + 0x7c]
jle 0x1003f075
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x1c]
add ecx, ecx
add ecx, ecx
add edx, ecx
lea eax, [ebx*4]
mov dword [esp + 0x28], edx
lea edx, [eax + edi]
mov dword [esp + 0x20], edx
lea edx, [edi + ebx*8]
mov dword [esp + 0x24], edx
mov edx, dword [esp + 0x14]
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x30], eax
mov dword [esp + 0x1c], edi
lea esi, [edx - 1]
cmp esi, 1
jle 0x1003f04f
mov esi, 2
mov eax, dword [esp + 0x1c]
lea ebx, [esi - 2]
push ebx
push eax
call sym.leptonlib.dll_l_getDataByte
mov ecx, dword [esp + 0x24]
mov dword [esp + 0x44], eax
fild dword [esp + 0x44]
lea edi, [esi - 1]
push edi
push ecx
fmul dword [esp + 0x7c]
fstp qword [esp + 0x70]
call sym.leptonlib.dll_l_getDataByte
mov edx, dword [esp + 0x2c]
mov dword [esp + 0x4c], eax
fild dword [esp + 0x4c]
push esi
push edx
fmul dword [esp + 0x88]
fadd qword [esp + 0x78]
fstp qword [esp + 0x78]
call sym.leptonlib.dll_l_getDataByte
mov dword [esp + 0x54], eax
fild dword [esp + 0x54]
mov eax, dword [esp + 0x38]
push ebx
push eax
fmul dword [esp + 0x94]
fadd qword [esp + 0x80]
fstp qword [esp + 0x80]
call sym.leptonlib.dll_l_getDataByte
mov ecx, dword [esp + 0x40]
mov dword [esp + 0x5c], eax
fild dword [esp + 0x5c]
push edi
push ecx
fmul dword [esp + 0xa0]
fadd qword [esp + 0x88]
fstp qword [esp + 0x88]
call sym.leptonlib.dll_l_getDataByte
mov edx, dword [esp + 0x48]
mov dword [esp + 0x64], eax
fild dword [esp + 0x64]
push esi
push edx
fmul dword [esp + 0xac]
fadd qword [esp + 0x90]
fstp qword [esp + 0x90]
call sym.leptonlib.dll_l_getDataByte
mov dword [esp + 0x6c], eax
fild dword [esp + 0x6c]
push ebx
mov ebx, dword [esp + 0x58]
push ebx
fmul dword [esp + 0xb8]
fadd qword [esp + 0x98]
fstp qword [esp + 0x98]
call sym.leptonlib.dll_l_getDataByte
mov dword [esp + 0x74], eax
fild dword [esp + 0x74]
push edi
push ebx
fmul dword [esp + 0xc4]
fadd qword [esp + 0xa0]
fstp qword [esp + 0xa0]
call sym.leptonlib.dll_l_getDataByte
mov dword [esp + 0x7c], eax
fild dword [esp + 0x7c]
add esp, 0x40
push esi
push ebx
fmul dword [esp + 0x90]
fadd qword [esp + 0x68]
fstp qword [esp + 0x68]
call sym.leptonlib.dll_l_getDataByte
mov dword [esp + 0x44], eax
fild dword [esp + 0x44]
add esp, 8
fmul dword [esp + 0x8c]
fadd qword [esp + 0x60]
fstp dword [esp + 0x3c]
fld dword [esp + 0x3c]
fadd qword [0x10142230]
call fcn.10140710
xor ecx, ecx
test eax, eax
setl cl
dec ecx
and eax, ecx
cmp eax, 0xff
jle 0x1003f025
mov eax, 0xff
mov edx, dword [esp + 0x28]
push eax
push edi
push edx
call sym.leptonlib.dll_l_setDataByte
mov edx, dword [esp + 0x20]
inc esi
lea eax, [esi - 1]
lea ecx, [edx - 1]
add esp, 0xc
cmp eax, ecx
jl 0x1003eeb3
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x2c]
mov esi, dword [esp + 0x10]
mov edi, dword [esp + 0x18]
add dword [esp + 0x1c], eax
add dword [esp + 0x20], eax
add dword [esp + 0x24], eax
add dword [esp + 0x28], ecx
inc esi
dec edi
cmp esi, edi
mov dword [esp + 0x10], esi
jl 0x1003eea2
mov eax, dword [esp + 0x44]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x14]
push edx
push eax
call sym.leptonlib.dll_fpixCreate
push eax
mov dword [esp + 0x4c], eax
call sym.leptonlib.dll_dpixGetData
mov ecx, dword [esp + 0x4c]
mov esi, eax
push ecx
mov dword [esp + 0x40], esi
call sym.leptonlib.dll_dpixGetWpl
mov edx, dword [esp + 0x28]
lea ecx, [edx - 2]
add esp, 0x10
cmp ecx, 2
mov dword [esp + 0x38], eax
mov dword [esp + 0x10], 2
jle 0x1003f189
mov ecx, dword [esp + 0x14]
lea edx, [esi + eax*8 + 8]
add ecx, 0xfffffffe
lea edi, [edi + ebx*8]
mov dword [esp + 0x28], edx
lea ebx, [ebx]
cmp ecx, 2
jle 0x1003f15f
mov eax, dword [esp + 0x28]
mov esi, 4
mov dword [esp + 0x34], eax
lea ecx, [esi - 4]
push ecx
push edi
call sym.leptonlib.dll_l_getDataByte
push esi
push edi
mov ebx, eax
call sym.leptonlib.dll_l_getDataByte
lea edx, [esi - 3]
push edx
push edi
add ebx, eax
call sym.leptonlib.dll_l_getDataByte
add ebx, eax
lea eax, [esi - 1]
push eax
push edi
call sym.leptonlib.dll_l_getDataByte
lea ecx, [esi - 2]
push ecx
push edi
add ebx, eax
call sym.leptonlib.dll_l_getDataByte
add eax, ebx
mov dword [esp + 0x64], eax
fild dword [esp + 0x64]
mov eax, dword [esp + 0x5c]
inc esi
add eax, 4
fstp dword [eax - 4]
mov ecx, dword [esp + 0x3c]
add ecx, 0xfffffffe
lea edx, [esi - 2]
add esp, 0x28
cmp edx, ecx
mov dword [esp + 0x34], eax
jl 0x1003f0f2
mov eax, dword [esp + 0x38]
mov esi, dword [esp + 0x30]
mov ebx, dword [esp + 0x20]
inc dword [esp + 0x10]
add ebx, ebx
add ebx, ebx
lea edx, [eax*4]
add dword [esp + 0x28], edx
mov edx, dword [esp + 0x18]
add edi, ebx
lea ebx, [edx - 2]
cmp dword [esp + 0x10], ebx
mov ebx, dword [esp + 0x20]
jl 0x1003f0e0
lea ecx, [edx - 2]
cmp ecx, 2
mov dword [esp + 0x10], 2
jle 0x1003f319
mov edi, dword [esp + 0x20]
lea ecx, [ebx*4]
mov dword [esp + 0x30], ecx
mov ecx, dword [esp + 0x24]
add ecx, ecx
add ecx, ecx
mov dword [esp + 0x2c], ecx
mov ecx, dword [esp + 0x4c]
lea ecx, [ecx + edi*8]
mov edi, dword [esp + 0x24]
mov dword [esp + 0x34], ecx
mov ecx, dword [esp + 0x1c]
lea ecx, [ecx + edi*8]
mov dword [esp + 0x1c], ecx
lea ecx, [esi + eax*8]
lea ebx, [eax*4]
mov dword [esp + 0x24], ecx
mov ecx, eax
lea eax, [eax + eax*2]
lea eax, [esi + eax*4]
mov dword [esp + 0x20], eax
shl ecx, 4
lea eax, [ebx + esi]
add ecx, esi
mov dword [esp + 0x28], eax
mov dword [esp + 0x3c], ecx
mov eax, esi
mov dword [esp + 0x38], esi
mov esi, dword [esp + 0x14]
mov edi, 2
add esi, 0xfffffffe
cmp esi, edi
jle 0x1003f2e0
mov edx, dword [esp + 0x28]
sub edx, eax
mov dword [esp + 0x54], edx
mov edx, dword [esp + 0x24]
sub edx, eax
mov dword [esp + 0x58], edx
mov edx, dword [esp + 0x20]
sub edx, eax
sub ecx, eax
lea esi, [eax + 8]
mov dword [esp + 0x50], edx
mov dword [esp + 0x4c], ecx
jmp 0x1003f248
mov ecx, dword [esp + 0x4c]
mov edx, dword [esp + 0x50]
mov eax, dword [esp + 0x54]
fld dword [eax + esi]
mov eax, dword [esp + 0x58]
fadd dword [esi]
push edi
fadd dword [eax + esi]
fadd dword [edx + esi]
fadd dword [ecx + esi]
mov ecx, dword [esp + 0x38]
push ecx
fmul qword [0x10143e80]
fstp dword [esp + 0x68]
call sym.leptonlib.dll_l_getDataByte
mov dword [esp + 0x64], eax
fild dword [esp + 0x64]
add esp, 8
fstp dword [esp + 0x5c]
fld dword [esp + 0x5c]
fld st(0)
fsub dword [esp + 0x60]
fmul dword [ebp + 0x10]
faddp st(1)
fadd qword [0x10142230]
call fcn.10140710
xor edx, edx
test eax, eax
setl dl
dec edx
and eax, edx
cmp eax, 0xff
jle 0x1003f2b2
mov eax, 0xff
push eax
mov eax, dword [esp + 0x20]
push edi
push eax
call sym.leptonlib.dll_l_setDataByte
mov ecx, dword [esp + 0x20]
inc edi
add ecx, 0xfffffffe
add esp, 0xc
add esi, 4
cmp edi, ecx
jl 0x1003f240
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x3c]
mov esi, dword [esp + 0x2c]
add dword [esp + 0x1c], esi
mov esi, dword [esp + 0x30]
add dword [esp + 0x34], esi
inc dword [esp + 0x10]
add dword [esp + 0x28], ebx
add dword [esp + 0x24], ebx
add dword [esp + 0x20], ebx
add eax, ebx
add ecx, ebx
lea esi, [edx - 2]
cmp dword [esp + 0x10], esi
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], ecx
jl 0x1003f202
lea edx, [esp + 0x40]
push edx
call sym.leptonlib.dll_dpixDestroy
mov eax, dword [esp + 0x48]
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push ebx
call sym.leptonlib.dll_boxClone
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret