Function at 0x180016834
Capabilities:
Encrypt data using dpapi
Query or enumerate registry value

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0xb8
mov rcx, qword [0x180059270]
xor edx, edx
mov r8d, 0x208
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rbp, rax
test rax, rax
jne 0x180016876
lea eax, [rbp + 8]
jmp 0x180016cda
mov rcx, qword [0x180059270]
xor edx, edx
mov r8d, 0x1000
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rbx, rax
test rax, rax
jne 0x18001689b
lea edi, [rax + 8]
jmp 0x180016caf
lea r13, [0x180057d08]
lea rsi, [0x180057c60]
mov r15d, 3
xor edx, edx
lea rcx, [rsp + 0x70]
lea r8d, [rdx + 0x34]
call sub.ntdll.dll_memset
mov r14, qword [r13]
mov rcx, qword [rsp + 0x100]
lea rax, [rsp + 0x110]
lea r9, [rsp + 0x40]
xor r12d, r12d
mov qword [rsp + 0x38], rax
lea rax, [rsp + 0x118]
mov qword [rsp + 0x30], rbx
mov qword [rsp + 0x28], rax
and qword [rsp + 0x20], r12
mov r8, rbp
xor edx, edx
mov qword [rsp + 0x48], r14
mov dword [rsp + 0x40], 0x104
mov dword [rsp + 0x110], 0x1000
call qword [sym.imp.ADVAPI32.dll_RegEnumValueW]
mov edi, eax
cmp eax, 0x103
je 0x180016bcf
mov r14, qword [rsp + 0x100]
test edi, edi
jne 0x180016b6e
mov rcx, qword [rsi]
call qword [sym.imp.KERNEL32.dll_lstrlenW]
mov rdx, qword [rsi]
mov rcx, rbp
lea r8d, [rax + 1]
call qword [sym.imp.SHLWAPI.dll_StrCmpNIW]
test eax, eax
jne 0x180016972
cmp dword [rsp + 0x118], 3
jne 0x180016972
mov edx, dword [rsp + 0x110]
mov rcx, rbx
call fcn.18001676c
mov qword [rsp + 0x70], rax
mov rcx, qword [rsi + 8]
call qword [sym.imp.KERNEL32.dll_lstrlenW]
mov rdx, qword [rsi + 8]
mov rcx, rbp
lea r8d, [rax + 1]
call qword [sym.imp.SHLWAPI.dll_StrCmpNIW]
test eax, eax
jne 0x1800169af
cmp dword [rsp + 0x118], 3
jne 0x1800169af
mov edx, dword [rsp + 0x110]
mov rcx, rbx
call fcn.18001676c
mov qword [rsp + 0x78], rax
mov rcx, qword [rsi + 0x10]
call qword [sym.imp.KERNEL32.dll_lstrlenW]
mov rdx, qword [rsi + 0x10]
mov rcx, rbp
lea r8d, [rax + 1]
call qword [sym.imp.SHLWAPI.dll_StrCmpNIW]
test eax, eax
jne 0x1800169ef
cmp dword [rsp + 0x118], 3
jne 0x1800169ef
mov edx, dword [rsp + 0x110]
mov rcx, rbx
call fcn.18001676c
mov qword [rsp + 0x80], rax
mov rcx, qword [rsi + 0x20]
call qword [sym.imp.KERNEL32.dll_lstrlenW]
mov rdx, qword [rsi + 0x20]
mov rcx, rbp
lea r8d, [rax + 1]
call qword [sym.imp.SHLWAPI.dll_StrCmpNIW]
test eax, eax
jne 0x180016a2f
cmp dword [rsp + 0x118], 3
jne 0x180016a2f
mov edx, dword [rsp + 0x110]
mov rcx, rbx
call fcn.18001676c
mov qword [rsp + 0x88], rax
mov rcx, qword [rsi + 0x18]
call qword [sym.imp.KERNEL32.dll_lstrlenW]
mov rdx, qword [rsi + 0x18]
mov rcx, rbp
lea r8d, [rax + 1]
call qword [sym.imp.SHLWAPI.dll_StrCmpNIW]
test eax, eax
jne 0x180016a6b
cmp dword [rsp + 0x110], 4
jne 0x180016a6b
cmp dword [rsp + 0x118], 4
jne 0x180016a6b
mov eax, dword [rbx]
mov dword [rsp + 0xa0], eax
mov rcx, qword [rsi + 0x28]
call qword [sym.imp.KERNEL32.dll_lstrlenW]
mov rdx, qword [rsi + 0x28]
mov rcx, rbp
lea r8d, [rax + 1]
call qword [sym.imp.SHLWAPI.dll_StrCmpNIW]
test eax, eax
jne 0x180016b1c
cmp dword [rsp + 0x118], 3
jne 0x180016b1c
cmp byte [rbx], 2
jne 0x180016b1c
lea r8d, [rax + 0xc]
lea rcx, [rsp + 0x50]
xor edx, edx
call sub.ntdll.dll_memset
mov r11d, dword [rsp + 0x110]
lea rax, [rbx + 1]
mov qword [rsp + 0x64], rax
lea rax, [rsp + 0x50]
dec r11d
mov qword [rsp + 0x30], rax
and dword [rsp + 0x28], 0
and qword [rsp + 0x20], 0
lea rcx, [rsp + 0x60]
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov dword [rsp + 0x60], r11d
call qword [sym.imp.CRYPT32.dll_CryptUnprotectData]
test eax, eax
je 0x180016b0c
mov edx, dword [rsp + 0x50]
mov rcx, qword [rsp + 0x54]
call fcn.18001676c
mov qword [rsp + 0x90], rax
mov rcx, qword [rsp + 0x54]
test rcx, rcx
je 0x180016b1c
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, qword [rsi + 0x30]
call qword [sym.imp.KERNEL32.dll_lstrlenW]
mov rdx, qword [rsi + 0x30]
mov rcx, rbp
lea r8d, [rax + 1]
call qword [sym.imp.SHLWAPI.dll_StrCmpNIW]
test eax, eax
jne 0x180016b6e
cmp dword [rsp + 0x110], 4
jne 0x180016b6e
cmp dword [rsp + 0x118], 4
jne 0x180016b6e
lea rcx, [0x18004e8f0]
cmp dword [rbx], eax
jne 0x180016b61
lea rcx, [0x18004e8f4]
call fcn.1800167d8
mov qword [rsp + 0x98], rax
lea rax, [rsp + 0x110]
inc r12d
lea r9, [rsp + 0x40]
mov qword [rsp + 0x38], rax
lea rax, [rsp + 0x118]
mov qword [rsp + 0x30], rbx
mov qword [rsp + 0x28], rax
and qword [rsp + 0x20], 0
mov r8, rbp
mov edx, r12d
mov rcx, r14
mov dword [rsp + 0x40], 0x104
mov dword [rsp + 0x110], 0x1000
call qword [sym.imp.ADVAPI32.dll_RegEnumValueW]
mov edi, eax
cmp eax, 0x103
jne 0x18001692f
mov r14, qword [rsp + 0x48]
mov r8, qword [rsp + 0x70]
test r8, r8
je 0x180016c14
cmp qword [rsp + 0x80], 0
je 0x180016c00
mov rcx, qword [rsp + 0x108]
lea r8, [rsp + 0x70]
mov rdx, r14
call fcn.180015110
mov r8, qword [rsp + 0x70]
mov edi, eax
test r8, r8
je 0x180016c14
mov rcx, qword [0x180059270]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov r8, qword [rsp + 0x78]
test r8, r8
je 0x180016c2d
mov rcx, qword [0x180059270]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov r8, qword [rsp + 0x90]
test r8, r8
je 0x180016c49
mov rcx, qword [0x180059270]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov r8, qword [rsp + 0x80]
test r8, r8
je 0x180016c65
mov rcx, qword [0x180059270]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov r8, qword [rsp + 0x88]
test r8, r8
je 0x180016c81
mov rcx, qword [0x180059270]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov r8, qword [rsp + 0x98]
test r8, r8
je 0x180016c9d
mov rcx, qword [0x180059270]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
add rsi, 0x38
add r13, 8
sub r15, 1
jne 0x1800168af
mov rcx, qword [0x180059270]
mov r8, rbp
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
test rbx, rbx
je 0x180016cd8
mov rcx, qword [0x180059270]
mov r8, rbx
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, edi
add rsp, 0xb8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret