Function at 0x140037970
Capabilities:
Allocate or change rwx memory
Get system information on windows
Make suspicious ntquerysysteminformation call

Disassembly:
mov qword [rsp + 8], rcx
push rsi
push rdi
sub rsp, 0xf8
mov rax, qword [0x14018e080]
xor rax, rsp
mov qword [rsp + 0xe8], rax
mov dword [rsp + 0xb0], 0
mov qword [rsp + 0x28], 0
lea r9, [rsp + 0xb0]
mov r8d, dword [rsp + 0xb0]
mov rdx, qword [rsp + 0x28]
mov ecx, 0x40
call sub.ntdll.dll_NtQuerySystemInformation
mov dword [rsp + 0x30], eax
cmp dword [rsp + 0x30], 0xc0000004
jne 0x140037a2b
mov r8d, 0x8000
xor edx, edx
mov rcx, qword [rsp + 0x28]
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, dword [rsp + 0xb0]
mov r9d, 4
mov r8d, 0x3000
mov edx, eax
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov qword [rsp + 0x28], rax
lea r9, [rsp + 0xb0]
mov r8d, dword [rsp + 0xb0]
mov rdx, qword [rsp + 0x28]
mov ecx, 0x40
call sub.ntdll.dll_NtQuerySystemInformation
mov dword [rsp + 0x30], eax
jmp 0x1400379c7
cmp dword [rsp + 0x30], 0
jl 0x140037a3a
cmp qword [rsp + 0x28], 0
jne 0x140037a5c
cmp qword [rsp + 0x28], 0
je 0x140037a55
mov r8d, 0x8000
xor edx, edx
mov rcx, qword [rsp + 0x28]
call qword [sym.imp.KERNEL32.dll_VirtualFree]
xor al, al
jmp 0x140037e8c
mov qword [rsp + 0x38], 0
mov rax, qword [rsp + 0x28]
mov qword [rsp + 0x40], rax
mov dword [rsp + 0x24], 0
jmp 0x140037a83
mov eax, dword [rsp + 0x24]
inc eax
mov dword [rsp + 0x24], eax
mov eax, dword [rsp + 0x24]
mov rcx, qword [rsp + 0x40]
cmp rax, qword [rcx]
jae 0x140037aec
mov eax, dword [rsp + 0x24]
imul rax, rax, 0x28
lea rcx, [rsp + 0x88]
mov rdx, qword [rsp + 0x40]
mov rdi, rcx
lea rsi, [rdx + rax + 0x10]
mov ecx, 0x28
rep movsb byte [rdi], byte [rsi]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov eax, eax
cmp qword [rsp + 0x90], rax
je 0x140037ac9
jmp 0x140037a79
mov rax, qword [rsp + 0x110]
cmp qword [rsp + 0x98], rax
jne 0x140037aea
mov rax, qword [rsp + 0x88]
mov qword [rsp + 0x38], rax
jmp 0x140037aec
jmp 0x140037a79
mov r8d, 0x8000
xor edx, edx
mov rcx, qword [rsp + 0x28]
call qword [sym.imp.KERNEL32.dll_VirtualFree]
cmp qword [rsp + 0x38], 0
jne 0x140037b0e
xor al, al
jmp 0x140037e8c
mov qword [rsp + 0xd8], 0
mov rax, qword [rsp + 0x38]
add rax, 8
mov r9d, 8
lea r8, [rsp + 0xd8]
mov rdx, rax
mov rcx, qword [rsp + 0x110]
call fcn.14003b0a0
movzx eax, al
test eax, eax
je 0x140037b53
cmp qword [rsp + 0xd8], 0
jne 0x140037b84
lea rdx, str.____Failed_to_find_device_object
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcout]
call fcn.140030e60
mov qword [rsp + 0x48], rax
lea rdx, [0x140035500]
mov rcx, qword [rsp + 0x48]
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]
xor al, al
jmp 0x140037e8c
mov qword [rsp + 0xe0], 0
mov rax, qword [rsp + 0xd8]
add rax, 8
mov r9d, 8
lea r8, [rsp + 0xe0]
mov rdx, rax
mov rcx, qword [rsp + 0x110]
call fcn.14003b0a0
movzx eax, al
test eax, eax
je 0x140037bcc
cmp qword [rsp + 0xe0], 0
jne 0x140037bfd
lea rdx, str.____Failed_to_find_driver_object
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcout]
call fcn.140030e60
mov qword [rsp + 0x50], rax
lea rdx, [0x140035500]
mov rcx, qword [rsp + 0x50]
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]
xor al, al
jmp 0x140037e8c
mov qword [rsp + 0xd0], 0
mov rax, qword [rsp + 0xe0]
add rax, 0x28
mov r9d, 8
lea r8, [rsp + 0xd0]
mov rdx, rax
mov rcx, qword [rsp + 0x110]
call fcn.14003b0a0
movzx eax, al
test eax, eax
je 0x140037c45
cmp qword [rsp + 0xd0], 0
jne 0x140037c76
lea rdx, str.____Failed_to_find_driver_section
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcout]
call fcn.140030e60
mov qword [rsp + 0x58], rax
lea rdx, [0x140035500]
mov rcx, qword [rsp + 0x58]
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]
xor al, al
jmp 0x140037e8c
lea rax, [rsp + 0xb8]
mov rdi, rax
xor eax, eax
mov ecx, 0x10
rep stosb byte [rdi], al
mov rax, qword [rsp + 0xd0]
add rax, 0x58
mov r9d, 0x10
lea r8, [rsp + 0xb8]
mov rdx, rax
mov rcx, qword [rsp + 0x110]
call fcn.14003b0a0
movzx eax, al
test eax, eax
je 0x140037cc7
movzx eax, word [rsp + 0xb8]
test eax, eax
jne 0x140037cf8
lea rdx, str.____Failed_to_find_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.140030e60
mov qword [rsp + 0x60], rax
lea rdx, [0x140035500]
mov rcx, qword [rsp + 0x60]
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]
xor al, al
jmp 0x140037e8c
mov edx, 8
lea rcx, [rsp + 0xc8]
call fcn.14003c690
movzx eax, word [rsp + 0xb8]
xor edx, edx
mov ecx, 2
div rcx
inc rax
mov rdx, rax
lea rcx, [rsp + 0xc8]
call fcn.140035620
nop
movzx eax, word [rsp + 0xb8]
mov qword [rsp + 0x68], rax
lea rcx, [rsp + 0xc8]
call fcn.14002e8c0
mov rcx, qword [rsp + 0x68]
mov r9, rcx
mov r8, rax
mov rdx, qword [rsp + 0xc0]
mov rcx, qword [rsp + 0x110]
call fcn.14003b0a0
movzx eax, al
test eax, eax
jne 0x140037db7
lea rdx, str.____Failed_to_read_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.140030e60
mov qword [rsp + 0x70], rax
lea rdx, [0x140035500]
mov rcx, qword [rsp + 0x70]
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 byte [rsp + 0x20], 0
lea rcx, [rsp + 0xc8]
call fcn.1400365e0
movzx eax, byte [rsp + 0x20]
jmp 0x140037e8c
xor eax, eax
mov word [rsp + 0xb8], ax
mov rax, qword [rsp + 0xd0]
add rax, 0x58
mov r9d, 0x10
lea r8, [rsp + 0xb8]
mov rdx, rax
mov rcx, qword [rsp + 0x110]
call fcn.14003b840
movzx eax, al
test eax, eax
jne 0x140037e35
lea rdx, str.____Failed_to_write_driver_name_length
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcout]
call fcn.140030e60
mov qword [rsp + 0x78], rax
lea rdx, [0x140035500]
mov rcx, qword [rsp + 0x78]
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 byte [rsp + 0x21], 0
lea rcx, [rsp + 0xc8]
call fcn.1400365e0
movzx eax, byte [rsp + 0x21]
jmp 0x140037e8c
lea rdx, str.___MmUnloadedDrivers_Cleaned:
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcout]
call fcn.140030e60
lea rdx, [rsp + 0xc8]
mov rcx, rax
call fcn.140030920
mov qword [rsp + 0x80], rax
lea rdx, [0x140035500]
mov rcx, qword [rsp + 0x80]
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 byte [rsp + 0x22], 1
lea rcx, [rsp + 0xc8]
call fcn.1400365e0
movzx eax, byte [rsp + 0x22]
mov rcx, qword [rsp + 0xe8]
xor rcx, rsp
call fcn.14015a6e0
add rsp, 0xf8
pop rdi
pop rsi
ret