Function at 0x41afc2
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 0x41afe1
cmp byte [edi + 0x18], 0
jne 0x41afe1
xor al, al
jmp 0x41b262
cmp byte [edi + 0x132], 0
je 0x41b000
call fcn.0041a8ed
mov ecx, dword [edi + 0x128]
sub ecx, eax
jns 0x41b000
mov ecx, edi
call fcn.0041ac11
push ebx
lea eax, [edi + 0x18]
test esi, esi
push 0x4d0650
cmove esi, eax
push esi
call fcn.004b6367
mov ebx, eax
pop ecx
pop ecx
test ebx, ebx
jne 0x41b023
xor al, al
jmp 0x41b261
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 0x41b17b
xor eax, eax
mov esi, eax
mov dword [esp + 0x10], eax
add esi, ecx
cmp byte [esi + 0x20], 0
jne 0x41b149
inc dword [esp + 0x28]
lea eax, [esp + 0x4c]
push eax
mov ecx, esi
call fcn.0041b3fa
xor eax, eax
mov dword [esi], ebp
mov esi, eax
mov dword [esp + 0x14], esi
cmp word [edi + 0x130], ax
jbe 0x41b0c5
cmp word [esp + 0x54], ax
jne 0x41b0c5
mov ecx, dword [esp + 0x10]
add ecx, dword [esp + 0x1c]
push ecx
movzx esi, word [ecx + 6]
mov ecx, edi
call fcn.0041a853
movzx ecx, ax
lea eax, [esi + 0x1e]
add eax, ebp
cdq
idiv ecx
test edx, edx
je 0x41b0bc
mov esi, ecx
sub esi, edx
jmp 0x41b0c0
mov esi, dword [esp + 0x14]
mov word [esp + 0x68], si
push ebx
push 0x1e
lea eax, [esp + 0x54]
push 1
push eax
call fcn.004b7479
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 0x41b121
push ebx
push eax
push 1
push dword [ecx + 0x18]
call fcn.004b7479
add esp, 0x10
add ebp, eax
jmp 0x41b121
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.004b7479
add esp, 0x10
add ebp, eax
dec esi
test esi, esi
jg 0x41b0fd
mov eax, dword [esp + 0x1c]
mov esi, dword [esp + 0x10]
mov ecx, dword [eax + esi + 0x10]
test ecx, ecx
je 0x41b14d
push ebx
push ecx
push 1
push dword [eax + esi + 0x1c]
call fcn.004b7479
add esp, 0x10
add ebp, eax
jmp 0x41b14d
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 0x41b05d
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 0x41b217
xor eax, eax
mov ebp, eax
lea esi, [ecx + ebp]
cmp byte [esi + 0x20], 0
jne 0x41b1f2
push 0x36
push eax
mov dword [esp + 0x54], eax
lea eax, [esp + 0x58]
push eax
call fcn.004b6030
add esp, 0xc
lea eax, [esp + 0x4c]
mov ecx, esi
push eax
call fcn.0041b459
push ebx
push 0x2e
lea eax, [esp + 0x54]
push 1
push eax
call fcn.004b7479
add dword [esp + 0x28], eax
add esp, 0x10
movzx eax, word [esi + 6]
test ax, ax
je 0x41b1f2
push ebx
push eax
push 1
push dword [esi + 0x18]
call fcn.004b7479
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 0x41b197
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.004b7479
push ebx
call fcn.004b53ce
add esp, 0x14
mov al, 1
pop ebp
pop ebx
pop edi
pop esi
add esp, 0x78
ret 4