Function at 0x140001490
Capabilities:
Check if file exists
Get common file path
Get file attributes

Disassembly:
push rdi
sub rsp, 0x470
mov rax, qword [0x14001c008]
xor rax, rsp
mov qword [rsp + 0x460], rax
mov rdi, qword [rcx]
xor edx, edx
lea rcx, [rsp + 0x250]
mov r8d, 0x208
call sub.VCRUNTIME140.dll_memset
lea rdx, [rsp + 0x250]
mov ecx, 0x104
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
xor edx, edx
lea rcx, [rsp + 0x40]
mov r8d, 0x208
call sub.VCRUNTIME140.dll_memset
movups xmm0, xmmword [str.gdrv.sys]
movzx eax, word [0x14000a5f8]
lea rcx, [rsp + 0x40]
mov word [rsp + 0x38], ax
movups xmmword [rsp + 0x28], xmm0
mov r8, qword [rdi + 0x20]
test r8, r8
jne 0x140001565
mov r9d, 0x104
mov dword [rsp + 0x20], 0x5c
mov edx, r9d
lea r8, [rsp + 0x250]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncat_s]
mov r9d, 2
lea r8, [rsp + 0x20]
mov edx, 0x104
lea rcx, [rsp + 0x40]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncat_s]
mov r9d, 9
lea r8, [rsp + 0x28]
mov edx, 0x104
lea rcx, [rsp + 0x40]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncat_s]
jmp 0x140001570
mov edx, 0x104
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscat_s]
lea rcx, [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x1400016de
test al, 0x10
jne 0x1400016de
lea rcx, [rsp + 0x40]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsdup]
lea rdx, [rsp + 0x20]
mov qword [rsp + 0x20], 0
mov rcx, rax
mov qword [rdi + 0x20], rax
call fcn.1400045f0
test eax, eax
je 0x14000160d
lea rcx, str.___Vulnerable_driver_was_already_installed
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__putws]
mov rcx, qword [0x14001e6c0]
test rcx, rcx
je 0x1400015d3
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov rcx, qword [rsp + 0x20]
call sub.api_ms_win_crt_string_l1_1_0.dll__wcsdup
mov qword [0x14001e6c0], rax
test rax, rax
jne 0x1400016ae
lea rcx, str.____Error_while_attempting_to_set_the_service_name.
call sub.api_ms_win_crt_stdio_l1_1_0.dll__putws
lea rcx, [0x14000a8e8]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__putws]
xor eax, eax
jmp 0x1400016f4
lea rcx, str.___Installing_vulnerable_driver...
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__putws]
mov rcx, qword [rdi + 0x20]
call fcn.1400044d0
cmp eax, 1
je 0x1400016a3
lea rcx, str.____An_error_occurred_while_installing_the_vulnerable_driver
mov qword [rsp + 0x488], rbx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__putws]
lea rcx, str.___Uninstalling_the_service_and_attempting_the_install_again...
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__putws]
mov ecx, 0x4e20
call qword [sym.imp.KERNEL32.dll_Sleep]
mov rcx, qword [0x14001c0a0]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [0x14001c0a0], 0xffffffffffffffff
call fcn.140004570
mov ecx, 0x7d0
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_Sleep]
test ebx, ebx
mov rbx, qword [rsp + 0x488]
je 0x1400016bf
mov rcx, qword [rdi + 0x20]
call fcn.1400044d0
test eax, eax
je 0x1400016bf
mov ecx, 0x7d0
call qword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, 0x1388
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rcx, [0x14000a8e8]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__putws]
xor eax, eax
jmp 0x1400016f4
mov ecx, 0x7d0
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rcx, str.____New_uninstall___install_attempt_failed__make_sure_that_there_is_no_trace_of_the_driver_left...
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__putws]
mov eax, 3
jmp 0x1400016f4
lea rdx, [rsp + 0x40]
lea rcx, [0x14000a600]
call fcn.140001430
mov eax, 2
mov rcx, qword [rsp + 0x460]
xor rcx, rsp
call fcn.1400085d0
add rsp, 0x470
pop rdi
ret