Function at 0x401040
Capabilities:
Check if file exists
Create process on windows

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x40312e
push eax
mov dword fs:[0], esp
sub esp, 0x16c
push ebx
push ebp
push esi
push edi
mov esi, ecx
call fcn.004017d0
mov ebx, 1
cmp eax, ebx
jne 0x4010a2
mov ecx, esi
call fcn.004016c0
cmp eax, ebx
jne 0x4010a2
mov ecx, esi
call fcn.004023a0
cmp eax, ebx
jne 0x4010a2
push ecx
mov ecx, esp
mov dword [esp + 0x24], esp
push 0x4050b0
call sub.MFC42.DLL_CString::CString_1
mov ecx, esi
call fcn.004015c0
jmp 0x401369
push 0
call fcn.00402640
mov ebp, dword [sym.imp.USER32.dll_SendMessageA]
mov edi, eax
add esp, 4
test edi, edi
je 0x4010ed
push 0x24
push 0x4050a4
push 0x405060
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
cmp eax, 7
je 0x401369
push 0
push 0
push 0x402
push edi
call ebp
push 0
push 0
push 0x401
push edi
call ebp
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::CString_2
lea eax, [esp + 0x14]
mov ecx, esi
push eax
mov dword [esp + 0x188], 0
call fcn.00401510
push 0x405050
lea ecx, [esp + 0x14]
push eax
push ecx
mov byte [esp + 0x190], bl
call sub.MFC42.DLL_operator_1
push eax
lea ecx, [esp + 0x1c]
mov byte [esp + 0x188], 2
call sub.MFC42.DLL_CString::operator_1
lea ecx, [esp + 0x10]
mov byte [esp + 0x184], bl
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x14]
mov byte [esp + 0x184], 0
call sub.MFC42.DLL_CString::CString
mov edx, dword [esp + 0x18]
mov edi, dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
push edx
call edi
test eax, eax
je 0x40134e
lea ecx, [esp + 0x1c]
call sub.MFC42.DLL_CString::CString_2
lea eax, [esp + 0x14]
mov bl, 3
push eax
mov ecx, esi
mov byte [esp + 0x188], bl
call fcn.00401510
push 0x405040
lea ecx, [esp + 0x14]
push eax
push ecx
mov byte [esp + 0x190], 4
call sub.MFC42.DLL_operator_1
push eax
lea ecx, [esp + 0x20]
mov byte [esp + 0x188], 5
call sub.MFC42.DLL_CString::operator_1
lea ecx, [esp + 0x10]
mov byte [esp + 0x184], 4
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x14]
mov byte [esp + 0x184], bl
call sub.MFC42.DLL_CString::CString
mov edx, dword [esp + 0x1c]
push edx
call edi
test eax, eax
je 0x4012cb
mov ecx, 0x11
xor eax, eax
lea edi, [esp + 0x38]
rep stosd dword es:[edi], eax
mov dword [esp + 0x24], eax
lea ecx, [esp + 0x14]
mov dword [esp + 0x28], eax
mov dword [esp + 0x38], 0x44
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
call sub.MFC42.DLL_CString::CString_2
lea ecx, [esp + 0x20]
mov byte [esp + 0x184], 6
push ecx
mov ecx, esi
call fcn.00401510
push eax
lea ecx, [esp + 0x18]
mov byte [esp + 0x188], 7
call sub.MFC42.DLL_CString::operator_1
lea ecx, [esp + 0x20]
mov byte [esp + 0x184], 6
call sub.MFC42.DLL_CString::CString
mov edx, dword [esp + 0x14]
lea eax, [esp + 0x7c]
push edx
push 0x40502c
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
lea ecx, [esp + 0x24]
lea edx, [esp + 0x38]
lea eax, [esp + 0x7c]
push ecx
push edx
push 0
push 0
push 0x20
push 0
push 0
push 0
push eax
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
mov ecx, dword [esp + 0x24]
push 0xffffffffffffffff
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov edx, dword [esp + 0x24]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edx
call esi
mov eax, dword [esp + 0x28]
push eax
call esi
lea ecx, [esp + 0x14]
mov byte [esp + 0x184], bl
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x1c]
mov byte [esp + 0x184], 0
call sub.MFC42.DLL_CString::CString
jmp 0x401355
push str.Uninstall
push 0
call dword [sym.imp.USER32.dll_FindWindowA]
push 0
push 0
push 0x10
push eax
call ebp
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::CString_2
lea ecx, [esp + 0x34]
mov byte [esp + 0x184], 8
push ecx
mov ecx, esi
call fcn.00401510
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x188], 9
call sub.MFC42.DLL_CString::operator_1
lea ecx, [esp + 0x34]
mov byte [esp + 0x184], 8
call sub.MFC42.DLL_CString::CString
mov edx, dword [esp + 0x10]
mov ecx, esi
push edx
call fcn.00401df0
lea ecx, [esp + 0x10]
mov byte [esp + 0x184], bl
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x1c]
mov byte [esp + 0x184], 0
call sub.MFC42.DLL_CString::CString
mov ecx, esi
call fcn.00402540
lea ecx, [esp + 0x18]
mov dword [esp + 0x184], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov ecx, dword [esp + 0x17c]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x178
ret