Function at 0x40a3a0
Capabilities:
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x40e3cc
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x21c
push ebx
push esi
mov esi, ecx
push edi
xor ebx, ebx
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0x22]
mov word [esp + 0x20], bx
rep stosd dword es:[edi], eax
lea ecx, [esp + 0xc]
stosw word es:[edi], ax
call sub.MFC42u.DLL_CString::CString_3
lea eax, [esp + 0x20]
push 0x104
push eax
push ebx
mov dword [esp + 0x23c], ebx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea ecx, [esp + 0x20]
push ecx
lea ecx, [esp + 0x10]
call fcn.0040d164
lea ecx, [esp + 0xc]
call sub.MFC42u.DLL_CString::MakeLower
push str.evsimulator.exe
lea ecx, [esp + 0x10]
call sub.MFC42u.DLL_CString::Find
cmp eax, 0xffffffff
je 0x40a634
push str.sim.dat
push str.evsimulator.exe
lea ecx, [esp + 0x14]
call sub.MFC42u.DLL_CString::Replace
mov edx, dword [esp + 0xc]
push 0x41614c
push edx
call dword [sym.imp.MSVCRT.dll__wfopen]
add esp, 8
cmp eax, ebx
mov dword [esp + 0x1c], eax
jne 0x40a4a1
mov eax, dword [esi + 0xbb4]
mov edi, dword [sym.imp.USER32.dll_SendMessageW]
push str.COM1
push ebx
push 0x14d
push eax
call edi
mov ecx, dword [esi + 0x920]
push str.COM1
push ebx
push 0x14d
push ecx
call edi
mov edx, dword [esi + 0x68c]
push str.COM1
push ebx
push 0x14d
push edx
call edi
jmp 0x40a634
push ebp
push eax
lea ebx, [esi + 0x1bcc]
push 6
push 1
push ebx
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
lea ecx, [esp + 0x18]
call sub.MFC42u.DLL_CString::CString_3
lea ecx, [esp + 0x14]
mov byte [esp + 0x234], 1
call sub.MFC42u.DLL_CString::CString_3
lea ecx, [esp + 0x1c]
mov byte [esp + 0x234], 2
call sub.MFC42u.DLL_CString::CString_3
xor edi, edi
lea eax, [esp + 0x18]
mov di, word [ebx]
xor ebp, ebp
mov bp, word [esi + 0x1bce]
push edi
xor ebx, ebx
push 0x4163b4
mov bx, word [esi + 0x1bd0]
push eax
mov byte [esp + 0x240], 3
call sub.MFC42u.DLL_CString::Format
push ebp
lea ecx, [esp + 0x24]
push 0x4163b4
push ecx
call sub.MFC42u.DLL_CString::Format
push ebx
lea edx, [esp + 0x38]
push 0x4163b4
push edx
call sub.MFC42u.DLL_CString::Format
add esp, 0x24
lea ecx, [esp + 0x18]
push 0x4163cc
push 0
call sub.MFC42u.DLL_CString::Insert
push 0x4163cc
push 0
lea ecx, [esp + 0x1c]
call sub.MFC42u.DLL_CString::Insert
push 0x4163cc
push 0
lea ecx, [esp + 0x24]
call sub.MFC42u.DLL_CString::Insert
test edi, edi
jne 0x40a57c
mov eax, dword [esi + 0xbb4]
push str.COM1
push edi
push 0x14d
push eax
jmp 0x40a58f
mov ecx, dword [esp + 0x18]
mov edx, dword [esi + 0xbb4]
push ecx
push 0
push 0x14d
push edx
mov edi, dword [sym.imp.USER32.dll_SendMessageW]
call edi
test ebp, ebp
pop ebp
jne 0x40a5b1
mov eax, dword [esi + 0x920]
push str.COM1
push 0
push 0x14d
push eax
jmp 0x40a5c4
mov ecx, dword [esp + 0x10]
mov edx, dword [esi + 0x920]
push ecx
push 0
push 0x14d
push edx
call edi
test ebx, ebx
jne 0x40a5de
mov eax, dword [esi + 0x68c]
push str.COM1
push ebx
push 0x14d
push eax
jmp 0x40a5f1
mov ecx, dword [esp + 0x18]
mov edx, dword [esi + 0x68c]
push ecx
push 0
push 0x14d
push edx
call edi
mov eax, dword [esp + 0x1c]
push eax
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
lea ecx, [esp + 0x18]
mov byte [esp + 0x230], 2
call sub.MFC42u.DLL_CString::CString
lea ecx, [esp + 0x10]
mov byte [esp + 0x230], 1
call sub.MFC42u.DLL_CString::CString
lea ecx, [esp + 0x14]
mov byte [esp + 0x230], 0
call sub.MFC42u.DLL_CString::CString
lea ecx, [esp + 0xc]
mov dword [esp + 0x230], 0xffffffff
call sub.MFC42u.DLL_CString::CString
mov ecx, dword [esp + 0x228]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x228
ret