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

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rdi
push rbp
lea rbp, [rsp - 0x5b0]
sub rsp, 0x6b0
mov rax, qword [0x7ff66a893088]
xor rax, rsp
mov qword [rbp + 0x5a0], rax
movzx ebx, dx
mov rdi, rcx
call fcn.7ff66a846890
test al, al
jne 0x7ff66a84696b
lea rcx, str.Error:_Impossible_to_adjust_privilege_for_the_driver._n
call fcn.7ff66a841110
jmp 0x7ff66a846eaa
movzx r9d, bx
lea rcx, [rbp + 0x180]
mov r8, rdi
call fcn.7ff66a845080
test al, al
jne 0x7ff66a846993
lea rcx, str.Error:_Cannot_extract_driver._n
call fcn.7ff66a841110
jmp 0x7ff66a846eaa
mov qword [rsp + 0x30], 0
lea rcx, [rbp + 0x180]
mov dword [rsp + 0x28], 0x80
xor r9d, r9d
xor r8d, r8d
mov dword [rsp + 0x20], 3
mov edx, 0x80000000
call qword [sym.imp.KERNEL32.dll_CreateFileW]
cmp rax, 0xffffffffffffffff
je 0x7ff66a846e97
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rbx, qword [0x7ff66a895f88]
mov rcx, rbx
call qword [fcn.7ff66a8391c0]
xor r9d, r9d
lea rdx, [rsp + 0x48]
xor r8d, r8d
lea rcx, [rbp + 0x180]
call rbx
test al, al
je 0x7ff66a846e7c
movzx r9d, word [rsp + 0x48]
lea rcx, [rbp + 0x390]
mov r8, qword [rsp + 0x50]
mov edx, 0x104
shr r9, 1
call fcn.7ff66a841080
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, qword [rsp + 0x50]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov r9, rdi
lea r8, str.SYSTEMCurrentControlSetServices_s
mov edx, 0x104
lea rcx, [rsp + 0x70]
call fcn.7ff66a83f2d0
lea r8, [rsp + 0x40]
mov rcx, 0xffffffff80000002
lea rdx, [rsp + 0x70]
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyW]
or rbx, 0xffffffffffffffff
test eax, eax
jne 0x7ff66a846c0e
mov rcx, qword [rsp + 0x40]
lea rax, [rsp + 0x58]
mov dword [rsp + 0x28], 4
lea r9d, [rbx + 5]
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea rdx, str.Type
mov dword [rsp + 0x58], 2
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
je 0x7ff66a846abf
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Error:_Failed_to_create_Type._Error:_0x_08X._n
call fcn.7ff66a841110
lea rcx, [rbp + 0x390]
mov rax, rbx
nop dword [rax]
cmp word [rcx + rax*2 + 2], 0
lea rax, [rax + 1]
jne 0x7ff66a846ad0
mov rcx, qword [rsp + 0x40]
lea eax, [rax*2 + 2]
mov dword [rsp + 0x28], eax
lea rdx, str.ImagePath
lea rax, [rbp + 0x390]
mov r9d, 2
xor r8d, r8d
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
je 0x7ff66a846b26
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Error:_Failed_to_create_ImagePath._Error:_0x_08X._n
call fcn.7ff66a841110
mov rcx, qword [rsp + 0x40]
lea rax, [rsp + 0x58]
mov dword [rsp + 0x28], 4
lea rdx, str.Start
mov r9d, 4
mov qword [rsp + 0x20], rax
xor r8d, r8d
mov dword [rsp + 0x58], 3
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
je 0x7ff66a846b73
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Error:_Failed_to_create_Start._Error:_0x_08X._n
call fcn.7ff66a841110
mov rcx, qword [rsp + 0x40]
lea rax, str.FltMgr
mov dword [rsp + 0x28], 0xe
lea rdx, str.DependOnService
mov r9d, 7
mov qword [rsp + 0x20], rax
xor r8d, r8d
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
je 0x7ff66a846bba
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Error:_Failed_to_create_DependOnService._Error:_0x_08X._n
call fcn.7ff66a841110
mov rcx, qword [rsp + 0x40]
lea rax, str.FSFilter_Activity_Monitor
mov dword [rsp + 0x28], reloc.WS2_32.dll_gethostbyname
lea rdx, str.Group
mov r9d, 1
mov qword [rsp + 0x20], rax
xor r8d, r8d
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
je 0x7ff66a846c01
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Error:_Failed_to_create_Group._Error:_0x_08X._n
call fcn.7ff66a841110
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x7ff66a846c28
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, [rsp + 0x70]
lea rcx, str.Error:_Failed_to_create__s._Error:_0x_08X._n
call fcn.7ff66a841110
lea r8, str.Instances
lea rcx, [rsp + 0x70]
call fcn.7ff66a8381a0
lea r8, [rsp + 0x40]
mov rcx, 0xffffffff80000002
lea rdx, [rsp + 0x70]
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyW]
test eax, eax
jne 0x7ff66a846cb0
cmp word [rdi + rbx*2 + 2], 0
lea rbx, [rbx + 1]
jne 0x7ff66a846c54
mov rcx, qword [rsp + 0x40]
lea eax, [rbx*2 + 2]
mov dword [rsp + 0x28], eax
lea rdx, str.DefaultInstance
mov r9d, 1
mov qword [rsp + 0x20], rdi
xor r8d, r8d
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
je 0x7ff66a846ca3
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Error:_Failed_to_create_DefaultInstance._Error:_0x_08X._n
call fcn.7ff66a841110
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x7ff66a846cca
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, [rsp + 0x70]
lea rcx, str.Error:_Failed_to_create__s._Error:_0x_08X._n
call fcn.7ff66a841110
lea r8, [0x7ff66a8874cc]
lea rcx, [rsp + 0x70]
call fcn.7ff66a8381a0
mov r8, rdi
lea rcx, [rsp + 0x70]
call fcn.7ff66a8381a0
lea r8, [rsp + 0x40]
mov rcx, 0xffffffff80000002
lea rdx, [rsp + 0x70]
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyW]
test eax, eax
jne 0x7ff66a846da8
mov rcx, qword [rsp + 0x40]
lea rax, str.389110
mov dword [rsp + 0x28], 0xe
lea rdx, str.Altitude
mov r9d, 1
mov qword [rsp + 0x20], rax
xor r8d, r8d
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
je 0x7ff66a846d4e
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Error:_Failed_to_create_Altitude._Error:_0x_08X._n
call fcn.7ff66a841110
mov rcx, qword [rsp + 0x40]
lea rax, [rsp + 0x58]
mov dword [rsp + 0x28], 4
lea rdx, str.Flags
mov r9d, 4
mov qword [rsp + 0x20], rax
xor r8d, r8d
mov dword [rsp + 0x58], 0
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
je 0x7ff66a846d9b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Error:_Failed_to_create_Flags._Error:_0x_08X._n
call fcn.7ff66a841110
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x7ff66a846dc2
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, [rsp + 0x70]
lea rcx, str.Error:_Failed_to_create__s._Error:_0x_08X._n
call fcn.7ff66a841110
mov r9, rdi
lea r8, str.RegistryMachineSystemCurrentControlSetServices_s
mov edx, 0x104
lea rcx, [rsp + 0x70]
call fcn.7ff66a83f2d0
mov rbx, qword [0x7ff66a895f80]
mov rcx, rbx
call qword [fcn.7ff66a8391c0]
lea rdx, [rsp + 0x70]
lea rcx, [rsp + 0x60]
call rbx
mov rbx, qword [0x7ff66a895f38]
mov rcx, rbx
call qword [fcn.7ff66a8391c0]
lea rcx, [rsp + 0x60]
call rbx
test eax, eax
jns 0x7ff66a846e6b
mov edx, eax
lea rcx, str.Error:_Load_driver_failed_with_0x_08X_error_code._n
call fcn.7ff66a841110
lea rdx, [rsp + 0x70]
lea rcx, str._______Key:__s_n
call fcn.7ff66a841110
lea rcx, str._______Start______SERVICE_DEMAND_START_n
call fcn.7ff66a841110
lea rdx, [rbp + 0x180]
lea rcx, str._______ImagePath___s_n
call fcn.7ff66a841110
lea rcx, str._______Type_______SERVICE_FILE_SYSTEM_DRIVER_n
call fcn.7ff66a841110
lea rcx, [rbp + 0x180]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x7ff66a846eaa
lea rcx, [rbp + 0x180]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
mov al, 1
jmp 0x7ff66a846eac
lea rcx, str.Error:_Failed_to_convert_DriverPath_to_NtPath_n
call fcn.7ff66a841110
lea rcx, [rbp + 0x180]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x7ff66a846eaa
lea rdx, [rbp + 0x180]
lea rcx, str.Error:_Driver_is_not_found._Please_double_check_at_:_n___s_n
call fcn.7ff66a841110
xor al, al
mov rcx, qword [rbp + 0x5a0]
xor rcx, rsp
call fcn.7ff66a8489f0
lea r11, [rsp + 0x6b0]
mov rbx, qword [r11 + 0x20]
mov rdi, qword [r11 + 0x28]
mov rsp, r11
pop rbp
ret