Function at 0x10019260
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x1005fc88
push eax
mov dword fs:[0], esp
sub esp, 0x28
push ebx
mov ebx, dword [ebp + 8]
cmp ebx, 0xffffffff
push edi
sete al
mov edi, ecx
test al, al
je 0x100192a7
lea eax, [ebx + 1]
neg eax
pop edi
sbb eax, eax
and eax, ebx
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 4
mov eax, dword [edi + 0x20]
push esi
mov ecx, dword [eax]
test ecx, ecx
je 0x100192d3
mov edx, dword [edi + 0x30]
mov esi, dword [edx]
lea eax, [esi + ecx]
cmp ecx, eax
jae 0x100192d3
lea eax, [esi - 1]
mov dword [edx], eax
mov ecx, dword [edi + 0x20]
mov edx, dword [ecx]
lea eax, [edx + 1]
mov dword [ecx], eax
mov byte [edx], bl
jmp 0x10019446
cmp dword [edi + 0x4c], 0
jne 0x100192ef
pop esi
pop edi
or eax, 0xffffffff
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 4
mov esi, dword [edi + 0xc]
lea eax, [edi + 0x3c]
cmp dword [esi], eax
jne 0x1001930d
mov edx, dword [edi + 0x54]
mov ecx, dword [edi + 0x50]
sub edx, ecx
mov dword [esi], ecx
mov eax, dword [edi + 0x1c]
mov dword [eax], ecx
mov eax, dword [edi + 0x2c]
mov dword [eax], edx
cmp dword [edi + 0x38], 0
jne 0x10019332
push dword [edi + 0x4c]
movsx eax, bl
push eax
call fcn.1002fe48
add esp, 8
cmp eax, 0xffffffff
jne 0x10019446
or ebx, eax
jmp 0x10019446
push 0
push 8
lea ecx, [ebp - 0x34]
mov byte [ebp - 0xd], bl
mov dword [ebp - 0x20], 0xf
mov dword [ebp - 0x24], 0
mov byte [ebp - 0x34], 0
call fcn.1001c300
mov dword [ebp - 4], 0
mov ecx, dword [ebp - 0x20]
lea ecx, [ecx]
mov eax, dword [ebp - 0x34]
cmp ecx, 0x10
jae 0x1001936b
lea eax, [ebp - 0x34]
mov esi, dword [ebp - 0x34]
mov dword [ebp - 0x14], eax
cmp ecx, 0x10
jae 0x10019379
lea esi, [ebp - 0x34]
mov ecx, dword [edi + 0x38]
lea eax, [ebp - 0x18]
push eax
mov eax, dword [ebp - 0x24]
add eax, dword [ebp - 0x14]
mov edx, dword [ecx]
push eax
push esi
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0xd]
push eax
lea eax, [edi + 0x40]
push eax
call dword [edx + 0x1c]
mov ebx, dword [ebp + 8]
test eax, eax
js 0x1001942e
cmp eax, 1
jg 0x1001940d
mov ecx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x34]
cmp ecx, 0x10
jae 0x100193bb
lea eax, [ebp - 0x34]
mov esi, dword [ebp - 0x18]
sub esi, eax
je 0x100193e3
mov eax, dword [ebp - 0x34]
cmp ecx, 0x10
jae 0x100193cd
lea eax, [ebp - 0x34]
push dword [edi + 0x4c]
push esi
push 1
push eax
call fcn.10034781
mov ecx, dword [ebp - 0x20]
add esp, 0x10
cmp esi, eax
jne 0x10019431
lea eax, [ebp - 0xd]
mov byte [edi + 0x3d], 1
cmp dword [ebp - 0x1c], eax
jne 0x10019434
test esi, esi
jne 0x10019360
cmp dword [ebp - 0x24], 0x20
jae 0x10019431
push esi
push 8
lea ecx, [ebp - 0x34]
call fcn.1001c3d0
jmp 0x1001935a
cmp eax, 3
jne 0x1001942e
push dword [edi + 0x4c]
movsx eax, byte [ebp - 0xd]
push eax
call fcn.1002fe48
add esp, 8
cmp eax, 0xffffffff
jne 0x10019429
or ebx, eax
mov ecx, dword [ebp - 0x20]
jmp 0x10019434
mov ecx, dword [ebp - 0x20]
or ebx, 0xffffffff
cmp ecx, 0x10
jb 0x10019446
inc ecx
push ecx
push dword [ebp - 0x34]
lea ecx, [ebp - 0x34]
call fcn.10006e40
mov ecx, dword [ebp - 0xc]
mov eax, ebx
pop esi
pop edi
pop ebx
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 4