Function at 0x405630
Capabilities:
Clear file content
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x40c768
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x14
push ebx
push ebp
push esi
mov esi, ecx
push edi
lea ecx, [esp + 0x18]
mov dword [esp + 0x20], esi
call sub.MFC42.DLL_CString::CString_2
lea ecx, [esp + 0x14]
mov dword [esp + 0x2c], 0
call sub.MFC42.DLL_CString::CString_2
lea ecx, [esp + 0x10]
mov byte [esp + 0x2c], 1
call sub.MFC42.DLL_CString::CString_2
lea eax, [esi + 8]
mov ecx, esi
push eax
mov byte [esp + 0x30], 2
call fcn.004055e0
mov edi, eax
or ebx, 0xffffffff
cmp edi, ebx
je 0x40585f
push 0
push 0
push 0
push edi
mov ecx, esi
call fcn.004058a0
test edx, edx
jg 0x4056af
jl 0x4056ba
test eax, eax
jb 0x4056ba
push edi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x4056ff
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [esp + 0x10]
mov byte [esp + 0x2c], 1
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x14]
mov byte [esp + 0x2c], 0
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x18]
mov dword [esp + 0x2c], ebx
call sub.MFC42.DLL_CString::CString
pop edi
pop esi
mov eax, ebx
pop ebp
pop ebx
mov ecx, dword [esp + 0x14]
mov dword fs:[0], ecx
add esp, 0x20
ret
mov ebp, dword [esi + 0x10]
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
test ebp, ebp
je 0x4057de
mov ecx, dword [ebp + 0xc]
lea edx, [esp + 0x18]
push ecx
push str.__s__r_n
push edx
call sub.MFC42.DLL_CString::Format
add esp, 0xc
lea eax, [esp + 0x18]
lea ecx, [esp + 0x10]
push eax
call fcn.00409ac0
mov ecx, dword [esp + 0x10]
mov eax, dword [ecx - 8]
cmp eax, 0x1000
jle 0x405768
lea edx, [esp + 0x1c]
push 0
push edx
push eax
push ecx
push edi
call ebx
test eax, eax
je 0x4057f9
push 0x410860
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::operator
mov ecx, dword [esp + 0x10]
mov esi, dword [ebp + 0x14]
test esi, esi
je 0x4057cd
mov eax, dword [esi + 0x10]
mov ecx, dword [esi + 0xc]
push eax
push ecx
lea edx, [esp + 0x1c]
push str._s_s_r_n
push edx
call sub.MFC42.DLL_CString::Format
add esp, 0x10
lea eax, [esp + 0x14]
lea ecx, [esp + 0x10]
push eax
call fcn.00409ac0
mov ecx, dword [esp + 0x10]
mov eax, dword [ecx - 8]
cmp eax, 0x1000
jle 0x4057c7
lea edx, [esp + 0x1c]
push 0
push edx
push eax
push ecx
push edi
call ebx
test eax, eax
je 0x4057f9
push 0x410860
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::operator
mov ecx, dword [esp + 0x10]
mov esi, dword [esi]
test esi, esi
jne 0x40576f
mov ebp, dword [ebp]
test ebp, ebp
jne 0x405710
mov esi, dword [esp + 0x20]
jmp 0x4057e2
mov ecx, dword [esp + 0x10]
mov eax, dword [ecx - 8]
test eax, eax
je 0x405851
lea edx, [esp + 0x1c]
push 0
push edx
push eax
push ecx
push edi
call ebx
test eax, eax
jne 0x405843
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [esp + 0x10]
mov byte [esp + 0x2c], 1
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x14]
mov byte [esp + 0x2c], 0
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x18]
mov dword [esp + 0x2c], 0xffffffff
call sub.MFC42.DLL_CString::CString
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
mov ecx, dword [esp + 0x14]
mov dword fs:[0], ecx
add esp, 0x20
ret
push 0x410860
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::operator
push edi
mov byte [esi + 4], 0
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or ebx, 0xffffffff
lea ecx, [esp + 0x10]
mov byte [esp + 0x2c], 1
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x14]
mov byte [esp + 0x2c], 0
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x18]
mov dword [esp + 0x2c], ebx
call sub.MFC42.DLL_CString::CString
mov ecx, dword [esp + 0x24]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
mov dword fs:[0], ecx
add esp, 0x20
ret