Function at 0x41f127
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x78
push esi
mov esi, dword [esp + 0x80]
push edi
mov edi, ecx
test esi, esi
jne 0x41f146
cmp byte [edi + 0x18], 0
jne 0x41f146
xor al, al
jmp 0x41f3c7
cmp byte [edi + 0x132], 0
je 0x41f165
call fcn.0041ea52
mov ecx, dword [edi + 0x128]
sub ecx, eax
jns 0x41f165
mov ecx, edi
call fcn.0041ed76
push ebx
lea eax, [edi + 0x18]
test esi, esi
push 0x4d65fc
cmove esi, eax
push esi
call fcn.004bc548
mov ebx, eax
pop ecx
pop ecx
test ebx, ebx
jne 0x41f188
xor al, al
jmp 0x41f3c6
mov ecx, dword [edi]
xor eax, eax
push ebp
mov ebp, eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x24], eax
mov eax, dword [edi + 4]
sub eax, ecx
mov dword [esp + 0x14], ebp
push 0x24
pop esi
cdq
idiv esi
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x2c], esi
test eax, eax
je 0x41f2e0
xor eax, eax
mov esi, eax
mov dword [esp + 0x10], eax
add esi, ecx
cmp byte [esi + 0x20], 0
jne 0x41f2ae
inc dword [esp + 0x28]
lea eax, [esp + 0x4c]
push eax
mov ecx, esi
call fcn.0041f55f
xor eax, eax
mov dword [esi], ebp
mov esi, eax
mov dword [esp + 0x14], esi
cmp word [edi + 0x130], ax
jbe 0x41f22a
cmp word [esp + 0x54], ax
jne 0x41f22a
mov ecx, dword [esp + 0x10]
add ecx, dword [esp + 0x1c]
push ecx
movzx esi, word [ecx + 6]
mov ecx, edi
call fcn.0041e9b8
movzx ecx, ax
lea eax, [esi + 0x1e]
add eax, ebp
cdq
idiv ecx
test edx, edx
je 0x41f221
mov esi, ecx
sub esi, edx
jmp 0x41f225
mov esi, dword [esp + 0x14]
mov word [esp + 0x68], si
push ebx
push 0x1e
lea eax, [esp + 0x54]
push 1
push eax
call fcn.004bc6e0
mov ecx, dword [esp + 0x20]
add ebp, eax
add ecx, dword [esp + 0x2c]
add esp, 0x10
movzx eax, word [ecx + 6]
test ax, ax
je 0x41f286
push ebx
push eax
push 1
push dword [ecx + 0x18]
call fcn.004bc6e0
add esp, 0x10
add ebp, eax
jmp 0x41f286
xor eax, eax
push ebx
push 1
mov byte [esp + 0x28], al
mov word [esp + 0x29], ax
mov byte [esp + 0x2b], al
lea eax, [esp + 0x28]
push 1
push eax
call fcn.004bc6e0
add esp, 0x10
add ebp, eax
dec esi
test esi, esi
jg 0x41f262
mov eax, dword [esp + 0x1c]
mov esi, dword [esp + 0x10]
mov ecx, dword [eax + esi + 0x10]
test ecx, ecx
je 0x41f2b2
push ebx
push ecx
push 1
push dword [eax + esi + 0x1c]
call fcn.004bc6e0
add esp, 0x10
add ebp, eax
jmp 0x41f2b2
mov esi, dword [esp + 0x10]
mov ecx, dword [edi]
push 0x24
pop eax
add esi, eax
inc dword [esp + 0x24]
mov eax, dword [edi + 4]
sub eax, ecx
mov dword [esp + 0x10], esi
cdq
idiv dword [esp + 0x2c]
mov dword [esp + 0x1c], ecx
cmp dword [esp + 0x24], eax
jb 0x41f1c2
push 0x24
mov dword [esp + 0x18], ebp
pop esi
mov ecx, dword [edi]
xor eax, eax
mov dword [esp + 0x24], eax
mov eax, dword [edi + 4]
sub eax, ecx
cdq
idiv esi
test eax, eax
je 0x41f37c
xor eax, eax
mov ebp, eax
lea esi, [ecx + ebp]
cmp byte [esi + 0x20], 0
jne 0x41f357
push 0x36
push eax
mov dword [esp + 0x54], eax
lea eax, [esp + 0x58]
push eax
call fcn.004bea90
add esp, 0xc
lea eax, [esp + 0x4c]
mov ecx, esi
push eax
call fcn.0041f5be
push ebx
push 0x2e
lea eax, [esp + 0x54]
push 1
push eax
call fcn.004bc6e0
add dword [esp + 0x28], eax
add esp, 0x10
movzx eax, word [esi + 6]
test ax, ax
je 0x41f357
push ebx
push eax
push 1
push dword [esi + 0x18]
call fcn.004bc6e0
add esp, 0x10
add dword [esp + 0x18], eax
mov ecx, dword [edi]
push 0x24
pop eax
add ebp, eax
mov esi, dword [esp + 0x24]
mov eax, dword [edi + 4]
inc esi
sub eax, ecx
mov dword [esp + 0x24], esi
cdq
idiv dword [esp + 0x2c]
push 0
cmp esi, eax
pop eax
jb 0x41f2fc
mov ebp, dword [esp + 0x14]
xor eax, eax
mov dword [esp + 0x30], 0x6054b50
mov dword [esp + 0x34], eax
lea ecx, [esp + 0x30]
mov eax, dword [esp + 0x28]
push ebx
mov word [esp + 0x3c], ax
mov word [esp + 0x3e], ax
mov eax, dword [esp + 0x1c]
push 0x16
mov dword [esp + 0x44], eax
xor eax, eax
push 1
push ecx
mov dword [esp + 0x50], ebp
mov word [esp + 0x54], ax
call fcn.004bc6e0
push ebx
call fcn.004ba4a0
add esp, 0x14
mov al, 1
pop ebp
pop ebx
pop edi
pop esi
add esp, 0x78
ret 4