Function at 0x10098910
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x30
push esi
mov esi, dword [esp + 0x38]
test esi, esi
jne 0x10098923
xor eax, eax
pop esi
add esp, 0x30
ret
push 0
push 0
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x28]
push ecx
lea edx, [esp + 0x24]
push edx
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x24]
push ecx
push esi
call sym.leptonlib.dll_freadHeaderPnm
add esp, 0x20
test eax, eax
jne 0x1009891c
push ebx
mov ebx, dword [esp + 0x10]
push ebp
push edi
push ebx
call sym.leptonlib.dll_pixGetData
push ebx
mov edi, eax
call sym.leptonlib.dll_dpixGetRefcount
mov ebp, eax
mov eax, dword [esp + 0x2c]
add esp, 8
cmp eax, 3
jg 0x10098a49
xor edi, edi
cmp dword [esp + 0x20], edi
jle 0x10098a3f
xor ebp, ebp
cmp dword [esp + 0x1c], ebp
jle 0x10098a30
lea esp, [esp]
cmp eax, 1
je 0x100989fc
cmp eax, 2
je 0x100989fc
lea ebx, [esp + 0x38]
call fcn.10098640
test eax, eax
jne 0x10098c25
lea ebx, [esp + 0x34]
call fcn.10098640
test eax, eax
jne 0x10098c25
lea ebx, [esp + 0x30]
call fcn.10098640
test eax, eax
jne 0x10098c25
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x34]
lea edx, [esp + 0x2c]
push edx
mov edx, dword [esp + 0x3c]
push eax
push ecx
push edx
call sym.leptonlib.dll_composeRGBPixel
mov eax, dword [esp + 0x3c]
mov ecx, dword [esp + 0x28]
push eax
push edi
push ebp
push ecx
call sym.leptonlib.dll_pixSetPixel
add esp, 0x20
jmp 0x10098a21
lea ebx, [esp + 0x3c]
call fcn.10098640
test eax, eax
mov eax, dword [esp + 0x18]
jne 0x10098c29
mov edx, dword [esp + 0x3c]
push edx
push edi
push ebp
push eax
call sym.leptonlib.dll_pixSetPixel
add esp, 0x10
mov eax, dword [esp + 0x24]
inc ebp
cmp ebp, dword [esp + 0x1c]
jl 0x10098990
inc edi
cmp edi, dword [esp + 0x20]
jl 0x10098980
mov ebx, dword [esp + 0x18]
pop edi
pop ebp
mov eax, ebx
pop ebx
pop esi
add esp, 0x30
ret
cmp eax, 4
jne 0x10098ac4
mov eax, dword [esp + 0x1c]
imul eax, dword [esp + 0x28]
add eax, 7
cdq
and edx, 7
add eax, edx
mov ebx, eax
mov eax, dword [esp + 0x20]
sar ebx, 3
test eax, eax
jle 0x10098c25
lea ecx, [ebp*4]
mov dword [esp + 0x24], ecx
mov ebp, edi
mov dword [esp + 0x28], eax
xor edi, edi
test ebx, ebx
jle 0x10098aad
push esi
push 1
lea edx, [esp + 0x4c]
push 1
push edx
call dword [sym.imp.MSVCR90.dll_fread]
movzx eax, byte [esp + 0x54]
push eax
push edi
push ebp
call sym.leptonlib.dll_l_setDataByte
inc edi
add esp, 0x1c
cmp edi, ebx
jl 0x10098a88
add ebp, dword [esp + 0x24]
sub dword [esp + 0x28], 1
jne 0x10098a82
mov eax, dword [esp + 0x18]
pop edi
pop ebp
pop ebx
pop esi
add esp, 0x30
ret
cmp eax, 5
mov eax, dword [esp + 0x20]
jne 0x10098ba5
test eax, eax
jle 0x10098c25
lea ecx, [ebp*4]
mov dword [esp + 0x24], ecx
mov ebp, edi
mov dword [esp + 0x20], eax
lea ebx, [ebx]
cmp dword [esp + 0x28], 0x10
je 0x10098b5b
mov edi, dword [esp + 0x1c]
xor ebx, ebx
test edi, edi
jle 0x10098b8a
push esi
push 1
lea edx, [esp + 0x4c]
push 1
push edx
call dword [sym.imp.MSVCR90.dll_fread]
mov eax, dword [esp + 0x38]
add esp, 0x10
cmp eax, 2
jne 0x10098b30
movzx eax, byte [esp + 0x44]
push eax
push ebx
push ebp
call sym.leptonlib.dll_l_setDataDibit
jmp 0x10098b51
cmp eax, 4
jne 0x10098b44
movzx ecx, byte [esp + 0x44]
push ecx
push ebx
push ebp
call sym.leptonlib.dll_l_setDataQbit
jmp 0x10098b51
movzx edx, byte [esp + 0x44]
push edx
push ebx
push ebp
call sym.leptonlib.dll_l_setDataByte
inc ebx
add esp, 0xc
cmp ebx, edi
jl 0x10098b05
jmp 0x10098b8a
mov ebx, dword [esp + 0x1c]
xor edi, edi
test ebx, ebx
jle 0x10098b8a
push esi
push 1
lea eax, [esp + 0x1c]
push 2
push eax
call dword [sym.imp.MSVCR90.dll_fread]
movzx ecx, word [esp + 0x24]
push ecx
push edi
push ebp
call sym.leptonlib.dll_l_setDataTwoBytes
inc edi
add esp, 0x1c
cmp edi, ebx
jl 0x10098b65
add ebp, dword [esp + 0x24]
sub dword [esp + 0x20], 1
jne 0x10098af0
mov eax, dword [esp + 0x18]
pop edi
pop ebp
pop ebx
pop esi
add esp, 0x30
ret
test eax, eax
jle 0x10098c25
mov ebx, dword [sym.imp.MSVCR90.dll_fread]
mov dword [esp + 0x28], edi
mov dword [esp + 0x24], eax
xor edi, edi
test ebp, ebp
jle 0x10098c13
lea ecx, [ecx]
push esi
push 1
lea edx, [esp + 0x1b]
push 1
push edx
call ebx
push esi
push 1
lea eax, [esp + 0x2a]
push 1
push eax
call ebx
push esi
push 1
lea ecx, [esp + 0x39]
push 1
push ecx
call ebx
movzx eax, byte [esp + 0x41]
movzx ecx, byte [esp + 0x42]
lea edx, [esp + 0x5c]
push edx
movzx edx, byte [esp + 0x47]
push eax
push ecx
push edx
call sym.leptonlib.dll_composeRGBPixel
mov eax, dword [esp + 0x6c]
mov ecx, dword [esp + 0x68]
mov dword [ecx + edi*4], eax
inc edi
add esp, 0x40
cmp edi, ebp
jl 0x10098bc0
lea eax, [ebp*4]
add dword [esp + 0x28], eax
sub dword [esp + 0x24], 1
jne 0x10098bb7
mov eax, dword [esp + 0x18]
pop edi
pop ebp
pop ebx
pop esi
add esp, 0x30
ret