Function at 0x4022a0
Capabilities:
Get common file path

Disassembly:
push 0xffffffffffffffff
push 0x4035bd
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x124
push ebx
push esi
lea ecx, [esp + 0xc]
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 8]
mov dword [esp + 0x134], 0
call sub.MFC42.DLL_CString::CString
push str.SYSTEMCurrentControlSetControlSession_ManagerEnvironment
lea ecx, [esp + 0x1c]
mov byte [esp + 0x138], 1
call sub.MFC42.DLL_CString::CString_3
mov edx, dword [esp + 0x18]
lea eax, [esp + 0x1c]
lea ecx, [esp + 0xc]
push eax
push ecx
push str.TEMP
push edx
push reloc.OLEAUT32.dll_SysReAllocString
mov byte [esp + 0x148], 2
call fcn.004026a0
mov edx, dword [esp + 0x2c]
lea eax, [esp + 0x38]
lea ecx, [esp + 0x1c]
push eax
push ecx
push 0x405190
push edx
push reloc.OLEAUT32.dll_SysReAllocString
call fcn.004026a0
add esp, 0x28
lea eax, [esp + 0x28]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
lea ecx, [esp + 0x14]
push 0xc
push ecx
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::Left
mov eax, dword [eax]
mov esi, dword [sym.imp.MSVCRT.dll__stricmp]
push eax
push str._SystemRoot_
call esi
add esp, 8
lea ecx, [esp + 0x14]
test eax, eax
sete bl
call fcn.00402e36
test bl, bl
je 0x4023e1
mov edx, dword [esp + 0xc]
lea ecx, [esp + 0xc]
mov eax, dword [edx - 8]
add eax, 0xfffffff4
push eax
lea eax, [esp + 0x14]
push eax
call sub.MFC42.DLL_CString::Right
lea ecx, [esp + 0x28]
push eax
lea edx, [esp + 0x18]
mov bl, 3
push ecx
push edx
mov byte [esp + 0x140], bl
call sub.MFC42.DLL_operator_1
push eax
lea ecx, [esp + 0x10]
mov byte [esp + 0x138], 4
call sub.MFC42.DLL_CString::operator_1
lea ecx, [esp + 0x14]
mov byte [esp + 0x134], bl
call fcn.00402e36
lea ecx, [esp + 0x10]
mov byte [esp + 0x134], 2
call fcn.00402e36
push ecx
lea eax, [esp + 0x10]
mov ecx, esp
mov dword [esp + 0x14], esp
push eax
call sub.MFC42.DLL_CString::CString_2
call fcn.00402520
add esp, 4
lea ecx, [esp + 0x10]
push 0xc
push ecx
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::Left
mov eax, dword [eax]
push eax
push str._SystemRoot_
call esi
add esp, 8
test eax, eax
je 0x402432
mov edx, dword [esp + 0xc]
mov eax, dword [esp + 8]
push edx
push eax
call esi
add esp, 8
test eax, eax
je 0x402432
mov bl, 1
jmp 0x402434
xor bl, bl
lea ecx, [esp + 0x10]
call fcn.00402e36
test bl, bl
je 0x4024a6
mov ecx, dword [esp + 8]
lea edx, [esp + 0x14]
mov eax, dword [ecx - 8]
lea ecx, [esp + 8]
add eax, 0xfffffff4
push eax
push edx
call sub.MFC42.DLL_CString::Right
push eax
lea eax, [esp + 0x2c]
lea ecx, [esp + 0x14]
mov bl, 5
push eax
push ecx
mov byte [esp + 0x140], bl
call sub.MFC42.DLL_operator_1
push eax
lea ecx, [esp + 0xc]
mov byte [esp + 0x138], 6
call sub.MFC42.DLL_CString::operator_1
lea ecx, [esp + 0x10]
mov byte [esp + 0x134], bl
call fcn.00402e36
lea ecx, [esp + 0x14]
mov byte [esp + 0x134], 2
call fcn.00402e36
push ecx
lea edx, [esp + 0xc]
mov ecx, esp
mov dword [esp + 0x24], esp
push edx
call sub.MFC42.DLL_CString::CString_2
call fcn.00402520
add esp, 4
lea ecx, [esp + 0x18]
mov byte [esp + 0x134], 1
call fcn.00402e36
lea ecx, [esp + 8]
mov byte [esp + 0x134], 0
call fcn.00402e36
lea ecx, [esp + 0xc]
mov dword [esp + 0x134], 0xffffffff
call fcn.00402e36
mov ecx, dword [esp + 0x12c]
pop esi
mov eax, 1
mov dword fs:[0], ecx
pop ebx
add esp, 0x130
ret