Function at 0x140047fa0
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 [0x14008d310]
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 0x140048043
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 0x140048427
jmp 0x140048051
test rbx, rbx
je 0x140048422
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 0x140048202
test r15, r15
je 0x1400480c4
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 0x1400481eb
mov al, byte [0x14008e3b8]
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 0x140048202
call fcn.1400027c4
mov rcx, rax
xor edi, edi
test rax, rax
je 0x140048469
mov rax, qword [rax]
call qword [rax + 0x18]
lea rsi, [rax + 0x18]
mov qword [rbp - 0x78], rsi
test r12, r12
je 0x140048193
or rbx, 0xffffffffffffffff
mov rax, rbx
inc rax
cmp word [r12 + rax*2], di
jne 0x140048145
mov r8d, eax
mov rdx, r12
lea rcx, [rbp - 0x78]
call fcn.140002a20
mov edx, 0x5c
lea rcx, [rbp - 0x78]
call fcn.1400086e0
lea rcx, [rbp - 0x40]
mov rax, rbx
inc rax
cmp word [rcx + rax*2], di
jne 0x140048173
mov r8d, eax
lea rdx, [rbp - 0x40]
lea rcx, [rbp - 0x78]
call fcn.140008448
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.140047fa0
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 0x1400481e6
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 0x140048062
cmp edi, 0x103
jne 0x140048409
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 0x140048403
mov ecx, dword [rsp + 0x64]
inc ecx
call fcn.14002657c
mov rbx, rax
mov qword [rbp - 0x70], rax
xor edi, edi
test rax, rax
je 0x1400483f4
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 0x1400483f9
xor edi, edi
test r15, r15
je 0x1400482f4
mov rax, qword [r15]
lea r8, [rbp - 0x40]
mov rdx, r12
mov rcx, r15
call qword [rax + 0x18]
test al, al
je 0x1400483e8
cmp byte [0x14008e3b8], dil
je 0x1400483bf
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 0x1400483bf
call fcn.1400027c4
test rax, rax
je 0x14004845a
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 0x140048376
lea rdx, str.PkgDef_merge_registry_encountered_data_collision_for_key_value__s
call fcn.1400069fc
xor r8d, r8d
xor edx, edx
mov rbx, qword [rsp + 0x78]
mov rcx, rbx
call fcn.140043d10
jmp 0x1400483a1
lea rdx, str.Error_while_merging_value__s
call fcn.1400069fc
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.140043d74
nop
lea rdx, [rbx - 0x18]
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x1400483bb
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 0x1400483f9
xor edi, edi
inc esi
mov dword [rsp + 0x64], r14d
jmp 0x140048290
mov edi, SafeArrayDestroy
mov rcx, rbx
call fcn.140002da0
xor ebx, ebx
cmp edi, 0x103
cmovne ebx, edi
xor r14d, r14d
cmp qword [rbp - 0x50], r14
je 0x140048427
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x140048427
mov ebx, 0x57
cmp byte [rsp + 0x60], r14b
je 0x140048434
call qword [sym.imp.ADVAPI32.dll_RevertToSelf]
mov rax, rbx
mov rcx, qword [rbp + 0x3e0]
xor rcx, rsp
call fcn.140001020
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.1400312f0
nop
jmp 0x140048468
nop
mov ecx, 0x80004005
call fcn.1400312f0
int3