Function at 0x140022320
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 0x1400227e7
mov dword [rdx], 0x20
lea rcx, [rbp + 0x350]
xor edx, edx
mov qword [rax + 0x10], rsi
mov r8d, 0x200
call fcn.14003aa80
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 0x1400227ab
xor edx, edx
lea rcx, [rbp + 0x150]
mov r8d, 0x200
call fcn.14003aa80
mov eax, dword [0x140093dd8]
lea rcx, [rbp + 0x150]
movups xmm0, xmmword [str.SYSTEMCurrentControlSetEnum]
dec rcx
mov dword [rbp + 0x168], eax
movsd xmm1, qword [0x140093dd0]
movzx eax, word [0x140093ddc]
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 0x1400223f0
movzx eax, word [0x14008daac]
mov word [rcx], ax
lea rcx, [rbp + 0x150]
dec rcx
nop
cmp byte [rcx + 1], sil
lea rcx, [rcx + 1]
jne 0x140022410
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 0x140022430
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 0x1400226a1
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 0x1400224e2
mov rcx, qword [0x1400b80b8]
test rcx, rcx
je 0x140022692
lea r8, str.GPUInstallation___SetIntelService_failed_to_set_Intel_adapter_service.
mov edx, 0x80000
call fcn.140032710
mov rcx, qword [rbp + 0xd60]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x1400226be
xor edx, edx
lea rcx, [rbp + 0x950]
mov r8d, 0x400
call fcn.14003aa80
lea rax, [rbp + 0x350]
mov r8, 0xffffffffffffffff
inc r8
cmp byte [rax + r8], sil
jne 0x140022504
lea rdx, [rbp + 0x350]
lea rcx, [rbp + 0x950]
call fcn.140060a2c
xor edx, edx
lea rcx, [rbp + 0x550]
mov r8d, 0x400
call fcn.14003aa80
movaps xmm0, xmmword [str.REGISTRYMACHINESYSTEMCurrentControlSetEnum]
lea rcx, [rbp + 0x550]
movaps xmm1, xmmword [0x140093d50]
sub rcx, 2
movaps xmmword [rbp + 0x550], xmm0
movaps xmm0, xmmword [0x140093d60]
movaps xmmword [rbp + 0x560], xmm1
movaps xmm1, xmmword [0x140093d70]
movaps xmmword [rbp + 0x570], xmm0
movaps xmm0, xmmword [0x140093d80]
movaps xmmword [rbp + 0x580], xmm1
movaps xmm1, xmmword [0x140093d90]
movaps xmmword [rbp + 0x590], xmm0
movaps xmmword [rbp + 0x5a0], xmm1
cmp word [rcx + 2], si
lea rcx, [rcx + 2]
jne 0x140022593
mov eax, dword [0x140093da0]
mov dword [rcx], eax
lea rcx, [rbp + 0x550]
sub rcx, 2
cmp word [rcx + 2], si
lea rcx, [rcx + 2]
jne 0x1400225b0
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 0x1400225d0
xor edx, edx
lea rcx, [rsp + 0x50]
mov r8d, 0x200
call fcn.14003aa80
movups xmm0, xmmword [str.SYSTEMCurrentControlSetServices]
movzx eax, word [0x14008daa8]
lea rcx, [rsp + 0x50]
movups xmm1, xmmword [0x14008da98]
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 0x140022620
movzx eax, word [0x14008daac]
mov word [rcx], ax
lea rcx, [rsp + 0x50]
dec rcx
nop dword [rax]
cmp byte [rcx + 1], sil
lea rcx, [rcx + 1]
jne 0x140022640
movzx eax, byte [0x14008dab8]
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.1400357b0
mov rcx, qword [rbp + 0xd60]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x1400226be
mov rcx, qword [0x1400b80b8]
test rcx, rcx
je 0x1400226be
lea r8, str.GPUInstallation___SetIntelService_failed_to_get_Intel_adapter_service_name.
mov edx, 0x80000
call fcn.140032710
call fcn.140032f10
cmp eax, 2
jne 0x1400227a9
xor edx, edx
lea rcx, [rsp + 0x50]
mov r8d, 0x200
call fcn.14003aa80
movzx eax, word [0x140093eb0]
lea rcx, [rsp + 0x50]
movups xmm0, xmmword [str.SYSTEMCurrentControlSetEnumRoot]
mov word [rsp + 0x70], ax
dec rcx
movups xmm1, xmmword [0x140093ea0]
movzx eax, byte [0x140093eb2]
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 0x140022715
movsd xmm0, qword [0x140093eb8]
lea rdx, [rsp + 0x50]
movzx eax, byte [0x140093ec0]
dec rdx
movsd qword [rcx], xmm0
mov byte [rcx + 8], al
nop dword [rax]
cmp byte [rdx + 1], sil
lea rdx, [rdx + 1]
jne 0x140022740
mov eax, dword [str.IGFX]
xor r9d, r9d
mov dword [rdx], eax
xor r8d, r8d
movzx eax, byte [0x140093ec8]
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 0x1400227c8
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 [0x1400b80b8]
test rcx, rcx
je 0x1400227a9
lea r8, str.GPUInstallation___SetIntelService_failed_to_add_LEGACY_IGFX_for_Intel.
mov edx, 0x80000
call fcn.140032710
jmp 0x1400227a9
mov eax, 0x57
jmp 0x1400227b3