Function at 0x10098230
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x124
mov eax, dword [0x10185cf0]
xor eax, esp
mov dword [esp + 0x120], eax
push ebx
push esi
mov esi, dword [esp + 0x130]
xor ebx, ebx
push edi
mov edi, dword [esp + 0x138]
cmp esi, ebx
jne 0x10098278
pop edi
pop esi
mov eax, 1
pop ebx
mov ecx, dword [esp + 0x120]
xor ecx, esp
call fcn.101407ce
add esp, 0x124
ret
cmp edi, ebx
je 0x1009825b
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x20]
push edx
push edi
call sym.leptonlib.dll_pixGetDimensions
mov eax, dword [esp + 0x38]
add esp, 0x10
cmp eax, 1
je 0x100982b6
cmp eax, 2
je 0x100982b6
cmp eax, 4
je 0x100982b6
cmp eax, 8
je 0x100982b6
cmp eax, 0x10
je 0x100982b6
cmp eax, 0x20
jne 0x1009825b
push edi
call sym.leptonlib.dll_pixGetColormap
add esp, 4
test eax, eax
je 0x100982d0
push 3
push edi
call sym.leptonlib.dll_pixRemoveColormap
add esp, 8
jmp 0x100982d9
push edi
call sym.leptonlib.dll_boxClone
add esp, 4
push ebp
push eax
mov dword [esp + 0x28], eax
call sym.leptonlib.dll_numaGetRefcount
add esp, 4
mov dword [esp + 0x28], eax
cmp eax, 1
jne 0x10098390
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
push eax
push ecx
push str.P1_n_Ascii_PBM_file_written_by_leptonlib__www.leptonica.com__n_d__d_n
push esi
call dword [sym.imp.MSVCR90.dll_fprintf]
add esp, 0x10
cmp dword [esp + 0x18], ebx
mov dword [esp + 0x10], ebx
jle 0x1009860b
mov edi, dword [sym.imp.MSVCR90.dll_fputc]
mov eax, dword [esp + 0x1c]
xor ebp, ebp
test eax, eax
jle 0x1009837c
jmp 0x10098330
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x24]
lea edx, [esp + 0x14]
push edx
push eax
push ebp
push ecx
call sym.leptonlib.dll_pixGetPixel
add esp, 0x10
cmp dword [esp + 0x14], 0
push esi
jne 0x10098354
push 0x30
jmp 0x10098356
push 0x31
call edi
add esp, 8
push esi
push 0x20
call edi
add ebx, 2
add esp, 8
cmp ebx, 0x46
jl 0x10098373
push esi
push 0xa
call edi
add esp, 8
mov eax, dword [esp + 0x1c]
inc ebp
cmp ebp, eax
jl 0x10098330
mov ecx, dword [esp + 0x10]
inc ecx
cmp ecx, dword [esp + 0x18]
mov dword [esp + 0x10], ecx
jl 0x10098325
jmp 0x1009860b
cmp eax, 2
je 0x100984be
cmp eax, 4
je 0x100984be
cmp eax, 8
je 0x100984be
cmp eax, 0x10
je 0x100984be
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
push edx
push eax
push str.P3_n_Ascii_PPM_file_written_by_leptonlib__www.leptonica.com__n_d__d_n255_n
push esi
call dword [sym.imp.MSVCR90.dll_fprintf]
add esp, 0x10
xor edi, edi
cmp dword [esp + 0x18], ebx
mov dword [esp + 0x10], ebx
jle 0x1009860b
mov ebp, dword [sym.imp.MSVCR90.dll_sprintf]
mov ecx, dword [esp + 0x1c]
jmp 0x100983f0
mov dword [esp + 0x20], 0
test ecx, ecx
jle 0x100984a6
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x20]
lea ecx, [esp + 0x14]
push ecx
mov ecx, dword [esp + 0x28]
push edx
push eax
push ecx
call sym.leptonlib.dll_pixGetPixel
lea edx, [esp + 0x24]
push 0
push edx
call sym.leptonlib.dll_l_getDataByte
mov byte [esp + 0x40], al
lea eax, [esp + 0x2c]
push 1
push eax
call sym.leptonlib.dll_l_getDataByte
lea ecx, [esp + 0x34]
push 2
push ecx
mov byte [esp + 0x51], al
call sym.leptonlib.dll_l_getDataByte
add esp, 0x28
mov byte [esp + 0x2a], al
xor ebx, ebx
mov edi, edi
movzx edx, byte [esp + ebx + 0x28]
push edx
lea eax, [esp + 0x34]
push str._3d
push eax
call ebp
push esi
push 4
lea ecx, [esp + 0x44]
push 1
push ecx
call dword [sym.imp.MSVCR90.dll_fwrite]
add edi, 4
add esp, 0x1c
cmp edi, 0x3c
jl 0x1009848b
push esi
push 0xa
call dword [sym.imp.MSVCR90.dll_fputc]
add esp, 8
xor edi, edi
inc ebx
cmp ebx, 3
jl 0x10098450
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x1c]
inc eax
cmp eax, ecx
mov dword [esp + 0x20], eax
jl 0x10098400
mov eax, dword [esp + 0x10]
inc eax
cmp eax, dword [esp + 0x18]
mov dword [esp + 0x10], eax
jl 0x100983f0
jmp 0x1009860b
mov ecx, eax
mov eax, dword [esp + 0x18]
mov edx, 1
shl edx, cl
mov ecx, dword [esp + 0x1c]
dec edx
push edx
push eax
push ecx
push str.P2_n_Ascii_PGM_file_written_by_leptonlib__www.leptonica.com__n_d__d_n_d_n
push esi
call dword [sym.imp.MSVCR90.dll_fprintf]
add esp, 0x14
xor edi, edi
cmp dword [esp + 0x18], ebx
mov dword [esp + 0x10], ebx
jle 0x1009860b
mov ebx, dword [sym.imp.MSVCR90.dll_sprintf]
mov ebp, dword [sym.imp.MSVCR90.dll_fwrite]
mov ecx, dword [esp + 0x1c]
jmp 0x10098510
mov dword [esp + 0x20], 0
test ecx, ecx
jle 0x100985f8
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x20]
lea edx, [esp + 0x14]
push edx
mov edx, dword [esp + 0x28]
push eax
push ecx
push edx
call sym.leptonlib.dll_pixGetPixel
mov eax, dword [esp + 0x38]
add esp, 0x10
lea ecx, [esp + 0x30]
cmp eax, 2
jne 0x1009856a
mov eax, dword [esp + 0x14]
push eax
push str._1d
push ecx
call ebx
push esi
push 2
lea edx, [esp + 0x44]
push 1
push edx
call ebp
add esp, 0x1c
add edi, 2
jmp 0x100985d0
cmp eax, 4
jne 0x10098590
mov eax, dword [esp + 0x14]
push eax
push str._2d
push ecx
call ebx
push esi
push 3
lea edx, [esp + 0x44]
push 1
push edx
call ebp
add esp, 0x1c
add edi, 3
jmp 0x100985d0
cmp eax, 8
mov eax, dword [esp + 0x14]
push eax
jne 0x100985b6
push str._3d
push ecx
call ebx
push esi
push 4
lea edx, [esp + 0x44]
push 1
push edx
call ebp
add esp, 0x1c
add edi, 4
jmp 0x100985d0
push str._5d
push ecx
call ebx
push esi
push 6
lea edx, [esp + 0x44]
push 1
push edx
call ebp
add esp, 0x1c
add edi, 6
cmp edi, 0x3c
jl 0x100985e3
push esi
push 0xa
call dword [sym.imp.MSVCR90.dll_fputc]
add esp, 8
xor edi, edi
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x1c]
inc eax
cmp eax, ecx
mov dword [esp + 0x20], eax
jl 0x10098520
mov eax, dword [esp + 0x10]
inc eax
cmp eax, dword [esp + 0x18]
mov dword [esp + 0x10], eax
jl 0x10098510
lea eax, [esp + 0x24]
push eax
call sym.leptonlib.dll_pixDestroy
mov ecx, dword [esp + 0x134]
add esp, 4
pop ebp
pop edi
pop esi
pop ebx
xor ecx, esp
xor eax, eax
call fcn.101407ce
add esp, 0x124
ret