Function at 0x402510
Capabilities:
Query environment variable

Disassembly:
push 0xffffffffffffffff
push 0x40d060
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x128
push ebx
push ebp
push esi
push edi
xor edi, edi
lea ecx, [esp + 0x24]
mov dword [esp + 0x140], edi
xor ebp, ebp
call fcn.0040c916
lea ecx, [esp + 0x10]
mov byte [esp + 0x140], 1
call sub.MFC42.DLL_CString::CString_2
lea ecx, [esp + 0x14]
mov byte [esp + 0x140], 2
call sub.MFC42.DLL_CString::CString_2
lea ecx, [esp + 0x1c]
mov byte [esp + 0x140], 3
call sub.MFC42.DLL_CString::CString_2
mov ecx, dword [esp + 0x14c]
mov bl, 4
mov byte [esp + 0x140], bl
call sub.MFC42.DLL_CString::Empty
lea eax, [esp + 0x24]
lea edx, [esp + 0x148]
push eax
push ecx
mov ecx, esp
mov dword [esp + 0x28], esp
push edx
call fcn.0040c9c4
call fcn.00402860
mov eax, dword [esp + 0x34]
add esp, 8
cmp eax, 2
jle 0x402699
lea eax, [esp + 0x18]
push 2
push eax
lea ecx, [esp + 0x2c]
call fcn.00401d00
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x144], 5
call sub.MFC42.DLL_CString::operator_1
lea ecx, [esp + 0x18]
mov byte [esp + 0x140], bl
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x10]
push ecx
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::operator_1
push 0x2c
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::Find_3
cmp eax, edi
jle 0x402639
lea edx, [esp + 0x18]
push eax
push edx
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 + 0x18]
mov byte [esp + 0x140], bl
call sub.MFC42.DLL_CString::CString
push 0x5c
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::Find_3
test eax, eax
jl 0x402675
lea eax, [esp + 0x38]
push 0x100
push eax
push edi
lea ecx, [esp + 0x20]
call sub.MFC42.DLL_CString::GetBuffer
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
test eax, eax
je 0x402675
lea ecx, [esp + 0x38]
push ecx
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::operator
lea edx, [esp + 0x10]
push 1
push edx
push ecx
lea eax, [esp + 0x20]
mov ecx, esp
mov dword [esp + 0x2c], esp
push eax
call fcn.0040c9c4
call fcn.00403350
add esp, 0xc
cmp eax, edi
jne 0x4026fe
lea ecx, [esp + 0x1c]
mov byte [esp + 0x140], 3
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x14]
mov byte [esp + 0x140], 2
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x10]
mov byte [esp + 0x140], 1
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x24]
mov byte [esp + 0x140], 0
call fcn.0040c91c
lea ecx, [esp + 0x148]
mov dword [esp + 0x140], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov eax, 1
jmp 0x402840
lea ecx, [esp + 0x10]
push ecx
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::operator_1
cmp dword [0x427788], edi
jle 0x4027d2
mov esi, dword [sym.imp.MSVCRT.dll__mbsicmp]
lea edx, [esp + 0x18]
push edi
push edx
mov ecx, 0x427780
call fcn.00401d00
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x144], 7
call sub.MFC42.DLL_CString::operator_1
lea ecx, [esp + 0x18]
mov byte [esp + 0x140], bl
call sub.MFC42.DLL_CString::CString
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
push eax
push ecx
call esi
add esp, 8
test eax, eax
je 0x402859
push 0x5c
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::ReverseFind
mov edx, dword [esp + 0x10]
mov ecx, dword [edx - 8]
sub ecx, eax
lea eax, [esp + 0x20]
dec ecx
push ecx
push eax
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::Right
push eax
lea ecx, [esp + 0x20]
mov byte [esp + 0x144], 8
call sub.MFC42.DLL_CString::operator_1
lea ecx, [esp + 0x20]
mov byte [esp + 0x140], bl
call sub.MFC42.DLL_CString::CString
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x1c]
push ecx
push edx
call esi
add esp, 8
test eax, eax
je 0x402859
mov eax, dword [0x427788]
inc edi
cmp edi, eax
jl 0x40271e
mov ecx, dword [esp + 0x14c]
lea eax, [esp + 0x14]
push eax
call sub.MFC42.DLL_CString::operator_1
lea ecx, [esp + 0x1c]
mov byte [esp + 0x140], 3
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x14]
mov byte [esp + 0x140], 2
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x10]
mov byte [esp + 0x140], 1
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x24]
mov byte [esp + 0x140], 0
call fcn.0040c91c
lea ecx, [esp + 0x148]
mov dword [esp + 0x140], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov eax, ebp
mov ecx, dword [esp + 0x138]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x134
ret
mov ebp, 1
jmp 0x4027e3