Function at 0x140008c80
Capabilities:
Get system information on windows
Make suspicious ntquerysysteminformation call
Parse pe header
Query environment variable
Resolve function by parsing pe exports

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x50]
sub rsp, 0x150
mov rax, qword [0x14002f010]
xor rax, rsp
mov qword [rbp + 0x48], rax
mov edi, edx
mov dword [rsp + 0x70], edx
mov r15d, 4
mov rax, qword gs:[0x58]
add r15, qword [rax]
mov qword [rbp + 0x28], r15
xor r12d, r12d
mov r14d, 0x5a4d
mov eax, dword [r15]
cmp dword [0x14002fbc0], eax
jle 0x140008f38
lea rcx, [0x14002fbc0]
call fcn.14000dbd0
cmp dword [0x14002fbc0], 0xffffffff
jne 0x140008f38
mov r15d, r12d
mov dword [rsp + 0x74], r12d
lea r9, [rsp + 0x74]
xor r8d, r8d
xor edx, edx
lea ecx, [rdx + 0xb]
call qword [sym.imp.ntdll.dll_NtQuerySystemInformation]
cmp eax, 0xc0000004
jne 0x140008d6a
xor edx, edx
mov r8d, 0x8000
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov edx, dword [rsp + 0x74]
xor ecx, ecx
lea r9d, [rcx + 4]
mov r8d, 0x3000
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov r15, rax
lea r9, [rsp + 0x74]
mov r8d, dword [rsp + 0x74]
mov rdx, rax
mov ecx, 0xb
call qword [sym.imp.ntdll.dll_NtQuerySystemInformation]
cmp eax, 0xc0000004
je 0x140008d21
test eax, eax
js 0x140008f09
mov r13d, r12d
cmp dword [r15], r12d
jbe 0x140008f09
nop
mov eax, r13d
mov qword [rbp + 0x18], rax
imul rcx, rax, 0x128
lea rbx, [rcx + r15]
movzx edx, word [rbx + 0x2e]
add rcx, 0x30
add rdx, rcx
add rdx, r15
lea rcx, [rbp - 0x38]
call fcn.140006410
nop
lea rcx, [rbp - 0x38]
call fcn.140006cc0
lea rdx, [0x140010ac8]
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__stricmp]
test eax, eax
jne 0x140008ef4
lea rdx, [rbx + 0x30]
lea rcx, [rbp - 0x78]
call fcn.140006410
nop
lea rcx, str.SYSTEMROOT
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
mov rdx, rax
lea rcx, [rsp + 0x30]
call fcn.140006410
nop
mov r8d, 1
lea rdx, [0x14001093c]
mov rcx, rax
call fcn.140006c40
mov rdi, rax
xor r8d, r8d
lea rdx, str.SystemRoot_
lea rcx, [rbp - 0x78]
call fcn.140006260
mov rsi, rax
mov rbx, qword [rdi + 0x10]
mov rcx, rdi
call fcn.140006cc0
mov qword [rsp + 0x20], rbx
mov r9, rax
mov r8d, 0xc
mov rdx, rsi
lea rcx, [rbp - 0x78]
call fcn.140006930
nop
lea rcx, [rsp + 0x30]
call fcn.140002c20
lea rcx, [rbp - 0x78]
call fcn.140006cc0
xor edx, edx
lea r8d, [rdx + 1]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LoadLibraryExA]
mov rsi, rax
cmp word [rax], r14w
jne 0x140009041
movsxd rax, dword [rax + 0x3c]
cmp dword [rax + rsi], 0x4550
jne 0x140009041
mov ecx, dword [rax + rsi + 0x88]
test ecx, ecx
je 0x140009041
mov eax, ecx
mov r14d, dword [rcx + rsi + 0x1c]
lea rcx, [rsi + r14]
mov qword [rbp + 8], rcx
mov ebx, dword [rax + rsi + 0x20]
add rbx, rsi
mov eax, dword [rax + rsi + 0x24]
add rax, rsi
mov qword [rbp + 0x38], rax
mov edi, r12d
test r14d, r14d
je 0x140008ee5
mov edx, dword [rbx]
add rdx, rsi
lea rcx, str.PsLookupProcessByProcessId
call sub.api_ms_win_crt_string_l1_1_0.dll_strcmp
test eax, eax
je 0x140008ff8
inc edi
add rbx, 4
cmp edi, r14d
jb 0x140008ec1
lea rcx, [rbp - 0x78]
call fcn.140002c20
mov r14d, 0x5a4d
lea rcx, [rbp - 0x38]
call fcn.140002c20
inc r13d
cmp r13d, dword [r15]
jb 0x140008d80
mov r8d, 0x8000
xor edx, edx
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov rbx, r12
mov qword [0x14002fbc8], rbx
lea rcx, [0x14002fbc0]
call fcn.14000db70
mov edi, dword [rsp + 0x70]
mov r15, qword [rbp + 0x28]
mov qword [rsp + 0x78], r12
mov rbx, qword [0x14002fbc8]
mov eax, dword [r15]
cmp dword [0x14002fbd0], eax
jle 0x140008f94
lea rcx, [0x14002fbd0]
call fcn.14000dbd0
cmp dword [0x14002fbd0], 0xffffffff
jne 0x140008f94
lea rcx, [0x140010ab8]
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
lea rdx, str.NtShutdownSystem
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x14002faf0], rax
lea rcx, [0x14002fbd0]
call fcn.14000db70
mov eax, dword [r15]
cmp dword [0x14002fbc4], eax
jle 0x140008fde
lea rcx, [0x14002fbc4]
call fcn.14000dbd0
cmp dword [0x14002fbc4], 0xffffffff
jne 0x140008fde
mov edx, 2
lea rcx, [0x14002fb60]
call qword [sym.imp.MSVCP140.dll__Mtx_init_in_situ]
lea rcx, [0x14000f470]
call fcn.14000df54
lea rcx, [0x14002fbc4]
call fcn.14000db70
lea rcx, [0x14002fb60]
call qword [sym.imp.MSVCP140.dll__Mtx_lock]
test eax, eax
je 0x140009059
mov ecx, eax
call qword [sym.imp.MSVCP140.dll_void___cdecl_std::_Throw_C_error_int_]
nop
movsxd rax, edi
mov rcx, qword [rbp + 0x38]
movzx ecx, word [rcx + rax*2]
mov rax, qword [rbp + 8]
mov ebx, dword [rax + rcx*4]
imul rax, qword [rbp + 0x18], 0x128
add rbx, qword [rax + r15 + 0x18]
xor edx, edx
mov r8d, 0x8000
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_VirtualFree]
nop
lea rcx, [rbp - 0x78]
call fcn.140002c20
nop
lea rcx, [rbp - 0x38]
call fcn.140002c20
jmp 0x140008f1d
lea rcx, [rbp - 0x78]
call fcn.140002c20
nop
lea rcx, [rbp - 0x38]
call fcn.140002c20
jmp 0x140008f1a
mov dword [rbp + 0x18], 0x25ff
mov word [rbp + 0x1c], 0
mov qword [rbp + 0x1e], rbx
mov rcx, qword [0x14002fad0]
mov r8d, 0xe
lea rdx, [rbp + 0x38]
call fcn.140003200
mov rcx, qword [0x14002fad0]
mov r8d, 0xe
lea rdx, [rbp + 0x18]
call fcn.1400033a0
mov ecx, edi
lea rdx, [rsp + 0x78]
call qword [0x14002faf0]
mov rcx, qword [0x14002fad0]
mov r8d, 0xe
lea rdx, [rbp + 0x38]
call fcn.1400033a0
lea rcx, [0x14002fb60]
call qword [sym.imp.MSVCP140.dll__Mtx_unlock]
mov eax, dword [r15]
cmp dword [0x14002fd20], eax
jle 0x14000937b
lea rcx, [0x14002fd20]
call fcn.14000dbd0
cmp dword [0x14002fd20], 0xffffffff
jne 0x14000937b
mov r14, r12
mov dword [rsp + 0x70], r12d
lea r9, [rsp + 0x70]
xor r8d, r8d
xor edx, edx
lea ecx, [rdx + 0xb]
call qword [sym.imp.ntdll.dll_NtQuerySystemInformation]
cmp eax, 0xc0000004
jne 0x140009159
xor edx, edx
mov r8d, 0x8000
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov edx, dword [rsp + 0x70]
xor ecx, ecx
lea r9d, [rcx + 4]
mov r8d, 0x3000
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov r14, rax
lea r9, [rsp + 0x70]
mov r8d, dword [rsp + 0x70]
mov rdx, rax
mov ecx, 0xb
call qword [sym.imp.ntdll.dll_NtQuerySystemInformation]
cmp eax, 0xc0000004
je 0x140009110
test eax, eax
jns 0x140009173
xor edx, edx
mov r8d, 0x8000
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_VirtualFree]
jmp 0x140009368
mov r15d, r12d
cmp dword [r14], r12d
jbe 0x140009353
nop
mov r13d, r15d
imul rcx, r13, 0x128
lea rbx, [rcx + r14]
movzx edx, word [rbx + 0x2e]
add rcx, 0x30
add rdx, rcx
add rdx, r14
lea rcx, [rbp - 0x18]
call fcn.140006410
nop
lea rcx, [rbp - 0x18]
call fcn.140006cc0
lea rdx, [0x140010ac8]
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__stricmp]
test eax, eax
jne 0x14000933e
lea rdx, [rbx + 0x30]
lea rcx, [rbp - 0x58]
call fcn.140006410
nop
lea rcx, str.SYSTEMROOT
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
mov rdx, rax
lea rcx, [rsp + 0x50]
call fcn.140006410
nop
mov r8d, 1
lea rdx, [0x14001093c]
mov rcx, rax
call fcn.140006c40
mov rdi, rax
xor r8d, r8d
lea rdx, str.SystemRoot_
lea rcx, [rbp - 0x58]
call fcn.140006260
mov rsi, rax
mov rbx, qword [rdi + 0x10]
mov rcx, rdi
call fcn.140006cc0
mov qword [rsp + 0x20], rbx
mov r9, rax
mov r8d, 0xc
mov rdx, rsi
lea rcx, [rbp - 0x58]
call fcn.140006930
nop
lea rcx, [rsp + 0x50]
call fcn.140002c20
lea rcx, [rbp - 0x58]
call fcn.140006cc0
xor edx, edx
lea r8d, [rdx + 1]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LoadLibraryExA]
mov r10, rax
mov eax, 0x5a4d
cmp word [r10], ax
jne 0x140009313
movsxd rcx, dword [r10 + 0x3c]
cmp dword [rcx + r10], 0x4550
jne 0x140009313
mov edx, dword [rcx + r10 + 0x88]
test edx, edx
je 0x140009313
mov r11d, dword [rdx + r10 + 0x1c]
lea rbx, [r10 + r11]
mov r8d, dword [rdx + r10 + 0x20]
add r8, r10
mov edi, dword [rdx + r10 + 0x24]
add rdi, r10
mov r9d, r12d
test r11d, r11d
je 0x140009334
nop dword [rax + rax]
mov edx, dword [r8]
add rdx, r10
mov rax, r12
nop dword [rax]
lea rcx, [0x140010b68]
movzx ecx, byte [rcx + rax]
inc rax
cmp cl, byte [rdx + rax - 1]
jne 0x140009328
cmp rax, 7
jne 0x1400092d0
movsxd rax, r9d
movzx ecx, word [rdi + rax*2]
mov r12d, dword [rbx + rcx*4]
imul rax, r13, 0x128
add r12, qword [rax + r14 + 0x18]
xor edx, edx
mov r8d, 0x8000
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_VirtualFree]
nop
lea rcx, [rbp - 0x58]
call fcn.140002c20
nop
lea rcx, [rbp - 0x18]
call fcn.140002c20
jmp 0x140009364
inc r9d
add r8, 4
cmp r9d, r11d
jb 0x1400092c0
lea rcx, [rbp - 0x58]
call fcn.140002c20
nop
lea rcx, [rbp - 0x18]
call fcn.140002c20
inc r15d
cmp r15d, dword [r14]
jb 0x140009180
xor edx, edx
mov r8d, 0x8000
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov r15, qword [rbp + 0x28]
mov qword [0x14002fde8], r12
lea rcx, [0x14002fd20]
call fcn.14000db70
mov rbx, qword [0x14002fde8]
mov eax, dword [r15]
cmp dword [0x14002fd08], eax
jle 0x1400093d2
lea rcx, [0x14002fd08]
call fcn.14000dbd0
cmp dword [0x14002fd08], 0xffffffff
jne 0x1400093d2
lea rcx, [0x140010ab8]
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
lea rdx, str.NtShutdownSystem
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x14002fec8], rax
lea rcx, [0x14002fd08]
call fcn.14000db70
mov eax, dword [r15]
cmp dword [0x14002fd04], eax
jle 0x14000941c
lea rcx, [0x14002fd04]
call fcn.14000dbd0
cmp dword [0x14002fd04], 0xffffffff
jne 0x14000941c
mov edx, 2
lea rcx, [0x14002fe20]
call qword [sym.imp.MSVCP140.dll__Mtx_init_in_situ]
lea rcx, [0x14000f4c0]
call fcn.14000df54
lea rcx, [0x14002fd04]
call fcn.14000db70
lea rcx, [0x14002fe20]
call qword [sym.imp.MSVCP140.dll__Mtx_lock]
test eax, eax
je 0x140009436
mov ecx, eax
call qword [sym.imp.MSVCP140.dll_void___cdecl_std::_Throw_C_error_int_]
int3
mov dword [rbp + 8], 0x25ff
mov word [rbp + 0xc], 0
mov qword [rbp + 0xe], rbx
mov rcx, qword [0x14002fad0]
mov r8d, 0xe
lea rdx, [rbp + 0x28]
call fcn.140003200
mov rcx, qword [0x14002fad0]
mov r8d, 0xe
lea rdx, [rbp + 8]
call fcn.1400033a0
mov rdx, qword [rsp + 0x78]
add rdx, 0x28
mov r8d, 8
lea rcx, [rbp - 0x80]
call qword [0x14002fec8]
mov rcx, qword [0x14002fad0]
mov r8d, 0xe
lea rdx, [rbp + 0x28]
call fcn.1400033a0
lea rcx, [0x14002fe20]
call qword [sym.imp.MSVCP140.dll__Mtx_unlock]
mov rax, qword [rbp - 0x80]
movabs rcx, 0xfffffffff000
and rax, rcx
mov rcx, qword [rbp + 0x48]
xor rcx, rsp
call fcn.14000da20
lea r11, [rsp + 0x150]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret