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

Disassembly:
mov r11, rsp
sub rsp, 0x198
mov rax, qword [0x00454a00]
xor rax, rsp
mov qword [rsp + 0x180], rax
mov qword [r11 + 0x10], rbx
mov qword [r11 + 0x18], rsi
lea rax, [rsp + 0x58]
mov qword [r11 + 0x20], rdi
xor edi, edi
lea rdx, str.SYSTEMCurrentControlSetServiceshwdatacard
mov qword [rsp + 0x40], rdi
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], rdi
xor r9d, r9d
xor r8d, r8d
mov rcx, 0xffffffff80000002
mov dword [rsp + 0x28], 0x2001f
mov ebx, edi
mov dword [rsp + 0x50], 1
mov dword [rsp + 0x20], edi
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
mov esi, eax
je 0x40aa15
lea rdx, str.INFO:_Open_Key_hwdatacard_error___d._n
lea rcx, [rsp + 0x70]
mov r8d, eax
call fcn.004209a0
lea rcx, [rsp + 0x70]
call fcn.004042c0
cmp esi, 5
jne 0x40ab18
mov eax, 0x4e2d
jmp 0x40ae13
cmp byte [0x0045647b], 1
jne 0x40aa4b
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 [0x0045647a], 1
jne 0x40aa9c
mov eax, dword [0x0044a00c]
cmp eax, 1
je 0x40aa69
cmp eax, 2
je 0x40aa69
cmp eax, 3
jne 0x40aa9c
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], edi
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
jmp 0x40aad1
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 ebx, eax
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp ebx, 5
je 0x40ab7f
mov qword [rsp + 0x40], rdi
lea rax, [rsp + 0x58]
lea rdx, str.SYSTEMCurrentControlSetServiceshwusbdev
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], rdi
xor r9d, r9d
xor r8d, r8d
mov rcx, 0xffffffff80000002
mov dword [rsp + 0x28], 0x2001f
mov dword [rsp + 0x20], edi
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
mov esi, eax
je 0x40ab89
lea rdx, str.INFO:_Open_Key_hwusbdev_error___d._n
lea rcx, [rsp + 0x70]
mov r8d, eax
call fcn.004209a0
lea rcx, [rsp + 0x70]
call fcn.004042c0
cmp esi, 5
jne 0x40ac1f
mov eax, 0x4e2d
jmp 0x40ae13
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 [0x0045648c]
test r11d, r11d
je 0x40ac00
mov rcx, qword [rsp + 0x58]
mov eax, edi
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 ebx, eax
jmp 0x40ac14
mov rcx, qword [rsp + 0x58]
lea rdx, str.EnableCD
call qword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
mov ebx, eax
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp ebx, 5
je 0x40aa0b
mov qword [rsp + 0x40], rdi
lea rax, [rsp + 0x58]
lea rdx, str.SYSTEMCurrentControlSetServicesew_hwusbdev
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], rdi
xor r9d, r9d
xor r8d, r8d
mov rcx, 0xffffffff80000002
mov dword [rsp + 0x28], 0x2001f
mov dword [rsp + 0x20], edi
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
mov esi, eax
je 0x40ac99
lea rdx, str.INFO:_Open_Key_ew_hwusbdev_error___d._n
lea rcx, [rsp + 0x70]
mov r8d, eax
call fcn.004209a0
lea rcx, [rsp + 0x70]
call fcn.004042c0
cmp esi, 5
jne 0x40ad33
mov eax, 0x4e2d
jmp 0x40ae13
mov rcx, qword [rsp + 0x58]
lea rax, [rsp + 0x60]
lea rdx, str.QCDriverResident
mov r9d, 4
xor r8d, r8d
mov dword [rsp + 0x28], 4
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x60], edi
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov r11d, dword [0x0045648c]
test r11d, r11d
je 0x40ad14
mov rcx, qword [rsp + 0x58]
mov eax, edi
cmp r11d, 1
setne al
lea rdx, str.EnableCD
mov r9d, 4
mov dword [rsp + 0x64], eax
lea rax, [rsp + 0x64]
xor r8d, r8d
mov dword [rsp + 0x28], 4
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov ebx, eax
jmp 0x40ad28
mov rcx, qword [rsp + 0x58]
lea rdx, str.EnableCD
call qword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
mov ebx, eax
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp ebx, 5
je 0x40aa0b
mov eax, dword [0x0044a00c]
cmp eax, 7
je 0x40ae0a
cmp eax, 6
je 0x40ae0a
call fcn.00404dd0
mov qword [rsp + 0x40], rdi
lea rax, [rsp + 0x58]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], rdi
lea rdx, str.SYSTEMCurrentControlSetServicesewusbnet
xor r9d, r9d
xor r8d, r8d
mov rcx, 0xffffffff80000002
mov dword [rsp + 0x28], 0x2001f
mov dword [rsp + 0x20], edi
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
mov esi, eax
je 0x40adc3
lea rdx, str.INFO:_Open_Key_ewusbnet_error___d._n
lea rcx, [rsp + 0x70]
mov r8d, eax
call fcn.004209a0
lea rcx, [rsp + 0x70]
call fcn.004042c0
cmp esi, 5
jne 0x40ae0a
mov eax, 0x4e2d
jmp 0x40ae13
cmp byte [0x0045647c], dil
mov rcx, qword [rsp + 0x58]
lea rax, [rsp + 0x50]
setne dil
lea rdx, str.QCDriverQOSEnabled
mov r9d, 4
xor r8d, r8d
mov dword [rsp + 0x28], 4
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x50], edi
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov cl, 1
call fcn.00404eb0
mov eax, ebx
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.00420600
add rsp, 0x198
ret