Function at 0x40a6f0
Capabilities:
Create process on windows
Query environment variable

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x453eb8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, 0x106c
call fcn.00415b80
mov eax, dword [0x464738]
push ebx
xor eax, ebp
push esi
mov esi, dword [ebp + 8]
mov dword [esp + 0x1070], eax
mov eax, dword [ebp + 0xc]
push edi
xor edi, edi
cmp eax, edi
mov ebx, ecx
je 0x40a78b
push 5
push edi
push edi
push esi
push str.open
push edi
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp esi, 0x20
push eax
jle 0x40a771
push esi
push str.Shell_open_file_Result:_d_OK:_ld
push 0x45651c
call fcn.00405160
add esp, 0x10
mov eax, 1
jmp 0x40a945
push edi
push str.Shell_open_file_Result:_d_Err:_ld
push 0x45651c
call fcn.00405160
add esp, 0x10
mov eax, edi
jmp 0x40a945
mov word [esp + 0x70], di
xor eax, eax
mov ecx, 0x1ff
lea edi, [esp + 0x72]
rep stosd dword es:[edi], eax
push 0x2e
push esi
stosw word es:[edi], ax
call dword [sym.imp.MSVCR71.dll_wcsrchr]
add esp, 8
test eax, eax
je 0x40a935
push 0x800
lea ecx, [esp + 0x74]
push ecx
push eax
mov ecx, ebx
call fcn.004091c0
test eax, eax
je 0x40a90a
lea edx, [esp + 0x70]
push edx
lea ecx, [esp + 0x14]
call dword [sym.imp.MFC71U.DLL_ATL::CStringT::CStringT_1]
lea ecx, [esp + 0x14]
mov dword [esp + 0x1084], 0
call dword [sym.imp.MFC71U.DLL_ATL::CStringT::CStringT_3]
push esi
lea ecx, [esp + 0x18]
mov byte [esp + 0x1088], 1
call dword [0x455230]
lea ecx, [esp + 0x14]
call dword [sym.imp.MFC71U.DLL_ATL::CSimpleStringT::operator_class_ATL::CSimpleStringT_]
push eax
push 0x456d48
lea ecx, [esp + 0x18]
call dword [sym.imp.MFC71U.DLL_ATL::CStringT::Replace]
test eax, eax
jne 0x40a840
push 0x4560e4
lea ecx, [esp + 0x14]
call dword [0x455230]
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x14]
call dword [0x455340]
mov ecx, dword [esp + 0x10]
push ecx
push str.CreateProcess_cmd_before_Expand:_s
push 0x45651c
call fcn.00405160
add esp, 0xc
push 0x800
lea edx, [esp + 0x874]
push edx
lea ecx, [esp + 0x18]
call dword [sym.imp.MFC71U.DLL_ATL::CSimpleStringT::GetBuffer]
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
lea eax, [esp + 0x870]
push eax
push str.CreateProcess_cmd_after_Expand:_s
push 0x45651c
call fcn.00405160
add esp, 0xc
xor eax, eax
mov ecx, 0x11
lea edi, [esp + 0x28]
rep stosd dword es:[edi], eax
xor ecx, ecx
mov dword [esp + 0x18], ecx
lea edx, [esp + 0x18]
push edx
mov dword [esp + 0x20], ecx
mov dword [esp + 0x24], ecx
lea eax, [esp + 0x2c]
push eax
push ecx
push ecx
push ecx
push ecx
push ecx
push ecx
mov dword [esp + 0x44], ecx
lea ecx, [esp + 0x890]
push ecx
push 0
mov dword [esp + 0x50], 0x44
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push str.CreateProcess_for_app_Result:_d_Err:_ld
push 0x45651c
call fcn.00405160
add esp, 0x10
lea ecx, [esp + 0x14]
call dword [sym.imp.MFC71U.DLL_ATL::CSimpleStringT::CSimpleStringT]
lea ecx, [esp + 0x10]
call dword [sym.imp.MFC71U.DLL_ATL::CSimpleStringT::CSimpleStringT]
mov eax, esi
jmp 0x40a945
push str.G_STR26
mov ecx, 0x464880
call fcn.00402060
mov ecx, eax
call dword [sym.imp.MFC71U.DLL_ATL::CSimpleStringT::GetBuffer]
mov edx, dword [ebx + 0x20]
push eax
push 0
push 0x1402
push edx
call dword [sym.imp.USER32.dll_SendMessageW]
jmp 0x40a943
push 0
push 0
push str.invalid_file_name_no_exp_name_
call sub.MFC71U.DLL_AfxMessageBox
xor eax, eax
mov ecx, dword [esp + 0x107c]
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x1074]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00415ae8
mov esp, ebp
pop ebp
ret 8