Function at 0x405c30
Capabilities:
Clear file content
Extract resource via kernel32 functions
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40fdd8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x14
push ebx
push esi
push edi
mov ebx, ecx
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x1c], ebx
mov eax, dword [ebp + 0x14]
mov dword [ebp - 4], 0
test eax, eax
je 0x405c7b
push ecx
lea eax, [ebp + 8]
mov ecx, esp
mov dword [ebp + 0x14], esp
push eax
call sub.MFC42.DLL_CString::CString_1
call fcn.00405b60
add esp, 4
lea ecx, [ebp + 8]
push ecx
lea ecx, [ebp + 0x14]
call sub.MFC42.DLL_CString::CString_1
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 1
call sub.MFC42.DLL_CString::CString_2
mov byte [ebp - 4], 2
call sub.MFC42.DLL_AfxGetModuleState
mov esi, dword [eax + 0xc]
push 0x5c
lea ecx, [ebp + 0x14]
call sub.MFC42.DLL_CString::ReverseFind
inc eax
lea ecx, [ebp + 0x14]
push eax
push 0
call sub.MFC42.DLL_CString::Delete
push 0x414040
push 0
lea ecx, [ebp + 0x14]
call sub.MFC42.DLL_CString::Insert
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp + 0x10]
push edx
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov edi, eax
test edi, edi
jne 0x405cf0
mov ecx, dword [ebp + 0x14]
push 0x10
push ecx
push 0x413ccc
mov ecx, ebx
call sub.MFC42.DLL_CWnd::MessageBoxA
jmp 0x405e58
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ebx, eax
push edi
push esi
mov dword [ebp + 0x10], ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
mov dword [ebp - 0x20], eax
jne 0x405d24
mov edx, dword [ebp + 0x14]
mov ecx, dword [ebp - 0x1c]
push 0x10
push edx
push 0x413ccc
call sub.MFC42.DLL_CWnd::MessageBoxA
jmp 0x405e58
lea ecx, [ebp - 0x14]
call sub.MFC42.DLL_CString::CString_2
lea eax, [ebp + 0xc]
push 4
push eax
lea ecx, [ebp + 8]
mov byte [ebp - 4], 4
call sub.MFC42.DLL_CString::Right
push eax
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 5
call fcn.0040f4dc
lea ecx, [ebp + 0xc]
mov byte [ebp - 4], 4
call sub.MFC42.DLL_CString::CString
jmp 0x405d62
mov ecx, dword [ebp - 0x14]
mov esi, dword [sym.imp.MSVCRT.dll__mbsicmp]
push str..exe
push ecx
mov dword [ebp - 4], 3
call esi
add esp, 8
test eax, eax
je 0x405d98
mov edx, dword [ebp - 0x14]
push str..sys
push edx
call esi
add esp, 8
test eax, eax
mov eax, 6
jne 0x405d9d
mov eax, 0x80
push 0
push eax
mov eax, dword [ebp + 8]
push 2
push 0
push 0
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x405e39
test ebx, ebx
mov esi, ebx
mov dword [ebp + 0xc], ebx
jbe 0x405de0
mov edx, dword [ebp - 0x20]
lea ecx, [ebp + 0xc]
sub edx, esi
push 0
push ecx
add edx, ebx
push esi
push edx
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
sub esi, dword [ebp + 0xc]
jne 0x405dc5
push edi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 2
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 1
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp + 0x14]
mov byte [ebp - 4], 0
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp + 8]
mov dword [ebp - 4], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp - 0x1c]
push 0x10
push eax
push 0x413244
call sub.MFC42.DLL_CWnd::MessageBoxA
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 2
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 1
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp + 0x14]
mov byte [ebp - 4], 0
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp + 8]
mov dword [ebp - 4], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
xor eax, eax
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 0x10