Function at 0x140154190
Capabilities:
Delete registry key

Disassembly:
jmp 0x140154190
mov qword [rsp + 8], rcx
sub rsp, 0xc8
lea rcx, str.ntdll.dll
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov qword [rsp + 0x30], rax
cmp qword [rsp + 0x30], 0
jne 0x1401541bd
xor al, al
jmp 0x14015440b
mov r8, qword [rsp + 0xd0]
lea rdx, str.RegistryMachineSystemCurrentControlSetServices_
lea rcx, [rsp + 0x90]
call fcn.140008ef4
nop
lea rcx, [rsp + 0x90]
call fcn.140003800
mov rdx, rax
lea rcx, [rsp + 0xb0]
call sub.ntdll.dll_RtlInitUnicodeString
mov r8, qword [rsp + 0xd0]
lea rdx, str.SYSTEMCurrentControlSetServices_
lea rcx, [rsp + 0x38]
call fcn.140008ef4
nop
lea rcx, [rsp + 0x38]
call fcn.140003800
lea r8, [rsp + 0x58]
mov rdx, rax
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
mov dword [rsp + 0x28], eax
cmp dword [rsp + 0x28], 0
je 0x140154290
cmp dword [rsp + 0x28], 2
jne 0x140154269
mov byte [rsp + 0x20], 1
lea rcx, [rsp + 0x38]
call fcn.140007333
nop
lea rcx, [rsp + 0x90]
call fcn.140007333
movzx eax, byte [rsp + 0x20]
jmp 0x14015440b
mov byte [rsp + 0x21], 0
lea rcx, [rsp + 0x38]
call fcn.140007333
nop
lea rcx, [rsp + 0x90]
call fcn.140007333
movzx eax, byte [rsp + 0x21]
jmp 0x14015440b
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea rdx, str.NtUnloadDriver
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rsp + 0x60], rax
mov rax, qword [rsp + 0x60]
mov qword [rsp + 0x68], rax
lea rcx, [rsp + 0xb0]
call qword [rsp + 0x68]
mov dword [rsp + 0x2c], 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.140004fcf
mov qword [rsp + 0x70], rax
lea rdx, [0x140007aa4]
mov rcx, qword [rsp + 0x70]
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 qword [rsp + 0x78], rax
mov edx, dword [rsp + 0x2c]
mov rcx, qword [rsp + 0x78]
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]
mov qword [rsp + 0x80], rax
lea rdx, [0x140004958]
mov rcx, qword [rsp + 0x80]
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]
cmp dword [rsp + 0x2c], 0
je 0x1401543a0
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.140004fcf
mov qword [rsp + 0x88], rax
lea rdx, [0x140004958]
mov rcx, qword [rsp + 0x88]
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 rcx, [rsp + 0x38]
call fcn.140003800
mov rdx, rax
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegDeleteTreeW]
mov dword [rsp + 0x28], eax
mov byte [rsp + 0x22], 0
lea rcx, [rsp + 0x38]
call fcn.140007333
nop
lea rcx, [rsp + 0x90]
call fcn.140007333
movzx eax, byte [rsp + 0x22]
jmp 0x14015440b
lea rcx, [rsp + 0x38]
call fcn.140003800
mov rdx, rax
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegDeleteTreeW]
mov dword [rsp + 0x28], eax
cmp dword [rsp + 0x28], 0
je 0x1401543e9
mov byte [rsp + 0x23], 0
lea rcx, [rsp + 0x38]
call fcn.140007333
nop
lea rcx, [rsp + 0x90]
call fcn.140007333
movzx eax, byte [rsp + 0x23]
jmp 0x14015440b
mov byte [rsp + 0x24], 1
lea rcx, [rsp + 0x38]
call fcn.140007333
nop
lea rcx, [rsp + 0x90]
call fcn.140007333
movzx eax, byte [rsp + 0x24]
add rsp, 0xc8
ret