Function at 0x18002f640
Capabilities:
Check if file exists

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r14
push r15
lea rbp, [rsp - 0x180]
sub rsp, 0x280
mov rax, qword [0x18004e508]
xor rax, rsp
mov qword [rbp + 0x170], rax
mov r15, rdx
mov r14, rcx
xor esi, esi
mov qword [rsp + 0x40], rsi
mov rbx, qword [r8]
lea rax, [rsp + 0x40]
mov qword [rsp + 0x48], rax
call fcn.1800015f0
mov rcx, rax
test rax, rax
je 0x18002f912
mov rax, qword [rax]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x40], rax
lea rdi, [rsi - 1]
test rbx, rbx
je 0x18002f6dc
cmp rbx, 0x10000
jae 0x18002f6c7
movzx edx, bx
lea rcx, [rsp + 0x40]
call fcn.180006c90
jmp 0x18002f6ef
mov rax, rdi
nop word [rax + rax]
inc rax
cmp word [rbx + rax*2], 0
jne 0x18002f6d0
jmp 0x18002f6de
mov eax, esi
mov r8d, eax
mov rdx, rbx
lea rcx, [rsp + 0x40]
call fcn.180006f60
nop
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.SHLWAPI.dll_PathIsRelativeW]
test eax, eax
je 0x18002f7e0
xor edx, edx
mov r8d, 0x208
lea rcx, [rsp + 0x60]
call sub.VCRUNTIME140.dll_memset
mov r8d, 0x104
lea rdx, [rsp + 0x60]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea rcx, [rsp + 0x60]
call qword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
mov rdx, qword [rsp + 0x40]
lea rcx, [rsp + 0x60]
call qword [sym.imp.SHLWAPI.dll_PathAppendW]
lea rax, [rsp + 0x30]
mov qword [rsp + 0x48], rax
call fcn.1800015f0
mov rcx, rax
test rax, rax
je 0x18002f907
mov rax, qword [rax]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x60]
cmp rax, 0x10000
jae 0x18002f78d
lea rax, [rsp + 0x60]
movzx edx, ax
lea rcx, [rsp + 0x30]
call fcn.180006c90
jmp 0x18002f7b2
lea rcx, [rsp + 0x60]
mov rax, rdi
inc rax
cmp word [rcx + rax*2], 0
jne 0x18002f795
mov r8d, eax
lea rdx, [rsp + 0x60]
lea rcx, [rsp + 0x30]
call fcn.180006f60
nop
lea rdx, [rsp + 0x30]
lea rcx, [rsp + 0x40]
call fcn.1800095f0
nop
mov rdx, qword [rsp + 0x30]
add rdx, 0xffffffffffffffe8
mov eax, edi
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x18002f7e0
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x18002f803
lea rdx, str.Driver_file_not_exist
lea ecx, [rax + 2]
call fcn.18002fab0
jmp 0x18002f8c3
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rcx, rax
lea r8, [rsp + 0x38]
mov edx, 0xf01ff
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x18002f8c3
mov rbx, qword [rsp + 0x38]
lea r8, [rsp + 0x48]
lea rdx, str.SeLoadDriverPrivilege
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
test eax, eax
je 0x18002f8b7
mov rax, qword [rsp + 0x48]
mov qword [rsp + 0x54], rax
mov dword [rsp + 0x50], 1
mov dword [rsp + 0x5c], 2
mov qword [rsp + 0x28], rsi
mov qword [rsp + 0x20], rsi
mov r9d, 0x10
lea r8, [rsp + 0x50]
xor edx, edx
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
je 0x18002f8b7
lea rcx, [r14 + 0x10]
mov rdx, qword [rsp + 0x40]
test rdx, rdx
je 0x18002f89c
mov rax, rdi
inc rax
cmp word [rdx + rax*2], 0
jne 0x18002f890
mov esi, eax
mov r8d, esi
call fcn.180006f60
lea rcx, [r14 + 8]
mov rdx, r15
call fcn.1800095f0
mov esi, 1
jmp 0x18002f8c3
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
mov rdx, qword [rsp + 0x40]
add rdx, 0xffffffffffffffe8
lock xadd dword [rdx + 0x10], edi
sub edi, 1
jg 0x18002f8df
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
mov eax, esi
mov rcx, qword [rbp + 0x170]
xor rcx, rsp
call fcn.18002ce50
mov rbx, qword [rsp + 0x2c8]
add rsp, 0x280
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret
mov ecx, 0x80004005
call fcn.180001450
nop
mov ecx, 0x80004005
call fcn.180001450
int3