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

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x5f]
sub rsp, 0xb0
mov rax, qword [0x140067040]
xor rax, rsp
mov qword [rbp + 0x27], rax
mov r13b, r8b
mov qword [rbp - 0x41], rdx
xor r14d, r14d
mov edi, r14d
mov dword [rbp - 0x49], r14d
lea r9, [rbp - 0x49]
xor r8d, r8d
xor edx, edx
lea ebx, [rdx + 0xb]
mov ecx, ebx
call qword [sym.imp.ntdll.dll_NtQuerySystemInformation]
mov esi, 0xc0000004
jmp 0x1400054a1
xor edx, edx
mov r8d, 0x8000
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov edx, dword [rbp - 0x49]
xor ecx, ecx
lea r9d, [rcx + 4]
mov r8d, 0x3000
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov rdi, rax
lea r9, [rbp - 0x49]
mov r8d, dword [rbp - 0x49]
mov rdx, rax
mov ecx, ebx
call qword [sym.imp.ntdll.dll_NtQuerySystemInformation]
cmp eax, esi
je 0x140005465
test eax, eax
js 0x140005785
mov r15d, r14d
cmp dword [rdi], r14d
jbe 0x140005785
mov eax, r15d
imul r12, rax, 0x128
movzx edx, word [r12 + rdi + 0x2e]
add rdx, 0x30
add rdx, r12
add rdx, rdi
xorps xmm0, xmm0
movups xmmword [rbp - 0x19], xmm0
mov qword [rbp - 9], r14
mov qword [rbp - 1], r14
or r8, 0xffffffffffffffff
inc r8
cmp byte [rdx + r8], r14b
jne 0x1400054e6
lea rcx, [rbp - 0x19]
call fcn.140004914
nop
lea rcx, [rbp - 0x19]
cmp qword [rbp - 1], 0xf
cmova rcx, qword [rbp - 0x19]
lea rdx, [0x140056060]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__stricmp]
test eax, eax
jne 0x14000573e
lea rdx, [rdi + 0x30]
add rdx, r12
xorps xmm0, xmm0
movups xmmword [rbp - 0x39], xmm0
mov qword [rbp - 0x29], r14
mov qword [rbp - 0x21], r14
or r8, 0xffffffffffffffff
inc r8
cmp byte [rdx + r8], r14b
jne 0x140005536
lea rcx, [rbp - 0x39]
call fcn.140004914
nop
lea rcx, str.SYSTEMROOT
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
xorps xmm0, xmm0
movups xmmword [rbp + 7], xmm0
mov qword [rbp + 0x17], r14
mov qword [rbp + 0x1f], r14
or r8, 0xffffffffffffffff
inc r8
cmp byte [rax + r8], r14b
jne 0x140005569
mov rdx, rax
lea rcx, [rbp + 7]
call fcn.140004914
nop
lea rdx, [0x14005605c]
lea rcx, [rbp + 7]
call fcn.140003cac
mov rbx, rax
lea rsi, [rbp - 0x39]
cmp qword [rbp - 0x21], 0xf
cmova rsi, qword [rbp - 0x39]
mov rax, qword [rbp - 0x29]
cmp rax, 0xc
jb 0x1400055fc
lea r14, [rax + rsi]
lea r8, [r14 - 0xb]
sub r8, rsi
mov rcx, rsi
jmp 0x1400055df
movabs rcx, 0x526d65747379535c
cmp qword [rax], rcx
jne 0x1400055d2
cmp dword [rax + 8], 0x5c746f6f
je 0x1400055f7
inc rax
lea r8, [r14 - 0xb]
sub r8, rax
mov rcx, rax
mov edx, 0x5c
call sub.VCRUNTIME140.dll_memchr
test rax, rax
jne 0x1400055ba
or rax, 0xffffffffffffffff
xor r14d, r14d
jmp 0x140005600
sub rax, rsi
jmp 0x1400055f2
or rax, 0xffffffffffffffff
mov rcx, qword [rbx + 0x10]
cmp qword [rbx + 0x18], 0xf
jbe 0x14000560e
mov rbx, qword [rbx]
mov qword [rsp + 0x20], rcx
mov r9, rbx
mov rdx, rax
lea rcx, [rbp - 0x39]
call fcn.140006788
nop
mov rdx, qword [rbp + 0x1f]
cmp rdx, 0xf
jbe 0x14000565e
inc rdx
mov rcx, qword [rbp + 7]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140005659
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400057c5
call fcn.14004c944
lea rcx, [rbp - 0x39]
cmp qword [rbp - 0x21], 0xf
cmova rcx, qword [rbp - 0x39]
xor edx, edx
lea r8d, [rdx + 1]
call qword [sym.imp.KERNEL32.dll_LoadLibraryExA]
mov rdx, rax
mov eax, 0x5a4d
cmp word [rdx], ax
jne 0x1400057f7
movsxd rcx, dword [rdx + 0x3c]
cmp dword [rcx + rdx], 0x4550
jne 0x1400057f7
mov eax, dword [rcx + rdx + 0x88]
test eax, eax
je 0x1400057f7
mov esi, dword [rax + rdx + 0x1c]
lea rbx, [rdx + rsi]
mov r11d, dword [rax + rdx + 0x20]
add r11, rdx
mov r14d, dword [rax + rdx + 0x24]
add r14, rdx
xor r8d, r8d
test esi, esi
je 0x140005700
mov ecx, dword [r11]
add rcx, rdx
mov rax, qword [rbp - 0x41]
sub rcx, rax
movzx r10d, byte [rax]
movzx r9d, byte [rax + rcx]
sub r10d, r9d
jne 0x1400056eb
inc rax
test r9d, r9d
jne 0x1400056d5
test r10d, r10d
je 0x1400057cc
inc r8d
add r11, 4
cmp r8d, esi
jb 0x1400056c8
mov rdx, qword [rbp - 0x21]
cmp rdx, 0xf
jbe 0x14000573b
inc rdx
mov rcx, qword [rbp - 0x39]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140005736
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14000582c
call fcn.14004c944
xor r14d, r14d
mov rdx, qword [rbp - 1]
cmp rdx, 0xf
jbe 0x140005779
inc rdx
mov rcx, qword [rbp - 0x19]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140005774
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14000588e
call fcn.14004c944
inc r15d
cmp r15d, dword [rdi]
jb 0x1400054b9
xor edx, edx
mov r8d, 0x8000
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualFree]
xor eax, eax
mov rcx, qword [rbp + 0x27]
xor rcx, rsp
call fcn.14004c8e0
lea r11, [rsp + 0xb0]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rdi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
movsxd rax, r8d
movzx ecx, word [r14 + rax*2]
xor r14d, r14d
mov ebx, dword [rbx + rcx*4]
xor edx, edx
mov r8d, 0x8000
mov rcx, rdi
test r13b, r13b
jne 0x1400057ef
add rbx, qword [r12 + rdi + 0x18]
call qword [sym.imp.KERNEL32.dll_VirtualFree]
jmp 0x1400057fa
mov rbx, r14
mov rdx, qword [rbp - 0x21]
cmp rdx, 0xf
jbe 0x140005838
inc rdx
mov rcx, qword [rbp - 0x39]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140005833
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140005833
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14004c944
mov qword [rbp - 0x29], r14
mov qword [rbp - 0x21], 0xf
mov byte [rbp - 0x39], r14b
mov rdx, qword [rbp - 1]
cmp rdx, 0xf
jbe 0x140005886
inc rdx
mov rcx, qword [rbp - 0x19]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140005881
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140005881
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14004c944
mov rax, rbx
jmp 0x140005798
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3