Function at 0x40dbe0
Capabilities:
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x411e3c
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 sub.MFC42u.DLL_CString::operator_2
lea ecx, [esp + 0xc]
call sub.MFC42u.DLL_CString::MakeLower
push str.khsimulator.exe
lea ecx, [esp + 0x10]
call sub.MFC42u.DLL_CString::Find
cmp eax, 0xffffffff
je 0x40de7a
push str.sim.dat
push str.khsimulator.exe
lea ecx, [esp + 0x14]
call sub.MFC42u.DLL_CString::Replace
mov edx, dword [esp + 0xc]
push 0x41a144
push edx
call dword [sym.imp.MSVCRT.dll__wfopen]
add esp, 8
cmp eax, ebx
mov dword [esp + 0x1c], eax
jne 0x40dce1
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 0x40de7a
push ebp
push eax
lea ebx, [esi + 0x1dc8]
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 + 0x1dca]
push edi
xor ebx, ebx
push 0x41a530
mov bx, word [esi + 0x1dcc]
push eax
mov byte [esp + 0x240], 3
call sub.MFC42u.DLL_CString::Format
add esp, 0xc
lea ecx, [esp + 0x14]
push ebp
push 0x41a530
push ecx
call sub.MFC42u.DLL_CString::Format
add esp, 0xc
lea edx, [esp + 0x1c]
push ebx
push 0x41a530
push edx
call sub.MFC42u.DLL_CString::Format
add esp, 0xc
lea ecx, [esp + 0x18]
push 0x41a150
push 0
call sub.MFC42u.DLL_CString::Insert
push 0x41a150
push 0
lea ecx, [esp + 0x1c]
call sub.MFC42u.DLL_CString::Insert
push 0x41a150
push 0
lea ecx, [esp + 0x24]
call sub.MFC42u.DLL_CString::Insert
test edi, edi
jne 0x40ddc2
mov eax, dword [esi + 0xbb4]
push str.COM1
push edi
push 0x14d
push eax
jmp 0x40ddd5
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 0x40ddf7
mov eax, dword [esi + 0x920]
push str.COM1
push 0
push 0x14d
push eax
jmp 0x40de0a
mov ecx, dword [esp + 0x10]
mov edx, dword [esi + 0x920]
push ecx
push 0
push 0x14d
push edx
call edi
test ebx, ebx
jne 0x40de24
mov eax, dword [esi + 0x68c]
push str.COM1
push ebx
push 0x14d
push eax
jmp 0x40de37
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