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

Disassembly:
mov r11, rsp
sub rsp, 0x198
mov rax, qword [0x0045f6c0]
xor rax, rsp
mov qword [rsp + 0x180], rax
mov qword [r11 + 0x10], rbx
mov qword [r11 + 0x18], rsi
xor esi, esi
mov qword [rsp + 0x40], rsi
lea rax, [rsp + 0x58]
mov qword [r11 + 0x20], rdi
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], rsi
lea rdx, str.SYSTEMCurrentControlSetServicesHWHandSet
xor r9d, r9d
xor r8d, r8d
mov rcx, 0xffffffff80000002
mov dword [rsp + 0x28], 0x2001f
mov edi, esi
mov dword [rsp + 0x50], 1
mov dword [rsp + 0x20], esi
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
mov ebx, eax
je 0x40d5b5
lea rdx, str.INFO:_Open_Key_HWHandSet_error___d._n
lea rcx, [rsp + 0x70]
mov r8d, eax
call fcn.00427fd0
lea rcx, [rsp + 0x70]
call fcn.00404a90
cmp ebx, 5
jne 0x40d6b8
mov eax, 0x4e2d
jmp 0x40d900
cmp byte [0x0046113c], 1
jne 0x40d5eb
mov rcx, qword [rsp + 0x58]
lea rax, [rsp + 0x50]
lea rdx, str.QCDriverPowerNotify
mov r9d, 4
xor r8d, r8d
mov dword [rsp + 0x28], 4
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
cmp byte [0x0046113b], 1
jne 0x40d63c
mov eax, dword [0x00454010]
cmp eax, 1
je 0x40d609
cmp eax, 2
je 0x40d609
cmp eax, 3
jne 0x40d63c
mov rcx, qword [rsp + 0x58]
lea rax, [rsp + 0x50]
lea rdx, str.QCDriverWinxpPMEnabled
mov r9d, 4
xor r8d, r8d
mov dword [rsp + 0x28], 4
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x50], esi
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
jmp 0x40d671
mov rcx, qword [rsp + 0x58]
lea rax, [rsp + 0x50]
lea rdx, str.QCDriverWinxpPMEnabled
mov r9d, 4
xor r8d, r8d
mov dword [rsp + 0x28], 4
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x50], 1
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov rcx, qword [rsp + 0x58]
lea rax, [rsp + 0x50]
lea rdx, str.QCDriverResident
mov r9d, 4
xor r8d, r8d
mov dword [rsp + 0x28], 4
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x50], 1
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov rcx, qword [rsp + 0x58]
mov edi, eax
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp edi, 5
je 0x40d71f
mov qword [rsp + 0x40], rsi
lea rax, [rsp + 0x58]
lea rdx, str.SYSTEMCurrentControlSetServiceshw_usbdev
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], rsi
xor r9d, r9d
xor r8d, r8d
mov rcx, 0xffffffff80000002
mov dword [rsp + 0x28], 0x2001f
mov dword [rsp + 0x20], esi
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
mov ebx, eax
je 0x40d729
lea rdx, str.INFO:_Open_Key_hw_usbdev_error___d._n
lea rcx, [rsp + 0x70]
mov r8d, eax
call fcn.00427fd0
lea rcx, [rsp + 0x70]
call fcn.00404a90
cmp ebx, 5
jne 0x40d7bf
mov eax, 0x4e2d
jmp 0x40d900
mov rcx, qword [rsp + 0x58]
lea rax, [rsp + 0x50]
lea rdx, str.QCDriverResident
mov r9d, 4
xor r8d, r8d
mov dword [rsp + 0x28], 4
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov r11d, dword [0x00461150]
test r11d, r11d
je 0x40d7a0
mov rcx, qword [rsp + 0x58]
mov eax, esi
cmp r11d, 1
setne al
lea rdx, str.EnableCD
mov r9d, 4
mov dword [rsp + 0x60], eax
lea rax, [rsp + 0x60]
xor r8d, r8d
mov dword [rsp + 0x28], 4
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov edi, eax
jmp 0x40d7b4
mov rcx, qword [rsp + 0x58]
lea rdx, str.EnableCD
call qword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
mov edi, eax
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp edi, 5
je 0x40d5ab
mov eax, dword [0x00454010]
cmp eax, 2
je 0x40d84d
cmp eax, 3
je 0x40d84d
cmp eax, 4
je 0x40d84d
cmp eax, 5
je 0x40d84d
cmp eax, 7
je 0x40d7f0
cmp eax, 6
jne 0x40d8f7
mov qword [rsp + 0x40], rsi
lea rax, [rsp + 0x58]
lea rdx, str.SOFTWAREMicrosoftWindowsCurrentVersionDriverSearching
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], rsi
xor r9d, r9d
xor r8d, r8d
mov rcx, 0xffffffff80000002
mov dword [rsp + 0x28], 0x2001f
mov dword [rsp + 0x20], esi
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
mov ebx, eax
je 0x40d83c
mov r8d, eax
lea rdx, str.Open_Key_Searching_Windows_Update_error___d._n
jmp 0x40d897
mov dword [rsp + 0x50], 2
lea rdx, str.SearchOrderConfig
jmp 0x40d8c6
mov qword [rsp + 0x40], rsi
lea rax, [rsp + 0x58]
lea rdx, str.SOFTWAREPoliciesMicrosoftWindowsDriverSearching
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], rsi
and al, 0x30
xor r9d, r9d
xor r8d, r8d
mov rcx, 0xffffffff80000002
mov dword [rsp + 0x28], 0x2001f
mov dword [rsp + 0x20], esi
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
mov ebx, eax
je 0x40d8b7
mov r8d, eax
lea rdx, str.INFO:_Open_Key_Searching_Windows_Update_error___d._n
lea rcx, [rsp + 0x70]
call fcn.00427fd0
lea rcx, [rsp + 0x70]
call fcn.00404a90
cmp ebx, 5
jne 0x40d8f7
mov eax, 0x4e2d
jmp 0x40d900
mov dword [rsp + 0x50], 1
lea rdx, str.DontSearchWindowsUpdate
mov rcx, qword [rsp + 0x58]
lea rax, [rsp + 0x50]
mov r9d, 4
xor r8d, r8d
mov dword [rsp + 0x28], 4
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov cl, 1
call fcn.004059a0
mov eax, edi
mov rdi, qword [rsp + 0x1b8]
mov rsi, qword [rsp + 0x1b0]
mov rbx, qword [rsp + 0x1a8]
mov rcx, qword [rsp + 0x180]
xor rcx, rsp
call fcn.00425570
add rsp, 0x198
ret