Function at 0x140040540
Capabilities:
Enumerate processes via ntquerysysteminformation
Get system information on windows

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbx
sub rsp, 0x378
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x2f0], 0xfffffffffffffffe
mov qword [rbp + 0x2e0], r9
test rdx, rdx
je 0x140040598
mov r14, r8
test r8, r8
je 0x1400407f4
mov rsi, rdx
mov qword [rbp + 0x2b0], rcx
lea rax, [0x14021c690]
mov qword [rbp + 0x2b8], rax
jmp 0x1400405b5
mov qword [rbp + 0x2b0], rcx
lea rax, [0x14021c660]
mov qword [rbp + 0x2b8], rax
mov esi, 8
xor r14d, r14d
movzx eax, byte [0x140331341]
mov edi, 0x80000
mov ecx, 0x80000
mov edx, 1
call fcn.140022d40
test rax, rax
je 0x140040c6f
mov r15, rax
mov qword [rbp + 0x298], 0x80000
mov qword [rbp + 0x2a0], rax
mov qword [rbp + 0x2a8], 0
xor edx, edx
lea r13, [rbp + 0x2c0]
mov r12, qword [sym.imp.ntdll.dll_NtQuerySystemInformation]
mov ebx, 0x80000
jmp 0x14004061e
mov rdi, qword [rbp + 0x298]
mov rdx, qword [rbp + 0x2a8]
mov dword [rbp + 0x2c0], 0
sub rdi, rdx
cmp rdi, rbx
jae 0x140040646
lea rcx, [rbp + 0x298]
mov r8, rbx
call fcn.140205260
mov r15, qword [rbp + 0x2a0]
mov ecx, 5
mov rdx, r15
mov r8d, ebx
mov r9, r13
call r12
test eax, eax
jns 0x1400406b6
or eax, 0x10000000
mov ecx, eax
call fcn.1400460f0
cmp edx, 0xd0000004
jne 0x1400407bc
mov qword [rbp + 0x100], rax
mov dword [rbp + 0x108], 0xd0000004
mov ecx, dword [rbp + 0x2c0]
mov rdx, rbx
add rdx, rbx
lea ebx, [rcx + 0x2800]
test ecx, ecx
cmove rbx, rdx
test rax, rax
je 0x140040610
lea rcx, [rbp + 0x100]
call fcn.1400460b0
jmp 0x140040610
mov qword [rbp + 0x2a8], rbx
mov qword [rbp + 0x278], 0
movzx eax, byte [0x140331341]
mov ecx, 0xfa0
mov edx, 8
call fcn.140022d40
test rax, rax
je 0x140040c7e
mov qword [rbp + 0x280], 0x1f4
mov qword [rbp + 0x288], rax
mov qword [rbp + 0x290], 0
mov rax, qword [rbp + 0x2b8]
mov rbx, qword [rax + 0x28]
xor r12d, r12d
jmp 0x140040741
lea rax, [r15 + r12]
mov rcx, qword [rbp + 0x288]
mov qword [rcx + rdi*8], rax
inc rdi
mov qword [rbp + 0x290], rdi
add r12, r13
test r13d, r13d
je 0x140040787
mov r13d, dword [r15 + r12]
mov rdx, qword [r15 + r12 + 0x50]
mov byte [rbp + 0x2ef], 1
mov ecx, 1
mov r8, rsi
mov r9, r14
call rbx
test al, al
je 0x140040739
mov rdi, qword [rbp + 0x290]
cmp rdi, qword [rbp + 0x280]
jne 0x140040720
mov byte [rbp + 0x2ef], 1
lea rcx, [rbp + 0x280]
call fcn.140038f20
jmp 0x140040720
mov rcx, qword [rbp + 0x2b0]
lea rsi, [rcx + 0x40]
mov qword [rbp + 0x270], rsi
mov rax, qword [rbp + 0x2e0]
cmp byte [rax], 0
je 0x1400407fb
mov byte [rbp + 0x2ef], 1
mov rdi, rcx
xor edx, edx
call fcn.14002a9d0
mov rax, qword [rdi + 0x10]
jmp 0x1400407fd
mov qword [rbp + 0x100], rax
mov dword [rbp + 0x108], edx
test rax, rax
je 0x1400407da
lea rcx, [rbp + 0x100]
call fcn.1400460b0
mov rdx, qword [rbp + 0x298]
test rdx, rdx
je 0x1400407f4
mov r8d, 1
mov rcx, r15
call fcn.140022d50
xor eax, eax
jmp 0x140040c5b
xor eax, eax
mov qword [rbp + 0x268], rax
mov byte [rbp + 0x2ef], 1
call fcn.1401dc990
mov dword [rbp + 0x2c0], eax
mov dword [rbp + 0x2c4], edx
mov byte [rbp + 0x2ef], 1
lea rcx, [rbp + 0x100]
lea rdx, [rbp + 0x2c0]
mov r8d, 0xd53e8000
mov r9d, 0x19db1de
call fcn.1401dc9c0
cmp qword [rbp + 0x100], 0
je 0x140040850
xor eax, eax
jmp 0x140040857
mov rax, qword [rbp + 0x108]
mov qword [rbp + 0x260], rax
mov rax, qword [rbp + 0x290]
mov qword [rbp + 0x110], rax
movups xmm0, xmmword [rbp + 0x280]
movaps xmmword [rbp + 0x100], xmm0
mov qword [rbp + 0x2c0], 0
mov qword [rbp + 0x2c8], 8
mov qword [rbp + 0x2d0], 0
lea rax, [rbp + 0x278]
mov qword [rbp + 0x118], rax
lea rax, [rbp + 0x270]
mov qword [rbp + 0x120], rax
mov rax, qword [rbp + 0x2e0]
mov qword [rbp + 0x128], rax
lea rax, [rbp + 0x268]
mov qword [rbp + 0x130], rax
lea rax, [rbp + 0x260]
mov qword [rbp + 0x138], rax
lea rcx, [rbp + 0x2c0]
lea rdx, [rbp + 0x100]
call fcn.1400337b0
mov rcx, qword [rbp + 0x2c0]
mov r9, qword [rbp + 0x2c8]
mov rdx, qword [rbp + 0x2d0]
imul rax, rdx, 0x158
add rax, r9
mov qword [rbp + 0x2c0], r9
mov r8, r9
mov qword [rbp + 0x2c8], r9
mov qword [rbp + 0x2d0], rcx
mov qword [rbp + 0x2d8], rax
test rdx, rdx
je 0x140040ba7
mov rdx, r8
lea rcx, [r8 + 0x158]
mov qword [rbp + 0x2c8], rcx
mov rcx, qword [r8]
cmp rcx, 2
je 0x140040b9e
lea rdi, [rbp - 0x50]
lea r14, [rbp + 0x100]
lea r15, [rbp - 0x58]
movabs r12, 0x8000000000000000
nop word cs:[rax + rax]
add rdx, 8
mov qword [rbp - 0x58], rcx
mov r8d, 0x150
mov rcx, rdi
call sub.VCRUNTIME140.dll_memcpy
mov r8, qword [rbp + 0x88]
mov rcx, r14
mov rdx, rsi
mov r9, r15
call fcn.140038870
cmp dword [rbp + 0x100], 2
je 0x140040b70
mov rdx, qword [rbp + 0x110]
test rdx, rdx
je 0x1400409d6
mov rcx, qword [rbp + 0x118]
mov r8d, 1
call fcn.140022d50
mov r13, qword [rbp + 0x140]
test r13, r13
je 0x140040a20
mov rbx, qword [rbp + 0x138]
add rbx, 8
jmp 0x1400409f9
add rbx, 0x20
dec r13
je 0x140040a20
mov rdx, qword [rbx - 8]
test rdx, rdx
je 0x1400409f0
mov rcx, qword [rbx]
mov r8d, 1
call fcn.140022d50
jmp 0x1400409f0
mov rdx, qword [rbp + 0x130]
test rdx, rdx
je 0x140040a42
mov rcx, qword [rbp + 0x138]
shl rdx, 5
mov r8d, 8
call fcn.140022d50
mov rdx, qword [rbp + 0x160]
cmp rdx, r12
je 0x140040a65
test rdx, rdx
je 0x140040a65
mov rcx, qword [rbp + 0x168]
mov r8d, 1
call fcn.140022d50
mov rdx, qword [rbp + 0x180]
cmp rdx, r12
je 0x140040a88
test rdx, rdx
je 0x140040a88
mov rcx, qword [rbp + 0x188]
mov r8d, 1
call fcn.140022d50
mov r13, qword [rbp + 0x158]
test r13, r13
je 0x140040ae0
mov rbx, qword [rbp + 0x150]
add rbx, 8
jmp 0x140040ab9
add rbx, 0x20
dec r13
je 0x140040ae0
mov rdx, qword [rbx - 8]
test rdx, rdx
je 0x140040ab0
mov rcx, qword [rbx]
mov r8d, 1
call fcn.140022d50
jmp 0x140040ab0
mov rdx, qword [rbp + 0x148]
test rdx, rdx
je 0x140040b02
mov rcx, qword [rbp + 0x150]
shl rdx, 5
mov r8d, 8
call fcn.140022d50
mov rdx, qword [rbp + 0x198]
cmp rdx, r12
je 0x140040b25
test rdx, rdx
je 0x140040b25
mov rcx, qword [rbp + 0x1a0]
mov r8d, 1
call fcn.140022d50
mov rdx, qword [rbp + 0x1b8]
cmp rdx, r12
je 0x140040b48
test rdx, rdx
je 0x140040b48
mov rcx, qword [rbp + 0x1c0]
mov r8d, 1
call fcn.140022d50
mov rax, qword [rbp + 0x1f8]
test rax, rax
je 0x140040b70
lock dec qword [rax]
jne 0x140040b70
lea rcx, [rbp + 0x1f8]
call fcn.14003ca10
nop word cs:[rax + rax]
mov rdx, qword [rbp + 0x2c8]
mov rax, qword [rbp + 0x2d8]
cmp rdx, rax
je 0x140040bac
lea rcx, [rdx + 0x158]
mov qword [rbp + 0x2c8], rcx
mov rcx, qword [rdx]
cmp rcx, 2
jne 0x140040980
add rdx, 0x158
jmp 0x140040baf
mov rdx, r8
jmp 0x140040baf
mov rdx, rax
sub rax, rdx
movabs rcx, 0xbe82fa0be82fa0bf
mov r8, rdx
mul rcx
shr rdx, 8
mov qword [rbp + 0x2b8], rdx
xor eax, eax
mov qword [rbp + 0x2e0], rax
mov qword [rbp + 0x2b0], r8
mov rcx, r8
mov rax, qword [rbp + 0x2e0]
cmp qword [rbp + 0x2b8], rax
je 0x140040c0b
inc rax
mov qword [rbp + 0x2e0], rax
lea rsi, [rcx + 0x158]
call fcn.14002c550
mov rcx, rsi
jmp 0x140040be0
mov rax, qword [rbp + 0x2d0]
test rax, rax
je 0x140040c30
mov rcx, qword [rbp + 0x2c0]
imul rdx, rax, 0x158
mov r8d, 8
call fcn.140022d50
mov rax, qword [rbp + 0x278]
mov rdx, qword [rbp + 0x298]
test rdx, rdx
je 0x140040c5b
mov rcx, qword [rbp + 0x2a0]
mov r8d, 1
mov rsi, rax
call fcn.140022d50
mov rax, rsi
add rsp, 0x378
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
mov ecx, 1
mov edx, 0x80000
call fcn.140215f80
mov ecx, 8
mov edx, 0xfa0
call fcn.140215f80
ud2