Function at 0x140002530
Capabilities:
Delete registry key
Get system information on windows
Install driver
Persist via windows service
Set registry value
Unload driver

Disassembly:
mov byte [rsp + 0x18], r8b
mov qword [rsp + 8], rcx
push rbp
push rdi
lea rbp, [rsp - 0x5a8]
sub rsp, 0x6a8
lea rcx, [rsp + 0x30]
mov rdi, rdx
call fcn.140001e10
test eax, eax
js 0x1400029d5
lea rcx, [0x14000318c]
mov qword [rsp + 0x6a0], rbx
call fcn.140001000
xor r8d, r8d
lea r9, [rbp + 0x5d0]
mov dl, 1
lea ecx, [r8 + 0xa]
call qword [sym.imp.ntdll.dll_RtlAdjustPrivilege]
mov ebx, eax
test eax, eax
jns 0x1400025b0
lea rcx, [0x14000318c]
call fcn.140001000
mov eax, ebx
mov rbx, qword [rsp + 0x6a0]
add rsp, 0x6a8
pop rdi
pop rbp
ret
xor r9d, r9d
mov qword [rsp + 0x20], 0
lea r8, [rbp + 0x390]
mov edx, 0x208
lea rcx, str.C:WindowsSystem32Driversgdrv.sys
call qword [sym.imp.ntdll.dll_RtlGetFullPathName_UEx]
test eax, eax
js 0x1400029cd
xor r9d, r9d
mov qword [rsp + 0x20], 0
lea r8, [rbp + 0x180]
mov edx, 0x208
mov rcx, rdi
call qword [sym.imp.ntdll.dll_RtlGetFullPathName_UEx]
test eax, eax
js 0x1400029cd
lea rdx, [rbp + 0x180]
lea rcx, [0x14000a650]
call fcn.1400021f0
lea rdx, [0x14000a650]
xor ecx, ecx
call qword [sym.imp.ntdll.dll_RtlCreateRegistryKey]
test eax, eax
js 0x1400029cd
lea r8, str.___
mov dword [rbp + 0x5c0], 1
mov edx, 5
lea rcx, [rsp + 0x70]
call qword [sym.imp.ntdll.dll_wcscpy_s]
lea r8, [rbp + 0x180]
mov edx, 0x87
lea rcx, [rsp + 0x70]
call qword [sym.imp.ntdll.dll_wcscat_s]
mov rbx, 0xffffffffffffffff
lea rcx, [rsp + 0x70]
mov rax, rbx
nop word [rax + rax]
cmp word [rcx + rax*2 + 2], 0
lea rax, [rax + 1]
jne 0x140002680
lea eax, [rax*2 + 2]
mov r9d, 1
mov dword [rsp + 0x28], eax
lea r8, str.ImagePath
lea rax, [rsp + 0x70]
xor ecx, ecx
lea rdx, [0x14000a650]
mov qword [rsp + 0x20], rax
call qword [sym.imp.ntdll.dll_RtlWriteRegistryValue]
test eax, eax
js 0x1400029cd
lea rax, [rbp + 0x5c0]
mov dword [rsp + 0x28], 4
mov r9d, 4
mov qword [rsp + 0x20], rax
lea r8, str.Type
xor ecx, ecx
lea rdx, [0x14000a650]
call qword [sym.imp.ntdll.dll_RtlWriteRegistryValue]
test eax, eax
js 0x1400029cd
xor r9d, r9d
mov qword [rbp + 0x5c0], 8
lea rdx, [rbp + 0x5c0]
lea r8d, [r9 + 8]
lea ecx, [r9 + 0x67]
call qword [sym.imp.ntdll.dll_NtQuerySystemInformation]
test eax, eax
jns 0x140002730
lea rcx, [0x14000318c]
call fcn.140001000
mov eax, dword [rbp + 0x5c4]
and al, 3
cmp al, 1
je 0x140002777
lea rcx, [0x14000318c]
call fcn.140001000
lea rdx, [0x14000a650]
lea rcx, [rsp + 0x30]
call qword [sym.imp.ntdll.dll_RtlInitUnicodeString]
lea rcx, [rsp + 0x30]
call qword [sym.imp.ntdll.dll_NtLoadDriver]
mov rbx, qword [rsp + 0x6a0]
add rsp, 0x6a8
pop rdi
pop rbp
ret
lea rdx, [rbp + 0x390]
lea rcx, [0x14000a860]
call fcn.1400021f0
lea rdx, [0x14000a860]
xor ecx, ecx
call qword [sym.imp.ntdll.dll_RtlCreateRegistryKey]
test eax, eax
js 0x1400029cd
lea r8, str.___
mov dword [rbp + 0x5c0], 1
mov edx, 5
lea rcx, [rsp + 0x70]
call qword [sym.imp.ntdll.dll_wcscpy_s]
lea r8, [rbp + 0x390]
mov edx, 0x87
lea rcx, [rsp + 0x70]
call qword [sym.imp.ntdll.dll_wcscat_s]
lea rax, [rsp + 0x70]
nop
cmp word [rax + rbx*2 + 2], 0
lea rbx, [rbx + 1]
jne 0x1400027e0
lea eax, [rbx*2 + 2]
mov r9d, 1
mov dword [rsp + 0x28], eax
lea r8, str.ImagePath
lea rax, [rsp + 0x70]
xor ecx, ecx
lea rdx, [0x14000a860]
mov qword [rsp + 0x20], rax
call qword [sym.imp.ntdll.dll_RtlWriteRegistryValue]
test eax, eax
js 0x1400029cd
lea rax, [rbp + 0x5c0]
mov dword [rsp + 0x28], 4
mov r9d, 4
mov qword [rsp + 0x20], rax
lea r8, str.Type
xor ecx, ecx
lea rdx, [0x14000a860]
call qword [sym.imp.ntdll.dll_RtlWriteRegistryValue]
test eax, eax
js 0x1400029cd
mov rdx, qword [rsp + 0x30]
lea r9, [rbp + 0x5c0]
xor r8d, r8d
call fcn.140002290
lea rcx, [0x14000318c]
mov edi, eax
test eax, eax
jns 0x140002888
call fcn.140001000
jmp 0x140002988
call fcn.140001000
mov rax, qword gs:[0x30]
mov rcx, qword [rax + 0x60]
mov eax, 0x23f0
cmp word [rcx + 0x120], ax
jb 0x1400028b4
lea rcx, [0x14000318c]
call fcn.140001000
lea rcx, [0x14000318c]
call fcn.140001000
lea rdx, [0x14000a650]
lea rcx, [rsp + 0x40]
call qword [sym.imp.ntdll.dll_RtlInitUnicodeString]
lea rcx, [rsp + 0x40]
call qword [sym.imp.ntdll.dll_NtLoadDriver]
cmp eax, 0xc000010e
jne 0x140002922
lea rdx, [0x14000a650]
lea rcx, [rsp + 0x50]
call qword [sym.imp.ntdll.dll_RtlInitUnicodeString]
lea rcx, [rsp + 0x50]
call qword [sym.imp.ntdll.dll_NtUnloadDriver]
test eax, eax
js 0x140002922
lea rdx, [0x14000a650]
lea rcx, [rsp + 0x60]
call qword [sym.imp.ntdll.dll_RtlInitUnicodeString]
lea rcx, [rsp + 0x60]
call qword [sym.imp.ntdll.dll_NtLoadDriver]
lea rcx, [0x14000318c]
call fcn.140001000
mov r8d, dword [rbp + 0x5c0]
xor r9d, r9d
mov rdx, qword [rsp + 0x30]
call fcn.140002290
lea rcx, [0x14000318c]
mov ebx, eax
call fcn.140001000
lea rdx, [0x14000a860]
lea rcx, [rsp + 0x30]
call qword [sym.imp.ntdll.dll_RtlInitUnicodeString]
lea rcx, [rsp + 0x30]
call qword [sym.imp.ntdll.dll_NtUnloadDriver]
lea rdx, str.SYSTEMControlSet001Servicesgdrv
mov rcx, 0xffffffff80000002
call qword [sym.imp.SHLWAPI.dll_SHDeleteKeyW]
xor edi, edi
test ebx, ebx
cmovns edi, ebx
lea rdx, str.SYSTEMControlSet001Servicesioctl_build
mov rcx, 0xffffffff80000002
call qword [sym.imp.SHLWAPI.dll_SHDeleteKeyW]
lea rdx, str.SYSTEMControlSet001Services_spoof
mov rcx, 0xffffffff80000002
call qword [sym.imp.SHLWAPI.dll_SHDeleteKeyW]
movzx edx, byte [rbp + 0x5d0]
lea r9, [rbp + 0x5d0]
xor r8d, r8d
lea ecx, [r8 + 0xa]
call qword [sym.imp.ntdll.dll_RtlAdjustPrivilege]
mov eax, edi
mov rbx, qword [rsp + 0x6a0]
add rsp, 0x6a8
pop rdi
pop rbp
ret