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

Disassembly:
push 0xffffffffffffffff
push 0x432424
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 [0x444d08]
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 0x406cb6
lea edx, [esp + 0xd4]
push edx
push ebx
push ebx
push 5
push ebx
call eax
test eax, eax
jne 0x406bcd
mov ecx, dword [esp + 0x550]
lea eax, [esp + 0xd4]
push eax
call fcn.004274a1
jmp 0x40704e
cmp dword [esp + 0x50], 1
jne 0x406c0e
cmp dword [esp + 0x48], ebx
jbe 0x406c0e
lea ecx, [esp + 0xd4]
push ecx
push ebx
push ebx
push 0x8005
push ebx
call dword [esi + 0x5c]
test eax, eax
jne 0x406cb6
mov ecx, dword [esp + 0x550]
lea edx, [esp + 0xd4]
push edx
call fcn.004274a1
jmp 0x40704e
push str.My_Documents
lea ecx, [esp + 0x18]
call fcn.00427386
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.00408380
lea edx, [esp + 0x34]
push edx
call fcn.00404820
add esp, 8
push eax
lea eax, [esp + 0x28]
push eax
mov byte [esp + 0x558], 1
call fcn.004050b0
add esp, 0x10
mov esi, dword [esp + 0x550]
push eax
mov ecx, esi
mov byte [esp + 0x54c], 2
call fcn.00427451
lea ecx, [esp + 0x1c]
mov byte [esp + 0x548], 1
call fcn.00427318
lea ecx, [esp + 0x28]
mov byte [esp + 0x548], bl
call fcn.00427318
lea ecx, [esp + 0x14]
mov dword [esp + 0x548], 0xffffffff
call fcn.00427318
push esi
call fcn.00404fd0
add esp, 4
jmp 0x40704e
lea edi, [esi + 0x54]
push edi
mov dword [esp + 0x3c], edi
call dword [sym.imp.SHELL32.dll_SHGetMalloc]
test eax, eax
jne 0x40704e
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 0x406d16
mov eax, dword [esp + 0x30]
lea edx, [esp + 0xd4]
push edx
push eax
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListA]
test eax, eax
je 0x407039
lea ecx, [esp + 0xd4]
push ecx
mov ecx, dword [esp + 0x554]
call fcn.004274a1
jmp 0x407039
mov edi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
lea edx, [esp + 0x10]
push edx
push 0x20019
push ebx
push str.SoftwareMicrosoftWindowsCurrentVersionExplorerUser_Shell_Folders
push reloc.WSOCK32.dll_accept
mov dword [esp + 0x24], ebx
xor ebp, ebp
mov dword [esp + 0x38], 0x104
mov dword [esp + 0x48], ebx
call edi
test eax, eax
jne 0x40702a
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 0x406d8d
lea ecx, [esp + 0x330]
push ecx
mov ecx, dword [esp + 0x554]
call fcn.004274a1
jmp 0x40702a
cmp dword [esp + 0x50], 2
je 0x406df2
lea edx, [esp + 0x10]
push edx
push 0x20019
push ebx
push str.NetworkLogon
push reloc.OLEAUT32.dll_SysReAllocString
call edi
test eax, eax
jne 0x406f8d
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 0x406ddf
mov ebp, 1
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp ebp, ebx
je 0x406f8d
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 0x40702a
lea ecx, [esp + 0x1d8]
push ecx
lea ecx, [esp + 0x20]
call fcn.00427386
push str.SoftwareMicrosoftWindowsCurrentVersionProfileList
lea ecx, [esp + 0x24]
mov dword [esp + 0x54c], 3
call fcn.00427386
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.004050b0
add esp, 0x10
lea ecx, [esp + 0x20]
mov byte [esp + 0x548], 6
call fcn.00427318
mov eax, dword [esp + 0x28]
lea edx, [esp + 0x10]
push edx
push 0x20019
push ebx
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call edi
test eax, eax
jne 0x406f68
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 0x406f5d
push str.Personal
lea ecx, [esp + 0x1c]
call fcn.00427386
mov edx, dword [0x440a90]
lea eax, [esp + 0x228]
push eax
lea ecx, [esp + 0x18]
mov byte [esp + 0x54c], 7
mov dword [esp + 0x18], edx
call fcn.004274a1
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.004050b0
add esp, 0x10
mov ecx, dword [esp + 0x550]
push eax
mov byte [esp + 0x54c], 9
call fcn.00427451
lea ecx, [esp + 0x2c]
mov byte [esp + 0x548], bl
call fcn.00427318
lea ecx, [esp + 0x14]
mov byte [esp + 0x548], 7
call fcn.00427318
lea ecx, [esp + 0x18]
mov byte [esp + 0x548], 6
call fcn.00427318
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.00427318
mov dword [esp + 0x548], 0xffffffff
lea ecx, [esp + 0x1c]
jmp 0x407025
push str.My_Documents
lea ecx, [esp + 0x1c]
call fcn.00427386
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.00408380
lea ecx, [esp + 0x2c]
push ecx
call fcn.00404820
add esp, 8
lea edx, [esp + 0x34]
mov bl, 0xb
push eax
push edx
mov byte [esp + 0x558], bl
call fcn.004050b0
add esp, 0x10
mov ecx, dword [esp + 0x550]
push eax
mov byte [esp + 0x54c], 0xc
call fcn.00427451
lea ecx, [esp + 0x2c]
mov byte [esp + 0x548], bl
call fcn.00427318
lea ecx, [esp + 0x20]
mov byte [esp + 0x548], 0xa
call fcn.00427318
mov dword [esp + 0x548], 0xffffffff
lea ecx, [esp + 0x18]
call fcn.00427318
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