Function at 0x41c240
Capabilities:
Write file on windows

Disassembly:
sub esp, 0xfac
push ebx
push ebp
push esi
push edi
mov edi, ecx
mov al, 1
mov cl, byte [0x43bca0]
mov dword [esp + 0x18], edi
test al, cl
jne 0x41c278
mov bl, cl
push 0xf000
or bl, al
mov byte [0x43bca0], bl
call sub.MFC42.DLL_operatornew
add esp, 4
mov dword [0x43bc9c], eax
xor esi, esi
mov ecx, edi
mov dword [esp + 0x14], esi
mov dword [esp + 0x10], esi
call fcn.0041bf10
test eax, eax
jne 0x41c29f
pop edi
pop esi
pop ebp
mov eax, str.error1
pop ebx
add esp, 0xfac
ret 4
push 0x1f40
call sub.MFC42.DLL_operatornew
mov ebp, eax
mov ecx, 0x7d0
xor eax, eax
mov edi, ebp
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0xfc4]
push 0x1f40
push ebp
push eax
call fcn.00410980
add esp, 0x10
test eax, eax
jg 0x41c2eb
push ebp
call sub.MFC42.DLL_operatordelete
add esp, 4
mov eax, str.error
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xfac
ret 4
push 0xfa0
call sub.MFC42.DLL_operatornew
mov ebx, eax
mov ecx, 0x3e8
xor eax, eax
mov edi, ebx
push 0xfa0
push ebx
rep stosd dword es:[edi], eax
push ebp
call fcn.00410a10
add esp, 0x10
test eax, eax
push ebp
jg 0x41c336
call sub.MFC42.DLL_operatordelete
push ebx
call sub.MFC42.DLL_operatordelete
add esp, 8
mov eax, str.error2
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xfac
ret 4
call sub.MFC42.DLL_operatordelete
add esp, 4
mov ecx, 0x3e8
xor eax, eax
lea edi, [esp + 0x1c]
rep stosd dword es:[edi], eax
push ebx
push str._s_r_n
lea ecx, [esp + 0x24]
push 0xfa0
push ecx
call dword [sym.imp.MSVCRT.dll__snprintf]
push ebx
mov edi, eax
call sub.MFC42.DLL_operatordelete
mov ebp, dword [esp + 0x2c]
add esp, 0x14
lea edx, [esp + 0x14]
lea eax, [esp + 0x1c]
mov ecx, dword [ebp + 4]
push 0
push edx
push edi
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x41c39d
pop edi
pop esi
pop ebp
mov eax, str.error3
pop ebx
add esp, 0xfac
ret 4
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
push 0xc8
call ebx
mov edi, dword [0x43bc9c]
mov ecx, 0x3c00
xor eax, eax
lea edx, [esp + 0x10]
rep stosd dword es:[edi], eax
mov ecx, dword [ebp + 8]
push eax
mov eax, dword [0x43bc9c]
push edx
push 0xa000
push eax
push ecx
call fcn.00419150
mov ecx, eax
call fcn.0041b480
test eax, eax
je 0x41c43b
mov edx, dword [esp + 0x10]
mov eax, dword [0x43bc9c]
add esi, edx
cmp byte [eax + esi - 1], 0x3e
je 0x41c43b
cmp esi, 7
jbe 0x41c403
cmp byte [eax + esi - 2], 0x3f
jne 0x41c403
cmp byte [eax + esi - 3], 0x29
je 0x41c43b
cmp esi, 0xa000
jae 0x41c43b
push 0x64
call ebx
mov ecx, dword [0x43bc9c]
mov eax, 0xa000
lea edx, [esp + 0x10]
push 0
sub eax, esi
push edx
mov edx, dword [ebp + 8]
add ecx, esi
push eax
push ecx
push edx
call fcn.00419150
mov ecx, eax
call fcn.0041b480
test eax, eax
jne 0x41c3de
lea ebx, [esi*4]
push ebx
call sub.MFC42.DLL_operatornew
mov ecx, ebx
mov esi, eax
mov edx, ecx
xor eax, eax
mov edi, esi
push ebx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
push esi
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [0x43bc9c]
push eax
call fcn.004109b0
add esp, 0x10
test eax, eax
jg 0x41c48d
push esi
call sub.MFC42.DLL_operatordelete
add esp, 4
mov eax, 0x438a68
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xfac
ret 4
mov edi, dword [0x43bc9c]
mov ecx, 0x3c00
xor eax, eax
push 0xf000
rep stosd dword es:[edi], eax
mov ecx, dword [0x43bc9c]
push ecx
push esi
call fcn.004109e0
add esp, 0xc
test eax, eax
push esi
jg 0x41c4d0
call sub.MFC42.DLL_operatordelete
add esp, 4
mov eax, 0x438a68
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xfac
ret 4
call sub.MFC42.DLL_operatordelete
mov eax, dword [0x43bc9c]
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xfac
ret 4