Function at 0x140005230
Capabilities:
Check if file exists
Delete registry key
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
mov r11, rsp
push rbp
push rdi
lea rbp, [r11 - 0x5f8]
sub rsp, 0x6e8
mov rax, qword [0x14006b008]
xor rax, rsp
mov qword [rbp + 0x5c0], rax
mov qword [r11 - 0x18], r12
lea rax, [rsp + 0x68]
xor r12d, r12d
mov qword [r11 - 0x28], r15
mov r15, rcx
mov qword [rsp + 0x68], r12
mov r9d, 0x20019
mov dword [rsp + 0x60], r12d
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea rdx, str.SOFTWAREMicrosoftWindows_NTCurrentVersionProfileList
mov rcx, 0xffffffff80000002
lea edi, [r12 + 1]
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x140005552
mov rcx, qword [rsp + 0x68]
lea rax, [rsp + 0x60]
mov qword [rsp + 0x58], r12
xor r9d, r9d
mov qword [rsp + 0x50], r12
xor r8d, r8d
mov qword [rsp + 0x48], r12
xor edx, edx
mov qword [rsp + 0x40], r12
mov qword [rsp + 0x38], r12
mov qword [rsp + 0x30], r12
mov qword [rsp + 0x28], r12
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyW]
test eax, eax
jne 0x140005552
mov eax, dword [rsp + 0x60]
test eax, eax
je 0x140005552
mov qword [rsp + 0x710], rsi
mov esi, r12d
mov qword [rsp + 0x708], rbx
mov qword [rsp + 0x6d8], r14
nop
xor edx, edx
mov qword [rsp + 0x70], r12
mov r8d, 0x208
lea rcx, [rbp - 0x70]
call fcn.140008710
mov rcx, qword [rsp + 0x68]
lea r9, [rsp + 0x78]
mov qword [rsp + 0x38], r12
lea r8, [rbp - 0x70]
mov qword [rsp + 0x30], r12
mov edx, esi
mov qword [rsp + 0x28], r12
mov qword [rsp + 0x20], r12
mov dword [rsp + 0x78], 0x104
call qword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
test eax, eax
jne 0x14000552e
lea rcx, [0x140055398]
call qword [sym.imp.KERNEL32.dll_lstrlenW]
mov r8d, eax
lea rdx, str.S_1_5_21_
lea rcx, [rbp - 0x70]
call qword [sym.imp.SHLWAPI.dll_StrCmpNIW]
test eax, eax
jne 0x14000552e
lea rax, [rsp + 0x70]
mov r9d, 0xf003f
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea rdx, [rbp - 0x70]
mov rcx, 0xffffffff80000003
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
mov r14d, r12d
sete r14b
test eax, eax
je 0x1400054e6
xor edx, edx
mov qword [rbp - 0x80], r12
mov r8d, 0x208
lea rcx, [rbp + 0x3b0]
call fcn.140008710
xor edx, edx
mov dword [rsp + 0x7c], 0x104
mov r8d, 0x208
lea rcx, [rbp + 0x1a0]
call fcn.140008710
mov rcx, qword [rsp + 0x68]
lea rax, [rbp - 0x80]
mov r9d, 0x20019
mov qword [rsp + 0x20], rax
xor r8d, r8d
lea rdx, [rbp - 0x70]
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x140005481
mov rcx, qword [rbp - 0x80]
lea rax, [rsp + 0x7c]
mov qword [rsp + 0x28], rax
lea rdx, str.ProfileImagePath
lea rax, [rbp + 0x3b0]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x140005481
lea r9, [rbp + 0x3b0]
mov edx, 0x104
lea r8, str._s_ntuser.dat
lea rcx, [rbp + 0x1a0]
call fcn.140004810
test eax, eax
js 0x140005481
lea rcx, [rbp + 0x1a0]
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
mov ebx, 1
test eax, eax
jne 0x140005484
mov ebx, r12d
mov rcx, qword [rbp - 0x80]
test rcx, rcx
je 0x140005493
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test ebx, ebx
je 0x1400054e1
lea r8, [rbp + 0x1a0]
mov rcx, 0xffffffff80000003
lea rdx, [0x140055410]
call qword [sym.imp.ADVAPI32.dll_RegLoadKeyW]
test eax, eax
jne 0x1400054e1
lea rax, [rsp + 0x70]
mov r9d, 0xf003f
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea rdx, [0x140055460]
mov rcx, 0xffffffff80000003
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x1400054e6
mov ebx, r12d
jmp 0x1400054ff
mov rcx, qword [rsp + 0x70]
mov rdx, r15
call qword [sym.imp.SHLWAPI.dll_SHDeleteKeyW]
test eax, 0xfffffffd
mov ebx, r12d
sete bl
mov rcx, qword [rsp + 0x70]
test rcx, rcx
je 0x14000550f
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test r14d, r14d
jne 0x140005528
lea rdx, str.94B337A5_1774_4843_84F5_2103CAE6C00F
mov rcx, 0xffffffff80000003
call qword [sym.imp.ADVAPI32.dll_RegUnLoadKeyW]
test ebx, ebx
cmove edi, r12d
inc esi
cmp esi, dword [rsp + 0x60]
jb 0x140005310
mov r14, qword [rsp + 0x6d8]
mov rbx, qword [rsp + 0x708]
mov rsi, qword [rsp + 0x710]
mov rcx, qword [rsp + 0x68]
mov r15, qword [rsp + 0x6d0]
mov r12, qword [rsp + 0x6e0]
test rcx, rcx
je 0x140005572
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, edi
mov rcx, qword [rbp + 0x5c0]
xor rcx, rsp
call fcn.1400074e0
add rsp, 0x6e8
pop rdi
pop rbp
ret