Function at 0x140001830
Capabilities:
Delete file
Unload driver
Write file on windows

Disassembly:
push rbp
sub rsp, 0x4b0
mov rax, qword [section..data]
xor rax, rsp
mov qword [rsp + 0x490], rax
mov rbp, rdx
cmp ecx, 2
jge 0x140001866
lea rcx, str.Invalid_arguments._Usage:_GDRVLoader.exe_TargetDriver.sys_n
call fcn.140001010
xor eax, eax
jmp 0x140001a76
mov qword [rsp + 0x4a8], rdi
lea rcx, str.Load_or_unload_driver__n
mov qword [rsp + 0x4a0], r14
mov edi, 0xc0000001
call fcn.140001010
lea rdx, [rsp + 0x58]
lea rcx, [0x1400034e8]
call fcn.1400017e0
xor r14d, r14d
mov qword [rsp + 0x4c0], rbx
mov ecx, r14d
mov qword [rsp + 0x4d0], rsi
lea rdx, [rsp + 0x58]
lea r8, str.LOAD
nop word [rax + rax]
movzx eax, byte [rdx + rcx]
inc rcx
cmp al, byte [r8 + rcx - 1]
jne 0x1400018d6
cmp rcx, 5
jne 0x1400018c0
jmp 0x140001908
mov rcx, r14
lea rdx, [rsp + 0x58]
lea r8, str.load
nop word [rax + rax]
movzx eax, byte [rdx + rcx]
inc rcx
cmp al, byte [r8 + rcx - 1]
jne 0x140001a8f
cmp rcx, 5
jne 0x1400018f0
mov qword [rsp + 0x30], r14
lea rcx, str.C:WindowsSystem32Driversgdrv.sys
mov dword [rsp + 0x28], 0x80
xor r9d, r9d
xor r8d, r8d
mov dword [rsp + 0x20], 1
mov edx, 0x10000000
mov dword [rsp + 0x44], r14d
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rsi, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x50
je 0x140001985
cmp rsi, 0xffffffffffffffff
je 0x140001a43
lea r9, [rsp + 0x44]
mov qword [rsp + 0x20], r14
mov r8d, 0x6650
lea rdx, [0x140005080]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, rsi
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test bl, bl
je 0x140001a43
mov rbx, qword [rbp + 8]
lea r9, [rsp + 0x40]
xor r8d, r8d
mov dl, 1
lea ecx, [r8 + 0xa]
call qword [sym.imp.ntdll.dll_RtlAdjustPrivilege]
mov edi, eax
test eax, eax
js 0x140001a32
xor r9d, r9d
mov qword [rsp + 0x20], r14
lea r8, [rsp + 0x280]
mov edx, 0x208
lea rcx, str.C:WindowsSystem32Driversgdrv.sys
call qword [sym.imp.ntdll.dll_RtlGetFullPathName_UEx]
mov edi, eax
test eax, eax
js 0x140001a32
xor r9d, r9d
mov qword [rsp + 0x20], r14
lea r8, [rsp + 0x70]
mov edx, 0x208
mov rcx, rbx
call qword [sym.imp.ntdll.dll_RtlGetFullPathName_UEx]
mov edi, eax
test eax, eax
js 0x140001a32
lea rdx, [rsp + 0x70]
lea rcx, [0x14000bed0]
call fcn.140001340
mov edi, eax
test eax, eax
js 0x140001a32
lea rdx, [rsp + 0x280]
lea rcx, [0x14000c0e0]
call fcn.140001340
mov edi, eax
test eax, eax
js 0x140001a32
call fcn.140001450
lea rcx, str.Driver_loaded_successfully_n
call fcn.140001010
lea rcx, str.C:WindowsSystem32Driversgdrv.sys
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
test edi, edi
jns 0x140001a51
mov edx, edi
lea rcx, str.Error:__08X_n
call fcn.140001010
mov r14, qword [rsp + 0x4a0]
mov eax, 1
mov rdi, qword [rsp + 0x4a8]
mov rsi, qword [rsp + 0x4d0]
mov rbx, qword [rsp + 0x4c0]
mov rcx, qword [rsp + 0x490]
xor rcx, rsp
call fcn.140001bf0
add rsp, 0x4b0
pop rbp
ret
mov rcx, r14
lea rdx, [rsp + 0x58]
lea r8, str.Unload
nop
movzx eax, byte [rdx + rcx]
inc rcx
cmp al, byte [r8 + rcx - 1]
jne 0x140001ab6
cmp rcx, 7
jne 0x140001aa0
jmp 0x140001ae8
mov rcx, r14
lea rdx, [rsp + 0x58]
lea r8, str.unload
nop word [rax + rax]
movzx eax, byte [rdx + rcx]
inc rcx
cmp al, byte [r8 + rcx - 1]
jne 0x140001a43
cmp rcx, 7
jne 0x140001ad0
mov rbx, qword [rbp + 8]
lea r9, [rsp + 0x40]
xor r8d, r8d
mov dl, 1
lea ecx, [r8 + 0xa]
call qword [sym.imp.ntdll.dll_RtlAdjustPrivilege]
mov edi, eax
test eax, eax
js 0x140001a43
mov edi, 0x34
lea rsi, [0x14000bed0]
lea r8, str.RegistryMachineSystemCurrentControlSetServices_
mov rcx, rsi
lea edx, [rdi + 1]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscpy_s]
movzx ecx, word [rbx]
mov rdx, rbx
test cx, cx
je 0x140001b8b
nop dword [rax]
nop dword [rax + rax]
add rdx, 2
cmp cx, 0x5c
mov rax, rdx
cmovne rax, rbx
movzx ecx, word [rdx]
mov rbx, rax
test cx, cx
jne 0x140001b40
movzx ecx, word [rax]
test cx, cx
je 0x140001b8b
lea rax, [0x14000bf38]
nop dword [rax]
cmp cx, 0x2e
je 0x140001b8b
add rbx, 2
mov word [rax], cx
inc edi
add rax, 2
movzx ecx, word [rbx]
test cx, cx
jne 0x140001b70
movsxd rax, edi
lea rcx, [rsp + 0x48]
mov rdx, rsi
mov word [rsi + rax*2], r14w
call qword [sym.imp.ntdll.dll_RtlInitUnicodeString]
lea rcx, [rsp + 0x48]
call qword [sym.imp.ntdll.dll_NtUnloadDriver]
movzx edx, byte [rsp + 0x40]
lea r9, [rsp + 0x40]
xor r8d, r8d
mov edi, eax
lea ecx, [r8 + 0xa]
call qword [sym.imp.ntdll.dll_RtlAdjustPrivilege]
test edi, edi
js 0x140001a43
lea rcx, str.Driver_unloaded_successfully_n
call fcn.140001010
jmp 0x140001a51