Function at 0x409370
Capabilities:
Read file on windows
Terminate process

Disassembly:
push 0xffffffffffffffff
push 0x40e31c
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x258
push ebp
push esi
mov esi, ecx
push edi
lea ecx, [esp + 0x20]
call sub.MFC42u.DLL_CString::CString_3
lea ecx, [esp + 0x10]
mov dword [esp + 0x26c], 0
call sub.MFC42u.DLL_CString::CString_3
xor eax, eax
lea edi, [esi + 0x44d8]
mov dword [esp + 0x49], eax
mov ecx, 0xc8
mov dword [esp + 0x4d], eax
push 0x41614c
mov dword [esp + 0x55], eax
mov byte [esp + 0x270], 1
mov dword [esp + 0x59], eax
mov byte [esp + 0x4c], 0
mov word [esp + 0x5d], ax
mov byte [esp + 0x5f], al
rep stosd dword es:[edi], eax
mov eax, dword [esi + 0x49a0]
push eax
call dword [sym.imp.MSVCRT.dll__wfopen]
mov edi, eax
add esp, 8
test edi, edi
mov dword [esp + 0x38], edi
jne 0x40941c
push 0x10
push str.EVSimulator_Message
push 0x41610c
mov ecx, esi
call sub.MFC42u.DLL_CWnd::MessageBoxW
push 1
call dword [sym.imp.MSVCRT.dll_exit]
mov ebp, dword [sym.imp.MSVCRT.dll_calloc]
push ebx
push 1
push 0x104
call ebp
push 1
push 0x104
call ebp
mov ebx, eax
push 2
push 0x104
mov dword [esp + 0x34], ebx
call ebp
push 1
push 0x104
call ebp
mov ecx, dword [0x4167a8]
add esp, 0x20
lea ebp, [esi + 0xfa0]
mov dword [esp + 0x30], eax
push 0xffffffffffffffff
push 0x96
push 0
push ecx
push 0
mov ecx, ebp
call sub.MFC42u.DLL_CListCtrl::InsertColumn
mov edx, dword [0x4167ac]
push 0xffffffffffffffff
push 0x12c
push 0
push edx
push 1
mov ecx, ebp
call sub.MFC42u.DLL_CListCtrl::InsertColumn
mov eax, dword [esi + 0xfc0]
mov ebp, dword [sym.imp.USER32.dll_SendMessageW]
push 0xa3
push 0
push 0x1036
push eax
call ebp
push 0
push 0
push edi
call dword [sym.imp.MSVCRT.dll_fseek]
push edi
push 4
push 1
push ebx
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x1c
mov ecx, esi
push ebx
call fcn.00403b10
push edi
mov dword [esi + 0x1884], eax
call dword [sym.imp.MSVCRT.dll_ftell]
mov ebx, dword [sym.imp.MSVCRT.dll_fseek]
push 0
push 0
push edi
mov dword [esp + 0x30], eax
call ebx
mov eax, dword [esi + 0x1884]
push 0
lea ecx, [eax + eax*2]
lea edx, [ecx*4 + 4]
push edx
push edi
call ebx
xor eax, eax
push edi
push 6
lea ecx, [esp + 0x68]
mov dword [esp + 0x69], eax
push 1
push ecx
mov byte [esp + 0x70], 0
mov word [esp + 0x75], ax
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x2c
mov ecx, str.PKGEXT
lea eax, [esp + 0x44]
mov bl, byte [eax]
mov dl, bl
cmp bl, byte [ecx]
jne 0x40954d
test dl, dl
je 0x409549
mov bl, byte [eax + 1]
mov dl, bl
cmp bl, byte [ecx + 1]
jne 0x40954d
add eax, 2
add ecx, 2
test dl, dl
jne 0x409529
xor eax, eax
jmp 0x409552
sbb eax, eax
sbb eax, 0xffffffff
xor ecx, ecx
cmp eax, ecx
jne 0x409564
mov dword [esi + 0x1880], 1
jmp 0x40956a
mov dword [esi + 0x1880], ecx
mov eax, dword [esi + 0x1880]
mov dword [esp + 0x10], ecx
cmp eax, ecx
je 0x4095eb
mov ebx, dword [sym.imp.MSVCRT.dll_fread]
push edi
push 4
lea edx, [esi + 0x1904]
push 1
push edx
call ebx
push edi
push 4
lea eax, [esp + 0x58]
push 1
push eax
call ebx
mov ecx, dword [esp + 0x60]
shl ecx, 4
push ecx
call sub.MFC42u.DLL_operatornew
mov edx, dword [esp + 0x64]
push edi
push 0x10
push edx
push eax
mov dword [esp + 0x4c], eax
call ebx
mov eax, dword [esp + 0x4c]
add esp, 0x34
test eax, eax
je 0x4095c8
push eax
call sub.MFC42u.DLL_operatordelete
add esp, 4
mov eax, dword [esi + 0x1884]
shl eax, 3
push eax
call sub.MFC42u.DLL_operatornew
mov ecx, dword [esi + 0x1884]
push edi
push 8
push ecx
push eax
mov dword [esp + 0x24], eax
call ebx
add esp, 0x14
mov edx, dword [esp + 0x20]
push 0
push edx
push edi
call dword [sym.imp.MSVCRT.dll_fseek]
add esp, 0xc
lea ecx, [esp + 0x14]
push 0x4163bc
call fcn.0040d164
mov eax, dword [esi + 0x1884]
xor ebx, ebx
test eax, eax
jbe 0x409845
mov eax, dword [esp + 0x10]
mov dword [esp + 0x28], 4
mov dword [esp + 0x10], eax
lea eax, [esi + 0x44d8]
mov dword [esp + 0x2c], eax
mov ecx, dword [esp + 0x28]
push 0
push ecx
push edi
call dword [sym.imp.MSVCRT.dll_fseek]
mov edx, dword [esp + 0x28]
push edi
push 0xc
push 1
push edx
call dword [sym.imp.MSVCRT.dll_fread]
mov ecx, dword [esp + 0x38]
lea eax, [esi + 0x1b20]
add esp, 0x1c
mov edx, dword [ecx]
mov dword [eax], edx
mov edx, dword [ecx + 4]
mov dword [eax + 4], edx
mov ecx, dword [ecx + 8]
mov dword [eax + 8], ecx
xor eax, eax
mov edx, dword [esp + 0x1c]
inc eax
cmp eax, 4
mov cl, byte [edx + eax + 7]
mov edx, dword [esp + 0x2c]
mov byte [edx + eax - 1], cl
jb 0x409671
mov eax, dword [esi + 0x1b24]
push 0
push eax
push edi
call dword [sym.imp.MSVCRT.dll_fseek]
mov eax, dword [esi + 0x1b28]
mov ecx, dword [esi + 0x1b24]
sub eax, ecx
push edi
mov edi, dword [esp + 0x2c]
push eax
push 1
push edi
mov dword [esp + 0x34], eax
call dword [sym.imp.MSVCRT.dll_fread]
mov ecx, dword [esp + 0x34]
add esp, 0x1c
test ecx, ecx
jbe 0x4096d2
mov eax, dword [esp + 0x30]
sub edi, eax
mov dl, byte [edi + eax]
mov byte [eax], dl
inc eax
dec ecx
jne 0x4096c9
push ebx
lea eax, [esp + 0x28]
push 0x4163b4
push eax
call sub.MFC42u.DLL_CString::Format
mov ecx, dword [esp + 0x30]
add esp, 0xc
push 0
push 0
push 0x23
push 0x23
push ecx
push ebx
push 9
lea ecx, [esi + 0xfa0]
call sub.MFC42u.DLL_CListCtrl::InsertItem
mov eax, dword [esi + 0x1880]
lea edx, [esp + 0x4c]
test eax, eax
push 0xa
push edx
je 0x40971a
mov eax, dword [esp + 0x18]
mov ecx, dword [eax]
push ecx
jmp 0x40971b
push ebx
call dword [sym.imp.MSVCRT.dll__itoa]
add esp, 0xc
lea ecx, [esp + 0x20]
push eax
call sub.MFC42u.DLL_CString::CString_2
lea eax, [esp + 0x20]
lea ecx, [esp + 0x14]
push eax
mov byte [esp + 0x274], 2
call sub.MFC42u.DLL_CString::operator_1
lea ecx, [esp + 0x20]
mov byte [esp + 0x270], 1
call sub.MFC42u.DLL_CString::CString
lea ecx, [esp + 0x14]
push ecx
lea ecx, [esp + 0x3c]
call fcn.0040d1ee
push 0x40
lea ecx, [esp + 0x3c]
mov byte [esp + 0x274], 3
call sub.MFC42u.DLL_CString::GetBuffer
push 0xffffffffffffffff
lea ecx, [esp + 0x3c]
mov dword [esp + 0x38], eax
call sub.MFC42u.DLL_CString::ReleaseBuffer
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0x62]
mov word [esp + 0x60], 0
rep stosd dword es:[edi], eax
lea edx, [esp + 0x60]
push 0x208
stosw word es:[edi], ax
mov eax, dword [esp + 0x34]
push edx
push 0xffffffffffffffff
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov ecx, dword [esp + 0x34]
lea edi, [esi + 0xfa0]
push ecx
push 0
push ebx
mov ecx, edi
call sub.MFC42u.DLL_CListCtrl::SetItemText
lea edx, [esp + 0x60]
mov ecx, edi
push edx
push 1
push ebx
call sub.MFC42u.DLL_CListCtrl::SetItemText
push 0x4163bc
lea ecx, [esp + 0x18]
call fcn.0040d164
mov ecx, dword [esp + 0x18]
mov edi, dword [esp + 0x30]
mov edx, ecx
xor eax, eax
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
mov byte [esp + 0x270], 1
and ecx, 3
rep stosb byte es:[edi], al
lea ecx, [esp + 0x38]
call sub.MFC42u.DLL_CString::CString
mov edi, dword [esp + 0x2c]
mov edx, dword [esp + 0x28]
mov ecx, dword [esp + 0x10]
mov eax, dword [esi + 0x1884]
inc ebx
add edi, 4
add edx, 0xc
add ecx, 8
mov dword [esp + 0x2c], edi
mov dword [esp + 0x28], edx
mov dword [esp + 0x10], ecx
mov edi, dword [esp + 0x3c]
cmp ebx, eax
jb 0x409634
mov ebx, dword [sym.imp.MSVCRT.dll_free]
push 0
call ebx
push 0
call ebx
push 0
call ebx
push 0
call ebx
push edi
call dword [sym.imp.MSVCRT.dll_fclose]
mov eax, dword [esi + 0x1884]
add esp, 0x14
cmp eax, 1
pop ebx
jne 0x40992e
mov eax, dword [esi + 0xfc0]
push 0
push 0
push 0x103c
push eax
call ebp
lea eax, [esi + 0x44d8]
mov ecx, esi
push eax
call fcn.00403b10
push eax
mov ecx, esi
call fcn.00405010
cmp dword [esi + 0x18bc], 7
jne 0x4098ae
push 1
call dword [sym.imp.MSVCRT.dll_exit]
mov ecx, esi
call fcn.00406130
mov eax, dword [esi + 0x18bc]
test eax, eax
je 0x4098c7
push 1
call dword [sym.imp.MSVCRT.dll_exit]
mov eax, dword [esi + 0x49a0]
lea ecx, [esi + 0xe28]
push eax
call sub.MFC42u.DLL_CWnd::SetWindowTextW
mov eax, dword [esi + 0x49a4]
cmp eax, 1
jne 0x4098ed
mov ecx, dword [0x4167bc]
push ecx
jmp 0x40990d
cmp eax, 2
jne 0x4098fb
mov edx, dword [0x4167c0]
push edx
jmp 0x40990d
cmp eax, 3
jne 0x409908
mov eax, dword [0x4167c4]
push eax
jmp 0x40990d
push str.NULL
lea ecx, [esi + 0xee4]
call sub.MFC42u.DLL_CWnd::SetWindowTextW
mov ecx, esi
call fcn.00409bd0
push 1
lea ecx, [esi + 0xfe0]
call sub.MFC42u.DLL_CWnd::EnableWindow
jmp 0x409956
mov eax, dword [esi + 0x49a0]
lea ecx, [esi + 0xe28]
push eax
call sub.MFC42u.DLL_CWnd::SetWindowTextW
lea ecx, [esp + 0x30]
mov dword [esp + 0x30], 0
push ecx
push 0
mov ecx, esi
call fcn.004025f0
mov edx, dword [esi + 0xbb4]
push str.COM1
push 0
push 0x143
push edx
call ebp
mov eax, dword [esi + 0xbb4]
push str.COM2
push 0
push 0x143
push eax
call ebp
mov ecx, dword [esi + 0xbb4]
push str.COM3
push 0
push 0x143
push ecx
call ebp
mov edx, dword [esi + 0xbb4]
push str.COM4
push 0
push 0x143
push edx
call ebp
mov eax, dword [esi + 0xbb4]
push str.COM5
push 0
push 0x143
push eax
call ebp
mov ecx, dword [esi + 0xbb4]
push str.COM6
push 0
push 0x143
push ecx
call ebp
mov edx, dword [esi + 0xbb4]
push str.COM7
push 0
push 0x143
push edx
call ebp
mov eax, dword [esi + 0xbb4]
push str.COM8
push 0
push 0x143
push eax
call ebp
mov ecx, dword [esi + 0xbb4]
push str.COM9
push 0
push 0x143
push ecx
call ebp
mov edx, dword [esi + 0x920]
push str.COM1
push 0
push 0x143
push edx
call ebp
mov eax, dword [esi + 0x920]
push str.COM2
push 0
push 0x143
push eax
call ebp
mov ecx, dword [esi + 0x920]
push str.COM3
push 0
push 0x143
push ecx
call ebp
mov edx, dword [esi + 0x920]
push str.COM4
push 0
push 0x143
push edx
call ebp
push str.COM5
push 0
push 0x143
mov eax, dword [esi + 0x920]
push eax
call ebp
mov ecx, dword [esi + 0x920]
push str.COM6
push 0
push 0x143
push ecx
call ebp
mov edx, dword [esi + 0x920]
push str.COM7
push 0
push 0x143
push edx
call ebp
mov eax, dword [esi + 0x920]
push str.COM8
push 0
push 0x143
push eax
call ebp
mov ecx, dword [esi + 0x920]
push str.COM9
push 0
push 0x143
push ecx
call ebp
mov edx, dword [esi + 0x68c]
push str.COM1
push 0
push 0x143
push edx
call ebp
mov eax, dword [esi + 0x68c]
push str.COM2
push 0
push 0x143
push eax
call ebp
mov ecx, dword [esi + 0x68c]
push str.COM3
push 0
push 0x143
push ecx
call ebp
mov edx, dword [esi + 0x68c]
push str.COM4
push 0
push 0x143
push edx
call ebp
mov eax, dword [esi + 0x68c]
push str.COM5
push 0
push 0x143
push eax
call ebp
mov ecx, dword [esi + 0x68c]
push str.COM6
push 0
push 0x143
push ecx
call ebp
mov edx, dword [esi + 0x68c]
push str.COM7
push 0
push 0x143
push edx
call ebp
mov eax, dword [esi + 0x68c]
push str.COM8
push 0
push 0x143
push eax
call ebp
mov ecx, dword [esi + 0x68c]
push str.COM9
push 0
push 0x143
push ecx
call ebp
lea ecx, [esp + 0x10]
mov byte [esp + 0x26c], 0
call sub.MFC42u.DLL_CString::CString
lea ecx, [esp + 0x20]
mov dword [esp + 0x26c], 0xffffffff
call sub.MFC42u.DLL_CString::CString
mov ecx, dword [esp + 0x264]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
add esp, 0x264
ret