Function at 0x21840
Capabilities:
Create device object
Print debug messages

Disassembly:
mov qword [rsp + 0x18], r8
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
sub rsp, 0xb8
call fcn.00016210
movzx eax, al
cmp eax, 1
jle 0x21895
call fcn.00016210
movzx eax, al
mov edx, eax
lea rcx, [0x00011090]
call sub.ntoskrnl.exe_DbgPrint
xor r9d, r9d
mov r8d, 0x46f
lea rdx, [0x000113c8]
lea rcx, [0x000110e4]
call qword [sym.imp.ntoskrnl.exe_RtlAssert]
cmp dword [0x0001b470], 0x10
jb 0x218a8
mov eax, 0xc000000d
jmp 0x21d50
mov dword [rsp + 0x54], 0
jmp 0x218bc
mov eax, dword [rsp + 0x54]
inc eax
mov dword [rsp + 0x54], eax
mov eax, dword [0x0001b470]
cmp dword [rsp + 0x54], eax
jae 0x218fb
mov eax, dword [rsp + 0x54]
lea rcx, [0x0001b480]
mov rdx, qword [rsp + 0xc0]
mov eax, dword [rcx + rax*4]
cmp dword [rdx + 8], eax
jne 0x218f9
lea rcx, [0x000115a0]
call sub.ntoskrnl.exe_DbgPrint
mov eax, 0xc000000d
jmp 0x21d50
jmp 0x218b2
mov r8d, 0x4d525356
mov edx, 0x1530
xor ecx, ecx
call qword [sym.imp.ntoskrnl.exe_ExAllocatePoolWithTag]
mov qword [rsp + 0x48], rax
cmp qword [rsp + 0x48], 0
jne 0x21925
mov eax, 0xc000009a
jmp 0x21d50
lea rcx, [0x000115d0]
call sub.ntoskrnl.exe_DbgPrint
mov r8d, 0x34
mov rdx, qword [rsp + 0xc0]
lea rcx, [rsp + 0x70]
call fcn.00013690
mov rdx, qword [rsp + 0x48]
lea rcx, [rsp + 0x70]
call fcn.000237a0
mov dword [rsp + 0x50], eax
cmp dword [rsp + 0x50], 0
jge 0x21990
cmp qword [rsp + 0x48], 0
je 0x2197b
mov edx, 0x4d525356
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
lea rcx, [0x000115f0]
call sub.ntoskrnl.exe_DbgPrint
mov eax, dword [rsp + 0x50]
jmp 0x21d50
lea rcx, [0x00011628]
call sub.ntoskrnl.exe_DbgPrint
mov eax, dword [0x0001b470]
lea rcx, [0x0001b4c0]
mov rdx, qword [rsp + 0xc0]
mov edx, dword [rdx + 4]
mov dword [rcx + rax*4], edx
mov eax, dword [0x0001b470]
lea rcx, [0x0001b480]
mov rdx, qword [rsp + 0xc0]
mov edx, dword [rdx + 8]
mov dword [rcx + rax*4], edx
mov eax, dword [0x0001b470]
inc eax
mov dword [0x0001b470], eax
mov eax, dword [rsp + 0xc8]
sub rax, 0x34
xor edx, edx
mov ecx, 2
div rcx
mov dword [rsp + 0x44], eax
xor eax, eax
test eax, eax
jne 0x21a11
mov rax, qword [rsp + 0xd0]
mov eax, dword [rax + 0x14]
and eax, 0x40
test eax, eax
je 0x21a57
lea rcx, [0x000113f0]
call sub.ntoskrnl.exe_DbgPrint
mov rax, qword [rsp + 0xc0]
add rax, 0x34
mov ecx, dword [rsp + 0x44]
mov dword [rsp + 0x20], ecx
mov r9, rax
mov rax, qword [rsp + 0xc0]
mov r8d, dword [rax + 8]
mov rax, qword [rsp + 0xc0]
mov edx, dword [rax + 4]
lea rcx, [0x00011650]
call sub.ntoskrnl.exe_DbgPrint
mov eax, dword [rsp + 0x44]
dec eax
mov eax, eax
mov rcx, qword [rsp + 0xc0]
movzx eax, word [rcx + rax*2 + 0x34]
test eax, eax
jne 0x21a8a
mov eax, dword [rsp + 0x44]
sub eax, 2
mov eax, eax
mov rcx, qword [rsp + 0xc0]
movzx eax, word [rcx + rax*2 + 0x34]
test eax, eax
je 0x21ab8
cmp qword [rsp + 0x48], 0
je 0x21aa2
mov edx, 0x4d525356
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
lea rcx, [0x000116c0]
call sub.ntoskrnl.exe_DbgPrint
mov eax, 0xc000000d
jmp 0x21d50
mov byte [rsp + 0x40], 1
call qword [sym.imp.ntoskrnl.exe_KeEnterCriticalRegion]
mov rax, qword [rsp + 0xd0]
add rax, 0x48
mov rcx, rax
call qword [sym.imp.ntoskrnl.exe_ExAcquireFastMutex]
mov rax, qword [rsp + 0xd0]
mov rax, qword [rax + 0x30]
mov qword [rsp + 0x60], rax
jmp 0x21af8
mov rax, qword [rsp + 0x60]
mov rax, qword [rax]
mov qword [rsp + 0x60], rax
mov rax, qword [rsp + 0xd0]
add rax, 0x30
cmp qword [rsp + 0x60], rax
je 0x21b37
mov rax, qword [rsp + 0x60]
sub rax, 0x38
mov qword [rsp + 0x58], rax
mov rax, qword [rsp + 0xc0]
mov rcx, qword [rsp + 0x58]
mov ecx, dword [rcx + 0x30]
cmp dword [rax + 4], ecx
jne 0x21b35
mov byte [rsp + 0x40], 0
jmp 0x21b37
jmp 0x21aeb
mov rax, qword [rsp + 0xd0]
add rax, 0x48
mov rcx, rax
call qword [sym.imp.ntoskrnl.exe_ExReleaseFastMutex]
call qword [sym.imp.ntoskrnl.exe_KeLeaveCriticalRegion]
movzx eax, byte [rsp + 0x40]
test eax, eax
jne 0x21b89
cmp qword [rsp + 0x48], 0
je 0x21b73
mov edx, 0x4d525356
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
lea rcx, [0x000116f8]
call sub.ntoskrnl.exe_DbgPrint
mov eax, 0xc000000d
jmp 0x21d50
mov eax, dword [rsp + 0x44]
shl rax, 1
mov dword [rsp + 0x44], eax
xor eax, eax
test eax, eax
jne 0x21bac
mov rax, qword [rsp + 0xd0]
mov eax, dword [rax + 0x14]
and eax, 0x10
test eax, eax
je 0x21bd0
lea rcx, [0x000113f0]
call sub.ntoskrnl.exe_DbgPrint
mov rax, qword [rsp + 0xd0]
mov rdx, qword [rax + 0x28]
lea rcx, [0x00011728]
call sub.ntoskrnl.exe_DbgPrint
mov rax, qword [rsp + 0xd0]
mov rax, qword [rax]
lea rcx, [rsp + 0x68]
mov qword [rsp + 0x30], rcx
mov byte [rsp + 0x28], 0
mov dword [rsp + 0x20], 0x180
mov r9d, 0x2a
xor r8d, r8d
mov edx, 0x1580
mov rcx, qword [rax + 8]
call qword [sym.imp.ntoskrnl.exe_IoCreateDevice]
mov dword [rsp + 0x50], eax
cmp dword [rsp + 0x50], 0
jge 0x21c36
cmp qword [rsp + 0x48], 0
je 0x21c2d
mov edx, 0x4d525356
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
mov eax, dword [rsp + 0x50]
jmp 0x21d50
mov rax, qword [rsp + 0x68]
mov rax, qword [rax + 0x40]
mov qword [rsp + 0x58], rax
mov eax, dword [rsp + 0x44]
mov r8d, 0x4d525356
mov edx, eax
xor ecx, ecx
call qword [sym.imp.ntoskrnl.exe_ExAllocatePoolWithTag]
mov rcx, qword [rsp + 0x58]
mov qword [rcx + 0x28], rax
mov rax, qword [rsp + 0x58]
cmp qword [rax + 0x28], 0
jne 0x21c9a
cmp qword [rsp + 0x48], 0
je 0x21c85
mov edx, 0x4d525356
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.ntoskrnl.exe_IoDeleteDevice]
mov eax, 0xc000009a
jmp 0x21d50
mov eax, dword [rsp + 0x44]
mov rcx, qword [rsp + 0xc0]
add rcx, 0x34
mov r8d, eax
mov rdx, rcx
mov rax, qword [rsp + 0x58]
mov rcx, qword [rax + 0x28]
call fcn.00013690
mov rax, qword [rsp + 0x58]
mov rcx, qword [rsp + 0xc0]
mov ecx, dword [rcx + 4]
mov dword [rax + 0x30], ecx
mov rdx, qword [rsp + 0xd0]
mov rcx, qword [rsp + 0x68]
call fcn.000216a0
mov rax, qword [rsp + 0x58]
add rax, 0x50
mov r8d, 0x1530
mov rdx, qword [rsp + 0x48]
mov rcx, rax
call fcn.00013690
xor eax, eax
test eax, eax
jne 0x21d17
mov rax, qword [rsp + 0xd0]
mov eax, dword [rax + 0x14]
and eax, 0x40
test eax, eax
je 0x21d34
lea rcx, [0x000113f0]
call sub.ntoskrnl.exe_DbgPrint
mov rdx, qword [rsp + 0x58]
lea rcx, [0x00011750]
call sub.ntoskrnl.exe_DbgPrint
cmp qword [rsp + 0x48], 0
je 0x21d4c
mov edx, 0x4d525356
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
mov eax, dword [rsp + 0x50]
add rsp, 0xb8
ret