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

Disassembly:
push 0xffffffffffffffff
push 0x40e27a
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x48
xor eax, eax
push ebx
mov dword [esp + 0x29], eax
push ebp
mov dword [esp + 0x31], eax
mov ebp, ecx
mov dword [esp + 0x35], eax
push esi
mov word [esp + 0x3d], ax
push edi
lea ecx, [esp + 0x10]
mov byte [esp + 0x34], 0
mov byte [esp + 0x43], al
call sub.MFC42u.DLL_CString::CString_3
xor ecx, ecx
mov ebx, dword [sym.imp.MSVCRT.dll_calloc]
mov dword [esp + 0x45], ecx
xor esi, esi
mov dword [esp + 0x49], ecx
push 1
mov dword [esp + 0x51], ecx
push 0x104
mov dword [esp + 0x59], ecx
mov dword [esp + 0x68], esi
mov word [esp + 0x5d], cx
mov byte [esp + 0x4c], 0
mov byte [esp + 0x5f], cl
call ebx
mov edi, eax
add esp, 8
cmp edi, esi
mov dword [esp + 0x1c], edi
jne 0x407da7
push esi
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
push 1
call dword [sym.imp.MSVCRT.dll_exit]
push 1
push 0x104
call ebx
add esp, 8
cmp eax, esi
mov dword [esp + 0x30], eax
jne 0x407dcd
push esi
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
push 1
call dword [sym.imp.MSVCRT.dll_exit]
mov eax, dword [ebp + 0x1888]
dec eax
je 0x407df4
dec eax
je 0x407de8
dec eax
jne 0x407dfe
mov dword [ebp + 0x18f4], 0x1f4
jmp 0x407dfe
mov dword [ebp + 0x18f4], 0x400
jmp 0x407dfe
mov dword [ebp + 0x18f4], 0x1000
push 2
mov ecx, ebp
call fcn.00408ce0
cmp dword [ebp + 0x18bc], esi
jne 0x4080f2
lea edx, [ebp + 0x307a]
push 0x4162c4
mov eax, dword [edx]
mov dword [esp + 0x38], eax
mov ecx, dword [edx + 4]
mov dword [esp + 0x3c], ecx
mov eax, dword [edx + 8]
mov dword [esp + 0x40], eax
mov ecx, dword [edx + 0xc]
mov dword [esp + 0x44], ecx
lea ecx, [esp + 0x14]
call fcn.0040d164
mov eax, dword [ebp + 0x1aa0]
mov dword [esp + 0x28], esi
cmp eax, esi
jbe 0x4080e8
lea ebx, [esp + 0x36]
mov dword [esp + 0x20], esi
mov dword [esp + 0x24], ebx
mov ecx, ebp
call fcn.004051c0
mov esi, eax
test esi, esi
mov dword [esp + 0x2c], esi
je 0x408116
mov edx, dword [ebp + 0x1aa4]
mov ecx, dword [esp + 0x20]
add edx, ecx
push 0
push edx
push esi
call dword [sym.imp.MSVCRT.dll_fseek]
push esi
push 0x18
push 1
push edi
call dword [sym.imp.MSVCRT.dll_fread]
lea eax, [ebp + 0x1b2c]
mov esi, edi
mov ecx, 6
mov edi, eax
add esp, 0x1c
lea eax, [ebx - 2]
rep movsd dword es:[edi], dword [esi]
push eax
mov ecx, ebp
call fcn.00403b40
push ebx
mov ecx, ebp
mov esi, eax
call fcn.00403b40
cmp word [ebp + 0x1b30], si
jne 0x407ed6
cmp word [ebp + 0x1b32], ax
je 0x4080bb
push 0x40
call sub.MFC42u.DLL_operatornew
add esp, 4
mov dword [esp + 0x18], eax
test eax, eax
mov byte [esp + 0x60], 1
je 0x407efa
mov ecx, eax
call sub.MFC42u.DLL_CWnd::CWnd
mov dword [esp + 0x18], eax
jmp 0x407f02
mov dword [esp + 0x18], 0
mov ecx, dword [esp + 0x18]
push 1
lea ebx, [ebp + 0x1908]
push str.Simulator
push ecx
mov ecx, ebx
mov byte [esp + 0x6c], 0
call fcn.0040bd60
push 0
mov ecx, ebx
call fcn.0040c4b0
mov edx, dword [0x41675c]
push edx
push ebx
call fcn.0040c5c0
mov ecx, dword [ebp + 0x1b38]
mov esi, dword [esp + 0x34]
mov eax, dword [ebp + 0x1b34]
add esp, 8
mov dword [ebp + 0x18e0], ecx
mov ecx, ebp
push esi
mov dword [ebp + 0x18ec], eax
call fcn.00403a50
push esi
mov dword [ebp + 0x18f0], eax
call dword [sym.imp.MSVCRT.dll_fclose]
push 2
push 0x104
call dword [sym.imp.MSVCRT.dll_calloc]
mov edx, dword [ebp + 0x1b2c]
push 0xa
push eax
push edx
call dword [sym.imp.MSVCRT.dll__itow]
add esp, 0x18
lea ecx, [esp + 0x10]
push eax
push 9
call sub.MFC42u.DLL_CString::Insert
lea eax, [esp + 0x10]
lea ecx, [esp + 0x14]
push eax
call fcn.0040d1ee
push 0x14
lea ecx, [esp + 0x18]
mov byte [esp + 0x64], 2
call sub.MFC42u.DLL_CString::GetBuffer
push 0xffffffffffffffff
lea ecx, [esp + 0x18]
mov esi, eax
call sub.MFC42u.DLL_CString::ReleaseBuffer
push 0
push 0
lea ecx, [esp + 0x4c]
push 0x14
push ecx
push 0xffffffffffffffff
push esi
push 0x200
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
je 0x408122
lea edi, [esp + 0x44]
or ecx, 0xffffffff
xor eax, eax
mov edx, dword [esp + 0x30]
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea esi, [esp + 0x44]
mov eax, ecx
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x10]
mov ecx, dword [ecx - 8]
test ecx, ecx
mov dword [ebp + 0x18e4], ecx
jle 0x408032
mov cl, byte [eax + edx]
mov byte [eax + ebp + 0x44c4], cl
mov ecx, dword [ebp + 0x18e4]
inc eax
cmp eax, ecx
jl 0x40801d
push 0x4162c4
lea ecx, [esp + 0x14]
call fcn.0040d164
mov ecx, dword [ebp + 0x18f4]
mov edx, dword [ebp + 0x18ec]
push 1
lea eax, [edx + ecx - 1]
cdq
idiv ecx
mov ecx, ebx
add eax, 2
mov dword [ebp + 0x18f8], eax
add eax, 0xfffffffe
push eax
push 0
call fcn.0040c410
mov eax, dword [ebp + 0x18ec]
test eax, eax
je 0x40812e
mov ecx, ebp
call fcn.004081a0
mov eax, dword [ebp + 0x18bc]
test eax, eax
jne 0x40813f
mov eax, dword [esp + 0x18]
test eax, eax
je 0x408099
mov eax, dword [eax + 0x20]
push eax
call sub.MFC42u.DLL_operatordelete
mov eax, dword [ebx]
add esp, 4
mov ecx, ebx
call dword [eax + 0x60]
lea ecx, [esp + 0x14]
mov byte [esp + 0x60], 0
call sub.MFC42u.DLL_CString::CString
mov ebx, dword [esp + 0x24]
mov eax, dword [esp + 0x28]
mov edx, dword [esp + 0x20]
mov ecx, dword [ebp + 0x1aa0]
mov edi, dword [esp + 0x1c]
add ebx, 4
inc eax
add edx, 0x18
cmp eax, ecx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], eax
mov dword [esp + 0x20], edx
jb 0x407e60
push edi
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
lea ecx, [esp + 0x10]
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
mov dword [ebp + 0x18bc], 7
jmp 0x4080e8
mov dword [ebp + 0x18bc], 5
jmp 0x408170
mov ecx, dword [esp + 0x1c]
mov dword [ebp + 0x18bc], 5
push ecx
jmp 0x408144
mov eax, dword [esp + 0x1c]
push eax
call dword [sym.imp.MSVCRT.dll_free]
mov eax, dword [esp + 0x1c]
add esp, 4
test eax, eax
je 0x408158
mov eax, dword [eax + 0x20]
push eax
call sub.MFC42u.DLL_operatordelete
mov edx, dword [ebp + 0x1908]
lea ecx, [ebp + 0x1908]
add esp, 4
call dword [edx + 0x60]
lea ecx, [esp + 0x14]
mov byte [esp + 0x60], 0
call sub.MFC42u.DLL_CString::CString
jmp 0x4080f2