Function at 0x140040c60
Capabilities:
Continue service
Create service
Delete service
Modify service
Persist via windows service
Start service
Stop service

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x2a0
mov rax, qword [0x14009b038]
xor rax, rsp
mov qword [rsp + 0x290], rax
xor esi, esi
lea rcx, str..AMDRyzenMasterDriverV20
mov qword [rsp + 0x30], rsi
xor r9d, r9d
mov dword [rsp + 0x28], 0x80
mov edx, 0xc0000000
mov dword [rsp + 0x20], 3
lea r8d, [rsi + 3]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov r8d, 0x100
lea rdx, [rsp + 0x90]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea edx, [rsi + 0x5c]
lea rcx, [rsp + 0x90]
call qword [sym.imp.VCRUNTIME140.dll_wcsrchr]
lea r9, str.AMDRyzenMasterDriver.sys
lea r8, [rsp + 0x90]
lea rdx, str._s_s
lea rcx, [rsp + 0x90]
mov word [rax], si
call qword [sym.imp.USER32.dll_wsprintfW]
xor edx, edx
xor ecx, ecx
mov r8d, 0xf003f
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov qword [rsp + 0x60], rsi
lea r8, str.AMDRyzenMasterDriverV20
mov qword [rsp + 0x58], rsi
lea rdx, str.AMDRyzenMasterDriverV20
mov qword [rsp + 0x50], rsi
mov rdi, rax
mov qword [rsp + 0x48], rsi
lea rax, [rsp + 0x90]
mov qword [rsp + 0x40], rsi
mov r9d, 0xf01ff
mov qword [rsp + 0x38], rax
mov rcx, rdi
mov dword [rsp + 0x30], 1
mov dword [rsp + 0x28], 2
mov dword [rsp + 0x20], 1
call qword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov rbx, rax
test rax, rax
jne 0x140040e3f
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x431
jne 0x140040dad
mov r8d, 0xf01ff
lea rdx, str.AMDRyzenMasterDriverV20
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
jmp 0x140040e3c
cmp eax, 0x430
jne 0x140040e3f
mov r8d, 0xf01ff
lea rdx, str.AMDRyzenMasterDriverV20
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
lea r8, [rsp + 0x70]
mov edx, 1
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_ControlService]
mov qword [rsp + 0x60], rsi
lea rax, [rsp + 0x90]
mov qword [rsp + 0x58], rsi
lea r8, str.AMDRyzenMasterDriverV20
mov qword [rsp + 0x50], rsi
lea rdx, str.AMDRyzenMasterDriverV20
mov qword [rsp + 0x48], rsi
mov r9d, 0xf01ff
mov qword [rsp + 0x40], rsi
mov rcx, rdi
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], 1
mov dword [rsp + 0x28], 3
mov dword [rsp + 0x20], 1
call qword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov rbx, rax
xor r8d, r8d
xor edx, edx
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
jne 0x140040eb1
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 3
jne 0x140040eb1
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_DeleteService]
mov qword [rsp + 0x50], rsi
lea rax, [rsp + 0x90]
mov qword [rsp + 0x48], rsi
or r9d, 0xffffffff
mov qword [rsp + 0x40], rsi
or r8d, r9d
mov qword [rsp + 0x38], rsi
or edx, r9d
mov qword [rsp + 0x30], rsi
mov rcx, rbx
mov qword [rsp + 0x28], rsi
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_ChangeServiceConfigW]
xor r8d, r8d
xor edx, edx
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_StartServiceW]
xor r9d, r9d
mov qword [rsp + 0x30], rsi
mov dword [rsp + 0x28], 0x80
lea rcx, str..AMDRyzenMasterDriverV20
mov edx, 0xc0000000
mov dword [rsp + 0x20], 3
lea r8d, [r9 + 3]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
test rdi, rdi
je 0x140040eed
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test rbx, rbx
je 0x140040efb
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov al, 1
mov rcx, qword [rsp + 0x290]
xor rcx, rsp
call fcn.140062800
lea r11, [rsp + 0x2a0]
mov rbx, qword [r11 + 0x10]
mov rsi, qword [r11 + 0x18]
mov rsp, r11
pop rdi
ret