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

Disassembly:
sub esp, 0x54
push esi
mov esi, dword [esp + 0x5c]
test esi, esi
jne 0x100216e3
xor eax, eax
pop esi
add esp, 0x54
ret
push esi
call sym.leptonlib.dll_numaGetRefcount
add esp, 4
cmp eax, 0x20
jne 0x100216dc
push edi
push 0
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x1c]
push ecx
push esi
call sym.leptonlib.dll_pixGetDimensions
push esi
call sym.leptonlib.dll_pixGetData
push esi
mov dword [esp + 0x60], eax
call sym.leptonlib.dll_dpixGetRefcount
mov ecx, dword [esp + 0x2c]
mov edi, dword [esp + 0x30]
add esp, 0x18
cmp ecx, edi
mov dword [esp + 0x44], eax
mov edx, ecx
jl 0x1002172b
mov edx, edi
cmp dword [esp + 0x68], 0
jg 0x10021754
mov eax, 0x51eb851f
imul edx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, 1
mov dword [esp + 0x68], 1
jl 0x10021754
mov dword [esp + 0x68], eax
mov eax, dword [esp + 0x64]
lea esi, [eax - 8]
push ebx
push ebp
cmp esi, 8
ja 0x10021788
push 4
push edi
push ecx
mov dword [esp + 0x3c], 4
call sym.leptonlib.dll_pixCreate
mov ebx, 2
add esp, 0xc
lea ebp, [ebx + 0x3e]
mov dword [esp + 0x18], 8
jmp 0x100217eb
cmp eax, 0x40
jge 0x100217b3
push 8
push edi
push ecx
mov dword [esp + 0x3c], 8
call sym.leptonlib.dll_pixCreate
mov ebx, 2
add esp, 0xc
lea ebp, [ebx + 0x3e]
mov dword [esp + 0x18], 8
jmp 0x100217eb
cmp eax, 0x100
jg 0x10021f92
push 8
push edi
push ecx
mov dword [esp + 0x3c], 8
call sym.leptonlib.dll_pixCreate
mov esi, dword [esp + 0x78]
add esp, 0xc
mov ebx, 3
mov ebp, 0x200
mov dword [esp + 0x18], 0x40
add esi, 0xffffffc0
mov edi, dword [esp + 0x68]
mov edx, eax
push edi
push edx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x3c], ebp
mov dword [esp + 0x4c], esi
call sym.leptonlib.dll_pixCopyResolution
mov eax, dword [esp + 0x1c]
push edi
push eax
call sym.leptonlib.dll_pixCopyInputFormat
add esp, 0x10
push 4
test esi, esi
jne 0x10021a87
mov ecx, dword [esp + 0x1c]
mov edi, dword [sym.imp.MSVCR90.dll_calloc]
push ecx
call edi
mov ebp, eax
add esp, 8
mov dword [esp + 0x10], ebp
test ebp, ebp
je 0x10021f92
cmp dword [esp + 0x18], esi
jle 0x10021858
push 0x20
push 1
call edi
fldz
mov dword [ebp + esi*4], eax
fstp dword [eax]
inc esi
add esp, 8
cmp esi, dword [esp + 0x18]
jl 0x10021840
dec ebx
push ebx
lea edx, [esp + 0x44]
push edx
lea eax, [esp + 0x44]
push eax
lea ecx, [esp + 0x44]
push ecx
mov dword [esp + 0x64], ebx
call sym.leptonlib.dll_makeRGBToIndexTables
mov edi, dword [esp + 0x24]
push edi
call sym.leptonlib.dll_pixGetData
push edi
mov esi, eax
call sym.leptonlib.dll_dpixGetRefcount
mov ebp, dword [esp + 0x48]
add esp, 0x18
cmp dword [esp + 0x20], 0
mov dword [esp + 0x68], 0
jle 0x10021989
mov ebx, dword [esp + 0x50]
lea edx, [eax*4]
mov eax, dword [esp + 0x4c]
lea ecx, [eax*4]
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x44], edx
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x34], esi
xor edi, edi
test eax, eax
jle 0x1002196a
mov edi, edi
lea edx, [esp + 0x2c]
push edx
mov edx, dword [ebx + edi*4]
lea eax, [esp + 0x2c]
push eax
lea ecx, [esp + 0x2c]
push ecx
push edx
call sym.leptonlib.dll_extractRGBValues
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x48]
mov esi, dword [ecx + eax*4]
mov edx, dword [esp + 0x38]
mov eax, dword [esp + 0x4c]
or esi, dword [eax + edx*4]
mov ecx, dword [esp + 0x3c]
mov edx, dword [esp + 0x50]
or esi, dword [edx + ecx*4]
add esp, 0x10
cmp ebp, 4
je 0x10021928
cmp ebp, 8
jne 0x10021f92
mov eax, dword [esp + 0x34]
push esi
push edi
push eax
call sym.leptonlib.dll_l_setDataByte
jmp 0x10021934
mov ecx, dword [esp + 0x34]
push esi
push edi
push ecx
call sym.leptonlib.dll_l_setDataQbit
mov edx, dword [esp + 0x1c]
mov eax, dword [edx + esi*4]
fld dword [eax]
inc edi
fadd qword [0x10142240]
add esp, 0xc
fstp dword [eax]
mov ecx, dword [esp + 0x24]
add dword [eax + 8], ecx
mov edx, dword [esp + 0x28]
add dword [eax + 0xc], edx
mov ecx, dword [esp + 0x2c]
add dword [eax + 0x10], ecx
mov eax, dword [esp + 0x1c]
cmp edi, eax
jl 0x100218d0
mov ecx, dword [esp + 0x68]
mov edx, dword [esp + 0x44]
add ebx, dword [esp + 0x4c]
add dword [esp + 0x34], edx
inc ecx
cmp ecx, dword [esp + 0x20]
mov dword [esp + 0x68], ecx
jl 0x100218c4
push ebp
call sym.leptonlib.dll_pixcmapCreate
push eax
mov dword [esp + 0x4c], eax
mov eax, dword [esp + 0x1c]
push eax
call sym.leptonlib.dll_pixSetColormap
add esp, 0xc
cmp dword [esp + 0x18], 0
mov dword [esp + 0x68], 0
jle 0x10021a3d
mov ecx, dword [esp + 0x10]
fldz
mov edx, dword [esp + 0x68]
mov esi, dword [ecx + edx*4]
fcomp dword [esi]
lea ebp, [esi + 0x14]
fnstsw ax
test ah, 0x44
jnp 0x100219fa
fild dword [esi + 8]
fdiv dword [esi]
call fcn.10140710
fild dword [esi + 0xc]
mov dword [ebp], eax
lea ebx, [esi + 0x18]
fdiv dword [esi]
call fcn.10140710
fild dword [esi + 0x10]
mov dword [ebx], eax
lea edi, [esi + 0x1c]
fdiv dword [esi]
call fcn.10140710
mov dword [edi], eax
jmp 0x10021a13
mov edx, dword [esp + 0x54]
mov eax, dword [esp + 0x68]
lea edi, [esi + 0x1c]
push edi
lea ebx, [esi + 0x18]
push ebx
push ebp
call fcn.10020d70
add esp, 0xc
mov eax, dword [edi]
mov ecx, dword [ebx]
mov edx, dword [ebp]
push eax
mov eax, dword [esp + 0x48]
push ecx
push edx
push eax
call sym.leptonlib.dll_pixcmapAddColor
mov eax, dword [esp + 0x78]
inc eax
add esp, 0x10
cmp eax, dword [esp + 0x18]
mov dword [esp + 0x68], eax
jl 0x100219b4
mov ebx, dword [esp + 0x18]
mov edi, dword [sym.imp.MSVCR90.dll_free]
mov ebp, dword [esp + 0x10]
xor esi, esi
test ebx, ebx
jle 0x10021a60
mov ecx, dword [ebp + esi*4]
push ecx
call edi
inc esi
add esp, 4
cmp esi, ebx
jl 0x10021a51
push ebp
call edi
mov edx, dword [esp + 0x3c]
push edx
call edi
mov eax, dword [esp + 0x44]
push eax
call edi
mov ecx, dword [esp + 0x4c]
push ecx
call edi
mov eax, dword [esp + 0x24]
add esp, 0x10
pop ebp
pop ebx
pop edi
pop esi
add esp, 0x54
ret
push ebp
call dword [sym.imp.MSVCR90.dll_calloc]
mov edi, eax
add esp, 8
test edi, edi
je 0x10021f92
xor esi, esi
test ebp, ebp
jle 0x10021aba
push 0x20
push 1
call dword [sym.imp.MSVCR90.dll_calloc]
fldz
mov dword [edi + esi*4], eax
fstp dword [eax]
inc esi
add esp, 8
cmp esi, ebp
jl 0x10021aa1
push ebx
lea edx, [esp + 0x44]
push edx
lea eax, [esp + 0x44]
push eax
lea ecx, [esp + 0x44]
push ecx
call sym.leptonlib.dll_makeRGBToIndexTables
mov ebp, dword [esp + 0x50]
add esp, 0x10
cmp dword [esp + 0x20], 0
mov dword [esp + 0x68], 0
jle 0x10021b8f
mov eax, dword [esp + 0x4c]
imul eax, dword [esp + 0x70]
mov ebx, dword [esp + 0x50]
add eax, eax
add eax, eax
mov dword [esp + 0x54], eax
mov eax, dword [esp + 0x1c]
xor esi, esi
test eax, eax
jle 0x10021b75
lea edx, [esp + 0x2c]
push edx
mov edx, dword [ebx + esi*4]
lea eax, [esp + 0x2c]
push eax
lea ecx, [esp + 0x2c]
push ecx
push edx
call sym.leptonlib.dll_extractRGBValues
mov eax, dword [esp + 0x34]
mov edx, dword [esp + 0x38]
mov ecx, dword [esp + 0x48]
mov ecx, dword [ecx + eax*4]
mov eax, dword [esp + 0x4c]
or ecx, dword [eax + edx*4]
mov edx, dword [esp + 0x3c]
or ecx, dword [ebp + edx*4]
add esi, dword [esp + 0x80]
mov eax, dword [edi + ecx*4]
fld dword [eax]
add esp, 0x10
fadd qword [0x10142240]
fstp dword [eax]
mov dword [eax + 4], ecx
mov ecx, dword [esp + 0x24]
add dword [eax + 8], ecx
mov edx, dword [esp + 0x28]
add dword [eax + 0xc], edx
mov ecx, dword [esp + 0x2c]
add dword [eax + 0x10], ecx
mov eax, dword [esp + 0x1c]
cmp esi, eax
jl 0x10021b08
mov ecx, dword [esp + 0x68]
add ecx, dword [esp + 0x70]
add ebx, dword [esp + 0x54]
cmp ecx, dword [esp + 0x20]
mov dword [esp + 0x68], ecx
jl 0x10021b02
push 2
push 0x200
call sym.leptonlib.dll_lheapCreate
xor esi, esi
add esp, 8
cmp dword [esp + 0x34], esi
mov dword [esp + 0x48], eax
jle 0x10021bc6
mov ebx, dword [esp + 0x34]
mov edi, edi
mov edx, dword [edi + esi*4]
mov eax, dword [esp + 0x48]
push edx
push eax
call sym.leptonlib.dll_lheapAdd
inc esi
add esp, 8
cmp esi, ebx
jl 0x10021bb0
push edi
call dword [sym.imp.MSVCR90.dll_free]
mov ecx, dword [esp + 0x70]
mov ebp, dword [sym.imp.MSVCR90.dll_calloc]
push 4
push ecx
call ebp
mov ebx, eax
add esp, 0xc
mov dword [esp + 0x10], ebx
test ebx, ebx
je 0x10021f92
mov edi, dword [esp + 0x18]
xor esi, esi
test edi, edi
jle 0x10021c0c
push 0x20
push 1
call ebp
fldz
mov dword [ebx + esi*4], eax
fstp dword [eax]
inc esi
add esp, 8
cmp esi, edi
jl 0x10021bf7
mov eax, dword [esp + 0x44]
test eax, eax
jle 0x10021c44
lea esi, [ebx + edi*4]
mov ebx, eax
xor ebp, ebp
jmp 0x10021c20
mov edx, dword [esp + 0x48]
push edx
call sym.leptonlib.dll_lheapRemove
fldz
mov dword [esi], eax
fstp dword [eax]
add esp, 4
add esi, 4
sub ebx, 1
mov dword [eax + 8], ebp
mov dword [eax + 0xc], ebp
mov dword [eax + 0x10], ebp
jne 0x10021c20
lea eax, [esp + 0x48]
push 1
push eax
call sym.leptonlib.dll_lheapDestroy
mov ebx, dword [esp + 0x3c]
push 4
push ebx
call dword [sym.imp.MSVCR90.dll_calloc]
mov ebp, eax
add esp, 0x10
xor eax, eax
mov dword [esp + 0x60], ebp
test ebp, ebp
je 0x10021f94
mov edx, dword [esp + 0x44]
test edx, edx
jle 0x10021c98
mov ecx, dword [esp + 0x10]
lea ecx, [ecx + edi*4]
nop
mov ebx, dword [ecx]
mov ebx, dword [ebx + 4]
lea esi, [eax + edi]
inc eax
add ecx, 4
cmp eax, edx
mov dword [ebp + ebx*4], esi
jl 0x10021c80
mov ebx, dword [esp + 0x34]
xor eax, eax
test ebx, ebx
jbe 0x10021cb5
mov edi, edi
cmp dword [ebp + eax*4], 0
jne 0x10021cb0
mov edx, eax
shr edx, 3
mov dword [ebp + eax*4], edx
inc eax
cmp eax, ebx
jb 0x10021ca0
mov edi, dword [esp + 0x14]
push edi
call sym.leptonlib.dll_pixGetData
mov esi, eax
push edi
mov dword [esp + 0x64], esi
call sym.leptonlib.dll_dpixGetRefcount
add esp, 8
cmp dword [esp + 0x20], 0
mov dword [esp + 0x58], eax
mov dword [esp + 0x68], 0
jle 0x10021de9
mov ecx, dword [esp + 0x4c]
mov ebx, dword [esp + 0x50]
add eax, eax
add eax, eax
lea edx, [ecx*4]
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x4c], edx
mov dword [esp + 0x18], esi
jmp 0x10021d10
xor esi, esi
test eax, eax
jle 0x10021dc2
lea ebx, [ebx]
lea eax, [esp + 0x2c]
push eax
mov eax, dword [ebx + esi*4]
lea ecx, [esp + 0x2c]
push ecx
lea edx, [esp + 0x2c]
push edx
push eax
call sym.leptonlib.dll_extractRGBValues
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x48]
mov eax, dword [edx + ecx*4]
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x4c]
or eax, dword [edx + ecx*4]
mov ecx, dword [esp + 0x3c]
mov edx, dword [esp + 0x50]
or eax, dword [edx + ecx*4]
add esp, 0x10
cmp dword [esp + 0x30], 4
mov edi, dword [ebp + eax*4]
je 0x10021d80
cmp dword [esp + 0x30], 8
jne 0x10021f92
mov eax, dword [esp + 0x18]
push edi
push esi
push eax
call sym.leptonlib.dll_l_setDataByte
jmp 0x10021d8c
mov ecx, dword [esp + 0x18]
push edi
push esi
push ecx
call sym.leptonlib.dll_l_setDataQbit
mov edx, dword [esp + 0x1c]
mov eax, dword [edx + edi*4]
fld dword [eax]
inc esi
fadd qword [0x10142240]
add esp, 0xc
fstp dword [eax]
mov ecx, dword [esp + 0x24]
add dword [eax + 8], ecx
mov edx, dword [esp + 0x28]
add dword [eax + 0xc], edx
mov ecx, dword [esp + 0x2c]
add dword [eax + 0x10], ecx
mov eax, dword [esp + 0x1c]
cmp esi, eax
jl 0x10021d20
mov ecx, dword [esp + 0x68]
mov edx, dword [esp + 0x44]
add ebx, dword [esp + 0x4c]
add dword [esp + 0x18], edx
inc ecx
cmp ecx, dword [esp + 0x20]
mov dword [esp + 0x68], ecx
jl 0x10021d10
mov edi, dword [esp + 0x14]
mov ebx, dword [esp + 0x34]
push 4
push ebx
call dword [sym.imp.MSVCR90.dll_calloc]
add esp, 8
mov dword [esp + 0x50], eax
test eax, eax
je 0x10021f92
mov eax, dword [esp + 0x30]
push eax
call sym.leptonlib.dll_pixcmapCreate
push eax
push edi
mov dword [esp + 0x50], eax
call sym.leptonlib.dll_pixSetColormap
mov ebx, dword [esp + 0x5c]
add esp, 0xc
cmp dword [esp + 0x6c], 0
mov dword [esp + 0x68], 0
jle 0x10021eaa
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x6c]
sub ecx, ebx
mov ebp, ebx
mov dword [esp + 0x54], ecx
mov dword [esp + 0x4c], edx
fldz
mov esi, dword [ecx + ebp]
fcomp dword [esi]
mov eax, dword [esp + 0x68]
mov dword [ebp], eax
fnstsw ax
test ah, 0x44
jnp 0x10021ea0
fild dword [esi + 8]
fdiv dword [esi]
call fcn.10140710
fild dword [esi + 0xc]
mov edi, eax
mov dword [esi + 0x14], edi
fdiv dword [esi]
call fcn.10140710
fild dword [esi + 0x10]
mov ebx, eax
mov dword [esi + 0x18], ebx
fdiv dword [esi]
call fcn.10140710
mov ecx, dword [esp + 0x44]
push eax
push ebx
push edi
push ecx
mov dword [esi + 0x1c], eax
call sym.leptonlib.dll_pixcmapAddColor
mov ebx, dword [esp + 0x60]
mov ecx, dword [esp + 0x64]
add esp, 0x10
inc dword [esp + 0x68]
add ebp, 4
sub dword [esp + 0x4c], 1
jne 0x10021e44
mov edx, dword [esp + 0x44]
push edx
call sym.leptonlib.dll_ccbaGetCount
add esp, 4
cmp eax, dword [esp + 0x6c]
jge 0x10021f39
xor ebp, ebp
cmp dword [esp + 0x20], ebp
jle 0x10021f39
mov eax, dword [esp + 0x58]
mov edi, dword [esp + 0x5c]
lea ecx, [eax*4]
mov dword [esp + 0x44], ecx
lea esp, [esp]
xor esi, esi
cmp dword [esp + 0x1c], esi
jle 0x10021f2e
jmp 0x10021ef0
mov eax, dword [esp + 0x30]
cmp eax, 4
je 0x10021f12
cmp eax, 8
jne 0x10021f27
push esi
push edi
call sym.leptonlib.dll_l_getDataByte
mov edx, dword [ebx + eax*4]
push edx
push esi
push edi
call sym.leptonlib.dll_l_setDataByte
jmp 0x10021f24
push esi
push edi
call sym.leptonlib.dll_l_getDataQbit
mov eax, dword [ebx + eax*4]
push eax
push esi
push edi
call sym.leptonlib.dll_l_setDataQbit
add esp, 0x14
inc esi
cmp esi, dword [esp + 0x1c]
jl 0x10021ef0
add edi, dword [esp + 0x44]
inc ebp
cmp ebp, dword [esp + 0x20]
jl 0x10021ee0
mov edi, dword [sym.imp.MSVCR90.dll_free]
mov ebp, dword [esp + 0x10]
xor esi, esi
cmp dword [esp + 0x6c], esi
jle 0x10021f61
jmp 0x10021f50
mov ecx, dword [ebp + esi*4]
push ecx
call edi
inc esi
add esp, 4
cmp esi, dword [esp + 0x6c]
jl 0x10021f50
push ebp
call edi
mov edx, dword [esp + 0x64]
push edx
call edi
push ebx
call edi
mov eax, dword [esp + 0x44]
push eax
call edi
mov ecx, dword [esp + 0x4c]
push ecx
call edi
mov edx, dword [esp + 0x54]
push edx
call edi
mov eax, dword [esp + 0x2c]
add esp, 0x18
pop ebp
pop ebx
pop edi
pop esi
add esp, 0x54
ret
xor eax, eax
pop ebp
pop ebx
pop edi
pop esi
add esp, 0x54
ret