Function at 0x1001a0c0
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x158
mov eax, dword [0x10185cf0]
xor eax, esp
mov dword [esp + 0x154], eax
push ebx
mov ebx, dword [esp + 0x160]
push edi
mov edi, dword [esp + 0x168]
mov dword [esp + 0x44], ebx
mov dword [esp + 0x2c], edi
test ebx, ebx
jne 0x1001a10c
pop edi
mov eax, 1
pop ebx
mov ecx, dword [esp + 0x154]
xor ecx, esp
call fcn.101407ce
add esp, 0x158
ret
test edi, edi
je 0x1001a0f0
push 0x3e8
push 0
call sym.leptonlib.dll_bbufferCreate
add esp, 8
mov dword [esp + 0xc], eax
test eax, eax
je 0x1001a0f0
push ebp
push esi
mov esi, dword [edi + 0xc]
push esi
lea eax, [esp + 0x68]
push str.ccba:__7d_cc_n
push eax
mov dword [esp + 0x50], esi
call dword [sym.imp.MSVCR90.dll_sprintf]
mov edx, dword [esp + 0x20]
push 0x12
lea ecx, [esp + 0x74]
push ecx
push edx
call sym.leptonlib.dll_bbufferRead
mov eax, dword [edi]
push eax
call sym.leptonlib.dll_pixGetWidth
mov ecx, dword [edi]
push ecx
mov dword [esp + 0x70], eax
call sym.leptonlib.dll_pixGetHeight
push 4
lea edx, [esp + 0x74]
mov dword [esp + 0x54], eax
mov eax, dword [esp + 0x38]
push edx
push eax
call sym.leptonlib.dll_bbufferRead
mov edx, dword [esp + 0x40]
push 4
lea ecx, [esp + 0x60]
push ecx
push edx
call sym.leptonlib.dll_bbufferRead
xor eax, eax
add esp, 0x38
mov dword [esp + 0x1c], eax
test esi, esi
jg 0x1001a1f9
lea edx, [esp + 0x54]
push edx
lea eax, [esp + 0x18]
push eax
call sym.leptonlib.dll_bbufferDestroyAndSaveData
mov edx, dword [esp + 0x5c]
lea ecx, [esp + 0x64]
push ecx
mov esi, eax
push edx
push esi
call sym.leptonlib.dll_zlibCompress
mov edi, eax
mov eax, dword [esp + 0x70]
push ebx
push eax
push 1
push edi
call dword [sym.imp.MSVCR90.dll_fwrite]
push esi
mov esi, dword [sym.imp.MSVCR90.dll_free]
call esi
push edi
call esi
add esp, 0x2c
xor eax, eax
mov ecx, dword [esp + 0x164]
pop esi
pop ebp
pop edi
pop ebx
xor ecx, esp
call fcn.101407ce
add esp, 0x158
ret
mov eax, dword [esp + 0x1c]
test eax, eax
jl 0x1001a20d
cmp eax, dword [edi + 0xc]
jge 0x1001a20d
mov ecx, dword [edi + 0x14]
mov esi, dword [ecx + eax*4]
inc dword [esi + 0xc]
jmp 0x1001a20f
xor esi, esi
lea edx, [esp + 0x40]
push edx
lea eax, [esp + 0x2c]
push eax
mov eax, dword [esi + 4]
lea ecx, [esp + 0x40]
push ecx
lea edx, [esp + 0x64]
push edx
push 0
push eax
mov dword [esp + 0x54], esi
call sym.leptonlib.dll_boxaGetBoxGeometry
add esp, 0x18
test eax, eax
jne 0x1001a3fe
mov edx, dword [esp + 0x14]
push 4
lea ecx, [esp + 0x5c]
push ecx
push edx
call sym.leptonlib.dll_bbufferRead
mov ecx, dword [esp + 0x20]
push 4
lea eax, [esp + 0x48]
push eax
push ecx
call sym.leptonlib.dll_bbufferRead
mov eax, dword [esp + 0x2c]
push 4
lea edx, [esp + 0x44]
push edx
push eax
call sym.leptonlib.dll_bbufferRead
mov edx, dword [esp + 0x38]
push 4
lea ecx, [esp + 0x68]
push ecx
push edx
call sym.leptonlib.dll_bbufferRead
mov ebx, dword [esi + 0x18]
add esp, 0x30
test ebx, ebx
jne 0x1001a297
push edi
call sym.leptonlib.dll_ccbaGenerateStepChains
mov ebx, dword [esi + 0x18]
add esp, 4
push ebx
call sym.leptonlib.dll_lheapGetCount
mov ecx, dword [esp + 0x18]
mov dword [esp + 0x1c], eax
push 4
lea eax, [esp + 0x20]
push eax
push ecx
call sym.leptonlib.dll_bbufferRead
mov edx, dword [esi + 8]
xor ebp, ebp
add esp, 0x10
cmp dword [esp + 0x18], ebp
mov dword [esp + 0x60], edx
jle 0x1001a3d5
jmp 0x1001a2d0
mov edx, dword [esp + 0x60]
lea eax, [esp + 0x2c]
push eax
lea ecx, [esp + 0x4c]
push ecx
push ebp
push edx
call sym.leptonlib.dll_ptaGetIPt
mov ecx, dword [esp + 0x24]
push 4
lea eax, [esp + 0x5c]
push eax
push ecx
call sym.leptonlib.dll_bbufferRead
mov eax, dword [esp + 0x30]
push 4
lea edx, [esp + 0x4c]
push edx
push eax
call sym.leptonlib.dll_bbufferRead
push 2
push ebp
push ebx
call sym.leptonlib.dll_numaaGetNuma
push eax
mov dword [esp + 0x5c], eax
call sym.leptonlib.dll_lheapGetCount
mov edi, eax
add esp, 0x38
xor esi, esi
test edi, edi
jle 0x1001a377
mov edx, dword [esp + 0x24]
lea ecx, [esp + 0x20]
push ecx
push esi
push edx
call sym.leptonlib.dll_numaGetIValue
mov eax, esi
add esp, 0xc
and eax, 1
jne 0x1001a348
mov cl, byte [esp + 0x20]
shl cl, 4
jmp 0x1001a350
mov cl, byte [esp + 0x13]
or cl, byte [esp + 0x20]
mov byte [esp + 0x13], cl
cmp eax, 1
jne 0x1001a370
mov ecx, dword [esp + 0x14]
push eax
lea eax, [esp + 0x17]
push eax
push ecx
call sym.leptonlib.dll_bbufferRead
mov cl, byte [esp + 0x1f]
add esp, 0xc
inc esi
cmp esi, edi
jl 0x1001a325
jmp 0x1001a37b
mov cl, byte [esp + 0x13]
and edi, 0x80000001
jns 0x1001a388
dec edi
or edi, 0xfffffffe
inc edi
push 1
cmp edi, 1
jne 0x1001a3a2
mov eax, dword [esp + 0x18]
lea edx, [esp + 0x17]
or cl, 8
push edx
mov byte [esp + 0x1b], cl
push eax
jmp 0x1001a3b1
mov edx, dword [esp + 0x18]
lea ecx, [esp + 0x17]
push ecx
mov byte [esp + 0x1b], 0x88
push edx
call sym.leptonlib.dll_bbufferRead
lea eax, [esp + 0x30]
add esp, 0xc
push eax
call sym.leptonlib.dll_numaDestroy
inc ebp
add esp, 4
cmp ebp, dword [esp + 0x18]
jl 0x1001a2d0
mov edi, dword [esp + 0x34]
lea ecx, [esp + 0x3c]
push ecx
call sym.leptonlib.dll_ccbDestroy
mov eax, dword [esp + 0x20]
inc eax
add esp, 4
cmp eax, dword [esp + 0x44]
mov dword [esp + 0x1c], eax
jl 0x1001a1f5
mov ebx, dword [esp + 0x4c]
jmp 0x1001a199
mov eax, 1
jmp 0x1001a1dc