Function at 0x1400392a8
Capabilities:
Query or enumerate registry key
Query or enumerate registry value
Set registry value

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x3f8]
sub rsp, 0x4f8
mov rax, qword [0x140090008]
xor rax, rsp
mov qword [rbp + 0x3e0], rax
mov r13d, r9d
mov rsi, r8
mov qword [rsp + 0x78], r8
mov rdi, rdx
mov qword [rbp - 0x50], rdx
mov rbx, rcx
mov rax, qword [rbp + 0x460]
mov qword [rbp - 0x70], rax
mov r15, qword [rbp + 0x468]
mov r12, qword [rbp + 0x470]
xor r14d, r14d
mov qword [rsp + 0x70], r14
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_ImpersonateLoggedOnUser]
test eax, eax
setne byte [rsp + 0x60]
test rdi, rdi
je 0x14003934b
lea rax, [rsp + 0x70]
mov qword [rsp + 0x20], rax
mov r9d, 0x20019
xor r8d, r8d
mov rdx, rdi
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov ebx, eax
test eax, eax
jne 0x14003972f
jmp 0x140039359
test rbx, rbx
je 0x14003972a
mov qword [rsp + 0x70], rbx
mov eax, 0x104
mov dword [rsp + 0x68], eax
mov dword [rbp - 0x80], eax
xor ebx, ebx
mov r14d, ebx
mov qword [rsp + 0x38], rbx
lea rax, [rbp - 0x80]
mov qword [rsp + 0x30], rax
lea rax, [rbp + 0x1d0]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rbx
lea r9, [rsp + 0x68]
lea r8, [rbp - 0x40]
mov edx, r14d
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
mov edi, eax
test eax, eax
jne 0x14003950a
test r15, r15
je 0x1400393cc
mov rax, qword [r15]
lea r9, [rbp - 0x40]
mov r8, r12
mov rdx, qword [rsp + 0x70]
mov rcx, r15
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
test al, al
je 0x1400394f3
mov al, byte [0x140091e42]
neg al
sbb ecx, ecx
and ecx, 0x19
add ecx, 0x20006
lea rax, [rbp - 0x58]
mov qword [rsp + 0x40], rax
lea rax, [rbp - 0x60]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], rbx
mov dword [rsp + 0x28], ecx
mov dword [rsp + 0x20], r13d
lea r9, [rbp + 0x1d0]
xor r8d, r8d
lea rdx, [rbp - 0x40]
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
mov edi, eax
test eax, eax
jne 0x14003950a
call fcn.140002dfc
mov rcx, rax
xor edi, edi
test rax, rax
je 0x14003976d
mov rax, qword [rax]
call qword [rax + 0x18]
lea rsi, [rax + 0x18]
mov qword [rbp - 0x78], rsi
test r12, r12
je 0x14003949b
or rbx, 0xffffffffffffffff
mov rax, rbx
inc rax
cmp word [r12 + rax*2], di
jne 0x14003944d
mov r8d, eax
mov rdx, r12
lea rcx, [rbp - 0x78]
call fcn.14000a350
mov edx, 0x5c
lea rcx, [rbp - 0x78]
call fcn.14001b014
lea rcx, [rbp - 0x40]
mov rax, rbx
inc rax
cmp word [rcx + rax*2], di
jne 0x14003947b
mov r8d, eax
lea rdx, [rbp - 0x40]
lea rcx, [rbp - 0x78]
call fcn.1400097e8
mov rbx, qword [rbp - 0x78]
mov rsi, rbx
mov qword [rsp + 0x30], rbx
mov qword [rsp + 0x28], r15
mov rax, qword [rbp - 0x70]
mov qword [rsp + 0x20], rax
mov r9d, r13d
mov r8, qword [rbp - 0x60]
lea rdx, [rbp - 0x40]
mov rcx, qword [rsp + 0x70]
call fcn.1400392a8
mov rdi, rax
mov rcx, qword [rbp - 0x60]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
nop
lea rdx, [rsi - 0x18]
or ecx, 0xffffffff
lock xadd dword [rdx + 0x10], ecx
xor ebx, ebx
sub ecx, 1
jg 0x1400394ee
mov rcx, qword [rdx]
mov r8, qword [rcx]
call qword [rreloc.OLEAUT32.dll_VariantClear + 8]
mov rsi, qword [rsp + 0x78]
inc r14d
mov eax, 0x104
mov dword [rsp + 0x68], eax
mov dword [rbp - 0x80], eax
test edi, edi
je 0x14003936a
cmp edi, 0x103
jne 0x140039711
mov qword [rsp + 0x58], rbx
mov qword [rsp + 0x50], rbx
lea rax, [rsp + 0x64]
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x40], rbx
mov qword [rsp + 0x38], rbx
mov qword [rsp + 0x30], rbx
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], rbx
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyW]
mov edi, eax
test eax, eax
jne 0x14003970b
mov ecx, dword [rsp + 0x64]
inc ecx
call fcn.14005212c
mov rbx, rax
mov qword [rbp - 0x70], rax
xor edi, edi
test rax, rax
je 0x1400396fc
mov r8d, dword [rsp + 0x64]
xor edx, edx
mov rcx, rax
call sub.VCRUNTIME140.dll_memset
mov r14d, dword [rsp + 0x64]
mov esi, edi
mov r13, qword [rsp + 0x78]
mov dword [rsp + 0x68], 0x104
lea rax, [rsp + 0x64]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], rbx
lea rax, [rbp - 0x68]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rdi
lea r9, [rsp + 0x68]
lea r8, [rbp - 0x40]
mov edx, esi
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.ADVAPI32.dll_RegEnumValueW]
mov edi, eax
test eax, eax
jne 0x140039701
xor edi, edi
test r15, r15
je 0x1400395fc
mov rax, qword [r15]
lea r8, [rbp - 0x40]
mov rdx, r12
mov rcx, r15
call qword [rax + 0x18]
test al, al
je 0x1400396f0
cmp byte [0x140091e42], dil
je 0x1400396c7
mov qword [rsp + 0x28], rdi
mov qword [rsp + 0x20], rdi
xor r9d, r9d
xor r8d, r8d
lea rdx, [rbp - 0x40]
mov rcx, r13
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov edi, eax
cmp eax, 2
je 0x1400396c7
call fcn.140002dfc
test rax, rax
je 0x140039762
mov rdx, qword [rax]
mov rcx, rax
call qword [rdx + 0x18]
add rax, 0x18
mov qword [rsp + 0x78], rax
lea r8, [rbp - 0x40]
lea rcx, [rsp + 0x78]
test edi, edi
jne 0x14003967e
lea rdx, str.PkgDef_merge_registry_encountered_data_collision_for_key_value__s
call fcn.14000a5cc
xor r8d, r8d
xor edx, edx
mov rbx, qword [rsp + 0x78]
mov rcx, rbx
call fcn.14003212c
jmp 0x1400396a9
lea rdx, str.Error_while_merging_value__s
call fcn.14000a5cc
movzx edx, di
or edx, 0x80070000
test edi, edi
cmovle edx, edi
xor r8d, r8d
mov rbx, qword [rsp + 0x78]
mov rcx, rbx
call fcn.140032190
nop
lea rdx, [rbx - 0x18]
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x1400396c3
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rbx, qword [rbp - 0x70]
mov eax, dword [rsp + 0x64]
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], rbx
mov r9d, dword [rbp - 0x68]
xor r8d, r8d
lea rdx, [rbp - 0x40]
mov rcx, r13
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov edi, eax
test eax, eax
jne 0x140039701
xor edi, edi
inc esi
mov dword [rsp + 0x64], r14d
jmp 0x140039598
mov edi, SafeArrayGetDim
mov rcx, rbx
call fcn.140052590
xor ebx, ebx
cmp edi, 0x103
cmovne ebx, edi
xor r14d, r14d
cmp qword [rbp - 0x50], r14
je 0x14003972f
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x14003972f
mov ebx, 0x57
cmp byte [rsp + 0x60], r14b
je 0x14003973c
call qword [sym.imp.ADVAPI32.dll_RevertToSelf]
mov rax, rbx
mov rcx, qword [rbp + 0x3e0]
xor rcx, rsp
call fcn.140052570
add rsp, 0x4f8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
mov ecx, 0x80004005
call fcn.140002fa4
nop
mov ecx, 0x80004005
call fcn.140002fa4
int3