Function at 0x14004a2d0
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 - 0x3e8]
sub rsp, 0x4e8
mov rax, qword [0x1400922d0]
xor rax, rsp
mov qword [rbp + 0x3d0], rax
mov r13d, r9d
mov rsi, r8
mov qword [rsp + 0x68], r8
mov rdi, rdx
mov qword [rsp + 0x78], rdx
mov rbx, rcx
mov rax, qword [rbp + 0x450]
mov qword [rbp - 0x60], rax
mov r15, qword [rbp + 0x458]
mov r12, qword [rbp + 0x460]
xor r14d, r14d
mov qword [rbp - 0x78], r14
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_ImpersonateLoggedOnUser]
test eax, eax
setne byte [rsp + 0x60]
test rdi, rdi
je 0x14004a36a
lea rax, [rbp - 0x78]
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
jmp 0x14004a37a
test rbx, rbx
je 0x14004a375
mov qword [rbp - 0x78], rbx
jmp 0x14004a382
mov ebx, 0x57
test ebx, ebx
jne 0x14004a74b
mov eax, 0x104
mov dword [rbp - 0x68], eax
mov dword [rbp - 0x64], eax
xor ebx, ebx
mov r14d, ebx
mov qword [rsp + 0x38], rbx
lea rax, [rbp - 0x64]
mov qword [rsp + 0x30], rax
lea rax, [rbp + 0x1c0]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rbx
lea r9, [rbp - 0x68]
lea r8, [rbp - 0x50]
mov edx, r14d
mov rcx, qword [rbp - 0x78]
call qword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
mov edi, eax
test eax, eax
jne 0x14004a534
test r15, r15
je 0x14004a3f1
mov rax, qword [r15]
lea r9, [rbp - 0x50]
mov r8, r12
mov rdx, qword [rbp - 0x78]
mov rcx, r15
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
test al, al
je 0x14004a51e
mov al, byte [0x140093378]
neg al
sbb ecx, ecx
and ecx, 0x19
add ecx, 0x20006
lea rax, [rbp - 0x54]
mov qword [rsp + 0x40], rax
lea rax, [rbp - 0x70]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], rbx
mov dword [rsp + 0x28], ecx
mov dword [rsp + 0x20], r13d
lea r9, [rbp + 0x1c0]
xor r8d, r8d
lea rdx, [rbp - 0x50]
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
mov edi, eax
test eax, eax
jne 0x14004a534
call fcn.140002950
mov rcx, rax
xor edi, edi
test rax, rax
je 0x14004a78d
mov rax, qword [rax]
call qword [rax + 0x18]
lea rsi, [rax + 0x18]
mov qword [rsp + 0x70], rsi
test r12, r12
je 0x14004a4c5
or rbx, 0xffffffffffffffff
mov rax, rbx
inc rax
cmp word [r12 + rax*2], di
jne 0x14004a473
mov r8d, eax
mov rdx, r12
lea rcx, [rsp + 0x70]
call fcn.140002c00
mov edx, 0x5c
lea rcx, [rsp + 0x70]
call fcn.140008e40
lea rcx, [rbp - 0x50]
mov rax, rbx
inc rax
cmp word [rcx + rax*2], di
jne 0x14004a4a3
mov r8d, eax
lea rdx, [rbp - 0x50]
lea rcx, [rsp + 0x70]
call fcn.140008ba0
mov rbx, qword [rsp + 0x70]
mov rsi, rbx
mov qword [rsp + 0x30], rbx
mov qword [rsp + 0x28], r15
mov rax, qword [rbp - 0x60]
mov qword [rsp + 0x20], rax
mov r9d, r13d
mov r8, qword [rbp - 0x70]
lea rdx, [rbp - 0x50]
mov rcx, qword [rbp - 0x78]
call fcn.14004a2d0
mov rdi, rax
mov rcx, qword [rbp - 0x70]
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 0x14004a519
lfence
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rsi, qword [rsp + 0x68]
inc r14d
mov eax, 0x104
mov dword [rbp - 0x68], eax
mov dword [rbp - 0x64], eax
test edi, edi
je 0x14004a392
cmp edi, 0x103
jne 0x14004a733
mov qword [rsp + 0x58], rbx
mov qword [rsp + 0x50], rbx
lea rax, [rbp - 0x80]
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 [rbp - 0x78]
call qword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyW]
mov edi, eax
test eax, eax
jne 0x14004a72d
mov ecx, dword [rbp - 0x80]
inc ecx
call fcn.140026f10
mov rbx, rax
mov qword [rbp - 0x60], rax
xor edi, edi
test rax, rax
je 0x14004a71e
mov r8d, dword [rbp - 0x80]
xor edx, edx
mov rcx, rax
call sub.VCRUNTIME140.dll_memset
mov r14d, dword [rbp - 0x80]
mov esi, edi
mov r13, qword [rsp + 0x68]
mov dword [rbp - 0x68], 0x104
lea rax, [rbp - 0x80]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], rbx
lea rax, [rbp - 0x58]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rdi
lea r9, [rbp - 0x68]
lea r8, [rbp - 0x50]
mov edx, esi
mov rcx, qword [rbp - 0x78]
call qword [sym.imp.ADVAPI32.dll_RegEnumValueW]
mov edi, eax
test eax, eax
jne 0x14004a723
xor edi, edi
test r15, r15
je 0x14004a61d
mov rax, qword [r15]
lea r8, [rbp - 0x50]
mov rdx, r12
mov rcx, r15
call qword [rax + 0x18]
test al, al
je 0x14004a713
cmp byte [0x140093378], dil
je 0x14004a6eb
mov qword [rsp + 0x28], rdi
mov qword [rsp + 0x20], rdi
xor r9d, r9d
xor r8d, r8d
lea rdx, [rbp - 0x50]
mov rcx, r13
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov edi, eax
cmp eax, 2
je 0x14004a6eb
call fcn.140002950
test rax, rax
je 0x14004a77e
mov rdx, qword [rax]
mov rcx, rax
call qword [rdx + 0x18]
add rax, 0x18
mov qword [rsp + 0x68], rax
lea r8, [rbp - 0x50]
lea rcx, [rsp + 0x68]
test edi, edi
jne 0x14004a69f
lea rdx, str.PkgDef_merge_registry_encountered_data_collision_for_key_value__s
call fcn.140006970
xor r8d, r8d
xor edx, edx
mov rbx, qword [rsp + 0x68]
mov rcx, rbx
call fcn.140045c24
jmp 0x14004a6ca
lea rdx, str.Error_while_merging_value__s
call fcn.140006970
movzx edx, di
or edx, 0x80070000
test edi, edi
cmovle edx, edi
xor r8d, r8d
mov rbx, qword [rsp + 0x68]
mov rcx, rbx
call fcn.140045c88
nop
lea rdx, [rbx - 0x18]
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x14004a6e7
lfence
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rbx, qword [rbp - 0x60]
mov eax, dword [rbp - 0x80]
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], rbx
mov r9d, dword [rbp - 0x58]
xor r8d, r8d
lea rdx, [rbp - 0x50]
mov rcx, r13
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov edi, eax
test eax, eax
jne 0x14004a723
xor edi, edi
inc esi
mov dword [rbp - 0x80], r14d
jmp 0x14004a5bd
mov edi, SafeArrayGetDim
mov rcx, rbx
call fcn.140002ef0
xor ebx, ebx
cmp edi, 0x103
cmovne ebx, edi
xor r14d, r14d
cmp qword [rsp + 0x78], r14
je 0x14004a74b
mov rcx, qword [rbp - 0x78]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
nop
cmp byte [rsp + 0x60], r14b
je 0x14004a758
call qword [sym.imp.ADVAPI32.dll_RevertToSelf]
mov rax, rbx
mov rcx, qword [rbp + 0x3d0]
xor rcx, rsp
call fcn.140001020
add rsp, 0x4e8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
mov ecx, 0x80004005
call fcn.1400327c0
nop
jmp 0x14004a78c
nop
mov ecx, 0x80004005
call fcn.1400327c0
int3