Function at 0x409aa0
Capabilities:
Create process on windows
Create process suspended
Read file on windows
Terminate process
Write and execute a file
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x411c99
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x990
push ebx
push ebp
mov ebp, ecx
push esi
push edi
lea ecx, [esp + 0x14]
call sub.MFC42u.DLL_CString::CString_3
mov ecx, 0x11
xor eax, eax
lea edi, [esp + 0x1c8]
mov dx, word [ebp + 0x1c20]
rep stosd dword es:[edi], eax
mov dword [esp + 0x44], eax
mov esi, 0x44
mov dword [esp + 0x48], eax
mov dword [esp + 0x9a8], 0
mov dword [esp + 0x4c], eax
mov dword [esp + 0x20], 0xffffffff
mov dword [esp + 0x50], eax
mov eax, dword [ebp + 0x4ba8]
cmp eax, 1
mov byte [esp + 0x98], 0
mov dword [esp + 0x1c8], esi
mov dword [esp + 0x80], edx
jne 0x409e38
or ecx, 0xffffffff
mov edi, str.Gui.exe
xor eax, eax
lea ebx, [esp + 0x98]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov byte [esp + 0x24], al
mov esi, edi
mov edi, ebx
mov ebx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea ebx, [esp + 0x98]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
or ecx, 0xffffffff
mov edi, 0x41a4a4
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, ebx
mov ebx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea ebx, [esp + 0x98]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x41a2a0
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, ebx
mov ebx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea ebx, [esp + 0x98]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x41a4a4
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, ebx
mov ebx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
xor ecx, ecx
mov dword [esp + 0x25], ecx
mov dword [esp + 0x29], ecx
mov dword [esp + 0x2d], ecx
mov dword [esp + 0x31], ecx
mov word [esp + 0x35], cx
mov byte [esp + 0x37], cl
and edx, 0xffff
push edx
lea edx, [esp + 0x28]
push 0x41a2d4
push edx
call dword [sym.imp.MSVCRT.dll_sprintf]
lea edi, [esp + 0x30]
or ecx, 0xffffffff
xor eax, eax
add esp, 0xc
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x98]
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0x98]
and ecx, 3
mov byte [esp + 0x398], al
rep movsb byte es:[edi], byte [esi]
mov edi, 0x41a4a0
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
push 0
and ecx, 3
push 0x104
rep movsb byte es:[edi], byte [esi]
mov ecx, 0x40
lea edi, [esp + 0x3a5]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea ecx, [esp + 0x3a4]
stosb byte es:[edi], al
mov eax, dword [ebp + 0x4bc8]
push ecx
push 0xffffffffffffffff
push eax
push 0x200
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
lea edi, [esp + 0x398]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x98]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea eax, [esp + 0x44]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x1c8]
push eax
push ecx
push 0
push 0
push 0x10
push 0
push 0
lea edx, [esp + 0xb4]
push 0
push edx
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x40b27d
mov eax, dword [ebp + 0x20]
push eax
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x409dc5
test ebp, ebp
je 0x409de2
mov esi, dword [ebp + 0x20]
test esi, esi
je 0x409de2
push 0xfffffffffffffff0
push esi
call dword [sym.imp.USER32.dll_GetWindowLongW]
mov ebx, eax
push 6
shr ebx, 0x1c
push esi
and bl, 1
call dword [sym.imp.USER32.dll_ShowWindow]
mov ecx, 0xb
xor eax, eax
lea edi, [esp + 0x54]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x54]
mov dword [esp + 0x54], 0x2c
push ecx
push esi
call dword [sym.imp.ExtUI.dll_public:_static_bool___cdecl_CExtNcFrameImpl::stat_GetWindowPlacement_struct_HWND_____struct_tagWINDOWPLACEMENT__]
mov eax, dword [esp + 0x64]
mov edi, 6
add esp, 8
cmp eax, edi
jne 0x409d9b
test bl, bl
jne 0x409de2
mov edx, dword [ebp + 0xfc]
add ebp, 0xfc
mov ecx, ebp
call dword [edx + 0x3c]
test al, al
je 0x409de2
lea eax, [esp + 0x54]
mov dword [esp + 0x5c], edi
push eax
push esi
call dword [sym.imp.ExtUI.dll_public:_static_bool___cdecl_CExtNcFrameImpl::stat_SetWindowPlacement_struct_HWND_____struct_tagWINDOWPLACEMENT_const__]
add esp, 8
jmp 0x409de2
call sub.MFC42u.DLL_AfxGetThread
test eax, eax
je 0x409dd7
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0x7c]
jmp 0x409dd9
xor eax, eax
push 6
mov ecx, eax
call sub.MFC42u.DLL_CWnd::ShowWindow
mov eax, dword [esp + 0x44]
or esi, 0xffffffff
push esi
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, esi
jne 0x409e01
mov dword [esp + 0x9a8], esi
jmp 0x40b288
mov edx, dword [esp + 0x44]
lea ecx, [esp + 0x20]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
test eax, eax
jne 0x409e21
mov dword [esp + 0x9a8], esi
jmp 0x40b288
mov eax, dword [esp + 0x48]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
call esi
mov ecx, dword [esp + 0x44]
push ecx
jmp 0x40b27b
cmp eax, 2
jne 0x40a159
or ecx, 0xffffffff
mov edi, str.Gui.exe
xor eax, eax
lea ebx, [esp + 0x98]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov byte [esp + 0x24], al
mov esi, edi
mov edi, ebx
mov ebx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea ebx, [esp + 0x98]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
or ecx, 0xffffffff
mov edi, 0x41a4a4
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, ebx
mov ebx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea ebx, [esp + 0x98]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x41a49c
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, ebx
mov ebx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea ebx, [esp + 0x98]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x41a4a4
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, ebx
mov ebx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov dword [esp + 0x25], eax
mov ecx, ebx
mov dword [esp + 0x29], eax
and ecx, 3
mov dword [esp + 0x2d], eax
and edx, 0xffff
mov dword [esp + 0x31], eax
mov word [esp + 0x35], ax
rep movsb byte es:[edi], byte [esi]
mov byte [esp + 0x37], al
push edx
lea ecx, [esp + 0x28]
push 0x41a2d4
push ecx
call dword [sym.imp.MSVCRT.dll_sprintf]
lea edi, [esp + 0x30]
or ecx, 0xffffffff
xor eax, eax
add esp, 0xc
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x98]
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0x98]
and ecx, 3
mov byte [esp + 0x398], al
rep movsb byte es:[edi], byte [esi]
mov edi, 0x41a4a0
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
push 0
and ecx, 3
push 0x104
rep movsb byte es:[edi], byte [esi]
mov ecx, 0x40
lea edi, [esp + 0x3a5]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea ecx, [esp + 0x3a4]
stosb byte es:[edi], al
mov eax, dword [ebp + 0x4bc8]
push ecx
push 0xffffffffffffffff
push eax
push 0x200
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
lea edi, [esp + 0x398]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x98]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea eax, [esp + 0x44]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x1cc]
lea edx, [esp + 0x9c]
push ecx
push 0
push 0
push 0x10
push 0
push 0
push 0
push edx
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x40b27d
mov eax, dword [ebp + 0x20]
push eax
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x40a0d4
test ebp, ebp
je 0x40a0f1
mov esi, dword [ebp + 0x20]
test esi, esi
je 0x40a0f1
push 0xfffffffffffffff0
push esi
call dword [sym.imp.USER32.dll_GetWindowLongW]
mov ebx, eax
push 6
shr ebx, 0x1c
push esi
and bl, 1
call dword [sym.imp.USER32.dll_ShowWindow]
mov ecx, 0xb
xor eax, eax
lea edi, [esp + 0x54]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x54]
mov dword [esp + 0x54], 0x2c
push ecx
push esi
call dword [sym.imp.ExtUI.dll_public:_static_bool___cdecl_CExtNcFrameImpl::stat_GetWindowPlacement_struct_HWND_____struct_tagWINDOWPLACEMENT__]
mov eax, dword [esp + 0x64]
mov edi, 6
add esp, 8
cmp eax, edi
jne 0x40a0ac
test bl, bl
jne 0x40a0f1
mov edx, dword [ebp + 0xfc]
lea ecx, [ebp + 0xfc]
call dword [edx + 0x3c]
test al, al
je 0x40a0f1
lea eax, [esp + 0x54]
mov dword [esp + 0x5c], edi
push eax
push esi
call dword [sym.imp.ExtUI.dll_public:_static_bool___cdecl_CExtNcFrameImpl::stat_SetWindowPlacement_struct_HWND_____struct_tagWINDOWPLACEMENT_const__]
add esp, 8
jmp 0x40a0f1
call sub.MFC42u.DLL_AfxGetThread
test eax, eax
je 0x40a0e6
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0x7c]
jmp 0x40a0e8
xor eax, eax
push 6
mov ecx, eax
call sub.MFC42u.DLL_CWnd::ShowWindow
mov eax, dword [esp + 0x44]
or esi, 0xffffffff
push esi
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, esi
jne 0x40a110
mov dword [esp + 0x9a8], esi
jmp 0x40b288
mov edx, dword [esp + 0x44]
lea ecx, [esp + 0x20]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
test eax, eax
jne 0x40a130
mov dword [esp + 0x9a8], esi
jmp 0x40b288
mov eax, dword [esp + 0x48]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
call esi
mov ecx, dword [esp + 0x44]
push ecx
call esi
mov ebp, dword [ebp + 0x4bc4]
push ebp
call dword [sym.imp.MSVCRT.dll__wunlink]
add esp, 4
jmp 0x40b27d
cmp eax, 3
jne 0x40b27d
mov ecx, 0x11
xor eax, eax
lea edi, [esp + 0x20c]
xor edx, edx
rep stosd dword es:[edi], eax
mov ecx, 0x11
lea edi, [esp + 0x250]
mov dword [esp + 0x20c], esi
mov dword [esp + 0x54], edx
rep stosd dword es:[edi], eax
mov dword [esp + 0x64], eax
mov dword [esp + 0x250], esi
mov dword [esp + 0x58], edx
mov dword [esp + 0x68], eax
lea esi, [ebp + 0x1874]
mov dword [esp + 0x5c], edx
mov dword [esp + 0x6c], eax
lea ecx, [ebp + 0xb94]
push esi
mov dword [esp + 0x64], edx
mov dword [esp + 0x74], eax
call sub.MFC42u.DLL_CWnd::GetWindowTextW
push 3
push 0
mov ecx, esi
call sub.MFC42u.DLL_CString::Delete
lea esi, [ebp + 0x1878]
lea ecx, [ebp + 0x900]
push esi
call sub.MFC42u.DLL_CWnd::GetWindowTextW
push 3
push 0
mov ecx, esi
call sub.MFC42u.DLL_CString::Delete
lea ebx, [ebp + 0x187c]
lea ecx, [ebp + 0x66c]
push ebx
call sub.MFC42u.DLL_CWnd::GetWindowTextW
push 3
push 0
mov ecx, ebx
call sub.MFC42u.DLL_CString::Delete
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0x39a]
mov word [esp + 0x398], 0
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x398]
push 0x104
push ecx
push 0
stosw word es:[edi], ax
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea edx, [esp + 0x398]
lea ecx, [esp + 0x18]
push edx
call fcn.0041063c
lea ecx, [esp + 0x18]
mov byte [esp + 0x9a8], 1
call sub.MFC42u.DLL_CString::MakeLower
push str.khsimulator.exe
lea ecx, [esp + 0x1c]
call sub.MFC42u.DLL_CString::Find
cmp eax, 0xffffffff
je 0x40a476
push str.ComPara.dat
push str.khsimulator.exe
lea ecx, [esp + 0x20]
call sub.MFC42u.DLL_CString::Replace
mov eax, dword [esp + 0x18]
push 0x41a0f8
push eax
call dword [sym.imp.MSVCRT.dll__wfopen]
add esp, 8
mov dword [esp + 0x38], eax
test eax, eax
je 0x40a476
lea ecx, [esp + 0x10]
call sub.MFC42u.DLL_CString::CString_3
lea ecx, [ebp + 0xb94]
mov byte [esp + 0x9a8], 2
call sub.MFC42u.DLL_CWnd::IsWindowEnabled
test eax, eax
je 0x40a32c
lea eax, [ebp + 0x1874]
lea ecx, [esp + 0x3c]
push eax
push 0x41a47c
push ecx
call sub.MFC42u.DLL_operator
push 0x41a478
lea edx, [esp + 0x20]
push eax
push edx
mov byte [esp + 0x9b4], 3
call sub.MFC42u.DLL_operator_2
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x9ac], 4
call sub.MFC42u.DLL_CString::operator_1
lea ecx, [esp + 0x1c]
mov byte [esp + 0x9a8], 3
call sub.MFC42u.DLL_CString::CString
lea ecx, [esp + 0x3c]
mov byte [esp + 0x9a8], 2
call sub.MFC42u.DLL_CString::CString
lea ecx, [ebp + 0x900]
call sub.MFC42u.DLL_CWnd::IsWindowEnabled
test eax, eax
je 0x40a397
push esi
lea eax, [esp + 0x20]
push 0x41a470
push eax
call sub.MFC42u.DLL_operator
push 0x41a478
lea ecx, [esp + 0x40]
push eax
push ecx
mov byte [esp + 0x9b4], 5
call sub.MFC42u.DLL_operator_2
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x9ac], 6
call sub.MFC42u.DLL_CString::operator_1
lea ecx, [esp + 0x3c]
mov byte [esp + 0x9a8], 5
call sub.MFC42u.DLL_CString::CString
lea ecx, [esp + 0x1c]
mov byte [esp + 0x9a8], 2
call sub.MFC42u.DLL_CString::CString
lea ecx, [ebp + 0x66c]
call sub.MFC42u.DLL_CWnd::IsWindowEnabled
test eax, eax
je 0x40a402
push ebx
lea edx, [esp + 0x20]
push 0x41a468
push edx
call sub.MFC42u.DLL_operator
push 0x41a478
push eax
lea eax, [esp + 0x44]
mov byte [esp + 0x9b0], 7
push eax
call sub.MFC42u.DLL_operator_2
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x9ac], 8
call sub.MFC42u.DLL_CString::operator_1
lea ecx, [esp + 0x3c]
mov byte [esp + 0x9a8], 7
call sub.MFC42u.DLL_CString::CString
lea ecx, [esp + 0x1c]
mov byte [esp + 0x9a8], 2
call sub.MFC42u.DLL_CString::CString
mov edx, dword [esp + 0x10]
mov ecx, 0x100
xor eax, eax
lea edi, [esp + 0x5a0]
rep stosd dword es:[edi], eax
push eax
push eax
lea ecx, [esp + 0x5a8]
push 0x400
push ecx
push 0xffffffffffffffff
push edx
push eax
push eax
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov eax, dword [esp + 0x38]
lea edi, [esp + 0x5a0]
push eax
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
lea ecx, [esp + 0x5a8]
push 1
push ecx
call dword [sym.imp.MSVCRT.dll_fwrite]
mov edx, dword [esp + 0x48]
push edx
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 0x14
lea ecx, [esp + 0x10]
mov byte [esp + 0x9a8], 1
call sub.MFC42u.DLL_CString::CString
lea ecx, [esp + 0x18]
mov byte [esp + 0x9a8], 0
call sub.MFC42u.DLL_CString::CString
cmp byte [ebp + 0x1d25], 0x55
je 0x40a5c4
cmp dword [ebp + 0x1c80], 2
jb 0x40a56f
lea ecx, [ebp + 0xb94]
mov dword [esp + 0x18], 0
call sub.MFC42u.DLL_CWnd::IsWindowEnabled
mov edi, dword [sym.imp.MSVCRT.dll_wcscmp]
test eax, eax
je 0x40a4e8
lea ecx, [ebp + 0x900]
call sub.MFC42u.DLL_CWnd::IsWindowEnabled
test eax, eax
je 0x40a4e8
mov eax, dword [esi]
push eax
mov eax, dword [ebp + 0x1874]
push eax
call edi
add esp, 8
test eax, eax
jne 0x40a4e8
mov dword [esp + 0x18], 1
lea ecx, [ebp + 0xb94]
call sub.MFC42u.DLL_CWnd::IsWindowEnabled
test eax, eax
je 0x40a521
lea ecx, [ebp + 0x66c]
call sub.MFC42u.DLL_CWnd::IsWindowEnabled
test eax, eax
je 0x40a521
mov eax, dword [ebx]
mov ecx, dword [ebp + 0x1874]
push eax
push ecx
call edi
add esp, 8
test eax, eax
jne 0x40a521
mov dword [esp + 0x18], 1
lea ecx, [ebp + 0x900]
call sub.MFC42u.DLL_CWnd::IsWindowEnabled
test eax, eax
je 0x40a54e
lea ecx, [ebp + 0x66c]
call sub.MFC42u.DLL_CWnd::IsWindowEnabled
test eax, eax
je 0x40a54e
mov eax, dword [ebx]
mov edx, dword [esi]
push eax
push edx
call edi
add esp, 8
test eax, eax
je 0x40a556
mov eax, dword [esp + 0x18]
test eax, eax
je 0x40a56f
mov eax, dword [0x41a95c]
push 0x10
push str.KHSimulator_Message
push eax
mov ecx, ebp
call sub.MFC42u.DLL_CWnd::MessageBoxW
jmp 0x40b27d
push ecx
mov ecx, esp
mov dword [esp + 0x40], esp
push ebx
call sub.MFC42u.DLL_CString::CString_2
push ecx
mov byte [esp + 0x9b0], 9
mov ecx, esp
mov dword [esp + 0x24], esp
push esi
call sub.MFC42u.DLL_CString::CString_2
push ecx
lea eax, [ebp + 0x1874]
mov ecx, esp
mov dword [esp + 0x44], esp
push eax
mov byte [esp + 0x9b8], 0xa
call sub.MFC42u.DLL_CString::CString_2
mov ecx, ebp
mov byte [esp + 0x9b4], 0
call fcn.0040da60
cmp byte [ebp + 0x1d25], 0x55
jne 0x40a5eb
push 0
lea ecx, [ebp + 0xb94]
call sub.MFC42u.DLL_CWnd::EnableWindow
push 0
lea ecx, [ebp + 0x900]
call sub.MFC42u.DLL_CWnd::EnableWindow
push 0
lea ecx, [ebp + 0x66c]
call sub.MFC42u.DLL_CWnd::EnableWindow
push 1
push 0x104
call dword [sym.imp.MSVCRT.dll_calloc]
add esp, 8
mov dword [esp + 0x38], eax
test eax, eax
jne 0x40a60b
push 1
call dword [sym.imp.MSVCRT.dll_exit]
mov eax, dword [ebp + 0x4bbc]
push 0x41a144
push eax
call dword [sym.imp.MSVCRT.dll__wfopen]
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x40a639
mov ecx, dword [esp + 0x38]
push ecx
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
jmp 0x40b27d
mov edx, dword [ebp + 0x1d8c]
push 0
push edx
push ebx
call dword [sym.imp.MSVCRT.dll_fseek]
mov edi, dword [sym.imp.MSVCRT.dll_fread]
push ebx
push 4
lea eax, [esp + 0x54]
push 1
push eax
mov dword [esp + 0x5c], 0
call edi
mov ecx, dword [esp + 0x5c]
lea edx, [ecx*4]
push edx
call sub.MFC42u.DLL_operatornew
mov esi, eax
mov eax, dword [esp + 0x60]
push ebx
push 4
push eax
push esi
mov dword [esp + 0x48], esi
call edi
add esp, 0x30
lea ecx, [ebp + 0xb94]
mov dword [esp + 0x10], 0
call sub.MFC42u.DLL_CWnd::IsWindowEnabled
test eax, eax
je 0x40a6a7
mov dword [esp + 0x10], 1
lea ecx, [ebp + 0x900]
call sub.MFC42u.DLL_CWnd::IsWindowEnabled
test eax, eax
je 0x40a6ba
inc dword [esp + 0x10]
lea ecx, [ebp + 0x66c]
call sub.MFC42u.DLL_CWnd::IsWindowEnabled
test eax, eax
je 0x40a6cd
inc dword [esp + 0x10]
cmp byte [ebp + 0x1d25], 0x55
jne 0x40a6e7
mov ecx, dword [ebp + 0x4bb0]
mov dx, word [esp + 0x40]
mov word [ecx + 0x26], dx
jmp 0x40a6f6
mov eax, dword [ebp + 0x4bb0]
mov cx, word [esp + 0x10]
mov word [eax + 0x26], cx
lea ecx, [ebp + 0xb94]
mov dword [esp + 0x10], 0
call sub.MFC42u.DLL_CWnd::IsWindowEnabled
test eax, eax
je 0x40a772
mov edx, dword [esi]
push 0
push edx
push ebx
call dword [sym.imp.MSVCRT.dll_fseek]
push ebx
lea esi, [ebp + 0x1d24]
push 0x28
push 1
push esi
call edi
mov al, byte [esi]
add esp, 0x1c
test al, al
je 0x40a750
mov eax, dword [esp + 0x18]
push 0
mov ecx, dword [eax + 4]
push ecx
push ebx
call dword [sym.imp.MSVCRT.dll_fseek]
push ebx
push 0x28
push 1
push esi
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x1c
mov edi, dword [ebp + 0x4bb0]
mov ecx, 0xa
add edi, 0x30
mov dword [esp + 0x10], 1
rep movsd dword es:[edi], dword [esi]
mov edi, dword [sym.imp.MSVCRT.dll_fread]
mov esi, dword [esp + 0x18]
lea ecx, [ebp + 0x900]
call sub.MFC42u.DLL_CWnd::IsWindowEnabled
test eax, eax
je 0x40a7f8
mov edx, dword [esi + 4]
push 0
push edx
push ebx
call dword [sym.imp.MSVCRT.dll_fseek]
push ebx
lea esi, [ebp + 0x1d24]
push 0x28
push 1
push esi
call edi
mov al, byte [esi]
add esp, 0x1c
cmp al, 1
jne 0x40a7b8
mov eax, dword [esp + 0x10]
mov ecx, dword [ebp + 0x4bb0]
lea eax, [eax + eax*4]
lea edi, [ecx + eax*8 + 0x30]
jmp 0x40a7e8
mov edx, dword [esp + 0x18]
push 0
mov eax, dword [edx]
push eax
push ebx
call dword [sym.imp.MSVCRT.dll_fseek]
push ebx
push 0x28
push 1
push esi
call dword [sym.imp.MSVCRT.dll_fread]
mov eax, dword [esp + 0x2c]
mov edx, dword [ebp + 0x4bb0]
add esp, 0x1c
lea ecx, [eax + eax*4]
lea edi, [edx + ecx*8 + 0x30]
mov eax, dword [esp + 0x10]
mov ecx, 0xa
inc eax
rep movsd dword es:[edi], dword [esi]
mov dword [esp + 0x10], eax
lea ecx, [ebp + 0x66c]
call sub.MFC42u.DLL_CWnd::IsWindowEnabled
test eax, eax
je 0x40a845
mov eax, dword [esp + 0x18]
push 0
mov ecx, dword [eax + 8]
push ecx
push ebx
call dword [sym.imp.MSVCRT.dll_fseek]
push ebx
lea esi, [ebp + 0x1d24]
push 0x28
push 1
push esi
call dword [sym.imp.MSVCRT.dll_fread]
mov eax, dword [esp + 0x2c]
mov ecx, 0xa
add esp, 0x1c
lea edx, [eax + eax*4]
mov eax, dword [ebp + 0x4bb0]
lea edi, [eax + edx*8 + 0x30]
rep movsd dword es:[edi], dword [esi]
cmp byte [ebp + 0x1d25], 0x55
jne 0x40a907
mov ecx, dword [esp + 0x40]
xor eax, eax
cmp ecx, eax
mov dword [esp + 0x10], eax
jle 0x40a907
mov dword [esp + 0x1c], eax
mov dword [esp + 0x18], 4
mov ecx, dword [esp + 0x18]
mov eax, dword [ebp + 0x1d8c]
mov edi, dword [sym.imp.MSVCRT.dll_fseek]
add ecx, eax
push 0
push ecx
push ebx
call edi
mov esi, dword [esp + 0x44]
push ebx
push 4
push 1
push esi
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x1c
mov ecx, ebp
push esi
call fcn.00406120
push 0
push eax
push ebx
call edi
push ebx
push 0x28
push 1
push esi
call dword [sym.imp.MSVCRT.dll_fread]
mov eax, dword [ebp + 0x4bb0]
mov edx, dword [esp + 0x38]
mov ecx, 0xa
lea edi, [ebp + 0x1d24]
rep movsd dword es:[edi], dword [esi]
lea edi, [edx + eax + 0x30]
mov eax, dword [esp + 0x2c]
mov ecx, 0xa
lea esi, [ebp + 0x1d24]
rep movsd dword es:[edi], dword [esi]
mov edi, dword [esp + 0x34]
mov ecx, dword [esp + 0x5c]
add esp, 0x1c
inc eax
add edi, 4
add edx, 0x28
cmp eax, ecx
mov dword [esp + 0x10], eax
mov dword [esp + 0x18], edi
mov dword [esp + 0x1c], edx
jl 0x40a870
mov ecx, dword [esp + 0x38]
push ecx
call dword [sym.imp.MSVCRT.dll_free]
push ebx
call dword [sym.imp.MSVCRT.dll_fclose]
or ecx, 0xffffffff
mov edi, str.KHComserver.exe
xor eax, eax
add esp, 8
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x98]
mov ebx, ecx
mov esi, edi
or ecx, 0xffffffff
mov edi, edx
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0x98]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x41a4a4
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0x98]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x41a2a0
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [ebp + 0xb94]
call sub.MFC42u.DLL_CWnd::IsWindowEnabled
mov ebx, dword [sym.imp.MSVCRT.dll__wtoi]
test eax, eax
je 0x40aa3e
mov edi, 0x41a4a4
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x98]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov eax, dword [ebp + 0x1874]
mov ecx, edx
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call ebx
xor ecx, ecx
add esp, 4
mov dword [esp + 0x25], ecx
lea edx, [esp + 0x24]
mov dword [esp + 0x29], ecx
push eax
mov dword [esp + 0x31], ecx
push 0x41a2d4
mov dword [esp + 0x39], ecx
push edx
mov word [esp + 0x41], cx
mov byte [esp + 0x30], 0
mov byte [esp + 0x43], cl
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
lea edi, [esp + 0x24]
lea edx, [esp + 0x98]
jmp 0x40aa93
lea ecx, [ebp + 0xb94]
call sub.MFC42u.DLL_CWnd::IsWindowEnabled
test eax, eax
jne 0x40aab8
cmp byte [ebp + 0x1d25], 0x55
je 0x40aab8
mov edi, 0x41a4a4
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x98]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea edx, [esp + 0x98]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x41a49c
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea esi, [ebp + 0x900]
mov ecx, esi
call sub.MFC42u.DLL_CWnd::IsWindowEnabled
test eax, eax
je 0x40ab47
mov edi, 0x41a4a4
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x98]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov eax, dword [ebp + 0x1878]
mov ecx, edx
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call ebx
xor ecx, ecx
add esp, 4
mov dword [esp + 0x25], ecx
lea edx, [esp + 0x24]
mov dword [esp + 0x29], ecx
push eax
mov dword [esp + 0x31], ecx
push 0x41a2d4
mov dword [esp + 0x39], ecx
push edx
mov word [esp + 0x41], cx
mov byte [esp + 0x30], 0
mov byte [esp + 0x43], cl
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
lea edi, [esp + 0x24]
lea edx, [esp + 0x98]
jmp 0x40ab98
mov ecx, esi
call sub.MFC42u.DLL_CWnd::IsWindowEnabled
test eax, eax
jne 0x40abbd
cmp byte [ebp + 0x1d25], 0x55
je 0x40abbd
mov edi, 0x41a4a4
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x98]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea edx, [esp + 0x98]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x41a49c
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea esi, [ebp + 0x66c]
mov ecx, esi
call sub.MFC42u.DLL_CWnd::IsWindowEnabled
test eax, eax
je 0x40ac4c
mov edi, 0x41a4a4
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x98]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov eax, dword [ebp + 0x187c]
mov ecx, edx
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call ebx
xor ecx, ecx
add esp, 4
mov dword [esp + 0x25], ecx
lea edx, [esp + 0x24]
mov dword [esp + 0x29], ecx
push eax
mov dword [esp + 0x31], ecx
push 0x41a2d4
mov dword [esp + 0x39], ecx
push edx
mov word [esp + 0x41], cx
mov byte [esp + 0x30], 0
mov byte [esp + 0x43], cl
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
lea edi, [esp + 0x24]
lea edx, [esp + 0x98]
jmp 0x40ac9d
mov ecx, esi
call sub.MFC42u.DLL_CWnd::IsWindowEnabled
test eax, eax
jne 0x40acc2
cmp byte [ebp + 0x1d25], 0x55
je 0x40acc2
mov edi, 0x41a4a4
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x98]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0x98]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x41a49c
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
or ecx, 0xffffffff
mov edi, 0x41a4a4
xor eax, eax
mov byte [ebp + 0x1d25], 0x55
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x98]
mov esi, edi
mov ebx, ecx
or ecx, 0xffffffff
mov edi, edx
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0x98]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
or ecx, 0xffffffff
mov edi, 0x41a454
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov ebx, ecx
mov esi, edi
or ecx, 0xffffffff
mov edi, edx
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0x98]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x41a4a4
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0x98]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x41a49c
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0x98]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x41a4a4
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
mov byte [esp + 0x294], al
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
push 0
and ecx, 3
push 0
rep movsb byte es:[edi], byte [esi]
mov ecx, 0x40
lea edi, [esp + 0x29d]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea ecx, [esp + 0x29c]
push 0x104
stosb byte es:[edi], al
mov eax, dword [ebp + 0x4bc8]
push ecx
push 0xffffffffffffffff
push eax
push 0x200
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
lea edi, [esp + 0x294]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x98]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea eax, [esp + 0x54]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x210]
mov ebx, dword [sym.imp.KERNEL32.dll_CreateProcessA]
push ecx
push 0
push 0
push 8
push 0
push 0
lea edx, [esp + 0xb4]
push 0
push edx
push 0
call ebx
test eax, eax
je 0x40b27d
or ecx, 0xffffffff
mov edi, str.Gui.exe
xor eax, eax
lea edx, [esp + 0x98]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov byte [esp + 0x98], 0
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea edx, [esp + 0x98]
and ecx, 3
mov byte [esp + 0x84], al
rep movsb byte es:[edi], byte [esi]
or ecx, 0xffffffff
mov edi, 0x41a4a4
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea edx, [esp + 0x98]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x41a450
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea edx, [esp + 0x98]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x41a4a4
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov dword [esp + 0x85], eax
mov ecx, edx
mov dword [esp + 0x89], eax
and ecx, 3
mov dword [esp + 0x8d], eax
mov dword [esp + 0x91], eax
mov word [esp + 0x95], ax
rep movsb byte es:[edi], byte [esi]
mov byte [esp + 0x97], al
mov eax, dword [esp + 0x80]
lea ecx, [esp + 0x84]
and eax, 0xffff
push eax
push 0x41a2d4
push ecx
call dword [sym.imp.MSVCRT.dll_sprintf]
lea edi, [esp + 0x90]
or ecx, 0xffffffff
xor eax, eax
add esp, 0xc
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x98]
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea edx, [esp + 0x98]
and ecx, 3
push 0
rep movsb byte es:[edi], byte [esi]
mov edi, 0x41a4a0
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push 0x104
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, 0x41
lea edi, [esp + 0x2a0]
rep stosd dword es:[edi], eax
mov eax, dword [ebp + 0x4bc8]
lea ecx, [esp + 0x2a0]
push ecx
push 0xffffffffffffffff
push eax
push 0x200
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
lea edi, [esp + 0x294]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x98]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [esp + 0x64]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x254]
push ecx
push 0
push 0
push 0x10
push 0
push 0
lea edx, [esp + 0xb4]
push 0
push edx
push 0
call ebx
test eax, eax
je 0x40b27d
mov eax, dword [ebp + 0x20]
push eax
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x40b11b
test ebp, ebp
je 0x40b138
mov esi, dword [ebp + 0x20]
test esi, esi
je 0x40b138
push 0xfffffffffffffff0
push esi
call dword [sym.imp.USER32.dll_GetWindowLongW]
mov ebx, eax
push 6
shr ebx, 0x1c
push esi
and bl, 1
call dword [sym.imp.USER32.dll_ShowWindow]
mov ecx, 0xb
xor eax, eax
lea edi, [esp + 0x19c]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x19c]
mov dword [esp + 0x19c], 0x2c
push ecx
push esi
call dword [sym.imp.ExtUI.dll_public:_static_bool___cdecl_CExtNcFrameImpl::stat_GetWindowPlacement_struct_HWND_____struct_tagWINDOWPLACEMENT__]
mov eax, dword [esp + 0x1ac]
mov edi, 6
add esp, 8
cmp eax, edi
jne 0x40b0ed
test bl, bl
jne 0x40b138
mov edx, dword [ebp + 0xfc]
lea ecx, [ebp + 0xfc]
call dword [edx + 0x3c]
test al, al
je 0x40b138
lea eax, [esp + 0x19c]
mov dword [esp + 0x1a4], edi
push eax
push esi
call dword [sym.imp.ExtUI.dll_public:_static_bool___cdecl_CExtNcFrameImpl::stat_SetWindowPlacement_struct_HWND_____struct_tagWINDOWPLACEMENT_const__]
add esp, 8
jmp 0x40b138
call sub.MFC42u.DLL_AfxGetThread
test eax, eax
je 0x40b12d
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0x7c]
jmp 0x40b12f
xor eax, eax
push 6
mov ecx, eax
call sub.MFC42u.DLL_CWnd::ShowWindow
mov eax, dword [esp + 0x64]
push 0xdbba0
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
or ebx, 0xffffffff
cmp eax, ebx
jne 0x40b15b
mov dword [esp + 0x9a8], ebx
jmp 0x40b288
cmp eax, 0x102
jne 0x40b206
mov edx, dword [esp + 0x64]
mov edi, dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
lea ecx, [esp + 0x20]
push ecx
push edx
call edi
test eax, eax
jne 0x40b188
mov dword [esp + 0x9a8], ebx
jmp 0x40b288
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x64]
mov ebx, dword [sym.imp.KERNEL32.dll_TerminateProcess]
push eax
push ecx
call ebx
test eax, eax
je 0x40b27d
mov edx, dword [esp + 0x68]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edx
call esi
mov eax, dword [esp + 0x64]
push eax
call esi
mov edx, dword [esp + 0x54]
lea ecx, [esp + 0x20]
push ecx
push edx
call edi
test eax, eax
je 0x40b27d
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x54]
push eax
push ecx
call ebx
test eax, eax
je 0x40b27d
mov edx, dword [esp + 0x58]
push edx
call esi
mov eax, dword [esp + 0x54]
push eax
call esi
mov ecx, dword [0x41a960]
push 0x1010
push str.KHSimulator_Message
push ecx
mov ecx, ebp
call sub.MFC42u.DLL_CWnd::MessageBoxW
jmp 0x40b27d
mov eax, dword [esp + 0x64]
mov edi, dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
lea edx, [esp + 0x20]
push edx
push eax
call edi
test eax, eax
jne 0x40b225
mov dword [esp + 0x9a8], ebx
jmp 0x40b288
mov ecx, dword [esp + 0x68]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
call esi
mov edx, dword [esp + 0x64]
push edx
call esi
mov ecx, dword [esp + 0x54]
lea eax, [esp + 0x20]
push eax
push ecx
call edi
test eax, eax
jne 0x40b252
mov dword [esp + 0x9a8], ebx
jmp 0x40b288
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x54]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
test eax, eax
jne 0x40b26f
mov dword [esp + 0x9a8], ebx
jmp 0x40b288
mov ecx, dword [esp + 0x58]
push ecx
call esi
mov edx, dword [esp + 0x54]
push edx
call esi
mov dword [esp + 0x9a8], 0xffffffff
lea ecx, [esp + 0x14]
call sub.MFC42u.DLL_CString::CString
mov ecx, dword [esp + 0x9a0]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x99c
ret