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

Disassembly:
sub esp, 0x44
push esi
mov esi, dword [esp + 0x4c]
test esi, esi
jne 0x100229e3
xor eax, eax
pop esi
add esp, 0x44
ret
push esi
call sym.leptonlib.dll_numaGetRefcount
add esp, 4
cmp eax, 0x20
jne 0x100229dc
mov ecx, dword [esp + 0x50]
lea eax, [ecx - 3]
cmp eax, 3
ja 0x100229dc
push ebp
mov ebp, dword [esp + 0x5c]
cmp ebp, 0x100
jg 0x10022a34
mov eax, dword [esp + 0x60]
test eax, eax
je 0x10022a18
mov dword [eax], 0xffffffff
push ecx
lea ecx, [esp + 0x3c]
push ecx
lea edx, [esp + 0x3c]
push edx
lea eax, [esp + 0x3c]
push eax
call sym.leptonlib.dll_makeRGBToIndexTables
add esp, 0x10
test eax, eax
je 0x10022a3c
pop ebp
xor eax, eax
pop esi
add esp, 0x44
ret
push 0
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x18]
push edx
push esi
call sym.leptonlib.dll_pixGetDimensions
push esi
call sym.leptonlib.dll_pixGetData
push esi
mov dword [esp + 0x58], eax
call sym.leptonlib.dll_dpixGetRefcount
add esp, 0x18
cmp ebp, 4
mov dword [esp + 0x3c], eax
jg 0x10022a74
mov dword [esp + 0x50], 2
jmp 0x10022a87
xor eax, eax
cmp ebp, 0x10
setg al
lea eax, [eax*4 + 4]
mov dword [esp + 0x50], eax
mov ecx, dword [esp + 0x50]
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
push edi
push ecx
push edx
push eax
call sym.leptonlib.dll_pixCreate
mov edi, eax
add esp, 0xc
mov dword [esp + 0x48], edi
test edi, edi
jne 0x10022ab0
pop edi
pop ebp
pop esi
add esp, 0x44
ret
push ebx
push esi
push edi
call sym.leptonlib.dll_pixCopyResolution
push esi
push edi
call sym.leptonlib.dll_pixCopyInputFormat
push edi
call sym.leptonlib.dll_pixGetData
push edi
mov ebx, eax
call sym.leptonlib.dll_dpixGetRefcount
mov ecx, dword [esp + 0x78]
push ecx
mov dword [esp + 0x2c], eax
call sym.leptonlib.dll_lheapGetCount
mov esi, dword [sym.imp.MSVCR90.dll_calloc]
push 4
push eax
call esi
add esp, 0x24
mov dword [esp + 0x30], eax
test eax, eax
jne 0x10022af9
pop ebx
pop edi
pop ebp
pop esi
add esp, 0x44
ret
push 4
inc ebp
push ebp
call esi
mov esi, eax
add esp, 8
xor eax, eax
mov dword [esp + 0x14], esi
test esi, esi
je 0x10022cbf
cmp dword [esp + 0x1c], eax
lea ebp, [eax + 1]
mov dword [esp + 0x20], eax
mov dword [esp + 0x34], eax
jle 0x10022c2b
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 0x44]
lea eax, [edx*4]
lea edx, [ecx*4]
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0x18]
mov dword [esp + 0x10], ebx
mov ebx, dword [esp + 0x48]
mov dword [esp + 0x44], edx
xor esi, esi
test eax, eax
jle 0x10022c08
jmp 0x10022b60
lea eax, [esp + 0x24]
push eax
mov eax, dword [ebx + esi*4]
lea ecx, [esp + 0x2c]
push ecx
lea edx, [esp + 0x34]
push edx
push eax
call sym.leptonlib.dll_extractRGBValues
mov ecx, dword [esp + 0x3c]
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 + 0x34]
mov edx, dword [esp + 0x50]
or eax, dword [edx + ecx*4]
mov ecx, dword [esp + 0x40]
mov edi, dword [ecx + eax*4]
add esp, 0x10
test edi, edi
jne 0x10022bd0
mov edx, ecx
mov ecx, dword [esp + 0x14]
mov dword [edx + eax*4], ebp
mov eax, dword [ebx + esi*4]
mov dword [ecx + ebp*4], eax
mov eax, dword [esp + 0x58]
mov ecx, dword [esp + 0x10]
lea edx, [ebp - 1]
push edx
push eax
push esi
push ecx
call sym.leptonlib.dll_setPixelLow
add esp, 0x10
inc ebp
jmp 0x10022bf7
mov eax, dword [esp + 0x58]
mov ecx, dword [esp + 0x10]
lea edx, [edi - 1]
push edx
push eax
push esi
push ecx
call sym.leptonlib.dll_setPixelLow
mov edx, dword [esp + 0x24]
mov eax, dword [edx + edi*4]
add esp, 0x10
cmp eax, dword [ebx + esi*4]
je 0x10022bf7
inc dword [esp + 0x20]
mov eax, dword [esp + 0x18]
inc esi
cmp esi, eax
jl 0x10022b60
mov edi, dword [esp + 0x4c]
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x50]
add ebx, dword [esp + 0x44]
add dword [esp + 0x10], edx
inc ecx
cmp ecx, dword [esp + 0x1c]
mov dword [esp + 0x34], ecx
jl 0x10022b51
mov esi, dword [esp + 0x14]
mov eax, dword [esp + 0x68]
test eax, eax
je 0x10022c39
mov ecx, dword [esp + 0x20]
mov dword [eax], ecx
mov edx, dword [esp + 0x58]
push edx
call sym.leptonlib.dll_pixcmapCreate
mov ebx, dword [esp + 0x68]
add esp, 4
mov ebp, eax
test ebx, ebx
jle 0x10022c8a
add esi, 4
lea eax, [esp + 0x24]
push eax
mov eax, dword [esi]
lea ecx, [esp + 0x2c]
push ecx
lea edx, [esp + 0x34]
push edx
push eax
call sym.leptonlib.dll_extractRGBValues
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x38]
mov eax, dword [esp + 0x3c]
push ecx
push edx
push eax
push ebp
call sym.leptonlib.dll_pixcmapAddColor
add esp, 0x20
add esi, 4
sub ebx, 1
jne 0x10022c53
push ebp
push edi
call sym.leptonlib.dll_pixSetColormap
mov ecx, dword [esp + 0x38]
mov esi, dword [sym.imp.MSVCR90.dll_free]
push ecx
call esi
mov edx, dword [esp + 0x20]
push edx
call esi
mov eax, dword [esp + 0x48]
push eax
call esi
mov ecx, dword [esp + 0x50]
push ecx
call esi
mov edx, dword [esp + 0x58]
push edx
call esi
add esp, 0x1c
mov eax, edi
pop ebx
pop edi
pop ebp
pop esi
add esp, 0x44
ret