Function at 0x140024940
Capabilities:
Delete registry key

Disassembly:
mov qword [rsp + 8], rcx
sub rsp, 0x118
mov rax, qword [0x140074060]
xor rax, rsp
mov qword [rsp + 0x100], rax
mov dword [rsp + 0x40], 0
lea rcx, [0x14006caf8]
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov qword [rsp + 0x38], rax
cmp qword [rsp + 0x38], 0
jne 0x140024987
xor al, al
jmp 0x140024c55
mov r8, qword [rsp + 0x120]
lea rdx, str.RegistryMachineSystemCurrentControlSetServices_
lea rcx, [rsp + 0xd0]
call fcn.140024c70
nop
lea rax, [rsp + 0xd0]
mov rcx, rax
call fcn.14000da4c
mov qword [rsp + 0x48], rax
mov rdx, qword [rsp + 0x48]
lea rcx, [rsp + 0xf0]
call qword [sym.imp.ntdll.dll_RtlInitUnicodeString]
mov r8, qword [rsp + 0x120]
lea rdx, str.SYSTEMCurrentControlSetServices_
lea rcx, [rsp + 0xb0]
call fcn.140024c70
nop
lea rax, [rsp + 0xb0]
mov rcx, rax
call fcn.14000da4c
mov qword [rsp + 0x50], rax
lea r8, [rsp + 0xa8]
mov rdx, qword [rsp + 0x50]
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
mov dword [rsp + 0x28], eax
cmp dword [rsp + 0x28], 0
je 0x140024a7c
cmp dword [rsp + 0x28], 2
jne 0x140024a53
mov byte [rsp + 0x20], 1
lea rcx, [rsp + 0xb0]
call fcn.14000d484
nop
lea rcx, [rsp + 0xd0]
call fcn.14000d484
mov al, byte [rsp + 0x20]
jmp 0x140024c55
mov byte [rsp + 0x21], 0
lea rcx, [rsp + 0xb0]
call fcn.14000d484
nop
lea rcx, [rsp + 0xd0]
call fcn.14000d484
mov al, byte [rsp + 0x21]
jmp 0x140024c55
mov rcx, qword [rsp + 0xa8]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea rdx, str.NtUnloadDriver
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rsp + 0x58], rax
mov rax, qword [rsp + 0x58]
mov qword [rsp + 0x60], rax
lea rcx, [rsp + 0xf0]
call qword [rsp + 0x60]
mov dword [rsp + 0x2c], eax
lea rdx, str.___NtUnloadDriver_Status_0x
lea rcx, [0x140075750]
call fcn.1400120b8
mov qword [rsp + 0x30], rax
lea rax, [0x1400035b0]
mov qword [rsp + 0x68], rax
mov rax, qword [rsp + 0x30]
mov rax, qword [rax]
movsxd rax, dword [rax + 4]
mov rcx, qword [rsp + 0x30]
add rcx, rax
mov rax, rcx
mov rcx, rax
call qword [rsp + 0x68]
mov rax, qword [rsp + 0x30]
mov qword [rsp + 0x70], rax
mov edx, dword [rsp + 0x2c]
mov rcx, qword [rsp + 0x70]
call fcn.14001f7a8
mov qword [rsp + 0x78], rax
lea rax, [0x140011e28]
mov qword [rsp + 0x80], rax
mov rcx, qword [rsp + 0x78]
call qword [rsp + 0x80]
cmp dword [rsp + 0x2c], 0
je 0x140024bd3
lea rdx, str.____Driver_Unload_Failed__
lea rcx, [0x140075750]
call fcn.1400120b8
mov qword [rsp + 0x88], rax
lea rax, [0x140011e28]
mov qword [rsp + 0x90], rax
mov rcx, qword [rsp + 0x88]
call qword [rsp + 0x90]
lea rax, [rsp + 0xb0]
mov rcx, rax
call fcn.14000da4c
mov qword [rsp + 0x98], rax
mov rdx, qword [rsp + 0x98]
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegDeleteTreeW]
mov dword [rsp + 0x28], eax
mov byte [rsp + 0x22], 0
lea rcx, [rsp + 0xb0]
call fcn.14000d484
nop
lea rcx, [rsp + 0xd0]
call fcn.14000d484
mov al, byte [rsp + 0x22]
jmp 0x140024c55
lea rax, [rsp + 0xb0]
mov rcx, rax
call fcn.14000da4c
mov qword [rsp + 0xa0], rax
mov rdx, qword [rsp + 0xa0]
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegDeleteTreeW]
mov dword [rsp + 0x28], eax
cmp dword [rsp + 0x28], 0
je 0x140024c31
mov byte [rsp + 0x23], 0
lea rcx, [rsp + 0xb0]
call fcn.14000d484
nop
lea rcx, [rsp + 0xd0]
call fcn.14000d484
mov al, byte [rsp + 0x23]
jmp 0x140024c55
mov byte [rsp + 0x24], 1
lea rcx, [rsp + 0xb0]
call fcn.14000d484
nop
lea rcx, [rsp + 0xd0]
call fcn.14000d484
mov al, byte [rsp + 0x24]
mov rcx, qword [rsp + 0x100]
xor rcx, rsp
call fcn.140029d90
add rsp, 0x118
ret