Function at 0x12450
Capabilities:
Create device object

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x50
mov rdi, rcx
lea rdx, [0x00021130]
lea rcx, [rsp + 0x40]
call qword [sym.imp.ntoskrnl.exe_RtlInitUnicodeString]
lea r9, [0x00025778]
lea r8, [0x00025780]
lea rcx, [rsp + 0x40]
mov edx, 0x1f01ff
call qword [sym.imp.ntoskrnl.exe_IoGetDeviceObjectPointer]
xor esi, esi
test eax, eax
js 0x12586
mov rcx, qword [0x00025778]
test byte [rcx + 0x30], 0x80
je 0x124bb
and dword [rcx + 0x30], 0xffffff7f
mov rcx, qword [0x00025778]
mov bl, 1
jmp 0x124bd
xor bl, bl
mov r9d, dword [rcx + 0x48]
lea rax, [0x00025770]
lea r8, [0x00024f00]
mov qword [rsp + 0x30], rax
mov eax, dword [rcx + 0x34]
xor edx, edx
mov rcx, rdi
mov byte [rsp + 0x28], sil
mov dword [rsp + 0x20], eax
call qword [sym.imp.ntoskrnl.exe_IoCreateDevice]
test eax, eax
jns 0x1250c
mov rcx, qword [0x00025780]
call qword [sym.imp.ntoskrnl.exe_ObfDereferenceObject]
mov qword [0x00025770], rsi
mov qword [0x00025778], rsi
jmp 0x12586
mov rdx, qword [0x00025778]
mov rcx, qword [0x00025770]
call qword [sym.imp.ntoskrnl.exe_IoAttachDeviceToDeviceStack]
test rax, rax
mov qword [0x00025778], rax
jne 0x12556
mov rcx, qword [0x00025780]
call qword [sym.imp.ntoskrnl.exe_ObfDereferenceObject]
mov rcx, qword [0x00025770]
call qword [sym.imp.ntoskrnl.exe_IoDeleteDevice]
mov qword [0x00025770], rsi
mov qword [0x00025778], rsi
jmp 0x12586
mov eax, dword [rax + 0x30]
mov rcx, qword [0x00025770]
and eax, 0x14
or dword [rcx + 0x30], eax
mov rax, qword [0x00025770]
and dword [rax + 0x30], 0xffffff7f
test bl, bl
je 0x12586
mov rax, qword [0x00025778]
or dword [rax + 0x30], 0x80
lea rdx, [0x00021150]
lea rcx, [rsp + 0x40]
call qword [sym.imp.ntoskrnl.exe_RtlInitUnicodeString]
lea r9, [0x00025790]
lea r8, [0x00025798]
lea rcx, [rsp + 0x40]
mov edx, 0x1f01ff
call qword [sym.imp.ntoskrnl.exe_IoGetDeviceObjectPointer]
test eax, eax
js 0x126c8
mov rcx, qword [0x00025790]
test byte [rcx + 0x30], 0x80
je 0x125dd
and dword [rcx + 0x30], 0xffffff7f
mov rcx, qword [0x00025790]
mov bl, 1
jmp 0x125df
xor bl, bl
mov r9d, dword [rcx + 0x48]
lea rax, [0x00025788]
lea r8, [0x00025110]
mov qword [rsp + 0x30], rax
mov eax, dword [rcx + 0x34]
xor edx, edx
mov rcx, rdi
mov byte [rsp + 0x28], sil
mov dword [rsp + 0x20], eax
call qword [sym.imp.ntoskrnl.exe_IoCreateDevice]
test eax, eax
jns 0x1263e
mov rcx, qword [0x00025798]
call qword [sym.imp.ntoskrnl.exe_ObfDereferenceObject]
mov qword [0x00025788], rsi
mov qword [0x00025790], rsi
xor eax, eax
mov rbx, qword [rsp + 0x60]
mov rsi, qword [rsp + 0x68]
add rsp, 0x50
pop rdi
ret
mov rdx, qword [0x00025790]
mov rcx, qword [0x00025788]
call qword [sym.imp.ntoskrnl.exe_IoAttachDeviceToDeviceStack]
test rax, rax
mov qword [0x00025790], rax
jne 0x12698
mov rcx, qword [0x00025798]
call qword [sym.imp.ntoskrnl.exe_ObfDereferenceObject]
mov rcx, qword [0x00025788]
call qword [sym.imp.ntoskrnl.exe_IoDeleteDevice]
mov qword [0x00025788], rsi
mov qword [0x00025790], rsi
xor eax, eax
mov rbx, qword [rsp + 0x60]
mov rsi, qword [rsp + 0x68]
add rsp, 0x50
pop rdi
ret
mov eax, dword [rax + 0x30]
mov rcx, qword [0x00025788]
and eax, 0x14
or dword [rcx + 0x30], eax
mov rax, qword [0x00025788]
and dword [rax + 0x30], 0xffffff7f
test bl, bl
je 0x126c8
mov rax, qword [0x00025790]
or dword [rax + 0x30], 0x80
mov rbx, qword [rsp + 0x60]
mov rsi, qword [rsp + 0x68]
xor eax, eax
add rsp, 0x50
pop rdi
ret