Function at 0x405e00
Capabilities:
Read file on windows
Terminate process
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x40e218
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x48
push ebx
push ebp
mov ebp, ecx
push esi
push edi
lea ecx, [esp + 0x14]
call sub.MFC42u.DLL_CString::CString_3
xor edi, edi
push str.macro_.dll
lea ecx, [esp + 0x1c]
mov dword [esp + 0x64], edi
mov byte [esp + 0x16], 0
mov byte [esp + 0x17], 0
call sub.MFC42u.DLL_CString::CString_1
mov esi, dword [sym.imp.MSVCRT.dll_calloc]
push 2
push 0x104
mov byte [esp + 0x68], 1
call esi
push 1
push 0x104
call esi
mov esi, eax
add esp, 0x10
cmp esi, edi
mov dword [esp + 0x2c], esi
jne 0x405e81
push edi
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
push 1
call dword [sym.imp.MSVCRT.dll_exit]
mov eax, dword [ebp + 0x1aa8]
mov dword [esp + 0x28], edi
cmp eax, edi
jbe 0x40606d
mov ebx, dword [esp + 0x68]
mov dword [esp + 0x24], edi
jmp 0x405ea1
mov esi, dword [esp + 0x2c]
mov eax, dword [esp + 0x24]
mov edx, dword [ebp + 0x1aac]
add eax, edx
push 0
push eax
push ebx
call dword [sym.imp.MSVCRT.dll_fseek]
push ebx
push 0x14
push 1
push esi
call dword [sym.imp.MSVCRT.dll_fread]
mov ecx, 5
lea edi, [ebp + 0x1bb8]
rep movsd dword es:[edi], dword [esi]
mov ecx, 9
xor eax, eax
lea edi, [esp + 0x4e]
mov word [esp + 0x4c], 0
rep stosd dword es:[edi], eax
xor edx, edx
lea ecx, [esp + 0x4c]
mov dx, word [ebp + 0x1bb8]
push 0xa
push ecx
push edx
stosw word es:[edi], ax
call dword [sym.imp.MSVCRT.dll__itow]
add esp, 0x28
lea ecx, [esp + 0x18]
push eax
push 6
call sub.MFC42u.DLL_CString::Insert
lea eax, [esp + 0x18]
lea ecx, [esp + 0x68]
push eax
call fcn.0040d1ee
push 0x14
lea ecx, [esp + 0x6c]
mov byte [esp + 0x64], 2
call sub.MFC42u.DLL_CString::GetBuffer
push 0xffffffffffffffff
lea ecx, [esp + 0x6c]
mov esi, eax
call sub.MFC42u.DLL_CString::ReleaseBuffer
lea eax, [ebp + 0x49b4]
lea ecx, [esp + 0x14]
push eax
call sub.MFC42u.DLL_CString::operator_2
push str.evsimulator.exe
lea ecx, [esp + 0x18]
call sub.MFC42u.DLL_CString::Find
cmp eax, 0xffffffff
je 0x4060ab
push esi
push str.evsimulator.exe
lea ecx, [esp + 0x1c]
call sub.MFC42u.DLL_CString::Replace
mov ecx, dword [esp + 0x14]
push 0x416174
push ecx
call dword [sym.imp.MSVCRT.dll__wfopen]
mov edi, eax
add esp, 8
test edi, edi
je 0x4060b3
mov eax, dword [ebp + 0x1bc4]
test eax, eax
mov dword [esp + 0x20], eax
je 0x4060cd
push 1
push eax
call dword [sym.imp.MSVCRT.dll_calloc]
add esp, 8
mov esi, eax
test esi, esi
push 0
je 0x4060ee
mov edx, dword [ebp + 0x1bc8]
push edx
push ebx
call dword [sym.imp.MSVCRT.dll_fseek]
mov eax, dword [esp + 0x2c]
push ebx
push eax
push 1
push esi
call dword [sym.imp.MSVCRT.dll_fread]
mov eax, dword [esp + 0x3c]
add esp, 0x1c
test eax, eax
mov dword [esp + 0x1c], 0
jle 0x40601e
mov ecx, dword [esp + 0x1c]
push edi
push 1
lea eax, [esp + 0x1a]
mov dl, byte [ecx + esi]
push 1
push eax
mov byte [esp + 0x22], dl
call dword [sym.imp.MSVCRT.dll_fwrite]
mov al, byte [edi + 0xc]
add esp, 0x10
test al, 0x20
jne 0x4060ff
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x20]
inc eax
cmp eax, ecx
mov dword [esp + 0x1c], eax
jl 0x405fe4
push edi
call dword [sym.imp.MSVCRT.dll_fclose]
push esi
call dword [sym.imp.MSVCRT.dll_free]
add esp, 8
lea ecx, [esp + 0x18]
push str.macro_.dll
call fcn.0040d164
lea ecx, [esp + 0x68]
mov byte [esp + 0x60], 1
call sub.MFC42u.DLL_CString::CString
mov eax, dword [esp + 0x28]
mov edx, dword [esp + 0x24]
mov ecx, dword [ebp + 0x1aa8]
inc eax
add edx, 0x14
cmp eax, ecx
mov dword [esp + 0x28], eax
mov dword [esp + 0x24], edx
jb 0x405e9d
mov dword [ebp + 0x18bc], 0
lea ecx, [esp + 0x18]
mov byte [esp + 0x60], 0
call sub.MFC42u.DLL_CString::CString
lea ecx, [esp + 0x14]
mov dword [esp + 0x60], 0xffffffff
call sub.MFC42u.DLL_CString::CString
mov ecx, dword [esp + 0x58]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x54
ret 4
push 1
call dword [sym.imp.MSVCRT.dll_exit]
mov ecx, dword [esp + 0x2c]
push ecx
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
mov dword [ebp + 0x18bc], 7
jmp 0x40611a
push edi
mov dword [ebp + 0x18bc], 5
call dword [sym.imp.MSVCRT.dll_fclose]
mov edx, dword [esp + 0x18]
push edx
call dword [sym.imp.MSVCRT.dll__wunlink]
add esp, 8
jmp 0x40611a
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
push 1
call dword [sym.imp.MSVCRT.dll_exit]
push edi
call dword [sym.imp.MSVCRT.dll_fclose]
push esi
call dword [sym.imp.MSVCRT.dll_free]
add esp, 8
mov dword [ebp + 0x18bc], 5
lea ecx, [esp + 0x68]
mov byte [esp + 0x60], 1
call sub.MFC42u.DLL_CString::CString
jmp 0x406077