Function at 0x41f56e
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 0x41f58d
cmp byte [edi + 0x18], 0
jne 0x41f58d
xor al, al
jmp 0x41f80e
cmp byte [edi + 0x132], 0
je 0x41f5ac
call fcn.0041ee99
mov ecx, dword [edi + 0x128]
sub ecx, eax
jns 0x41f5ac
mov ecx, edi
call fcn.0041f1bd
push ebx
lea eax, [edi + 0x18]
test esi, esi
push 0x4d761c
cmove esi, eax
push esi
call fcn.004bcaf8
mov ebx, eax
pop ecx
pop ecx
test ebx, ebx
jne 0x41f5cf
xor al, al
jmp 0x41f80d
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 0x41f727
xor eax, eax
mov esi, eax
mov dword [esp + 0x10], eax
add esi, ecx
cmp byte [esi + 0x20], 0
jne 0x41f6f5
inc dword [esp + 0x28]
lea eax, [esp + 0x4c]
push eax
mov ecx, esi
call fcn.0041f9a6
xor eax, eax
mov dword [esi], ebp
mov esi, eax
mov dword [esp + 0x14], esi
cmp word [edi + 0x130], ax
jbe 0x41f671
cmp word [esp + 0x54], ax
jne 0x41f671
mov ecx, dword [esp + 0x10]
add ecx, dword [esp + 0x1c]
push ecx
movzx esi, word [ecx + 6]
mov ecx, edi
call fcn.0041edff
movzx ecx, ax
lea eax, [esi + 0x1e]
add eax, ebp
cdq
idiv ecx
test edx, edx
je 0x41f668
mov esi, ecx
sub esi, edx
jmp 0x41f66c
mov esi, dword [esp + 0x14]
mov word [esp + 0x68], si
push ebx
push 0x1e
lea eax, [esp + 0x54]
push 1
push eax
call fcn.004bcc90
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 0x41f6cd
push ebx
push eax
push 1
push dword [ecx + 0x18]
call fcn.004bcc90
add esp, 0x10
add ebp, eax
jmp 0x41f6cd
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.004bcc90
add esp, 0x10
add ebp, eax
dec esi
test esi, esi
jg 0x41f6a9
mov eax, dword [esp + 0x1c]
mov esi, dword [esp + 0x10]
mov ecx, dword [eax + esi + 0x10]
test ecx, ecx
je 0x41f6f9
push ebx
push ecx
push 1
push dword [eax + esi + 0x1c]
call fcn.004bcc90
add esp, 0x10
add ebp, eax
jmp 0x41f6f9
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 0x41f609
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 0x41f7c3
xor eax, eax
mov ebp, eax
lea esi, [ecx + ebp]
cmp byte [esi + 0x20], 0
jne 0x41f79e
push 0x36
push eax
mov dword [esp + 0x54], eax
lea eax, [esp + 0x58]
push eax
call fcn.004bf040
add esp, 0xc
lea eax, [esp + 0x4c]
mov ecx, esi
push eax
call fcn.0041fa05
push ebx
push 0x2e
lea eax, [esp + 0x54]
push 1
push eax
call fcn.004bcc90
add dword [esp + 0x28], eax
add esp, 0x10
movzx eax, word [esi + 6]
test ax, ax
je 0x41f79e
push ebx
push eax
push 1
push dword [esi + 0x18]
call fcn.004bcc90
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 0x41f743
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.004bcc90
push ebx
call fcn.004baa50
add esp, 0x14
mov al, 1
pop ebp
pop ebx
pop edi
pop esi
add esp, 0x78
ret 4