Function at 0x40fcb0
Capabilities:
Get common file path
Get session user name
Query or enumerate registry value

Disassembly:
push 0xffffffffffffffff
push 0x42b664
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x530
push ebx
push ebp
push esi
lea eax, [esp + 0x3c]
push edi
mov esi, ecx
push eax
mov dword [esp + 0x44], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov cl, byte [0x4399d0]
xor eax, eax
mov byte [esp + 0xd4], cl
mov ecx, 0x40
lea edi, [esp + 0xd5]
xor ebx, ebx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [esi + 0x5c]
cmp eax, ebx
je 0x40fe26
lea edx, [esp + 0xd4]
push edx
push ebx
push ebx
push 5
push ebx
call eax
test eax, eax
jne 0x40fd3d
mov ecx, dword [esp + 0x550]
lea eax, [esp + 0xd4]
push eax
call fcn.00420e8a
jmp 0x4101be
cmp dword [esp + 0x50], 1
jne 0x40fd7e
cmp dword [esp + 0x48], ebx
jbe 0x40fd7e
lea ecx, [esp + 0xd4]
push ecx
push ebx
push ebx
push 0x8005
push ebx
call dword [esi + 0x5c]
test eax, eax
jne 0x40fe26
mov ecx, dword [esp + 0x550]
lea edx, [esp + 0xd4]
push edx
call fcn.00420e8a
jmp 0x4101be
push str.My_Documents
lea ecx, [esp + 0x18]
call fcn.00420dbb
lea eax, [esp + 0x14]
push 1
push eax
push ecx
mov ecx, esp
mov dword [esp + 0x44], esp
push ecx
mov ecx, esi
mov dword [esp + 0x558], ebx
call fcn.004114d0
lea edx, [esp + 0x34]
push edx
call fcn.0040cb30
add esp, 8
push eax
lea eax, [esp + 0x28]
push eax
mov byte [esp + 0x558], 1
call fcn.0040d540
add esp, 0x10
mov esi, dword [esp + 0x550]
push eax
mov ecx, esi
mov byte [esp + 0x54c], 2
call fcn.00420e3a
lea ecx, [esp + 0x1c]
mov byte [esp + 0x548], 1
call fcn.00420d4d
lea ecx, [esp + 0x28]
mov byte [esp + 0x548], bl
call fcn.00420d4d
lea ecx, [esp + 0x14]
mov dword [esp + 0x548], 0xffffffff
call fcn.00420d4d
push esi
call fcn.0040d460
add esp, 4
jmp 0x4101be
lea edi, [esi + 0x54]
push edi
mov dword [esp + 0x3c], edi
call dword [sym.imp.SHELL32.dll_SHGetMalloc]
test eax, eax
jne 0x4101be
lea ecx, [esp + 0x30]
mov dword [esp + 0x30], ebx
push ecx
push 5
push ebx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
cmp eax, ebx
jne 0x40fe86
mov eax, dword [esp + 0x30]
lea edx, [esp + 0xd4]
push edx
push eax
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListA]
test eax, eax
je 0x4101a9
lea ecx, [esp + 0xd4]
push ecx
mov ecx, dword [esp + 0x554]
call fcn.00420e8a
jmp 0x4101a9
mov edi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
lea edx, [esp + 0x10]
push edx
push 0x20019
push ebx
push str.SoftwareMicrosoftWindowsCurrentVersionExplorerUser_Shell_Folders
push 0x80000001
mov dword [esp + 0x24], ebx
xor ebp, ebp
mov dword [esp + 0x38], 0x104
mov dword [esp + 0x48], ebx
call edi
test eax, eax
jne 0x41019a
lea eax, [esp + 0x24]
lea ecx, [esp + 0x330]
push eax
mov eax, dword [esp + 0x14]
lea edx, [esp + 0x38]
push ecx
push edx
push ebx
push str.Personal
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x40fefd
lea ecx, [esp + 0x330]
push ecx
mov ecx, dword [esp + 0x554]
call fcn.00420e8a
jmp 0x41019a
cmp dword [esp + 0x50], 2
je 0x40ff62
lea edx, [esp + 0x10]
push edx
push 0x20019
push ebx
push str.NetworkLogon
push 0x80000002
call edi
test eax, eax
jne 0x4100fd
lea eax, [esp + 0x24]
lea ecx, [esp + 0x438]
push eax
mov eax, dword [esp + 0x14]
lea edx, [esp + 0x38]
push ecx
push edx
push ebx
push str.UserProfiles
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x40ff4f
mov ebp, 1
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp ebp, ebx
je 0x4100fd
lea edx, [esp + 0x3c]
lea eax, [esp + 0x1d8]
push edx
push eax
mov dword [esp + 0x44], 0x50
mov dword [esp + 0x2c], 0x104
call dword [sym.imp.ADVAPI32.dll_GetUserNameA]
test eax, eax
je 0x41019a
lea ecx, [esp + 0x1d8]
push ecx
lea ecx, [esp + 0x20]
call fcn.00420dbb
push str.SoftwareMicrosoftWindowsCurrentVersionProfileList
lea ecx, [esp + 0x24]
mov dword [esp + 0x54c], 3
call fcn.00420dbb
lea edx, [esp + 0x1c]
push 1
lea eax, [esp + 0x24]
push edx
lea ecx, [esp + 0x30]
push eax
push ecx
mov byte [esp + 0x558], 4
call fcn.0040d540
add esp, 0x10
lea ecx, [esp + 0x20]
mov byte [esp + 0x548], 6
call fcn.00420d4d
mov eax, dword [esp + 0x28]
lea edx, [esp + 0x10]
push edx
push 0x20019
push ebx
push eax
push 0x80000002
call edi
test eax, eax
jne 0x4100d8
lea ecx, [esp + 0x24]
lea edx, [esp + 0x228]
push ecx
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0x38]
push edx
push eax
push ebx
push str.ProfileImagePath
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4100cd
push str.Personal
lea ecx, [esp + 0x1c]
call fcn.00420dbb
mov edx, dword [0x4383c0]
lea eax, [esp + 0x228]
push eax
lea ecx, [esp + 0x18]
mov byte [esp + 0x54c], 7
mov dword [esp + 0x18], edx
call fcn.00420e8a
lea ecx, [esp + 0x18]
push 1
lea edx, [esp + 0x18]
push ecx
lea eax, [esp + 0x34]
mov bl, 8
push edx
push eax
mov byte [esp + 0x558], bl
call fcn.0040d540
add esp, 0x10
mov ecx, dword [esp + 0x550]
push eax
mov byte [esp + 0x54c], 9
call fcn.00420e3a
lea ecx, [esp + 0x2c]
mov byte [esp + 0x548], bl
call fcn.00420d4d
lea ecx, [esp + 0x14]
mov byte [esp + 0x548], 7
call fcn.00420d4d
lea ecx, [esp + 0x18]
mov byte [esp + 0x548], 6
call fcn.00420d4d
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [esp + 0x28]
mov byte [esp + 0x548], 3
call fcn.00420d4d
mov dword [esp + 0x548], 0xffffffff
lea ecx, [esp + 0x1c]
jmp 0x410195
push str.My_Documents
lea ecx, [esp + 0x1c]
call fcn.00420dbb
lea edx, [esp + 0x18]
push 1
push edx
push ecx
mov eax, esp
mov dword [esp + 0x48], esp
push eax
mov ecx, esi
mov dword [esp + 0x558], 0xa
call fcn.004114d0
lea ecx, [esp + 0x2c]
push ecx
call fcn.0040cb30
add esp, 8
lea edx, [esp + 0x34]
mov bl, 0xb
push eax
push edx
mov byte [esp + 0x558], bl
call fcn.0040d540
add esp, 0x10
mov ecx, dword [esp + 0x550]
push eax
mov byte [esp + 0x54c], 0xc
call fcn.00420e3a
lea ecx, [esp + 0x2c]
mov byte [esp + 0x548], bl
call fcn.00420d4d
lea ecx, [esp + 0x20]
mov byte [esp + 0x548], 0xa
call fcn.00420d4d
mov dword [esp + 0x548], 0xffffffff
lea ecx, [esp + 0x18]
call fcn.00420d4d
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edi, dword [esp + 0x38]
mov eax, dword [edi]
mov edx, dword [esp + 0x30]
push edx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x14]
mov eax, dword [edi]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
mov ecx, dword [esp + 0x540]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x53c
ret 4