Function at 0x140051d24
Capabilities:
Delete registry key

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push rbp
mov rbp, rsp
sub rsp, 0x80
mov rax, qword [0x1400edb00]
xor rax, rsp
mov qword [rbp - 8], rax
mov rsi, rcx
lea rcx, [0x1400bf460]
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov rbx, rax
xor edi, edi
test rax, rax
je 0x140051eaf
mov r8, rsi
lea rdx, str.RegistryMachineSystemCurrentControlSetServices_
lea rcx, [rbp - 0x28]
call fcn.140051978
nop
lea rdx, [rbp - 0x28]
cmp qword [rbp - 0x10], 7
cmova rdx, qword [rbp - 0x28]
lea rcx, [rbp - 0x58]
call sub.ntdll.dll_RtlInitUnicodeString
mov r8, rsi
lea rdx, str.SYSTEMCurrentControlSetServices_
lea rcx, [rbp - 0x48]
call fcn.140051978
nop
lea rdx, [rbp - 0x48]
cmp qword [rbp - 0x30], 7
cmova rdx, qword [rbp - 0x48]
lea r8, [rbp - 0x60]
mov rsi, 0xffffffff80000002
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
test eax, eax
je 0x140051ddb
cmp eax, 2
sete dil
jmp 0x140051e99
mov rcx, qword [rbp - 0x60]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea rdx, str.NtUnloadDriver
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rcx, [rbp - 0x58]
call rax
mov ebx, eax
lea rdx, str.___NtUnloadDriver_Status_0x
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcout]
call fcn.14003c3c4
lea rdx, [0x140047178]
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___class_std::ios_base____ptr64____cdecl___class_std::ios_base____ptr64_____ptr64]
mov edx, ebx
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___long_int____ptr64]
lea rdx, [0x14003e374]
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64____cdecl___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64_____ptr64]
test ebx, ebx
je 0x140051e7b
lea rdx, str.____Driver_Unload_Failed__
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcout]
call fcn.14003c3c4
lea rdx, [0x14003e374]
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64____cdecl___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64_____ptr64]
lea rdx, [rbp - 0x48]
cmp qword [rbp - 0x30], 7
cmova rdx, qword [rbp - 0x48]
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_RegDeleteTreeW]
jmp 0x140051e99
lea rdx, [rbp - 0x48]
cmp qword [rbp - 0x30], 7
cmova rdx, qword [rbp - 0x48]
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_RegDeleteTreeW]
test eax, eax
jne 0x140051e99
mov dil, 1
lea rcx, [rbp - 0x48]
call fcn.140044004
nop
lea rcx, [rbp - 0x28]
call fcn.140044004
mov al, dil
mov rcx, qword [rbp - 8]
xor rcx, rsp
call fcn.1400b45e0
lea r11, [rsp + 0x80]
mov rbx, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rdi, qword [r11 + 0x28]
mov rsp, r11
pop rbp
ret