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

Disassembly:
sub esp, 0x50
push esi
mov esi, dword [esp + 0x58]
test esi, esi
jne 0x10001933
xor eax, eax
pop esi
add esp, 0x50
ret
push esi
call sym.leptonlib.dll_numaGetRefcount
add esp, 4
cmp eax, 0x20
jne 0x1000192c
push ebx
mov ebx, dword [esp + 0x60]
push ebp
push edi
test ebx, ebx
je 0x10001bf1
mov ebp, dword [esp + 0x6c]
test ebp, ebp
je 0x10001bf1
mov edi, dword [esp + 0x70]
test edi, edi
je 0x10001bf1
push ebx
call sym.leptonlib.dll_numaGetRefcount
add esp, 4
cmp eax, 0x10
jne 0x10001bf1
push ebp
call sym.leptonlib.dll_numaGetRefcount
add esp, 4
cmp eax, 0x10
jne 0x10001bf1
push edi
call sym.leptonlib.dll_numaGetRefcount
add esp, 4
cmp eax, 0x10
jne 0x10001bf1
cmp dword [esp + 0x74], 0
je 0x10001bf1
cmp dword [esp + 0x78], 0
je 0x10001bf1
push esi
call sym.leptonlib.dll_pixGetData
push esi
mov edi, eax
call sym.leptonlib.dll_dpixGetRefcount
mov ebp, eax
push esi
mov dword [esp + 0x58], ebp
call sym.leptonlib.dll_pixGetWidth
push esi
mov dword [esp + 0x4c], eax
call sym.leptonlib.dll_pixGetHeight
push ebx
mov dword [esp + 0x4c], eax
call sym.leptonlib.dll_pixGetWidth
push ebx
mov dword [esp + 0x48], eax
call sym.leptonlib.dll_pixGetHeight
push esi
mov dword [esp + 0x50], eax
call sym.leptonlib.dll_pixCreateTemplate
mov ebx, eax
push ebx
mov dword [esp + 0x7c], ebx
call sym.leptonlib.dll_pixGetData
push ebx
mov esi, eax
call sym.leptonlib.dll_dpixGetRefcount
xor ebx, ebx
xor edx, edx
add esp, 0x24
cmp dword [esp + 0x34], edx
mov dword [esp + 0x50], eax
mov dword [esp + 0x1c], ebx
jle 0x10001be5
mov ecx, dword [esp + 0x78]
imul eax, ecx
imul ebp, ecx
add eax, eax
add eax, eax
add ebp, ebp
add ebp, ebp
mov dword [esp + 0x28], edx
mov dword [esp + 0x54], eax
mov dword [esp + 0x58], ebp
mov dword [esp + 0x24], esi
mov dword [esp + 0x20], edi
lea esp, [esp]
xor esi, esi
cmp dword [esp + 0x30], edx
mov dword [esp + 0x10], esi
jle 0x10001bca
mov dword [esp + 0x14], edx
mov dword [esp + 0x18], edx
jmp 0x10001a70
mov ecx, dword [esp + 0x68]
lea eax, [esp + 0x40]
push eax
push ebx
push esi
push ecx
call sym.leptonlib.dll_pixGetPixel
mov eax, dword [esp + 0x7c]
lea edx, [esp + 0x54]
push edx
push ebx
push esi
push eax
call sym.leptonlib.dll_pixGetPixel
mov edx, dword [esp + 0x90]
lea ecx, [esp + 0x68]
push ecx
push ebx
push esi
push edx
call sym.leptonlib.dll_pixGetPixel
xor ecx, ecx
add esp, 0x30
cmp dword [esp + 0x78], ecx
mov dword [esp + 0x2c], ecx
jle 0x10001b9d
mov eax, dword [esp + 0x20]
mov ebp, dword [esp + 0x24]
mov dword [esp + 0x64], eax
mov edx, dword [esp + 0x28]
add edx, ecx
cmp edx, dword [esp + 0x38]
jge 0x10001b9d
xor edi, edi
cmp dword [esp + 0x74], edi
jle 0x10001b6c
mov eax, dword [esp + 0x18]
mov ebx, dword [esp + 0x64]
lea esi, [eax + ebp]
sub ebx, ebp
mov edi, edi
mov ecx, dword [esp + 0x14]
add ecx, edi
cmp ecx, dword [esp + 0x3c]
jge 0x10001b6c
mov ecx, dword [ebx + esi]
mov eax, ecx
shr eax, 0x18
imul eax, dword [esp + 0x40]
shr eax, 8
cmp eax, 0xff
jl 0x10001b18
mov eax, 0xff
mov edx, ecx
shr edx, 0x10
and edx, 0xff
imul edx, dword [esp + 0x44]
shr edx, 8
cmp edx, 0xff
jl 0x10001b38
mov edx, 0xff
shr ecx, 8
and ecx, 0xff
imul ecx, dword [esp + 0x48]
shr ecx, 8
cmp ecx, 0xff
jl 0x10001b56
mov ecx, 0xff
push esi
push ecx
push edx
push eax
call sym.leptonlib.dll_composeRGBPixel
inc edi
add esp, 0x10
add esi, 4
cmp edi, dword [esp + 0x74]
jl 0x10001af0
mov eax, dword [esp + 0x4c]
mov ecx, dword [esp + 0x2c]
mov esi, dword [esp + 0x10]
mov ebx, dword [esp + 0x1c]
add eax, eax
add eax, eax
add dword [esp + 0x64], eax
mov eax, dword [esp + 0x50]
add eax, eax
add eax, eax
inc ecx
add ebp, eax
cmp ecx, dword [esp + 0x78]
mov dword [esp + 0x2c], ecx
jl 0x10001ac5
mov eax, dword [esp + 0x74]
add dword [esp + 0x14], eax
add eax, eax
add eax, eax
add dword [esp + 0x18], eax
inc esi
cmp esi, dword [esp + 0x30]
mov dword [esp + 0x10], esi
jl 0x10001a70
mov eax, dword [esp + 0x54]
mov ecx, dword [esp + 0x78]
mov ebp, dword [esp + 0x58]
xor edx, edx
add dword [esp + 0x20], ebp
add dword [esp + 0x24], eax
add dword [esp + 0x28], ecx
inc ebx
cmp ebx, dword [esp + 0x34]
mov dword [esp + 0x1c], ebx
jl 0x10001a50
mov eax, dword [esp + 0x5c]
pop edi
pop ebp
pop ebx
pop esi
add esp, 0x50
ret
pop edi
pop ebp
pop ebx
xor eax, eax
pop esi
add esp, 0x50
ret