Function at 0x4160e8
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0x22c
push ebx
push ebp
push esi
push edi
mov edi, ecx
lea ecx, [esp + 0x14]
push edi
call fcn.00407ea3
xor ebp, ebp
lea ecx, [esp + 0x14]
mov ebx, str.CSIDL_
push ebp
mov edx, ebx
call fcn.00408123
mov esi, eax
cmp esi, 0xffffffff
je 0x416319
push ebx
call fcn.0041c13e
pop ecx
add eax, esi
lea edx, [esp + 0x10]
push eax
lea ecx, [esp + 0x18]
call fcn.00408064
mov ebx, 0x43b670
lea ecx, [esp + 0x10]
push ebp
mov edx, ebx
call fcn.00408123
push eax
lea edx, [esp + 0x1c]
lea ecx, [esp + 0x14]
call fcn.0040810f
lea ecx, [esp + 0x10]
mov esi, eax
call fcn.00407ec1
mov ecx, dword [esi]
mov dword [esp + 0x10], ecx
lea ecx, [esp + 0x18]
mov dword [esi], ebp
call fcn.00407eb8
push ebx
call fcn.0041c13e
mov esi, eax
mov dword [esp], str.CSIDL_
call fcn.0041c13e
pop ecx
lea ecx, [esp + 0x10]
add esi, eax
call fcn.00408041
add eax, esi
lea edx, [esp + 0x18]
push eax
lea ecx, [esp + 0x18]
call fcn.00408064
lea ecx, [esp + 0x14]
mov esi, eax
call fcn.00407ec1
mov ecx, dword [esi]
mov dword [esp + 0x14], ecx
lea ecx, [esp + 0x18]
mov dword [esi], ebp
call fcn.00407eb8
lea eax, [esp + 0x28]
mov dword [esp + 0x28], ebp
push eax
push ecx
xor edx, edx
mov dword [esp + 0x2c], ebp
lea ecx, [esp + 0x18]
mov dword [esp + 0x28], ebp
mov dword [esp + 0x24], ebp
call fcn.004082f5
lea eax, [esp + 0x24]
xor edx, edx
push eax
push ecx
inc edx
lea ecx, [esp + 0x18]
call fcn.004082f5
lea eax, [esp + 0x20]
push eax
push ecx
push 2
pop edx
lea ecx, [esp + 0x18]
call fcn.004082f5
lea eax, [esp + 0x1c]
push eax
push ecx
push 3
pop edx
lea ecx, [esp + 0x18]
call fcn.004082f5
push 0x43c19c
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ebx, eax
test ebx, ebx
je 0x41625c
push str.SHGetSpecialFolderPathW
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
test esi, esi
je 0x416251
lea ecx, [esp + 0x28]
call fcn.00407ed1
push eax
call fcn.0041cdf9
pop ecx
push 1
push eax
lea eax, [esp + 0x38]
push eax
push ebp
call esi
mov ebp, eax
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
test ebp, ebp
jne 0x4162cd
lea eax, [esp + 0x18]
xor ebx, ebx
push eax
push 1
push ebx
lea ecx, [esp + 0x30]
call fcn.00407ed1
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
js 0x4162b7
lea eax, [esp + 0x2c]
mov dword [esp + 0x2c], 0x104
push eax
lea eax, [esp + 0x34]
push eax
push ebx
push ebx
lea ecx, [esp + 0x30]
call fcn.00407ed1
push eax
push dword [esp + 0x2c]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push dword [esp + 0x18]
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
jns 0x4162cd
lea ecx, [esp + 0x1c]
call fcn.00407ed1
push eax
lea eax, [esp + 0x34]
push eax
call fcn.0041c164
pop ecx
pop ecx
lea eax, [esp + 0x30]
push eax
push edi
call fcn.0041c164
pop ecx
pop ecx
lea ecx, [esp + 0x14]
call fcn.00407ed1
push eax
push edi
call fcn.0041d0a8
pop ecx
pop ecx
lea ecx, [esp + 0x1c]
call fcn.00407eb8
lea ecx, [esp + 0x20]
call fcn.00407eb8
lea ecx, [esp + 0x24]
call fcn.00407eb8
lea ecx, [esp + 0x28]
call fcn.00407eb8
lea ecx, [esp + 0x10]
call fcn.00407eb8
lea ecx, [esp + 0x14]
call fcn.00407eb8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x22c
ret