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

Disassembly:
sub esp, 0x6c
push ebp
push esi
mov esi, dword [esp + 0x78]
xor ebp, ebp
cmp esi, ebp
jne 0x1001d788
pop esi
lea eax, [ebp + 1]
pop ebp
add esp, 0x6c
ret
push ebx
mov ebx, dword [esp + 0x90]
push edi
mov edi, dword [esp + 0x98]
cmp ebx, ebp
jne 0x1001d7ad
cmp edi, ebp
jne 0x1001d7ad
cmp dword [esp + 0x9c], ebp
je 0x1001d830
cmp dword [esp + 0x90], ebp
jge 0x1001d7bd
mov dword [esp + 0x90], ebp
lea eax, [esp + 0x50]
push eax
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0x88]
push edx
push esi
call sym.leptonlib.dll_pixGetDimensions
add esp, 0x10
cmp dword [esp + 0x90], 0xff
jg 0x1001d830
mov edx, dword [esp + 0x84]
cmp edx, ebp
jl 0x1001d830
mov ecx, dword [esp + 0x88]
cmp ecx, ebp
jl 0x1001d830
mov eax, dword [esp + 0x8c]
cmp eax, ebp
jl 0x1001d830
cmp edx, ebp
jne 0x1001d812
cmp ecx, ebp
jne 0x1001d812
cmp eax, ebp
je 0x1001d81c
imul edx, ecx
imul edx, eax
test edx, edx
je 0x1001d830
push esi
call sym.leptonlib.dll_pixGetColormap
add esp, 4
cmp eax, ebp
jne 0x1001d83d
cmp dword [esp + 0x50], 0x20
je 0x1001d84a
pop edi
pop ebx
pop esi
mov eax, 1
pop ebp
add esp, 0x6c
ret
push 2
push esi
call sym.leptonlib.dll_pixRemoveColormap
add esp, 8
jmp 0x1001d853
push esi
call sym.leptonlib.dll_boxClone
add esp, 4
push eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x30], ebp
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x28], ebp
call sym.leptonlib.dll_pixGetWidth
mov dword [esp + 0x84], eax
mov eax, dword [esp + 0x18]
push eax
call sym.leptonlib.dll_pixGetHeight
add esp, 8
mov dword [esp + 0x10], eax
cmp ebx, ebp
je 0x1001d8b8
mov ecx, dword [esp + 0x80]
push 8
push eax
push ecx
call sym.leptonlib.dll_pixCreate
mov esi, eax
push esi
mov dword [esp + 0x34], esi
call sym.leptonlib.dll_pixGetData
push esi
mov dword [esp + 0x44], eax
call sym.leptonlib.dll_dpixGetRefcount
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0x24]
add esp, 0x14
mov dword [ebx], esi
cmp edi, ebp
je 0x1001d8ef
mov edx, dword [esp + 0x80]
push 8
push eax
push edx
call sym.leptonlib.dll_pixCreate
mov esi, eax
push esi
mov dword [esp + 0x38], esi
call sym.leptonlib.dll_pixGetData
push esi
mov dword [esp + 0x4c], eax
call sym.leptonlib.dll_dpixGetRefcount
mov dword [esp + 0x54], eax
mov eax, dword [esp + 0x24]
add esp, 0x14
mov dword [edi], esi
mov edi, dword [esp + 0x9c]
cmp edi, ebp
je 0x1001d927
push 8
push eax
mov eax, dword [esp + 0x88]
push eax
call sym.leptonlib.dll_pixCreate
mov esi, eax
push esi
mov dword [esp + 0x3c], esi
call sym.leptonlib.dll_pixGetData
push esi
mov ebx, eax
call sym.leptonlib.dll_dpixGetRefcount
add esp, 0x14
mov ebp, eax
mov dword [edi], esi
jmp 0x1001d935
mov ebx, dword [esp + 0x80]
mov ebp, dword [esp + 0x80]
mov ecx, dword [esp + 0x14]
push ecx
call sym.leptonlib.dll_pixGetData
mov edx, dword [esp + 0x18]
push edx
mov esi, eax
call sym.leptonlib.dll_dpixGetRefcount
mov edi, eax
mov eax, dword [esp + 0x8c]
add esp, 8
test eax, eax
je 0x1001d9cf
fld1
push eax
push 0
push ecx
fstp dword [esp]
call sym.leptonlib.dll_numaGammaTRC
push eax
mov dword [esp + 0x80], eax
call sym.leptonlib.dll_numaGetIArray
fld1
add esp, 0x10
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0x88]
push eax
push 0
push ecx
fstp dword [esp]
call sym.leptonlib.dll_numaGammaTRC
push eax
mov dword [esp + 0x84], eax
call sym.leptonlib.dll_numaGetIArray
fld1
mov ecx, dword [esp + 0x9c]
add esp, 0x10
push ecx
push 0
push ecx
fstp dword [esp]
mov dword [esp + 0x54], eax
call sym.leptonlib.dll_numaGammaTRC
push eax
mov dword [esp + 0x88], eax
call sym.leptonlib.dll_numaGetIArray
add esp, 0x10
mov dword [esp + 0x4c], eax
cmp dword [esp + 0x10], 0
mov dword [esp + 0x34], 0
jle 0x1001dba4
mov eax, dword [esp + 0x40]
lea ecx, [eax*4]
lea edx, [ebp*4]
mov dword [esp + 0x6c], edx
mov edx, dword [esp + 0x3c]
mov dword [esp + 0x68], ecx
lea ecx, [edi*4]
lea eax, [edx*4]
mov edx, dword [esp + 0x38]
mov dword [esp + 0x60], ecx
mov ecx, dword [esp + 0x30]
mov dword [esp + 0x64], eax
mov eax, dword [esp + 0x80]
mov dword [esp + 0x40], ebx
mov dword [esp + 0x3c], edx
mov dword [esp + 0x38], ecx
mov dword [esp + 0x30], esi
cmp dword [esp + 0x24], 0
je 0x1001da40
mov dword [esp + 0x54], ecx
cmp dword [esp + 0x28], 0
je 0x1001da4b
mov dword [esp + 0x58], edx
cmp dword [esp + 0x2c], 0
je 0x1001da56
mov dword [esp + 0x5c], ebx
xor ebp, ebp
test eax, eax
jle 0x1001db71
lea edx, [esp + 0x18]
push edx
mov edx, dword [esp + 0x34]
lea eax, [esp + 0x20]
push eax
mov eax, dword [edx + ebp*4]
lea ecx, [esp + 0x28]
push ecx
push eax
call sym.leptonlib.dll_extractRGBValues
mov ecx, dword [esp + 0x30]
add esp, 0x10
cmp dword [esp + 0x84], 0
je 0x1001dab8
mov edx, dword [esp + 0x44]
mov ecx, dword [edx + ecx*4]
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x48]
mov esi, dword [esp + 0x4c]
mov dword [esp + 0x20], ecx
mov edx, dword [edx + eax*4]
mov eax, dword [esp + 0x18]
mov dword [esp + 0x1c], edx
mov eax, dword [esi + eax*4]
mov dword [esp + 0x18], eax
jmp 0x1001dac0
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
mov edi, dword [esp + 0x90]
test edi, edi
jle 0x1001dadd
cmp ecx, edx
mov esi, ecx
jg 0x1001dad3
mov esi, edx
cmp esi, eax
jg 0x1001dad9
mov esi, eax
cmp esi, edi
jl 0x1001db55
mov edi, ecx
sub edi, edx
jns 0x1001dae7
mov edi, edx
sub edi, ecx
mov esi, ecx
sub esi, eax
jns 0x1001daf1
mov esi, eax
sub esi, ecx
mov ebx, edx
sub ebx, eax
jns 0x1001dafb
sub eax, edx
mov ebx, eax
cmp dword [esp + 0x24], 0
je 0x1001db19
mov ecx, dword [esp + 0x54]
lea eax, [esi + edi]
cdq
sub eax, edx
sar eax, 1
push eax
push ebp
push ecx
call sym.leptonlib.dll_l_setDataByte
add esp, 0xc
cmp dword [esp + 0x28], 0
je 0x1001db37
lea eax, [ebx + edi]
cdq
sub eax, edx
mov edx, dword [esp + 0x58]
sar eax, 1
push eax
push ebp
push edx
call sym.leptonlib.dll_l_setDataByte
add esp, 0xc
cmp dword [esp + 0x2c], 0
je 0x1001db55
lea eax, [ebx + esi]
cdq
sub eax, edx
sar eax, 1
push eax
mov eax, dword [esp + 0x60]
push ebp
push eax
call sym.leptonlib.dll_l_setDataByte
add esp, 0xc
mov eax, dword [esp + 0x80]
inc ebp
cmp ebp, eax
jl 0x1001da60
mov edx, dword [esp + 0x3c]
mov ecx, dword [esp + 0x38]
mov ebx, dword [esp + 0x40]
mov esi, dword [esp + 0x34]
mov edi, dword [esp + 0x60]
add ecx, dword [esp + 0x64]
add edx, dword [esp + 0x68]
add ebx, dword [esp + 0x6c]
add dword [esp + 0x30], edi
inc esi
cmp esi, dword [esp + 0x10]
mov dword [esp + 0x34], esi
mov dword [esp + 0x38], ecx
mov dword [esp + 0x3c], edx
mov dword [esp + 0x40], ebx
jl 0x1001da35
cmp dword [esp + 0x84], 0
je 0x1001dbed
lea ecx, [esp + 0x70]
push ecx
call sym.leptonlib.dll_numaDestroy
lea edx, [esp + 0x78]
push edx
call sym.leptonlib.dll_numaDestroy
lea eax, [esp + 0x80]
push eax
call sym.leptonlib.dll_numaDestroy
mov ecx, dword [esp + 0x50]
mov esi, dword [sym.imp.MSVCR90.dll_free]
push ecx
call esi
mov edx, dword [esp + 0x58]
push edx
call esi
mov eax, dword [esp + 0x60]
push eax
call esi
add esp, 0x18
lea ecx, [esp + 0x14]
push ecx
call sym.leptonlib.dll_pixDestroy
add esp, 4
pop edi
pop ebx
pop esi
xor eax, eax
pop ebp
add esp, 0x6c
ret