Function at 0x140021110
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 0x140021401
mov dword [rdx], 0x20
lea rcx, [rbp + 0x530]
xor edx, edx
mov r8d, 0x200
call fcn.14003aa80
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 0x140021406
xor edx, edx
lea rcx, [rsp + 0x30]
mov r8d, 0x200
call fcn.14003aa80
mov eax, dword [0x140093dd8]
lea rcx, [rsp + 0x30]
movups xmm0, xmmword [str.SYSTEMCurrentControlSetEnum]
dec rcx
mov dword [rsp + 0x48], eax
movsd xmm1, qword [0x140093dd0]
movzx eax, word [0x140093ddc]
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 0x1400211d1
movzx eax, word [0x14008daac]
mov word [rcx], ax
lea rcx, [rsp + 0x30]
dec rcx
nop dword [rax]
cmp byte [rcx + 1], 0
lea rcx, [rcx + 1]
jne 0x1400211f0
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 0x140021210
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 0x1400212b9
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 0x1400212aa
mov rcx, qword [0x1400b80b8]
test rcx, rcx
je 0x1400212aa
lea r8, str.GPUInstallation___RestoreIntelService_failed_to_restore_service.
mov edx, 0x80000
call fcn.140032710
mov rcx, qword [rbp + 0x740]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x1400212d6
mov rcx, qword [0x1400b80b8]
test rcx, rcx
je 0x1400212d6
lea r8, str.GPUInstallation___RestoreIntelService_failed_to_get_Intel_adapter_service_name.
mov edx, 0x80000
call fcn.140032710
call fcn.140032f10
cmp eax, 2
jne 0x1400213fd
xor edx, edx
lea rcx, [rbp + 0x130]
mov r8d, 0x200
call fcn.14003aa80
movzx eax, word [0x140093eb0]
lea rcx, [rbp + 0x330]
movups xmm0, xmmword [str.SYSTEMCurrentControlSetEnumRoot]
mov word [rbp + 0x150], ax
xor edx, edx
movups xmm1, xmmword [0x140093ea0]
movzx eax, byte [0x140093eb2]
mov r8d, 0x200
mov byte [rbp + 0x152], al
movaps xmmword [rbp + 0x130], xmm0
movaps xmmword [rbp + 0x140], xmm1
call fcn.14003aa80
lea rax, [rbp + 0x330]
dec rax
nop dword [rax]
cmp byte [rax + 1], 0
lea rax, [rax + 1]
jne 0x140021350
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 0x140021370
mov eax, dword [str.IGFX]
mov r9d, 0xf003f
mov dword [rdx], eax
xor r8d, r8d
movzx eax, byte [0x140093ec8]
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 0x140021406
mov rcx, qword [rbp + 0x740]
lea rdx, [rbp + 0x330]
call qword [sym.imp.ADVAPI32.dll_RegDeleteTreeA]
mov ebx, eax
test eax, eax
je 0x1400213f0
mov rcx, qword [0x1400b80b8]
test rcx, rcx
je 0x1400213f0
lea r8, str.GPUInstallation___RestoreIntelService_failed_to_delete_LEGACY_IGFX.
mov edx, 0x80000
call fcn.140032710
mov rcx, qword [rbp + 0x740]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, ebx
jmp 0x140021406
mov eax, 0x57
lea r11, [rsp + 0x830]
mov rbx, qword [r11 + 0x18]
mov rdi, qword [r11 + 0x20]
mov rsp, r11
pop rbp
ret