Function at 0x140003890
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 + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x27]
sub rsp, 0xe0
mov rax, qword [0x14001a010]
xor rax, rsp
mov qword [rbp + 0x1f], rax
mov r14, rdx
mov qword [rbp - 0x29], rdx
mov rdi, rcx
mov qword [rbp - 0x51], rcx
mov esi, 4
mov rax, qword gs:[0x58]
add rsi, qword [rax]
mov qword [rbp - 1], rsi
mov eax, dword [rsi]
cmp dword [0x14001ae40], eax
jle 0x140003cc8
lea rcx, [0x14001ae40]
call fcn.140012308
cmp dword [0x14001ae40], 0xffffffff
jne 0x140003cc8
xor r14d, r14d
mov edi, r14d
mov qword [rbp - 0x59], r14
mov dword [rbp - 0x61], r14d
lea r9, [rbp - 0x61]
xor r8d, r8d
xor edx, edx
lea ecx, [rdx + 0xb]
call qword [sym.imp.ntdll.dll_NtQuerySystemInformation]
cmp eax, 0xc0000004
jne 0x14000397a
nop dword [rax + rax]
xor edx, edx
mov r8d, 0x8000
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov edx, dword [rbp - 0x61]
xor ecx, ecx
lea r9d, [rcx + 4]
mov r8d, 0x3000
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov rdi, rax
lea r9, [rbp - 0x61]
mov r8d, dword [rbp - 0x61]
mov rdx, rax
mov ecx, 0xb
call qword [sym.imp.ntdll.dll_NtQuerySystemInformation]
cmp eax, 0xc0000004
je 0x140003930
mov qword [rbp - 0x59], rdi
test eax, eax
jns 0x140003994
xor edx, edx
mov r8d, 0x8000
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualFree]
jmp 0x140003cad
mov esi, r14d
mov dword [rsp + 0x30], r14d
cmp dword [rdi], r14d
jbe 0x140003c98
mov r15d, 0x5a4d
nop dword [rax + rax]
mov eax, esi
imul rcx, rax, 0x128
lea rbx, [rcx + rdi]
movzx eax, word [rbx + 0x2e]
add rax, rcx
lea rdx, [rdi + 0x30]
add rdx, rax
mov qword [rbp - 0x21], r14
mov qword [rbp - 0x11], r14
mov qword [rbp - 9], 0xf
mov byte [rbp - 0x21], 0
mov r8, 0xffffffffffffffff
inc r8
cmp byte [rdx + r8], 0
jne 0x1400039e6
lea rcx, [rbp - 0x21]
call fcn.14000e8b0
nop
lea rcx, [rbp - 0x21]
cmp qword [rbp - 9], 0x10
cmovae rcx, qword [rbp - 0x21]
lea rdx, str.ntoskrnl.exe
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__stricmp]
test eax, eax
jne 0x140003c4f
lea rdx, [rbx + 0x30]
mov qword [rbp - 0x49], r14
mov qword [rbp - 0x39], r14
mov qword [rbp - 0x31], 0xf
mov byte [rbp - 0x49], al
mov r8, 0xffffffffffffffff
nop dword [rax + rax]
inc r8
cmp byte [rdx + r8], 0
jne 0x140003a40
lea rcx, [rbp - 0x49]
call fcn.14000e8b0
nop
lea rcx, str.SYSTEMROOT
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
mov qword [rsp + 0x38], r14
mov qword [rbp - 0x71], r14
mov qword [rbp - 0x69], 0xf
mov byte [rsp + 0x38], 0
mov r8, 0xffffffffffffffff
nop
inc r8
cmp byte [rax + r8], 0
jne 0x140003a80
mov rdx, rax
lea rcx, [rsp + 0x38]
call fcn.14000e8b0
nop
mov rcx, qword [rbp - 0x71]
mov rdx, qword [rbp - 0x69]
mov rax, rdx
sub rax, rcx
cmp rax, 1
jb 0x140003ad0
lea rax, [rcx + 1]
mov qword [rbp - 0x71], rax
lea rax, [rsp + 0x38]
cmp rdx, 0x10
cmovae rax, qword [rsp + 0x38]
mov word [rax + rcx], 0x5c
lea rbx, [rsp + 0x38]
jmp 0x140003af2
mov qword [rsp + 0x20], 1
lea r9, [0x14001499c]
mov edx, 1
lea rcx, [rsp + 0x38]
call fcn.14000fb80
mov rbx, rax
lea rcx, [rbp - 0x49]
call fcn.14000de80
mov rcx, qword [rbx + 0x10]
cmp qword [rbx + 0x18], 0x10
jb 0x140003b09
mov rbx, qword [rbx]
mov qword [rsp + 0x20], rcx
mov r9, rbx
mov rdx, rax
lea rcx, [rbp - 0x49]
call fcn.14000e700
nop
mov rdx, qword [rbp - 0x69]
cmp rdx, 0x10
jb 0x140003b5a
inc rdx
mov rcx, qword [rsp + 0x38]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140003b55
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140003d85
call fcn.14001214c
mov qword [rbp - 0x71], r14
mov qword [rbp - 0x69], 0xf
mov byte [rsp + 0x38], 0
lea rcx, [rbp - 0x49]
cmp qword [rbp - 0x31], 0x10
cmovae rcx, qword [rbp - 0x49]
xor edx, edx
lea r8d, [rdx + 1]
call qword [sym.imp.KERNEL32.dll_LoadLibraryExA]
mov rsi, rax
cmp word [rax], r15w
jne 0x140003ed8
movsxd rax, dword [rax + 0x3c]
cmp dword [rax + rsi], 0x4550
jne 0x140003e4d
mov ecx, dword [rax + rsi + 0x88]
test ecx, ecx
je 0x140003e4d
mov r15d, dword [rcx + rsi + 0x1c]
lea r12, [rsi + r15]
mov ebx, dword [rcx + rsi + 0x20]
add rbx, rsi
mov r13d, dword [rcx + rsi + 0x24]
add r13, rsi
mov edi, r14d
test r15d, r15d
je 0x140003bf6
mov edx, dword [rbx]
add rdx, rsi
lea rcx, str.ExFreePoolWithTag
call sub.api_ms_win_crt_string_l1_1_0.dll_strcmp
test eax, eax
je 0x140003d8c
inc edi
add rbx, 4
cmp edi, r15d
jb 0x140003bd2
mov rdx, qword [rbp - 0x31]
cmp rdx, 0x10
jb 0x140003c31
inc rdx
mov rcx, qword [rbp - 0x49]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140003c2c
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140003f0e
call fcn.14001214c
mov qword [rbp - 0x39], r14
mov qword [rbp - 0x31], 0xf
mov byte [rbp - 0x49], 0
mov rdi, qword [rbp - 0x59]
mov esi, dword [rsp + 0x30]
mov r15d, 0x5a4d
mov rdx, qword [rbp - 9]
cmp rdx, 0x10
jb 0x140003c8a
inc rdx
mov rcx, qword [rbp - 0x21]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140003c85
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140003f15
call fcn.14001214c
inc esi
mov dword [rsp + 0x30], esi
cmp esi, dword [rdi]
jb 0x1400039b0
xor edx, edx
mov r8d, 0x8000
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov rsi, qword [rbp - 1]
mov qword [0x14001adb0], r14
lea rcx, [0x14001ae40]
call fcn.1400122a8
mov rdi, qword [rbp - 0x51]
mov r14, qword [rbp - 0x29]
mov rbx, qword [0x14001adb0]
mov eax, dword [rsi]
cmp dword [0x14001ad38], eax
jle 0x140003d1e
lea rcx, [0x14001ad38]
call fcn.140012308
cmp dword [0x14001ad38], 0xffffffff
jne 0x140003d1e
lea rcx, [0x1400149e0]
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
lea rdx, str.NtShutdownSystem
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x14001af78], rax
lea rcx, [0x14001ad38]
call fcn.1400122a8
mov eax, dword [rsi]
cmp dword [0x14001ae30], eax
jle 0x140003d67
lea rcx, [0x14001ae30]
call fcn.140012308
cmp dword [0x14001ae30], 0xffffffff
jne 0x140003d67
mov edx, 2
lea rcx, [0x14001afc0]
call qword [sym.imp.MSVCP140.dll__Mtx_init_in_situ]
lea rcx, [0x140013eb0]
call fcn.140012650
lea rcx, [0x14001ae30]
call fcn.1400122a8
lea rcx, [0x14001afc0]
call qword [sym.imp.MSVCP140.dll__Mtx_lock]
test eax, eax
je 0x140003f1c
mov ecx, eax
call qword [sym.imp.MSVCP140.dll_void___cdecl_std::_Throw_C_error_int_]
nop
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
movsxd rax, edi
movzx ecx, word [r13 + rax*2]
mov ebx, dword [r12 + rcx*4]
mov eax, dword [rsp + 0x30]
imul rcx, rax, 0x128
mov rax, qword [rbp - 0x59]
add rbx, qword [rcx + rax + 0x18]
xor edx, edx
mov r8d, 0x8000
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_VirtualFree]
nop
mov rdx, qword [rbp - 0x31]
cmp rdx, 0x10
jb 0x140003dfa
inc rdx
mov rcx, qword [rbp - 0x49]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140003df5
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140003f0e
call fcn.14001214c
mov qword [rbp - 0x39], r14
mov qword [rbp - 0x31], 0xf
mov byte [rbp - 0x49], 0
mov rdx, qword [rbp - 9]
cmp rdx, 0x10
jb 0x140003e45
inc rdx
mov rcx, qword [rbp - 0x21]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140003e40
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140003f15
call fcn.14001214c
mov r14, rbx
jmp 0x140003ca9
mov rdx, qword [rbp - 0x31]
cmp rdx, 0x10
jb 0x140003e88
inc rdx
mov rcx, qword [rbp - 0x49]
cmp rdx, 0x1000
mov rax, rcx
jb 0x140003e83
mov rcx, qword [rcx - 8]
sub rax, rcx
add rdx, 0x27
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140003f0e
call fcn.14001214c
mov byte [rbp - 0x49], 0
mov qword [rbp - 0x31], 0xf
mov qword [rbp - 0x39], r14
mov rdx, qword [rbp - 9]
cmp rdx, 0x10
jb 0x140003ca9
inc rdx
mov rcx, qword [rbp - 0x21]
cmp rdx, 0x1000
mov rax, rcx
jb 0x140003ece
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140003f15
call fcn.14001214c
jmp 0x140003ca9
mov rdx, qword [rbp - 0x31]
cmp rdx, 0x10
jb 0x140003e88
inc rdx
mov rcx, qword [rbp - 0x49]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140003e83
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140003e83
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
mov dword [rbp - 1], 0x25ff
mov word [rbp + 3], 0
mov qword [rbp + 5], rbx
mov rax, qword [0x14001ae20]
mov qword [rbp - 0x29], 0xe
lea rcx, [rbp + 0xf]
mov qword [rbp - 0x51], rcx
mov qword [rbp - 0x59], rax
mov rcx, qword [rdi + 0x38]
test rcx, rcx
jne 0x140003f58
call qword [sym.imp.MSVCP140.dll_void___cdecl_std::_Xbad_function_call_void_]
int3
mov rax, qword [rcx]
lea r9, [rbp - 0x29]
lea r8, [rbp - 0x51]
lea rdx, [rbp - 0x59]
call qword [rax + 0x10]
mov rax, qword [0x14001ae20]
mov qword [rbp - 0x29], 0xe
lea rcx, [rbp - 1]
mov qword [rbp - 0x51], rcx
mov qword [rbp - 0x59], rax
mov rcx, qword [rdi + 0x78]
test rcx, rcx
jne 0x140003f95
call qword [sym.imp.MSVCP140.dll_void___cdecl_std::_Xbad_function_call_void_]
int3
mov rax, qword [rcx]
lea r9, [rbp - 0x29]
lea r8, [rbp - 0x51]
lea rdx, [rbp - 0x59]
call qword [rax + 0x10]
mov edx, 0x62346c6c
mov rcx, r14
call qword [0x14001af78]
mov rax, qword [0x14001ae20]
mov qword [rbp - 0x29], 0xe
lea rcx, [rbp + 0xf]
mov qword [rbp - 0x51], rcx
mov qword [rbp - 0x59], rax
mov rcx, qword [rdi + 0x78]
test rcx, rcx
jne 0x140003fe0
call qword [sym.imp.MSVCP140.dll_void___cdecl_std::_Xbad_function_call_void_]
int3
mov rax, qword [rcx]
lea r9, [rbp - 0x29]
lea r8, [rbp - 0x51]
lea rdx, [rbp - 0x59]
call qword [rax + 0x10]
lea rcx, [0x14001afc0]
call qword [sym.imp.MSVCP140.dll__Mtx_unlock]
mov rcx, qword [rbp + 0x1f]
xor rcx, rsp
call fcn.1400120f0
mov rbx, qword [rsp + 0x130]
add rsp, 0xe0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret