Function at 0x140020ec0
Capabilities:
Delete registry key
Set registry value

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rdi
push rbp
lea rbp, [rsp - 0x730]
sub rsp, 0x830
mov rdi, rdx
mov rbx, rcx
cmp rcx, 0xffffffffffffffff
je 0x1400211b1
mov dword [rdx], 0x20
lea rcx, [rbp + 0x530]
xor edx, edx
mov r8d, 0x200
call fcn.140038310
mov r9d, 0x200
mov qword [rsp + 0x20], 0
lea r8, [rbp + 0x530]
mov rdx, rdi
mov rcx, rbx
call qword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInstanceIdA]
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp ebx, 1
jne 0x1400211b6
xor edx, edx
lea rcx, [rsp + 0x30]
mov r8d, 0x200
call fcn.140038310
mov eax, dword [0x140090d48]
lea rcx, [rsp + 0x30]
movups xmm0, xmmword [str.SYSTEMCurrentControlSetEnum]
dec rcx
mov dword [rsp + 0x48], eax
movsd xmm1, qword [0x140090d40]
movzx eax, word [0x140090d4c]
movaps xmmword [rsp + 0x30], xmm0
mov word [rsp + 0x4c], ax
movsd qword [rsp + 0x40], xmm1
cmp byte [rcx + 1], 0
lea rcx, [rcx + 1]
jne 0x140020f81
movzx eax, word [0x14008aa4c]
mov word [rcx], ax
lea rcx, [rsp + 0x30]
dec rcx
nop dword [rax]
cmp byte [rcx + 1], 0
lea rcx, [rcx + 1]
jne 0x140020fa0
lea r8, [rbp + 0x530]
xor edx, edx
nop dword [rax]
nop word [rax + rax]
movzx eax, byte [r8 + rdx]
mov byte [rcx + rdx], al
lea rdx, [rdx + 1]
test al, al
jne 0x140020fc0
lea rax, [rbp + 0x740]
mov qword [rbp + 0x740], 0
mov r9d, 0xf003f
mov qword [rsp + 0x20], rax
xor r8d, r8d
lea rdx, [rsp + 0x30]
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov ebx, eax
test eax, eax
jne 0x140021069
mov rcx, qword [rbp + 0x740]
lea rax, str.IGFX
mov dword [rsp + 0x28], 4
lea r9d, [rbx + 1]
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea rdx, str.Service
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov ebx, eax
test eax, eax
je 0x14002105a
mov rcx, qword [0x1400b5090]
test rcx, rcx
je 0x14002105a
lea r8, str.GPUInstallation___RestoreIntelService_failed_to_restore_service.
mov edx, 0x80000
call fcn.14002ffd0
mov rcx, qword [rbp + 0x740]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x140021086
mov rcx, qword [0x1400b5090]
test rcx, rcx
je 0x140021086
lea r8, str.GPUInstallation___RestoreIntelService_failed_to_get_Intel_adapter_service_name.
mov edx, 0x80000
call fcn.14002ffd0
call fcn.1400307d0
cmp eax, 2
jne 0x1400211ad
xor edx, edx
lea rcx, [rbp + 0x130]
mov r8d, 0x200
call fcn.140038310
movzx eax, word [0x140090e20]
lea rcx, [rbp + 0x330]
movups xmm0, xmmword [str.SYSTEMCurrentControlSetEnumRoot]
mov word [rbp + 0x150], ax
xor edx, edx
movups xmm1, xmmword [0x140090e10]
movzx eax, byte [0x140090e22]
mov r8d, 0x200
mov byte [rbp + 0x152], al
movaps xmmword [rbp + 0x130], xmm0
movaps xmmword [rbp + 0x140], xmm1
call fcn.140038310
lea rax, [rbp + 0x330]
dec rax
nop dword [rax]
cmp byte [rax + 1], 0
lea rax, [rax + 1]
jne 0x140021100
movsd xmm0, qword [str.LEGACY_]
lea rdx, [rbp + 0x330]
movsd qword [rax], xmm0
dec rdx
cmp byte [rdx + 1], 0
lea rdx, [rdx + 1]
jne 0x140021120
mov eax, dword [str.IGFX]
mov r9d, 0xf003f
mov dword [rdx], eax
xor r8d, r8d
movzx eax, byte [0x140090e38]
mov rcx, 0xffffffff80000002
mov byte [rdx + 4], al
lea rax, [rbp + 0x740]
lea rdx, [rbp + 0x130]
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x1400211b6
mov rcx, qword [rbp + 0x740]
lea rdx, [rbp + 0x330]
call qword [sym.imp.ADVAPI32.dll_RegDeleteTreeA]
mov ebx, eax
test eax, eax
je 0x1400211a0
mov rcx, qword [0x1400b5090]
test rcx, rcx
je 0x1400211a0
lea r8, str.GPUInstallation___RestoreIntelService_failed_to_delete_LEGACY_IGFX.
mov edx, 0x80000
call fcn.14002ffd0
mov rcx, qword [rbp + 0x740]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, ebx
jmp 0x1400211b6
mov eax, 0x57
lea r11, [rsp + 0x830]
mov rbx, qword [r11 + 0x18]
mov rdi, qword [r11 + 0x20]
mov rsp, r11
pop rbp
ret