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

Disassembly:
sub esp, 0x4c
push ebx
mov ebx, dword [esp + 0x54]
test ebx, ebx
jne 0x1001dc23
xor eax, eax
pop ebx
add esp, 0x4c
ret
lea eax, [esp + 0x34]
push eax
lea ecx, [esp + 0x24]
push ecx
lea edx, [esp + 0x1c]
push edx
push ebx
call sym.leptonlib.dll_pixGetDimensions
mov eax, dword [esp + 0x74]
add esp, 0x10
cmp eax, 1
je 0x1001dc4e
cmp eax, 2
je 0x1001dc4e
cmp eax, 3
jne 0x1001dc1c
mov eax, dword [esp + 0x58]
push esi
push edi
test eax, eax
jl 0x1001dc92
mov edi, dword [esp + 0x64]
test edi, edi
jl 0x1001dc92
mov esi, dword [esp + 0x68]
test esi, esi
jl 0x1001dc92
test eax, eax
jne 0x1001dc74
test edi, edi
jne 0x1001dc74
test esi, esi
je 0x1001dc7e
imul eax, edi
imul eax, esi
test eax, eax
je 0x1001dc92
push ebx
call sym.leptonlib.dll_pixGetColormap
add esp, 4
test eax, eax
jne 0x1001dc9b
cmp dword [esp + 0x3c], 0x20
je 0x1001dca8
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x4c
ret
push 2
push ebx
call sym.leptonlib.dll_pixRemoveColormap
add esp, 8
jmp 0x1001dcb1
push ebx
call sym.leptonlib.dll_boxClone
add esp, 4
mov ecx, dword [esp + 0x1c]
push ebp
mov dword [esp + 0x60], eax
mov eax, dword [esp + 0x2c]
push 8
push eax
push ecx
call sym.leptonlib.dll_pixCreate
mov ebp, eax
push ebp
mov dword [esp + 0x68], ebp
call sym.leptonlib.dll_pixGetData
push ebp
mov ebx, eax
call sym.leptonlib.dll_dpixGetRefcount
mov edx, dword [esp + 0x74]
push edx
mov ebp, eax
call sym.leptonlib.dll_pixGetData
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x78]
push eax
call sym.leptonlib.dll_dpixGetRefcount
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0x80]
add esp, 0x1c
test eax, eax
je 0x1001dd64
fld1
push eax
push 0
push ecx
fstp dword [esp]
call sym.leptonlib.dll_numaGammaTRC
push eax
mov dword [esp + 0x5c], eax
call sym.leptonlib.dll_numaGetIArray
fld1
add esp, 0x10
push edi
push 0
push ecx
fstp dword [esp]
mov dword [esp + 0x40], eax
call sym.leptonlib.dll_numaGammaTRC
push eax
mov dword [esp + 0x60], eax
call sym.leptonlib.dll_numaGetIArray
fld1
add esp, 0x10
push esi
push 0
push ecx
fstp dword [esp]
mov dword [esp + 0x44], eax
call sym.leptonlib.dll_numaGammaTRC
push eax
mov dword [esp + 0x64], eax
call sym.leptonlib.dll_numaGetIArray
add esp, 0x10
mov dword [esp + 0x3c], eax
cmp dword [esp + 0x2c], 0
mov dword [esp + 0x30], 0
jle 0x1001defa
mov edx, dword [esp + 0x28]
lea ecx, [ebp*4]
lea eax, [edx*4]
mov dword [esp + 0x48], ecx
mov ecx, dword [esp + 0x24]
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0x20]
mov dword [esp + 0x28], ebx
mov dword [esp + 0x24], ecx
xor ebx, ebx
mov dword [esp + 0x1c], ebx
test eax, eax
jle 0x1001ded7
nop
lea edx, [esp + 0x10]
push edx
mov edx, dword [esp + 0x28]
lea eax, [esp + 0x18]
push eax
mov eax, dword [edx + ebx*4]
lea ecx, [esp + 0x20]
push ecx
push eax
call sym.leptonlib.dll_extractRGBValues
mov ecx, dword [esp + 0x28]
add esp, 0x10
cmp dword [esp + 0x64], 0
je 0x1001de05
mov edx, dword [esp + 0x34]
mov ecx, dword [edx + ecx*4]
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x38]
mov dword [esp + 0x18], ecx
mov edi, dword [edx + eax*4]
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x3c]
mov dword [esp + 0x14], edi
mov esi, dword [edx + eax*4]
mov dword [esp + 0x10], esi
jmp 0x1001de0d
mov esi, dword [esp + 0x10]
mov edi, dword [esp + 0x14]
mov eax, dword [esp + 0x70]
cmp eax, 1
jne 0x1001de58
lea eax, [edi + esi]
cdq
sub eax, edx
mov ebp, eax
sar ebp, 1
sub ebp, ecx
jns 0x1001de26
neg ebp
lea eax, [ecx + esi]
cdq
sub eax, edx
mov ebx, eax
sar ebx, 1
sub ebx, edi
jns 0x1001de36
neg ebx
lea eax, [ecx + edi]
cdq
sub eax, edx
sar eax, 1
sub eax, esi
jns 0x1001de44
neg eax
cmp ebp, ebx
mov ecx, ebp
jg 0x1001de4c
mov ecx, ebx
cmp ecx, eax
mov ebx, dword [esp + 0x1c]
jg 0x1001deb7
mov ecx, eax
jmp 0x1001deb7
cmp eax, 2
jne 0x1001de9b
mov edx, ecx
sub edx, edi
jns 0x1001de67
mov edx, edi
sub edx, ecx
mov eax, ecx
sub eax, esi
jns 0x1001de71
mov eax, esi
sub eax, ecx
mov ecx, edi
sub ecx, esi
jns 0x1001de7b
sub esi, edi
jmp 0x1001de7d
mov esi, ecx
cmp edx, eax
mov ecx, edx
jg 0x1001de85
mov ecx, eax
cmp esi, ecx
jge 0x1001deb7
cmp edx, eax
jge 0x1001de8f
mov eax, edx
cmp eax, esi
jle 0x1001de97
mov ecx, eax
jmp 0x1001deb7
mov ecx, esi
jmp 0x1001deb7
cmp ecx, edi
mov eax, ecx
jl 0x1001dea3
mov eax, edi
cmp eax, esi
jl 0x1001dea9
mov eax, esi
cmp ecx, edi
jg 0x1001deaf
mov ecx, edi
cmp ecx, esi
jg 0x1001deb5
mov ecx, esi
sub ecx, eax
mov eax, dword [esp + 0x28]
push ecx
push ebx
push eax
call sym.leptonlib.dll_l_setDataByte
mov eax, dword [esp + 0x2c]
inc ebx
add esp, 0xc
cmp ebx, eax
mov dword [esp + 0x1c], ebx
jl 0x1001ddb0
mov edx, dword [esp + 0x44]
mov ecx, dword [esp + 0x30]
add dword [esp + 0x24], edx
mov edx, dword [esp + 0x48]
add dword [esp + 0x28], edx
inc ecx
cmp ecx, dword [esp + 0x2c]
mov dword [esp + 0x30], ecx
jl 0x1001dda1
cmp dword [esp + 0x64], 0
pop ebp
je 0x1001df3e
lea eax, [esp + 0x48]
push eax
call sym.leptonlib.dll_numaDestroy
lea ecx, [esp + 0x50]
push ecx
call sym.leptonlib.dll_numaDestroy
lea edx, [esp + 0x58]
push edx
call sym.leptonlib.dll_numaDestroy
mov eax, dword [esp + 0x3c]
mov esi, dword [sym.imp.MSVCR90.dll_free]
push eax
call esi
mov ecx, dword [esp + 0x44]
push ecx
call esi
mov edx, dword [esp + 0x4c]
push edx
call esi
add esp, 0x18
lea eax, [esp + 0x5c]
push eax
call sym.leptonlib.dll_pixDestroy
mov eax, dword [esp + 0x58]
add esp, 4
pop edi
pop esi
pop ebx
add esp, 0x4c
ret