Function at 0x1400220d0
Capabilities:
Persist via windows service
Set registry value

Disassembly:
mov rax, rsp
mov qword [rax + 0x18], rbx
mov qword [rax + 0x20], rdi
push rbp
lea rbp, [rax - 0xd58]
sub rsp, 0xe50
mov rdi, rdx
mov rbx, rcx
cmp rcx, 0xffffffffffffffff
je 0x140022597
mov dword [rdx], 0x20
lea rcx, [rbp + 0x350]
xor edx, edx
mov qword [rax + 0x10], rsi
mov r8d, 0x200
call fcn.140038310
xor esi, esi
lea r8, [rbp + 0x350]
mov r9d, 0x200
mov qword [rsp + 0x20], rsi
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 0x14002255b
xor edx, edx
lea rcx, [rbp + 0x150]
mov r8d, 0x200
call fcn.140038310
mov eax, dword [0x140090d48]
lea rcx, [rbp + 0x150]
movups xmm0, xmmword [str.SYSTEMCurrentControlSetEnum]
dec rcx
mov dword [rbp + 0x168], eax
movsd xmm1, qword [0x140090d40]
movzx eax, word [0x140090d4c]
movaps xmmword [rbp + 0x150], xmm0
mov word [rbp + 0x16c], ax
movsd qword [rbp + 0x160], xmm1
nop
cmp byte [rcx + 1], sil
lea rcx, [rcx + 1]
jne 0x1400221a0
movzx eax, word [0x14008aa4c]
mov word [rcx], ax
lea rcx, [rbp + 0x150]
dec rcx
nop
cmp byte [rcx + 1], sil
lea rcx, [rcx + 1]
jne 0x1400221c0
lea r8, [rbp + 0x350]
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 0x1400221e0
lea rax, [rbp + 0xd60]
mov qword [rbp + 0xd60], rsi
mov r9d, 0xf003f
mov qword [rsp + 0x20], rax
xor r8d, r8d
lea rdx, [rbp + 0x150]
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov ebx, eax
test eax, eax
jne 0x140022451
mov rcx, qword [rbp + 0xd60]
lea rax, str.AMDKMDAP
mov dword [rsp + 0x28], 8
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 0x140022292
mov rcx, qword [0x1400b5090]
test rcx, rcx
je 0x140022442
lea r8, str.GPUInstallation___SetIntelService_failed_to_set_Intel_adapter_service.
mov edx, 0x80000
call fcn.14002ffd0
mov rcx, qword [rbp + 0xd60]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x14002246e
xor edx, edx
lea rcx, [rbp + 0x950]
mov r8d, 0x400
call fcn.140038310
lea rax, [rbp + 0x350]
mov r8, 0xffffffffffffffff
inc r8
cmp byte [rax + r8], sil
jne 0x1400222b4
lea rdx, [rbp + 0x350]
lea rcx, [rbp + 0x950]
call fcn.14005e2b8
xor edx, edx
lea rcx, [rbp + 0x550]
mov r8d, 0x400
call fcn.140038310
movaps xmm0, xmmword [str.REGISTRYMACHINESYSTEMCurrentControlSetEnum]
lea rcx, [rbp + 0x550]
movaps xmm1, xmmword [0x140090cc0]
sub rcx, 2
movaps xmmword [rbp + 0x550], xmm0
movaps xmm0, xmmword [0x140090cd0]
movaps xmmword [rbp + 0x560], xmm1
movaps xmm1, xmmword [0x140090ce0]
movaps xmmword [rbp + 0x570], xmm0
movaps xmm0, xmmword [0x140090cf0]
movaps xmmword [rbp + 0x580], xmm1
movaps xmm1, xmmword [0x140090d00]
movaps xmmword [rbp + 0x590], xmm0
movaps xmmword [rbp + 0x5a0], xmm1
cmp word [rcx + 2], si
lea rcx, [rcx + 2]
jne 0x140022343
mov eax, dword [0x140090d10]
mov dword [rcx], eax
lea rcx, [rbp + 0x550]
sub rcx, 2
cmp word [rcx + 2], si
lea rcx, [rcx + 2]
jne 0x140022360
lea r8, [rbp + 0x950]
xor edx, edx
nop dword [rax]
nop word [rax + rax]
movzx eax, word [r8 + rdx*2]
mov word [rcx + rdx*2], ax
lea rdx, [rdx + 1]
test ax, ax
jne 0x140022380
xor edx, edx
lea rcx, [rsp + 0x50]
mov r8d, 0x200
call fcn.140038310
movups xmm0, xmmword [str.SYSTEMCurrentControlSetServices]
movzx eax, word [0x14008aa48]
lea rcx, [rsp + 0x50]
movups xmm1, xmmword [0x14008aa38]
dec rcx
mov word [rsp + 0x70], ax
movaps xmmword [rsp + 0x50], xmm0
movaps xmmword [rsp + 0x60], xmm1
cmp byte [rcx + 1], sil
lea rcx, [rcx + 1]
jne 0x1400223d0
movzx eax, word [0x14008aa4c]
mov word [rcx], ax
lea rcx, [rsp + 0x50]
dec rcx
nop dword [rax]
cmp byte [rcx + 1], sil
lea rcx, [rcx + 1]
jne 0x1400223f0
movzx eax, byte [0x14008aa58]
lea r8, str.IntelServicePath
movsd xmm0, qword [str.AMDKMDAP]
lea rdx, [rsp + 0x50]
movsd qword [rcx], xmm0
mov r9d, 1
mov byte [rcx + 8], al
lea rax, [rbp + 0x550]
mov dword [rsp + 0x28], 0x200
mov rcx, 0xffffffff80000002
mov qword [rsp + 0x20], rax
call fcn.140033070
mov rcx, qword [rbp + 0xd60]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x14002246e
mov rcx, qword [0x1400b5090]
test rcx, rcx
je 0x14002246e
lea r8, str.GPUInstallation___SetIntelService_failed_to_get_Intel_adapter_service_name.
mov edx, 0x80000
call fcn.14002ffd0
call fcn.1400307d0
cmp eax, 2
jne 0x140022559
xor edx, edx
lea rcx, [rsp + 0x50]
mov r8d, 0x200
call fcn.140038310
movzx eax, word [0x140090e20]
lea rcx, [rsp + 0x50]
movups xmm0, xmmword [str.SYSTEMCurrentControlSetEnumRoot]
mov word [rsp + 0x70], ax
dec rcx
movups xmm1, xmmword [0x140090e10]
movzx eax, byte [0x140090e22]
mov byte [rsp + 0x72], al
movaps xmmword [rsp + 0x50], xmm0
movaps xmmword [rsp + 0x60], xmm1
cmp byte [rcx + 1], sil
lea rcx, [rcx + 1]
jne 0x1400224c5
movsd xmm0, qword [0x140090e28]
lea rdx, [rsp + 0x50]
movzx eax, byte [0x140090e30]
dec rdx
movsd qword [rcx], xmm0
mov byte [rcx + 8], al
nop dword [rax]
cmp byte [rdx + 1], sil
lea rdx, [rdx + 1]
jne 0x1400224f0
mov eax, dword [str.IGFX]
xor r9d, r9d
mov dword [rdx], eax
xor r8d, r8d
movzx eax, byte [0x140090e38]
mov rcx, 0xffffffff80000002
mov qword [rsp + 0x40], rsi
mov byte [rdx + 4], al
lea rax, [rbp + 0xd60]
mov qword [rsp + 0x38], rax
lea rdx, [rsp + 0x50]
mov qword [rsp + 0x30], rsi
mov dword [rsp + 0x28], 0xf003f
mov dword [rsp + 0x20], esi
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
mov ebx, eax
test eax, eax
jne 0x140022578
mov rcx, qword [rbp + 0xd60]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, ebx
mov rsi, qword [rsp + 0xe68]
lea r11, [rsp + 0xe50]
mov rbx, qword [r11 + 0x20]
mov rdi, qword [r11 + 0x28]
mov rsp, r11
pop rbp
ret
mov rcx, qword [0x1400b5090]
test rcx, rcx
je 0x140022559
lea r8, str.GPUInstallation___SetIntelService_failed_to_add_LEGACY_IGFX_for_Intel.
mov edx, 0x80000
call fcn.14002ffd0
jmp 0x140022559
mov eax, 0x57
jmp 0x140022563