Function at 0x470d21
Capabilities:
Get common file path
Get session user name
Query environment variable

Disassembly:
push ebp
lea ebp, [esp - 0x1c30]
mov eax, 0x1c30
call fcn.004f6500
push 0xffffffffffffffff
push 0x535eb9
mov eax, dword fs:[0]
push eax
push ecx
push ecx
mov eax, dword [0x590cec]
xor eax, ebp
mov dword [ebp + 0x1c2c], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 0x1c38]
lea ecx, [ebp + 0x10b4]
mov dword [ebp - 0x10], eax
call fcn.004063ed
xor ebx, ebx
lea ecx, [ebp + 0x14ec]
mov dword [ebp - 4], ebx
call fcn.004063ed
lea ecx, [ebp + 0xc7c]
mov byte [ebp - 4], 1
call fcn.004063ed
lea ecx, [ebp + 0x844]
mov byte [ebp - 4], 2
call fcn.004063ed
lea ecx, [ebp + 0x40c]
mov byte [ebp - 4], 3
call fcn.004063ed
push 0x103
lea eax, [ebp + 0x1a25]
push ebx
push eax
mov byte [ebp - 4], 4
mov byte [ebp + 0x1a24], bl
call fcn.004f42d0
add esp, 0xc
mov esi, 0x104
push esi
lea eax, [ebp + 0x1a24]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
lea eax, [ebp + 0x1a24]
push eax
lea ecx, [ebp + 0x40c]
call fcn.00489793
mov edi, str.Config
push edi
push ebx
lea ecx, [ebp + 0x40c]
call fcn.00489e94
push dword [ebp - 0x10]
lea ecx, [ebp + 0x10b4]
call fcn.00489793
lea ecx, [ebp + 0x844]
call fcn.00489fed
push edi
push ebx
lea ecx, [ebp + 0x844]
call fcn.00489e94
mov edi, 0x544444
push edi
lea eax, [ebp + 0x844]
push eax
lea ecx, [ebp + 0x14ec]
call fcn.00489e94
push edi
lea eax, [ebp + 0x40c]
push eax
lea ecx, [ebp + 0xc7c]
call fcn.00489e94
lea eax, [ebp + 0x14ec]
push eax
lea eax, [ebp + 0x10b4]
push eax
call fcn.004f63ab
pop ecx
pop ecx
test eax, eax
je 0x4711a6
lea eax, [ebp + 0xc7c]
push eax
lea eax, [ebp + 0x10b4]
push eax
call fcn.004f63ab
pop ecx
pop ecx
test eax, eax
je 0x4711a6
mov edi, str.SYSTEM
push edi
lea eax, [ebp + 0x844]
push eax
lea ecx, [ebp + 0x14ec]
call fcn.00489e94
push edi
lea eax, [ebp + 0x40c]
push eax
lea ecx, [ebp + 0xc7c]
call fcn.00489e94
lea eax, [ebp + 0x14ec]
push eax
lea eax, [ebp + 0x10b4]
push eax
call fcn.004f63ab
pop ecx
pop ecx
test eax, eax
je 0x471155
lea eax, [ebp + 0xc7c]
push eax
lea eax, [ebp + 0x10b4]
push eax
call fcn.004f63ab
pop ecx
pop ecx
test eax, eax
je 0x471155
mov edi, str.SECURITY
push edi
lea eax, [ebp + 0x844]
push eax
lea ecx, [ebp + 0x14ec]
call fcn.00489e94
push edi
lea eax, [ebp + 0x40c]
push eax
lea ecx, [ebp + 0xc7c]
call fcn.00489e94
lea eax, [ebp + 0x14ec]
push eax
lea eax, [ebp + 0x10b4]
push eax
call fcn.004f63ab
pop ecx
pop ecx
test eax, eax
je 0x471151
lea eax, [ebp + 0xc7c]
push eax
lea eax, [ebp + 0x10b4]
push eax
call fcn.004f63ab
pop ecx
pop ecx
test eax, eax
je 0x471151
mov edi, str.Software
push edi
lea eax, [ebp + 0x844]
push eax
lea ecx, [ebp + 0x14ec]
call fcn.00489e94
push edi
lea eax, [ebp + 0x40c]
push eax
lea ecx, [ebp + 0xc7c]
call fcn.00489e94
lea eax, [ebp + 0x14ec]
push eax
lea eax, [ebp + 0x10b4]
push eax
call fcn.004f63ab
pop ecx
pop ecx
test eax, eax
je 0x47114d
lea eax, [ebp + 0xc7c]
push eax
lea eax, [ebp + 0x10b4]
push eax
call fcn.004f63ab
pop ecx
pop ecx
test eax, eax
je 0x47114d
push 0x103
lea eax, [ebp + 0x1b29]
push ebx
push eax
mov byte [ebp + 0x1b28], bl
call fcn.004f42d0
mov edi, dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
add esp, 0xc
push esi
lea eax, [ebp + 0x1b28]
push eax
push str._USERPROFILE_
call edi
cmp byte [ebp + 0x1b28], bl
jne 0x4710c8
lea ecx, [ebp]
call fcn.0049722d
push reloc.ast.dll_Ordinal_2
lea ecx, [ebp]
mov byte [ebp - 4], 5
call fcn.00497255
test eax, eax
je 0x4710b4
push str.SOFTWAREMicrosoftWindows_NTCurrentVersionProfileList
lea ecx, [ebp]
call fcn.0049765c
test eax, eax
je 0x4710b4
push ebx
push str.ProfilesDirectory
lea ecx, [ebp]
call fcn.00497845
mov dword [ebp - 0x10], eax
cmp eax, ebx
je 0x4710b4
push esi
lea ecx, [ebp + 0x1b28]
push ecx
push eax
call edi
push dword [ebp - 0x10]
call fcn.004b6e29
push esi
lea eax, [ebp + 0x1b28]
push 0x554848
push eax
call fcn.004f55b0
push 0xff
lea eax, [ebp + 0x1925]
push ebx
push eax
mov byte [ebp + 0x1924], bl
call fcn.004f42d0
add esp, 0x1c
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp + 0x1924]
push eax
mov dword [ebp - 0x14], 0x100
call dword [sym.imp.ADVAPI32.dll_GetUserNameA]
push esi
lea eax, [ebp + 0x1924]
push eax
lea eax, [ebp + 0x1b28]
push eax
call fcn.004f55b0
add esp, 0xc
lea ecx, [ebp]
mov byte [ebp - 4], 4
call fcn.00498356
cmp byte [ebp + 0x1b28], bl
je 0x4710fc
push str.ntuser.dat
lea eax, [ebp + 0x1b28]
push eax
lea ecx, [ebp + 0x14ec]
call fcn.00489e94
lea eax, [ebp + 0x14ec]
push eax
lea eax, [ebp + 0x10b4]
push eax
call fcn.004f63ab
pop ecx
pop ecx
test eax, eax
jne 0x4710fc
push 5
jmp 0x471157
lea ecx, [ebp + 0x40c]
mov byte [ebp - 4], 3
call fcn.004064c1
lea ecx, [ebp + 0x844]
mov byte [ebp - 4], 2
call fcn.004064c1
lea ecx, [ebp + 0xc7c]
mov byte [ebp - 4], 1
call fcn.004064c1
lea ecx, [ebp + 0x14ec]
mov byte [ebp - 4], bl
call fcn.004064c1
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 0x10b4]
call fcn.004064c1
xor eax, eax
jmp 0x4711f3
push 4
jmp 0x471157
push 3
jmp 0x471157
push 2
pop esi
lea ecx, [ebp + 0x40c]
mov byte [ebp - 4], 3
call fcn.004064c1
lea ecx, [ebp + 0x844]
mov byte [ebp - 4], 2
call fcn.004064c1
lea ecx, [ebp + 0xc7c]
mov byte [ebp - 4], 1
call fcn.004064c1
lea ecx, [ebp + 0x14ec]
mov byte [ebp - 4], bl
call fcn.004064c1
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 0x10b4]
call fcn.004064c1
mov eax, esi
jmp 0x4711f3
lea ecx, [ebp + 0x40c]
mov byte [ebp - 4], 3
call fcn.004064c1
lea ecx, [ebp + 0x844]
mov byte [ebp - 4], 2
call fcn.004064c1
lea ecx, [ebp + 0xc7c]
mov byte [ebp - 4], 1
call fcn.004064c1
lea ecx, [ebp + 0x14ec]
mov byte [ebp - 4], bl
call fcn.004064c1
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 0x10b4]
call fcn.004064c1
xor eax, eax
inc eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x1c2c]
xor ecx, ebp
call fcn.004f41b5
add ebp, 0x1c30
leave
ret 4