Function at 0x421910
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x18
push ebx
push ebp
push esi
push edi
mov ebx, ecx
call fcn.00421690
test al, al
je 0x421bdb
mov ebp, dword [esp + 0x2c]
test ebp, ebp
je 0x421bdb
mov edi, dword [esp + 0x30]
test edi, edi
je 0x421bdb
mov esi, dword [esp + 0x34]
test esi, esi
je 0x421bdb
lea eax, [esp + 0x24]
lea ecx, [esp + 0x1c]
push eax
push ecx
push ebp
mov ecx, ebx
call fcn.00421bf0
test al, al
jne 0x42198a
push ebp
mov ecx, ebx
call fcn.004218b0
test al, al
je 0x421bdb
lea edx, [esp + 0x24]
lea eax, [esp + 0x1c]
push edx
push eax
push ebp
mov ecx, ebx
call fcn.00421bf0
test al, al
je 0x421bdb
mov eax, dword [esp + 0x24]
lea ecx, [esp + 0x14]
lea edx, [esp + 0x10]
push ecx
mov ecx, dword [esp + 0x20]
push edx
push eax
push ecx
push edi
mov ecx, ebx
call fcn.00421d70
test al, al
jne 0x4219b6
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], eax
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edi, esi
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea ebp, [edx + ecx + 5]
lea esi, [ebp + 1]
push esi
call sub.MFC42.DLL_operatornew
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
mov edi, eax
mov eax, dword [ebx + 8]
sub eax, edx
mov dword [esp + 0x24], edi
add eax, ebp
lea edx, [eax + ecx + 1]
push edx
call sub.MFC42.DLL_operatornew
mov edx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x18]
mov dword [esp + 0x34], eax
mov eax, dword [ebx + 8]
sub eax, edx
add eax, ebp
lea edx, [eax + ecx + 1]
push edx
call sub.MFC42.DLL_operatornew
add esp, 0xc
mov dword [esp + 0x18], eax
test edi, edi
je 0x421bb9
mov ecx, dword [esp + 0x2c]
test ecx, ecx
je 0x421bac
test eax, eax
je 0x421bac
mov ecx, esi
xor eax, eax
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov edi, dword [esp + 0x2c]
mov ecx, esi
xor eax, eax
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov edi, dword [esp + 0x18]
mov ecx, esi
xor eax, eax
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
mov edx, dword [esp + 0x20]
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x30]
push eax
push ecx
push str._s___s_r_n
push ebp
push edx
call dword [sym.imp.MSVCRT.dll__snprintf]
mov esi, dword [ebx]
mov ecx, dword [esp + 0x24]
mov eax, dword [esp + 0x40]
sub ecx, esi
mov edx, ecx
mov edi, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edx, dword [ebx]
mov esi, dword [esp + 0x34]
mov edi, eax
mov ecx, ebp
sub edi, edx
mov edx, dword [esp + 0x24]
add edi, edx
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebx + 8]
mov esi, dword [esp + 0x28]
mov edx, dword [ebx]
sub ecx, esi
mov edi, eax
mov eax, dword [esp + 0x34]
sub edi, edx
lea ecx, [ecx + edx + 1]
mov edx, dword [esp + 0x24]
add edi, ebp
add edi, edx
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call sub.MFC42.DLL_operatordelete
mov ecx, dword [ebx]
push ecx
call sub.MFC42.DLL_operatordelete
mov edx, dword [ebx + 4]
push edx
call sub.MFC42.DLL_operatordelete
mov eax, dword [esp + 0x34]
mov edi, dword [esp + 0x30]
mov esi, dword [ebx + 8]
sub ebp, eax
add ebp, edi
mov edi, dword [esp + 0x38]
add esi, ebp
mov dword [ebx + 4], edi
mov eax, esi
mov dword [ebx + 8], esi
mov esi, dword [esp + 0x4c]
lea ecx, [eax + 1]
mov dword [ebx], esi
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebx + 8]
mov edx, dword [ebx + 4]
inc ecx
push ecx
push edx
call fcn.00422110
lea eax, [ebx + 0xd]
push 0x473e68
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
mov esi, eax
add esp, 0x30
test esi, esi
je 0x421bdb
mov ecx, dword [ebx + 8]
mov edx, dword [ebx]
push esi
push ecx
push 1
push edx
call dword [sym.imp.MSVCRT.dll_fwrite]
mov ecx, dword [ebx + 8]
add esp, 0x10
cmp eax, ecx
push esi
je 0x421b97
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
xor al, al
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret 0xc
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
mov al, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret 0xc
push edi
call sub.MFC42.DLL_operatordelete
mov eax, dword [esp + 0x1c]
add esp, 4
mov ecx, dword [esp + 0x2c]
test ecx, ecx
je 0x421bce
push ecx
call sub.MFC42.DLL_operatordelete
mov eax, dword [esp + 0x1c]
add esp, 4
test eax, eax
je 0x421bdb
push eax
call sub.MFC42.DLL_operatordelete
add esp, 4
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x18
ret 0xc