Function at 0x140004974
Capabilities:
Delete registry value
Persist via run registry key
Query or enumerate registry value

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x468]
sub rsp, 0x568
mov rax, qword [0x14000f068]
xor rax, rsp
mov qword [rbp + 0x450], rax
mov eax, r8d
mov qword [rbp - 0x80], rdx
mov rbx, r9
mov dword [rsp + 0x60], eax
and eax, 1
mov qword [rsp + 0x70], rbx
mov dword [rsp + 0x5c], eax
mov r15, rcx
mov rcx, qword [rbp + 0x4d0]
neg eax
mov qword [rsp + 0x78], rcx
lea rax, [rsp + 0x48]
sbb r9d, r9d
mov qword [rsp + 0x20], rax
and r9d, 0x10006
xor r8d, r8d
add r9d, 0x20019
mov rcx, r15
mov r14, rdx
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
nop dword [rax + rax]
xor r13d, r13d
test eax, eax
jne 0x140004e55
lea rdx, [0x14000b580]
mov rcx, rbx
mov r8, rdx
lea r9, [rsp + 0x68]
mov edi, r13d
call qword [sym.imp.SHLWAPI.dll_IUnknown_QueryService]
nop dword [rax + rax]
test byte [0x14000f901], 0x40
je 0x140004a40
mov r8, r14
lea rdx, [0x14000ae30]
call fcn.140004e84
mov esi, r13d
mov r12d, 0x104
mov rcx, qword [rsp + 0x48]
lea rax, [rsp + 0x50]
mov qword [rsp + 0x38], rax
lea r9, [rsp + 0x54]
lea rax, [rbp + 0x240]
mov dword [rsp + 0x54], 0x50
mov qword [rsp + 0x30], rax
lea r8, [rbp - 0x70]
lea rax, [rsp + 0x40]
mov dword [rsp + 0x50], 0x208
mov qword [rsp + 0x28], rax
mov edx, esi
mov qword [rsp + 0x20], r13
call qword [sym.imp.ADVAPI32.dll_RegEnumValueW]
nop dword [rax + rax]
cmp eax, 0xea
je 0x140004bf7
test eax, eax
jne 0x140004bfe
mov edx, dword [rsp + 0x40]
lea eax, [rdx - 1]
cmp eax, 1
ja 0x140004bf7
mov rcx, qword [rsp + 0x68]
test rcx, rcx
je 0x140004ae4
mov rax, qword [rcx]
lea rdx, [rbp - 0x70]
mov rax, qword [rax + 0x20]
call qword [0x14000abe0]
test eax, eax
je 0x140004bf7
mov edx, dword [rsp + 0x40]
cmp edx, 2
jne 0x140004b2b
lea r8, [rbp + 0x240]
mov rdx, r12
lea rcx, [rbp + 0x30]
call fcn.14000200c
test eax, eax
js 0x140004bf7
mov r8d, r12d
lea rdx, [rbp + 0x240]
lea rcx, [rbp + 0x30]
call qword [sym.imp.SHLWAPI.dll_Ordinal_460]
nop dword [rax + rax]
dec eax
cmp eax, 0x103
ja 0x140004bf7
mov ecx, 0x43
call qword [sym.imp.USER32.dll_GetSystemMetrics]
nop dword [rax + rax]
test eax, eax
je 0x140004b4b
cmp word [rbp - 0x70], 0x2a
jne 0x140004bf7
mov edx, 0x618
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
nop dword [rax + rax]
mov rbx, rax
test rax, rax
je 0x140004bf7
mov r8, r14
mov rdx, r12
mov rcx, rax
call fcn.14000200c
test eax, eax
js 0x140004bf7
lea rcx, [rbx + 0x208]
mov rdx, r12
lea r8, [rbp - 0x70]
call fcn.14000200c
test eax, eax
js 0x140004bf7
lea rcx, [rbx + 0x410]
mov rdx, r12
lea r8, [rbp + 0x240]
call fcn.14000200c
test eax, eax
js 0x140004bf7
test rdi, rdi
jne 0x140004bcc
lea ecx, [rdi + 5]
call qword [sym.imp.COMCTL32.dll_DPA_Create]
nop dword [rax + rax]
mov rdi, rax
test rax, rax
je 0x140004be8
mov r8, rbx
mov edx, 0x7fffffff
mov rcx, rdi
call qword [sym.imp.COMCTL32.dll_DPA_InsertPtr]
nop dword [rax + rax]
cmp eax, 0xffffffff
jne 0x140004bf7
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LocalFree]
nop dword [rax + rax]
inc esi
jmp 0x140004a49
cmp eax, 0x103
mov ebx, 1
cmovne ebx, r13d
mov dword [rsp + 0x64], ebx
test rdi, rdi
je 0x140004e13
mov esi, 0x200
lea rcx, [rbp + 0x30]
mov r8d, esi
xor edx, edx
call sub.msvcrt.dll_memset
mov r12, 0xffffffff80000002
cmp r15, r12
jne 0x140004ca2
or eax, 0xffffffff
mov dword [rsp + 0x20], 1
mov r9d, eax
lea rcx, [0x14000b110]
mov edx, eax
mov r8, r14
call qword [sym.imp.api_ms_win_core_string_l1_1_0.dll_CompareStringOrdinal]
nop dword [rax + rax]
cmp eax, 2
jne 0x140004ca2
lea rax, [rsp + 0x58]
mov dword [rsp + 0x58], esi
mov qword [rsp + 0x30], rax
lea r8, str.FirstRequiresUserInput
lea rax, [rbp + 0x30]
mov r9d, 0x20000002
mov qword [rsp + 0x28], rax
lea rdx, str.SoftwareMicrosoftWindowsCurrentVersionOOBE
mov rcx, r12
mov qword [rsp + 0x20], r13
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegGetValueW]
nop dword [rax + rax]
movsxd r12, dword [rdi]
test r12, r12
jle 0x140004e04
mov ebx, dword [rsp + 0x5c]
mov r15, r13
mov r13, qword [rbp + 0x4d8]
xor esi, esi
mov rax, qword [rdi + 8]
mov r14, qword [rax + r15*8]
test ebx, ebx
je 0x140004cf0
lea rdx, [r14 + 0x208]
cmp word [rdx], 0x21
je 0x140004cf0
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
nop dword [rax + rax]
test eax, eax
jne 0x140004de1
cmp word [rbp + 0x30], si
je 0x140004d8e
or eax, 0xffffffff
mov dword [rsp + 0x20], 1
mov r9d, eax
lea rcx, [r14 + 0x208]
mov edx, eax
lea r8, [rbp + 0x30]
call qword [sym.imp.api_ms_win_core_string_l1_1_0.dll_CompareStringOrdinal]
nop dword [rax + rax]
cmp eax, 2
jne 0x140004d8e
lea edx, [rax - 1]
xor ecx, ecx
mov r8d, edx
lea r9, str.ShellDesktopSwitchEvent
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_CreateEventW]
nop dword [rax + rax]
mov rsi, rax
test rax, rax
je 0x140004d67
mov rcx, rax
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_SetEvent]
nop dword [rax + rax]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop dword [rax + rax]
lea r8, str.FirstRequiresUserInput
mov rcx, 0xffffffff80000002
lea rdx, str.SoftwareMicrosoftWindowsCurrentVersionOOBE
call qword [sym.imp.SHLWAPI.dll_SHDeleteValueW]
nop dword [rax + rax]
xor eax, eax
mov word [rbp + 0x30], ax
mov rax, qword [rsp + 0x70]
lea rsi, [r14 + 0x208]
mov r9d, dword [rsp + 0x60]
lea r8, [r14 + 0x410]
mov qword [rsp + 0x28], r13
mov rdx, rsi
mov qword [rsp + 0x20], rax
mov rcx, r14
mov rax, qword [rsp + 0x78]
call qword [0x14000abe0]
test ebx, ebx
je 0x140004ddf
cmp word [rsi], 0x21
jne 0x140004ddf
mov rcx, qword [rsp + 0x48]
mov rdx, rsi
call qword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
nop dword [rax + rax]
xor esi, esi
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_LocalFree]
nop dword [rax + rax]
inc r15
cmp r15, r12
jl 0x140004cbe
mov ebx, dword [rsp + 0x64]
mov r14, qword [rbp - 0x80]
mov rcx, rdi
call qword [sym.imp.COMCTL32.dll_DPA_Destroy]
nop dword [rax + rax]
test byte [0x14000f901], 0x40
je 0x140004e2b
mov r8, r14
lea rdx, [0x14000adb0]
call fcn.140004e84
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
nop dword [rax + rax]
mov rcx, qword [rsp + 0x68]
test rcx, rcx
je 0x140004e58
mov rax, qword [rcx]
mov rax, qword [rax + 0x10]
call qword [0x14000abe0]
jmp 0x140004e58
mov ebx, r13d
mov eax, ebx
mov rcx, qword [rbp + 0x450]
xor rcx, rsp
call fcn.140009590
add rsp, 0x568
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret