Function at 0x40d170
Capabilities:
Query or enumerate registry value

Disassembly:
push rbp
sub rsp, 0x260
mov rbp, rsp
mov qword [rbp + 0x38], rbp
mov qword [rbp + 0x270], rcx
mov qword [rbp + 0x278], rdx
mov rcx, qword [rbp + 0x278]
call fcn.0040a2a0
nop
cmp qword [rbp + 0x278], 0
jne 0x40d1b9
xor rcx, rcx
lea rdx, [rbp + 0x46]
mov r8d, 0x105
call sub.kernel32.dll_GetModuleFileNameW
jmp 0x40d1d7
mov rcx, qword [rbp + 0x278]
call fcn.0040af50
lea rcx, [rbp + 0x46]
mov edx, 0x105
mov r8, rax
call fcn.0040c6a0
cmp word [rbp + 0x46], 0
je 0x40d43c
mov qword [rbp + 0x258], 0
mov ecx, 0x80000001
lea rdx, [0x0040d4e8]
xor r8, r8
mov r9d, 0xf0019
lea rax, [rbp + 0x250]
mov qword [rsp + 0x20], rax
call sub.advapi32.dll_RegOpenKeyExW
test eax, eax
je 0x40d305
mov ecx, 0x80000002
lea rdx, [0x0040d4e8]
xor r8, r8
mov r9d, 0xf0019
lea rax, [rbp + 0x250]
mov qword [rsp + 0x20], rax
call sub.advapi32.dll_RegOpenKeyExW
test eax, eax
je 0x40d305
mov ecx, 0x80000001
lea rdx, [0x0040d522]
xor r8, r8
mov r9d, 0xf0019
lea rax, [rbp + 0x250]
mov qword [rsp + 0x20], rax
call sub.advapi32.dll_RegOpenKeyExW
test eax, eax
je 0x40d305
mov ecx, 0x80000002
lea rdx, [0x0040d522]
xor r8, r8
mov r9d, 0xf0019
lea rax, [rbp + 0x250]
mov qword [rsp + 0x20], rax
call sub.advapi32.dll_RegOpenKeyExW
test eax, eax
je 0x40d305
mov ecx, 0x80000001
lea rdx, [0x0040d556]
xor r8, r8
mov r9d, 0xf0019
lea rax, [rbp + 0x250]
mov qword [rsp + 0x20], rax
call sub.advapi32.dll_RegOpenKeyExW
test eax, eax
je 0x40d305
mov ecx, 0x80000001
lea rdx, [0x0040d588]
xor r8, r8
mov r9d, 0xf0019
lea rax, [rbp + 0x250]
mov qword [rsp + 0x20], rax
call sub.advapi32.dll_RegOpenKeyExW
test eax, eax
jne 0x40d43b
nop
mov rcx, rbp
lea rdx, [rbp + 0x46]
mov r8d, 0x105
call fcn.0040cf20
mov rcx, qword [rbp + 0x250]
lea rdx, [rbp + 0x46]
xor r8, r8
xor r9, r9
mov qword [rsp + 0x20], 0
lea rax, [rbp + 0x40]
mov qword [rsp + 0x28], rax
call sub.advapi32.dll_RegQueryValueExW
test eax, eax
jne 0x40d398
movsxd rcx, dword [rbp + 0x40]
call fcn.00404ae0
mov qword [rbp + 0x258], rax
mov rcx, qword [rbp + 0x250]
lea rdx, [rbp + 0x46]
xor r8, r8
xor r9, r9
mov rax, qword [rbp + 0x258]
mov qword [rsp + 0x20], rax
lea rax, [rbp + 0x40]
mov qword [rsp + 0x28], rax
call sub.advapi32.dll_RegQueryValueExW
mov rcx, qword [rbp + 0x270]
mov rdx, qword [rbp + 0x258]
call fcn.0040afd0
jmp 0x40d418
mov rcx, qword [rbp + 0x250]
lea rdx, [0x0040d5c8]
xor r8, r8
xor r9, r9
mov qword [rsp + 0x20], 0
lea rax, [rbp + 0x40]
mov qword [rsp + 0x28], rax
call sub.advapi32.dll_RegQueryValueExW
test eax, eax
jne 0x40d418
movsxd rcx, dword [rbp + 0x40]
call fcn.00404ae0
mov qword [rbp + 0x258], rax
mov rcx, qword [rbp + 0x250]
lea rdx, [0x0040d5c8]
xor r8, r8
xor r9, r9
mov rax, qword [rbp + 0x258]
mov qword [rsp + 0x20], rax
lea rax, [rbp + 0x40]
mov qword [rsp + 0x28], rax
call sub.advapi32.dll_RegQueryValueExW
mov rcx, qword [rbp + 0x270]
mov rdx, qword [rbp + 0x258]
call fcn.0040afd0
nop
cmp qword [rbp + 0x258], 0
je 0x40d42f
mov rcx, qword [rbp + 0x258]
call fcn.00404b10
mov rcx, qword [rbp + 0x250]
call sub.advapi32.dll_RegCloseKey
nop
lea rcx, [rbp + 0x278]
call fcn.0040a110
mov rax, qword [rbp + 0x270]
lea rsp, [rbp + 0x260]
pop rbp
ret