Function at 0x4036f0
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x407270
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x14
push ebx
push ebp
push esi
push edi
lea eax, [esp + 0x34]
lea ecx, [esp + 0x10]
push eax
mov dword [esp + 0x30], 0
call sub.MFC42.DLL_CString::CString_1
push 0x5c
lea ecx, [esp + 0x14]
mov byte [esp + 0x30], 1
call sub.MFC42.DLL_CString::ReverseFind
inc eax
lea ecx, [esp + 0x10]
push eax
push 0
call sub.MFC42.DLL_CString::Delete
push 0x2e
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::Find_1
lea ecx, [esp + 0x1c]
push eax
push ecx
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::Left
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x30], 2
call fcn.00406a4c
lea ecx, [esp + 0x1c]
mov byte [esp + 0x2c], 1
call sub.MFC42.DLL_CString::CString
mov edx, dword [esp + 0x34]
push 0x4166f4
push edx
call dword [sym.imp.MSVCRT.dll_fopen]
mov esi, eax
add esp, 8
test esi, esi
je 0x403994
mov ebx, dword [sym.imp.MSVCRT.dll_fseek]
push 2
push 0
push esi
call ebx
push esi
call dword [sym.imp.MSVCRT.dll_ftell]
mov edi, eax
push edi
call sub.MFC42.DLL_operatornew
mov ebp, eax
add esp, 0x14
test ebp, ebp
jne 0x4037c7
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
jmp 0x4039a2
push 0
push 0
push esi
call ebx
push esi
push edi
push 1
push ebp
call dword [sym.imp.MSVCRT.dll_fread]
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 0x20
lea eax, [esp + 0x10]
lea ecx, [esp + 0x1c]
push 0x4166f0
push eax
push ecx
call sub.MFC42.DLL_operator_1
mov eax, dword [eax]
push 0x4166ec
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
mov esi, eax
add esp, 8
test esi, esi
lea ecx, [esp + 0x1c]
mov dword [esp + 0x20], esi
setne bl
call sub.MFC42.DLL_CString::CString
test bl, bl
je 0x403989
lea ecx, [esp + 0x14]
call fcn.00406a16
mov edx, dword [esp + 0x10]
lea eax, [esp + 0x14]
push edx
push str.BYTE_g_by_s______r_n
push eax
mov byte [esp + 0x38], 3
call sub.MFC42.DLL_CString::Format
add esp, 0xc
test edi, edi
jle 0x4038d4
mov ebx, 0xfffffffa
lea esi, [ebp + 6]
sub ebx, ebp
lea ecx, [esp + 0x18]
call fcn.00406a16
xor ecx, ecx
xor edx, edx
mov cl, byte [esi + 1]
mov dl, byte [esi]
push ecx
xor eax, eax
mov al, byte [esi - 1]
push edx
xor ecx, ecx
xor edx, edx
mov cl, byte [esi - 2]
mov dl, byte [esi - 3]
push eax
push ecx
xor eax, eax
push edx
mov al, byte [esi - 4]
xor ecx, ecx
mov cl, byte [esi - 5]
xor edx, edx
mov dl, byte [esi - 6]
push eax
push ecx
push edx
lea eax, [esp + 0x38]
push str.0x_02x__0x_02x__0x_02x__0x_02x__0x_02x__0x_02x__0x_02x__0x_02x___r_n
push eax
mov byte [esp + 0x54], 4
call sub.MFC42.DLL_CString::Format
add esp, 0x28
lea ecx, [esp + 0x18]
add esi, 8
push ecx
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::operator_1
lea ecx, [esp + 0x18]
mov byte [esp + 0x2c], 3
call sub.MFC42.DLL_CString::CString
lea edx, [ebx + esi]
cmp edx, edi
jl 0x40385b
mov esi, dword [esp + 0x20]
push str.___r_n
lea ecx, [esp + 0x18]
call fcn.00406a28
lea ecx, [esp + 0x1c]
call fcn.00406a16
mov eax, dword [esp + 0x10]
mov byte [esp + 0x2c], 5
push eax
push eax
lea eax, [esp + 0x24]
push str.DWORD_g_dw_sSize__sizeof_g_by_s__
push eax
call sub.MFC42.DLL_CString::Format
add esp, 0x10
lea ecx, [esp + 0x1c]
push ecx
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::operator_1
mov eax, dword [esp + 0x14]
push esi
mov edi, dword [eax - 8]
push edi
push 1
push eax
call dword [sym.imp.MSVCRT.dll_fwrite]
add esp, 0x10
cmp eax, edi
jne 0x40393d
push 0
push 0
push 0x416658
call sub.MFC42.DLL_AfxMessageBox
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
lea ecx, [esp + 0x1c]
mov byte [esp + 0x2c], 3
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x14]
mov byte [esp + 0x2c], 1
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x10]
mov byte [esp + 0x2c], 0
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x34]
mov dword [esp + 0x2c], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov eax, 1
jmp 0x4039c3
push 0
push 0
push 0x416648
jmp 0x40399d
push 0
push 0
push 0x416638
call sub.MFC42.DLL_AfxMessageBox
lea ecx, [esp + 0x10]
mov byte [esp + 0x2c], 0
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x34]
mov dword [esp + 0x2c], 0xffffffff
call sub.MFC42.DLL_CString::CString
xor eax, eax
mov ecx, dword [esp + 0x24]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x20
ret 4