Function at 0x10011de0
Capabilities:
Resolve function by parsing pe exports
Write file on windows

Disassembly:
sub esp, 0x7c
push edi
mov edi, dword [esp + 0x84]
test edi, edi
jne 0x10011df7
lea eax, [edi + 1]
pop edi
add esp, 0x7c
ret
push ebp
mov ebp, dword [esp + 0x8c]
test ebp, ebp
jne 0x10011e0c
lea eax, [ebp + 1]
pop ebp
pop edi
add esp, 0x7c
ret
push ebx
push esi
push ebp
call sym.leptonlib.dll_pixGetWidth
mov ebx, eax
push ebp
mov dword [esp + 0x30], ebx
call sym.leptonlib.dll_pixGetHeight
push ebp
mov dword [esp + 0x28], eax
call sym.leptonlib.dll_numaGetRefcount
mov esi, eax
add esp, 0xc
mov dword [esp + 0x10], esi
cmp esi, 0x20
jne 0x10011e40
mov dword [esp + 0x10], 0x18
push ebp
call sym.leptonlib.dll_pixGetXRes
mov dword [esp + 0x8c], eax
fild dword [esp + 0x8c]
test eax, eax
jge 0x10011e5e
fadd dword [0x101422d0]
fmul qword [0x10143190]
fadd qword [0x10142230]
call fcn.10140710
push ebp
mov dword [esp + 0x5c], eax
call sym.leptonlib.dll_dpixGetData
mov dword [esp + 0x90], eax
fild dword [esp + 0x90]
test eax, eax
jge 0x10011e91
fadd dword [0x101422d0]
fmul qword [0x10143190]
fadd qword [0x10142230]
call fcn.10140710
push ebp
mov dword [esp + 0x64], eax
call sym.leptonlib.dll_dpixGetRefcount
mov dword [esp + 0x94], eax
add eax, eax
add eax, eax
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x1c]
imul eax, ebx
add eax, 0x1f
cdq
and edx, 0x1f
add eax, edx
mov ebx, eax
sar ebx, 5
add ebx, ebx
add ebx, ebx
mov eax, ebx
imul eax, dword [esp + 0x28]
mov dword [esp + 0x44], eax
xor eax, eax
add esp, 0xc
mov dword [esp + 0x24], eax
cmp esi, 0x20
jne 0x10011ef8
xor ebp, ebp
mov dword [esp + 0x18], eax
jmp 0x10011fa5
push ebp
call sym.leptonlib.dll_pixGetColormap
add esp, 4
mov dword [esp + 0x30], eax
test eax, eax
je 0x10011f2b
push eax
call sym.leptonlib.dll_ccbaGetCount
mov edx, dword [esp + 0x34]
mov ebp, eax
mov eax, dword [edx]
lea ecx, [ebp*4]
add esp, 4
mov dword [esp + 0x18], ecx
mov dword [esp + 0x14], eax
jmp 0x10011fa5
cmp esi, 1
jne 0x10011f45
mov dword [esp + 0x18], 8
lea ebp, [esi + 1]
mov dword [esp + 0x14], 0x1017f474
jmp 0x10011fa5
mov ecx, dword [esp + 0x10]
mov ebp, 1
shl ebp, cl
push 1
mov dword [esp + 0x28], 1
lea eax, [ebp*4]
push eax
mov dword [esp + 0x20], eax
call dword [sym.imp.MSVCR90.dll_calloc]
add esp, 8
mov dword [esp + 0x14], eax
test eax, eax
je 0x100121ff
mov eax, 0xff
cdq
lea ecx, [ebp - 1]
idiv ecx
xor edx, edx
test ebp, ebp
jle 0x10011fa5
mov ecx, dword [esp + 0x14]
inc ecx
mov esi, ebp
mov byte [ecx + 1], dl
mov byte [ecx], dl
mov byte [ecx - 1], dl
add edx, eax
add ecx, 4
sub esi, 1
jne 0x10011f93
push 0
push 0
push edi
call dword [sym.imp.MSVCR90.dll_fseek]
push 0x4d42
call sym.leptonlib.dll_convertOnBigEnd16
mov esi, dword [esp + 0x28]
movzx edx, ax
mov eax, dword [esp + 0x48]
add esi, 0x36
add eax, esi
push eax
mov dword [esp + 0x54], edx
mov dword [esp + 0x50], eax
call sym.leptonlib.dll_convertOnBigEnd16
movzx ecx, ax
mov eax, dword [esp + 0x50]
shr eax, 0x10
push eax
mov dword [esp + 0x5c], ecx
call sym.leptonlib.dll_convertOnBigEnd16
movzx edx, ax
push esi
mov dword [esp + 0x64], edx
mov dword [esp + 0x50], 0
call sym.leptonlib.dll_convertOnBigEnd16
movzx eax, ax
shr esi, 0x10
push esi
mov dword [esp + 0x6c], eax
call sym.leptonlib.dll_convertOnBigEnd16
mov esi, dword [sym.imp.MSVCR90.dll_fwrite]
push edi
push 2
movzx ecx, ax
lea edx, [esp + 0x68]
push 1
push edx
mov dword [esp + 0x80], ecx
call esi
push edi
push 2
lea eax, [esp + 0x7c]
push 1
push eax
call esi
add esp, 0x40
push edi
push 2
lea ecx, [esp + 0x50]
push 1
push ecx
call esi
push edi
push 2
lea edx, [esp + 0x4c]
push 1
push edx
call esi
push edi
push 2
lea eax, [esp + 0x5c]
push 1
push eax
call esi
push edi
push 2
lea ecx, [esp + 0x84]
push 1
push ecx
call esi
add esp, 0x40
push edi
push 2
lea edx, [esp + 0x58]
push 1
push edx
call esi
push 0x28
call sym.leptonlib.dll_convertOnBigEnd32
mov dword [esp + 0x70], eax
mov eax, dword [esp + 0x3c]
push eax
call sym.leptonlib.dll_convertOnBigEnd32
mov ecx, dword [esp + 0x34]
push ecx
mov dword [esp + 0x7c], eax
call sym.leptonlib.dll_convertOnBigEnd32
push 1
mov dword [esp + 0x84], eax
call sym.leptonlib.dll_convertOnBigEnd16
movzx edx, ax
mov eax, dword [esp + 0x30]
push eax
mov dword [esp + 0x8c], edx
call sym.leptonlib.dll_convertOnBigEnd16
mov edx, dword [esp + 0x5c]
movzx ecx, ax
push edx
mov dword [esp + 0x94], ecx
mov dword [esp + 0x98], 0
call sym.leptonlib.dll_convertOnBigEnd32
mov dword [esp + 0x9c], eax
mov eax, dword [esp + 0x7c]
push eax
call sym.leptonlib.dll_convertOnBigEnd32
mov ecx, dword [esp + 0x84]
push ecx
mov dword [esp + 0xa8], eax
call sym.leptonlib.dll_convertOnBigEnd32
push ebp
mov dword [esp + 0xb0], eax
call sym.leptonlib.dll_convertOnBigEnd32
push ebp
mov dword [esp + 0xb8], eax
call sym.leptonlib.dll_convertOnBigEnd32
push edi
push 4
lea edx, [esp + 0x9c]
push 1
push edx
mov dword [esp + 0xcc], eax
call esi
add esp, 0x48
push edi
push 4
lea eax, [esp + 0x68]
push 1
push eax
call esi
push edi
push 4
lea ecx, [esp + 0x7c]
push 1
push ecx
call esi
push edi
push 2
lea edx, [esp + 0x90]
push 1
push edx
call esi
push edi
push 2
lea eax, [esp + 0xa4]
push 1
push eax
call esi
add esp, 0x40
push edi
push 4
lea ecx, [esp + 0x78]
push 1
push ecx
call esi
push edi
push 4
lea edx, [esp + 0x8c]
push 1
push edx
call esi
push edi
push 4
lea eax, [esp + 0xa0]
push 1
push eax
call esi
push edi
push 4
lea ecx, [esp + 0xb4]
push 1
push ecx
call esi
add esp, 0x40
push edi
push 4
lea edx, [esp + 0x88]
push 1
push edx
call esi
push edi
push 4
lea eax, [esp + 0x9c]
push 1
push eax
call esi
add esp, 0x20
test ebp, ebp
jle 0x10012221
mov ebp, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
push edi
push ebp
push 1
push ecx
call esi
add esp, 0x10
cmp eax, ebp
je 0x1001220c
cmp dword [esp + 0x24], 0
je 0x100121ff
mov edx, dword [esp + 0x14]
push edx
call dword [sym.imp.MSVCR90.dll_free]
add esp, 4
pop esi
pop ebx
pop ebp
mov eax, 1
pop edi
add esp, 0x7c
ret
cmp dword [esp + 0x24], 0
je 0x10012221
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.MSVCR90.dll_free]
add esp, 4
cmp dword [esp + 0x10], 1
jne 0x1001224a
mov eax, dword [esp + 0x30]
test eax, eax
je 0x1001224a
mov ecx, dword [eax]
cmp byte [ecx], 0
jne 0x1001224a
mov ebp, dword [esp + 0x94]
push ebp
push ebp
call sym.leptonlib.dll_pixInvert
add esp, 8
jmp 0x10012251
mov ebp, dword [esp + 0x94]
push ebp
call sym.leptonlib.dll_pixEndianByteSwap
add esp, 4
cmp dword [esp + 0x10], 0x18
mov dword [esp + 0x24], 0
je 0x100122b6
push ebp
call sym.leptonlib.dll_pixGetData
mov ebp, eax
mov eax, dword [esp + 0x20]
lea edx, [eax - 1]
imul edx, dword [esp + 0x30]
add esp, 4
add ebp, edx
test eax, eax
jle 0x1001237b
mov dword [esp + 0x38], eax
mov edi, edi
push edi
push ebx
push 1
push ebp
call esi
add esp, 0x10
cmp eax, ebx
je 0x100122a6
mov dword [esp + 0x24], 1
sub ebp, dword [esp + 0x2c]
sub dword [esp + 0x38], 1
jne 0x10012290
jmp 0x1001237b
mov ebp, dword [esp + 0x28]
mov ecx, dword [esp + 0x94]
lea eax, [ebp + ebp*2]
sub ebx, eax
push ecx
mov dword [esp + 0x3c], ebx
call sym.leptonlib.dll_pixGetData
mov ecx, dword [esp + 0x20]
lea edx, [ecx - 1]
imul edx, dword [esp + 0x8c]
add esp, 4
lea eax, [eax + edx*4]
test ecx, ecx
jle 0x1001237b
add eax, 2
mov dword [esp + 0x1c], eax
mov dword [esp + 0x18], ecx
lea esp, [esp]
test ebp, ebp
jle 0x10012346
mov ebx, eax
mov al, byte [ebx - 2]
mov byte [esp + 0x22], al
mov cl, byte [ebx - 1]
push edi
push 3
mov byte [esp + 0x29], cl
mov dl, byte [ebx]
lea eax, [esp + 0x28]
push 1
push eax
mov byte [esp + 0x30], dl
call esi
add esp, 0x10
cmp eax, 3
je 0x10012336
mov dword [esp + 0x24], 1
add ebx, 4
sub ebp, 1
jne 0x10012306
mov ebp, dword [esp + 0x28]
mov ebx, dword [esp + 0x38]
test ebx, ebx
jle 0x10012368
lea ebx, [ebx]
push edi
push 1
lea ecx, [esp + 0x28]
push 1
push ecx
call esi
add esp, 0x10
sub ebx, 1
jne 0x10012350
mov ebx, dword [esp + 0x38]
mov eax, dword [esp + 0x1c]
sub eax, dword [esp + 0x2c]
sub dword [esp + 0x18], 1
mov dword [esp + 0x1c], eax
jne 0x10012300
mov esi, dword [esp + 0x94]
push esi
call sym.leptonlib.dll_pixEndianByteSwap
add esp, 4
cmp dword [esp + 0x10], 1
jne 0x100123ab
mov eax, dword [esp + 0x30]
test eax, eax
je 0x100123ab
mov edx, dword [eax]
cmp byte [edx], 0
jne 0x100123ab
push esi
push esi
call sym.leptonlib.dll_pixInvert
add esp, 8
pop esi
xor eax, eax
cmp dword [esp + 0x20], eax
pop ebx
pop ebp
setne al
pop edi
add esp, 0x7c
ret