Function at 0x402860
Capabilities:
Query environment variable

Disassembly:
push 0xffffffffffffffff
push 0x40d0fc
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x128
push ebx
push ebp
push esi
push edi
lea ecx, [esp + 0x10]
mov dword [esp + 0x140], 0
call sub.MFC42.DLL_CString::CString_2
lea ecx, [esp + 0x20]
mov byte [esp + 0x140], 1
call sub.MFC42.DLL_CString::CString_2
lea ecx, [esp + 0x1c]
mov byte [esp + 0x140], 2
call sub.MFC42.DLL_CString::CString_2
lea ecx, [esp + 0x14]
mov byte [esp + 0x140], 3
call sub.MFC42.DLL_CString::CString_2
lea ecx, [esp + 0x18]
mov byte [esp + 0x140], 4
call sub.MFC42.DLL_CString::CString_2
mov edi, dword [esp + 0x14c]
or ebp, 0xffffffff
mov bl, 5
push ebp
push 0
mov ecx, edi
mov byte [esp + 0x148], bl
call sub.MFC42.DLL_CStringArray::SetSize
mov eax, dword [esp + 0x148]
mov ecx, dword [eax - 8]
test ecx, ecx
je 0x402dd9
mov eax, dword [edi + 8]
lea ecx, [esp + 0x148]
push ecx
push eax
mov ecx, edi
call sub.MFC42.DLL_CStringArray::SetAtGrow_1
lea edx, [esp + 0x148]
lea ecx, [esp + 0x10]
push edx
call sub.MFC42.DLL_CString::operator_1
push 0x411114
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::TrimLeft_1
push 0x411114
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::TrimRight_1
push 0x4113a0
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::TrimLeft_1
push 0x4113a0
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::TrimRight_1
push str.___
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::TrimLeft_1
push 0x20
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::Find_3
mov esi, eax
test esi, esi
jg 0x4029e7
lea eax, [esp + 0x20]
push 0
push eax
push ecx
lea edx, [esp + 0x1c]
mov ecx, esp
mov dword [esp + 0x34], esp
push edx
call fcn.0040c9c4
call fcn.00403350
add esp, 0xc
test eax, eax
jne 0x4029da
mov eax, dword [esp + 0x148]
lea ecx, [esp + 0x1c]
push eax
push 0x41137c
push ecx
call sub.MFC42.DLL_CString::Format
add esp, 0xc
lea ecx, [esp + 0x1c]
push 1
push 0
call sub.MFC42.DLL_CString::GetBuffer
push eax
call fcn.00401240
add esp, 8
jmp 0x402dd9
mov eax, dword [edi + 8]
lea edx, [esp + 0x20]
push edx
jmp 0x402dd1
lea eax, [esp + 0x24]
push esi
push eax
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::Left
push eax
lea ecx, [esp + 0x18]
mov byte [esp + 0x144], 6
call sub.MFC42.DLL_CString::operator_1
lea ecx, [esp + 0x24]
mov byte [esp + 0x140], bl
call sub.MFC42.DLL_CString::CString
push 0x4113a0
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::TrimLeft_1
push 0x4113a0
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::TrimRight_1
push 0x5c
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::Find_3
test eax, eax
jl 0x402b69
lea ecx, [esp + 0x38]
push 0x100
push ecx
push 0
lea ecx, [esp + 0x20]
call sub.MFC42.DLL_CString::GetBuffer
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
test eax, eax
je 0x402a75
lea edx, [esp + 0x38]
lea ecx, [esp + 0x14]
push edx
call sub.MFC42.DLL_CString::operator
mov ebp, dword [sym.imp.MSVCRT.dll__access]
xor esi, esi
mov eax, dword [esp + 0x14]
push 0
push eax
call ebp
add esp, 8
cmp eax, 0xffffffff
jne 0x402aab
push 0x2e
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::ReverseFind
test eax, eax
jg 0x402aab
push str..exe
lea ecx, [esp + 0x18]
call fcn.0040c9dc
mov ecx, dword [esp + 0x14]
push 0
push ecx
call ebp
add esp, 8
cmp eax, 0xffffffff
jne 0x402b66
inc esi
lea ecx, [esp + 0x10]
push esi
push 0x20
call sub.MFC42.DLL_CString::Find_1
mov esi, eax
test esi, esi
jg 0x402ae3
lea edx, [esp + 0x10]
lea ecx, [esp + 0x14]
push edx
call sub.MFC42.DLL_CString::operator_1
jmp 0x402b14
lea eax, [esp + 0x24]
push esi
push eax
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::Left
push eax
lea ecx, [esp + 0x18]
mov byte [esp + 0x144], 7
call sub.MFC42.DLL_CString::operator_1
lea ecx, [esp + 0x24]
mov byte [esp + 0x140], bl
call sub.MFC42.DLL_CString::CString
push 0x4113a0
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::TrimLeft_1
push 0x4113a0
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::TrimRight_1
lea ecx, [esp + 0x38]
push 0x100
push ecx
push 0
lea ecx, [esp + 0x20]
call sub.MFC42.DLL_CString::GetBuffer
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
test eax, eax
je 0x402b5e
lea edx, [esp + 0x38]
lea ecx, [esp + 0x14]
push edx
call sub.MFC42.DLL_CString::operator
test esi, esi
jge 0x402a7d
or ebp, 0xffffffff
push 0x4113a0
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::TrimLeft_1
push 0x4113a0
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::TrimRight_1
mov eax, dword [edi + 8]
lea ecx, [esp + 0x14]
push ecx
push eax
mov ecx, edi
call sub.MFC42.DLL_CStringArray::SetAtGrow_1
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x10]
mov eax, dword [edx - 8]
sub eax, esi
dec eax
push eax
lea eax, [esp + 0x28]
push eax
call sub.MFC42.DLL_CString::Right
push eax
lea ecx, [esp + 0x1c]
mov byte [esp + 0x144], 8
call sub.MFC42.DLL_CString::operator_1
lea ecx, [esp + 0x24]
mov byte [esp + 0x140], bl
call sub.MFC42.DLL_CString::CString
push 0x411114
lea ecx, [esp + 0x1c]
call sub.MFC42.DLL_CString::TrimLeft_1
push 0x411114
lea ecx, [esp + 0x1c]
call sub.MFC42.DLL_CString::TrimRight_1
mov ecx, dword [esp + 0x18]
mov eax, dword [ecx - 8]
test eax, eax
je 0x402dd9
lea edx, [esp + 0x18]
lea ecx, [esp + 0x10]
push edx
call sub.MFC42.DLL_CString::operator_1
push 0x411114
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::TrimLeft_1
push 0x411114
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::TrimRight_1
mov eax, dword [esp + 0x10]
mov ecx, dword [eax - 8]
test ecx, ecx
je 0x402dd9
push 0x20
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::Find_3
mov esi, eax
test esi, esi
jle 0x402dc9
lea ecx, [esp + 0x24]
push esi
push ecx
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::Left
push eax
lea ecx, [esp + 0x1c]
mov byte [esp + 0x144], 9
call sub.MFC42.DLL_CString::operator_1
lea ecx, [esp + 0x24]
mov byte [esp + 0x140], bl
call sub.MFC42.DLL_CString::CString
push ecx
mov ecx, esp
mov dword [esp + 0x34], esp
push 0x4113a0
call sub.MFC42.DLL_CString::CString_1
push ecx
lea edx, [esp + 0x20]
mov ecx, esp
mov dword [esp + 0x3c], esp
push edx
mov byte [esp + 0x14c], 0xa
call fcn.0040c9c4
mov byte [esp + 0x148], bl
call fcn.00402e60
add esp, 8
and eax, 0x80000001
jns 0x402cbf
dec eax
or eax, 0xfffffffe
inc eax
je 0x402d0b
push esi
push 0x4113a0
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::Find_2
mov esi, eax
test esi, esi
jle 0x402dd9
lea eax, [esp + 0x2c]
push esi
push eax
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::Left
push eax
lea ecx, [esp + 0x1c]
mov byte [esp + 0x144], 0xb
call sub.MFC42.DLL_CString::operator_1
lea ecx, [esp + 0x2c]
mov byte [esp + 0x140], bl
call sub.MFC42.DLL_CString::CString
push 0x411114
lea ecx, [esp + 0x1c]
call sub.MFC42.DLL_CString::TrimLeft_1
push 0x411114
lea ecx, [esp + 0x1c]
call sub.MFC42.DLL_CString::TrimRight_1
push 0x4113a0
lea ecx, [esp + 0x1c]
call sub.MFC42.DLL_CString::TrimLeft_1
push 0x4113a0
lea ecx, [esp + 0x1c]
call sub.MFC42.DLL_CString::TrimRight_1
mov eax, dword [edi + 8]
lea ecx, [esp + 0x18]
push ecx
push eax
mov ecx, edi
call sub.MFC42.DLL_CStringArray::SetAtGrow_1
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x10]
mov eax, dword [edx - 8]
sub eax, esi
dec eax
push eax
lea eax, [esp + 0x2c]
push eax
call sub.MFC42.DLL_CString::Right
push eax
lea ecx, [esp + 0x1c]
mov byte [esp + 0x144], 0xc
call sub.MFC42.DLL_CString::operator_1
lea ecx, [esp + 0x28]
mov byte [esp + 0x140], bl
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x18]
push ecx
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::operator_1
push 0x411114
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::TrimLeft_1
push 0x411114
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::TrimRight_1
mov edx, dword [esp + 0x10]
mov eax, dword [edx - 8]
test eax, eax
jne 0x402c34
jmp 0x402dd9
mov eax, dword [edi + 8]
lea ecx, [esp + 0x10]
push ecx
push eax
mov ecx, edi
call sub.MFC42.DLL_CStringArray::SetAtGrow_1
lea ecx, [esp + 0x18]
mov byte [esp + 0x140], 4
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x14]
mov byte [esp + 0x140], 3
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x1c]
mov byte [esp + 0x140], 2
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x20]
mov byte [esp + 0x140], 1
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x10]
mov byte [esp + 0x140], 0
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x148]
mov dword [esp + 0x140], ebp
call sub.MFC42.DLL_CString::CString
mov ecx, dword [esp + 0x138]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x134
ret