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

Disassembly:
sub esp, 0x74
push esi
mov esi, dword [esp + 0x80]
push edi
mov edi, dword [esp + 0x80]
test edi, edi
je 0x100216be
push edi
call sym.leptonlib.dll_numaGetRefcount
add esp, 4
cmp eax, 0x20
jne 0x100216be
test esi, esi
je 0x100216be
push esi
call sym.leptonlib.dll_numaGetRefcount
add esp, 4
cmp eax, 8
jne 0x100216be
push esi
call sym.leptonlib.dll_pixGetColormap
add esp, 4
mov dword [esp + 0x5c], eax
test eax, eax
je 0x100216be
cmp dword [esp + 0x88], 0
je 0x100216be
cmp dword [esp + 0x8c], 0
je 0x100216be
cmp dword [esp + 0x90], 0
je 0x100216be
cmp dword [esp + 0x94], 0
je 0x100216be
push 0
lea eax, [esp + 0x44]
push eax
lea ecx, [esp + 0x10]
push ecx
push edi
call sym.leptonlib.dll_pixGetDimensions
push esi
call sym.leptonlib.dll_pixGetWidth
add esp, 0x14
cmp eax, dword [esp + 8]
jne 0x100216be
push esi
call sym.leptonlib.dll_pixGetHeight
add esp, 4
cmp eax, dword [esp + 0x40]
jne 0x100216be
mov edx, dword [esp + 8]
mov esi, dword [sym.imp.MSVCR90.dll_calloc]
push ebx
push ebp
push 1
push edx
call esi
mov ebp, eax
mov eax, dword [esp + 0x18]
push 1
push eax
mov dword [esp + 0x5c], ebp
call esi
mov ecx, dword [esp + 0x20]
mov edi, eax
push 1
push ecx
mov dword [esp + 0x74], edi
call esi
mov edx, dword [esp + 0x28]
push 4
push edx
mov dword [esp + 0x3c], eax
call esi
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x30]
push 4
push eax
call esi
mov ecx, dword [esp + 0x38]
push 4
push ecx
mov dword [esp + 0x54], eax
call esi
mov edx, dword [esp + 0x40]
push 4
push edx
mov dword [esp + 0x60], eax
call esi
mov dword [esp + 0x4c], eax
mov eax, dword [esp + 0x48]
push 4
push eax
call esi
mov ecx, dword [esp + 0x50]
add esp, 0x40
mov ebx, eax
push 4
push ecx
mov dword [esp + 0x34], ebx
call esi
add esp, 8
mov esi, eax
mov dword [esp + 0x18], esi
test ebp, ebp
je 0x100216b1
test edi, edi
je 0x100216b1
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x100216b1
cmp dword [esp + 0x20], 0
je 0x100216b1
cmp dword [esp + 0x24], 0
je 0x100216b1
cmp dword [esp + 0x28], 0
je 0x100216b1
cmp dword [esp + 0x14], 0
je 0x100216b1
test ebx, ebx
je 0x100216b1
test esi, esi
je 0x100216b1
mov edx, dword [esp + 0x88]
push eax
push edi
push ebp
push 0
push edx
call sym.leptonlib.dll_pixGetRGBLine
add esp, 0x14
cmp dword [esp + 0x10], 0
jle 0x100210d7
mov edx, dword [esp + 0x14]
sub edx, ebx
sub esi, ebx
mov ecx, ebx
mov ebx, ebp
mov ebp, dword [esp + 0x1c]
sub ebx, edi
mov eax, edi
sub ebp, edi
mov edi, dword [esp + 0x10]
mov dword [esp + 0x44], edi
lea esp, [esp]
movzx edi, byte [eax + ebx]
shl edi, 6
mov dword [edx + ecx], edi
movzx edi, byte [eax]
shl edi, 6
mov dword [ecx], edi
movzx edi, byte [eax + ebp]
shl edi, 6
mov dword [esi + ecx], edi
inc eax
add ecx, 4
sub dword [esp + 0x44], 1
jne 0x100210b0
mov esi, dword [esp + 0x8c]
push esi
call sym.leptonlib.dll_pixGetData
push esi
mov dword [esp + 0x60], eax
call sym.leptonlib.dll_dpixGetRefcount
mov dword [esp + 0x5c], eax
mov eax, dword [esp + 0x50]
lea ecx, [eax - 1]
add esp, 8
xor ebx, ebx
test ecx, ecx
jle 0x100215c5
mov edx, dword [esp + 0x58]
mov dword [esp + 0x44], edx
mov edi, edi
mov esi, dword [esp + 0x10]
mov ebp, dword [esp + 0x14]
mov eax, dword [esp + 0x20]
add esi, esi
add esi, esi
push esi
push ebp
push eax
call sub.MSVCR90.dll_memcpy
mov edi, dword [esp + 0x38]
mov ecx, dword [esp + 0x30]
push esi
push edi
push ecx
call sub.MSVCR90.dll_memcpy
mov edx, dword [esp + 0x30]
mov eax, dword [esp + 0x40]
push esi
push edx
push eax
call sub.MSVCR90.dll_memcpy
mov ecx, dword [esp + 0x40]
mov esi, dword [esp + 0x80]
mov edx, dword [esp + 0x70]
mov eax, dword [esp + 0xac]
push ecx
push esi
push edx
inc ebx
push ebx
push eax
mov dword [esp + 0xb8], ebx
call sym.leptonlib.dll_pixGetRGBLine
mov ecx, dword [esp + 0x48]
add esp, 0x38
test ecx, ecx
jle 0x100211cb
mov ebx, ebp
mov ebp, dword [esp + 0x18]
mov edx, edi
sub ebx, edi
sub ebp, edi
mov edi, dword [esp + 0x4c]
sub edi, esi
mov dword [esp + 0x50], edi
mov edi, dword [esp + 0x1c]
mov eax, esi
sub edi, esi
mov dword [esp + 0x40], ecx
lea ecx, [ecx]
mov esi, dword [esp + 0x50]
movzx esi, byte [eax + esi]
shl esi, 6
mov dword [ebx + edx], esi
movzx esi, byte [eax]
shl esi, 6
mov dword [edx], esi
movzx esi, byte [eax + edi]
shl esi, 6
mov dword [edx + ebp], esi
inc eax
add edx, 4
sub dword [esp + 0x40], 1
jne 0x100211a0
lea edx, [ecx - 1]
mov dword [esp + 0x40], 0
test edx, edx
jle 0x10021533
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x20]
mov ebp, dword [esp + 0x24]
mov ebx, dword [esp + 0x2c]
mov esi, dword [esp + 0x28]
mov ecx, edx
sub ecx, eax
mov dword [esp + 0x6c], ecx
mov ecx, ebp
sub ecx, eax
mov dword [esp + 0x74], ecx
mov ecx, ebx
sub ecx, eax
mov dword [esp + 0x34], ecx
lea edi, [eax + 4]
mov ecx, esi
sub ecx, eax
mov dword [esp + 0x7c], ecx
mov ecx, dword [esp + 0x18]
sub ecx, eax
mov eax, edx
sub eax, ebp
mov dword [esp + 0x60], eax
mov eax, ebx
sub eax, ebp
mov dword [esp + 0x30], eax
mov eax, esi
sub eax, ebp
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0x18]
sub eax, ebp
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x60]
mov ebx, dword [eax + ebp]
mov edx, dword [esp + 0x50]
mov eax, dword [edx + ebp]
mov ecx, dword [ebp]
cdq
and edx, 0x3f
add eax, edx
mov esi, eax
mov eax, ebx
cdq
and edx, 0x3f
add eax, edx
mov edx, dword [esp + 0x98]
sar esi, 6
mov esi, dword [edx + esi*4]
mov edx, dword [esp + 0x90]
sar eax, 6
or esi, dword [edx + eax*4]
mov eax, ecx
mov ecx, dword [esp + 0x94]
cdq
and edx, 0x3f
add eax, edx
mov edx, dword [esp + 0x9c]
sar eax, 6
or esi, dword [ecx + eax*4]
mov eax, dword [esp + 0x40]
mov esi, dword [edx + esi*4]
mov ecx, dword [esp + 0x44]
dec esi
push esi
push eax
push ecx
call sym.leptonlib.dll_l_setDataByte
lea edx, [esp + 0x84]
push edx
mov edx, dword [esp + 0x74]
lea eax, [esp + 0x80]
push eax
lea ecx, [esp + 0x7c]
push ecx
push esi
push edx
call sym.leptonlib.dll_pixcmapGetColor
mov ecx, dword [esp + 0x88]
mov eax, ebx
cdq
and edx, 7
add eax, edx
sar eax, 3
lea edx, [ecx*8]
add esp, 0x20
sub eax, edx
cmp dword [esp + 0xa0], 0
jle 0x10021309
mov ecx, dword [esp + 0xa0]
cmp eax, ecx
jle 0x10021301
mov eax, ecx
neg ecx
cmp eax, ecx
jge 0x10021309
mov eax, ecx
test eax, eax
je 0x10021380
mov ebx, dword [esp + 0x6c]
mov ecx, dword [ebx + edi]
mov edx, dword [edi - 4]
lea esi, [eax + eax*2]
add ecx, esi
add edx, esi
mov esi, dword [edi]
lea esi, [esi + eax*2]
test eax, eax
jle 0x10021358
cmp ecx, 0x3fff
jle 0x10021334
mov ecx, 0x3fff
cmp edx, 0x3fff
mov dword [ebx + edi], ecx
jle 0x10021344
mov edx, 0x3fff
cmp esi, 0x3fff
mov dword [edi - 4], edx
jle 0x10021354
mov esi, 0x3fff
mov dword [edi], esi
jmp 0x10021380
jge 0x10021380
xor eax, eax
test ecx, ecx
setl al
dec eax
and eax, ecx
xor ecx, ecx
test edx, edx
setl cl
mov dword [ebx + edi], eax
dec ecx
and ecx, edx
xor edx, edx
test esi, esi
setl dl
mov dword [edi - 4], ecx
dec edx
and edx, esi
mov dword [edi], edx
mov eax, dword [ebp]
mov ecx, dword [esp + 0x70]
cdq
and edx, 7
add eax, edx
sar eax, 3
lea edx, [ecx*8]
mov ecx, dword [esp + 0xa0]
sub eax, edx
test ecx, ecx
jle 0x100213b4
cmp eax, ecx
jle 0x100213aa
mov eax, ecx
mov edx, ecx
neg edx
cmp eax, edx
jge 0x100213b4
mov eax, edx
test eax, eax
je 0x10021451
mov ebx, dword [esp + 0x74]
mov edx, dword [esp + 0x30]
mov ecx, dword [ebx + edi]
mov edx, dword [edx + ebp]
lea esi, [eax + eax*2]
add ecx, esi
add edx, esi
mov esi, dword [esp + 0x34]
mov esi, dword [esi + edi]
lea esi, [esi + eax*2]
test eax, eax
jle 0x10021419
cmp ecx, 0x3fff
jle 0x100213ec
mov ecx, 0x3fff
cmp edx, 0x3fff
mov dword [ebx + edi], ecx
jle 0x100213fc
mov edx, 0x3fff
cmp esi, 0x3fff
mov eax, dword [esp + 0x30]
mov dword [eax + ebp], edx
jle 0x10021410
mov esi, 0x3fff
mov ecx, dword [esp + 0x34]
mov dword [ecx + edi], esi
jmp 0x1002144a
jge 0x1002144a
xor eax, eax
test ecx, ecx
setl al
dec eax
and eax, ecx
xor ecx, ecx
test edx, edx
setl cl
mov dword [ebx + edi], eax
xor eax, eax
dec ecx
and ecx, edx
mov edx, dword [esp + 0x30]
test esi, esi
setl al
mov dword [edx + ebp], ecx
mov ecx, dword [esp + 0x34]
dec eax
and eax, esi
mov dword [ecx + edi], eax
mov ecx, dword [esp + 0xa0]
mov edx, dword [esp + 0x50]
mov eax, dword [edx + ebp]
cdq
and edx, 7
add eax, edx
mov edx, dword [esp + 0x78]
add edx, edx
add edx, edx
sar eax, 3
add edx, edx
sub eax, edx
test ecx, ecx
jle 0x1002147f
cmp eax, ecx
jle 0x10021477
mov eax, ecx
neg ecx
cmp eax, ecx
jge 0x1002147f
mov eax, ecx
test eax, eax
je 0x10021515
mov ebx, dword [esp + 0x7c]
mov edx, dword [esp + 0x38]
mov ecx, dword [ebx + edi]
mov edx, dword [edx + ebp]
lea esi, [eax + eax*2]
add ecx, esi
add edx, esi
mov esi, dword [esp + 0x3c]
mov esi, dword [esi + edi]
lea esi, [esi + eax*2]
test eax, eax
jle 0x100214e4
cmp ecx, 0x3fff
jle 0x100214b7
mov ecx, 0x3fff
cmp edx, 0x3fff
mov dword [ebx + edi], ecx
jle 0x100214c7
mov edx, 0x3fff
cmp esi, 0x3fff
mov eax, dword [esp + 0x38]
mov dword [eax + ebp], edx
jle 0x100214db
mov esi, 0x3fff
mov ecx, dword [esp + 0x3c]
mov dword [ecx + edi], esi
jmp 0x10021515
jge 0x10021515
xor eax, eax
test ecx, ecx
setl al
dec eax
and eax, ecx
xor ecx, ecx
test edx, edx
setl cl
mov dword [ebx + edi], eax
xor eax, eax
dec ecx
and ecx, edx
mov edx, dword [esp + 0x38]
test esi, esi
setl al
mov dword [edx + ebp], ecx
mov ecx, dword [esp + 0x3c]
dec eax
and eax, esi
mov dword [ecx + edi], eax
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x10]
inc eax
lea edx, [ecx - 1]
add edi, 4
add ebp, 4
cmp eax, edx
mov dword [esp + 0x40], eax
jl 0x10021241
mov eax, dword [esp + 0x20]
mov eax, dword [eax + ecx*4 - 4]
cdq
and edx, 0x3f
add eax, edx
mov edx, dword [esp + 0x24]
mov esi, eax
mov eax, dword [edx + ecx*4 - 4]
cdq
and edx, 0x3f
add eax, edx
mov edx, dword [esp + 0x90]
sar eax, 6
sar esi, 6
mov esi, dword [edx + esi*4]
mov edx, dword [esp + 0x94]
or esi, dword [edx + eax*4]
mov eax, dword [esp + 0x28]
mov eax, dword [eax + ecx*4 - 4]
cdq
and edx, 0x3f
add eax, edx
mov edx, dword [esp + 0x98]
sar eax, 6
or esi, dword [edx + eax*4]
mov eax, dword [esp + 0x9c]
mov edx, dword [eax + esi*4]
mov esi, dword [esp + 0x44]
dec edx
push edx
dec ecx
push ecx
push esi
call sym.leptonlib.dll_l_setDataByte
mov eax, dword [esp + 0x60]
mov ebx, dword [esp + 0x8c]
add eax, eax
add eax, eax
add esi, eax
mov eax, dword [esp + 0x54]
lea ecx, [eax - 1]
add esp, 0xc
cmp ebx, ecx
mov dword [esp + 0x44], esi
jl 0x10021110
mov edx, dword [esp + 0x58]
dec eax
imul eax, dword [esp + 0x54]
xor edi, edi
cmp dword [esp + 0x10], edi
lea eax, [edx + eax*4]
mov dword [esp + 0x80], eax
jle 0x1002165f
mov esi, dword [esp + 0x2c]
mov ebx, dword [esp + 0x14]
mov ebp, dword [esp + 0x18]
sub ebx, esi
sub ebp, esi
mov eax, dword [esi + ebp]
cdq
and edx, 0x3f
add eax, edx
mov ecx, eax
mov eax, dword [ebx + esi]
cdq
and edx, 0x3f
add eax, edx
mov edx, dword [esp + 0x98]
sar ecx, 6
mov ecx, dword [edx + ecx*4]
mov edx, dword [esp + 0x90]
sar eax, 6
or ecx, dword [edx + eax*4]
mov eax, dword [esi]
cdq
and edx, 0x3f
add eax, edx
mov edx, dword [esp + 0x94]
sar eax, 6
or ecx, dword [edx + eax*4]
mov eax, dword [esp + 0x9c]
mov ecx, dword [eax + ecx*4]
mov edx, dword [esp + 0x80]
dec ecx
push ecx
push edi
push edx
call sym.leptonlib.dll_l_setDataByte
inc edi
add esp, 0xc
add esi, 4
cmp edi, dword [esp + 0x10]
jl 0x100215f5
mov eax, dword [esp + 0x4c]
mov esi, dword [sym.imp.MSVCR90.dll_free]
push eax
call esi
mov ecx, dword [esp + 0x60]
push ecx
call esi
mov edx, dword [esp + 0x24]
push edx
call esi
mov eax, dword [esp + 0x2c]
push eax
call esi
mov ecx, dword [esp + 0x34]
push ecx
call esi
mov edx, dword [esp + 0x3c]
push edx
call esi
mov eax, dword [esp + 0x2c]
push eax
call esi
mov ecx, dword [esp + 0x48]
push ecx
call esi
mov edx, dword [esp + 0x38]
push edx
call esi
add esp, 0x24
pop ebp
pop ebx
pop edi
xor eax, eax
pop esi
add esp, 0x74
ret
pop ebp
pop ebx
pop edi
mov eax, 1
pop esi
add esp, 0x74
ret
pop edi
mov eax, 1
pop esi
add esp, 0x74
ret