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

Disassembly:
mov byte [rsp + 0x18], r8b
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0x158
mov rax, qword [0x7ff670e25080]
xor rax, rsp
mov qword [rsp + 0x140], rax
mov qword [rsp + 0x28], 0
mov dword [rsp + 0xf8], 0
lea r9, [rsp + 0xf8]
mov r8d, dword [rsp + 0xf8]
mov rdx, qword [rsp + 0x28]
mov ecx, 0xb
call qword [sym.imp.ntdll.dll_NtQuerySystemInformation]
mov dword [rsp + 0x30], eax
cmp dword [rsp + 0x30], 0xc0000004
jne 0x7ff670daae85
mov r8d, 0x8000
xor edx, edx
mov rcx, qword [rsp + 0x28]
call qword [sym.imp.kernel32.dll_VirtualFree]
mov eax, dword [rsp + 0xf8]
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 + 0xf8]
mov r8d, dword [rsp + 0xf8]
mov rdx, qword [rsp + 0x28]
mov ecx, 0xb
call qword [sym.imp.ntdll.dll_NtQuerySystemInformation]
mov dword [rsp + 0x30], eax
jmp 0x7ff670daae20
cmp dword [rsp + 0x30], 0
jge 0x7ff670daaea6
mov r8d, 0x8000
xor edx, edx
mov rcx, qword [rsp + 0x28]
call qword [sym.imp.kernel32.dll_VirtualFree]
xor eax, eax
jmp 0x7ff670dab32b
mov rax, qword [rsp + 0x28]
mov qword [rsp + 0x40], rax
mov dword [rsp + 0x20], 0
jmp 0x7ff670daaec4
mov eax, dword [rsp + 0x20]
inc eax
mov dword [rsp + 0x20], eax
mov rax, qword [rsp + 0x40]
mov eax, dword [rax]
cmp dword [rsp + 0x20], eax
jae 0x7ff670dab316
mov eax, dword [rsp + 0x20]
imul rax, rax, 0x128
mov rcx, qword [rsp + 0x40]
lea rax, [rcx + rax + 8]
mov ecx, dword [rsp + 0x20]
imul rcx, rcx, 0x128
mov rdx, qword [rsp + 0x40]
movzx ecx, word [rdx + rcx + 0x2e]
lea rax, [rax + rcx + 0x28]
mov rdx, rax
lea rcx, [rsp + 0x120]
call fcn.7ff670d89f90
nop
lea rcx, [rsp + 0x120]
call fcn.7ff670d89ee0
mov rdx, qword [rsp + 0x160]
mov rcx, rax
call qword [sym.imp.ucrtbase.dll__stricmp]
test eax, eax
jne 0x7ff670dab304
mov eax, dword [rsp + 0x20]
imul rax, rax, 0x128
mov rcx, qword [rsp + 0x40]
lea rax, [rcx + rax + 0x30]
mov rdx, rax
lea rcx, [rsp + 0x100]
call fcn.7ff670d89f90
nop
lea rcx, [0x7ff670e072d0]
call qword [sym.imp.ucrtbase.dll_getenv]
mov rdx, rax
lea rcx, [rsp + 0xd8]
call fcn.7ff670d89f90
mov qword [rsp + 0x70], rax
mov rax, qword [rsp + 0x70]
mov qword [rsp + 0x78], rax
mov rax, qword [rsp + 0x78]
mov qword [rsp + 0x80], rax
lea rdx, [0x7ff670dca158]
mov rcx, qword [rsp + 0x80]
call fcn.7ff670d89ef0
mov qword [rsp + 0x88], rax
xor r8d, r8d
lea rdx, [0x7ff670e072c0]
lea rcx, [rsp + 0x100]
call fcn.7ff670dad250
mov qword [rsp + 0x90], rax
mov r9, qword [rsp + 0x88]
mov r8d, 0xc
mov rdx, qword [rsp + 0x90]
lea rcx, [rsp + 0x100]
call fcn.7ff670dad320
nop
lea rcx, [rsp + 0xd8]
call fcn.7ff670d89f30
lea rcx, [rsp + 0x100]
call fcn.7ff670d89ee0
mov r8d, 1
xor edx, edx
mov rcx, rax
call qword [sym.imp.kernel32.dll_LoadLibraryExA]
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x38]
mov qword [rsp + 0x58], rax
mov rax, qword [rsp + 0x58]
movzx eax, word [rax]
cmp eax, 0x5a4d
je 0x7ff670dab076
mov qword [rsp + 0x98], 0
lea rcx, [rsp + 0x100]
call fcn.7ff670d89f30
nop
lea rcx, [rsp + 0x120]
call fcn.7ff670d89f30
mov rax, qword [rsp + 0x98]
jmp 0x7ff670dab32b
mov rax, qword [rsp + 0x58]
movsxd rax, dword [rax + 0x3c]
mov rcx, qword [rsp + 0x38]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x50], rax
mov rax, qword [rsp + 0x50]
cmp dword [rax], 0x4550
je 0x7ff670dab0d0
mov qword [rsp + 0xa0], 0
lea rcx, [rsp + 0x100]
call fcn.7ff670d89f30
nop
lea rcx, [rsp + 0x120]
call fcn.7ff670d89f30
mov rax, qword [rsp + 0xa0]
jmp 0x7ff670dab32b
mov eax, 8
imul rax, rax, 0
mov rcx, qword [rsp + 0x50]
cmp dword [rcx + rax + 0x88], 0
jne 0x7ff670dab11c
mov qword [rsp + 0xa8], 0
lea rcx, [rsp + 0x100]
call fcn.7ff670d89f30
nop
lea rcx, [rsp + 0x120]
call fcn.7ff670d89f30
mov rax, qword [rsp + 0xa8]
jmp 0x7ff670dab32b
mov eax, 8
imul rax, rax, 0
mov rcx, qword [rsp + 0x50]
mov eax, dword [rcx + rax + 0x88]
mov rcx, qword [rsp + 0x38]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x48], rax
mov rax, qword [rsp + 0x48]
mov eax, dword [rax + 0x1c]
mov rcx, qword [rsp + 0x38]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x68], rax
mov rax, qword [rsp + 0x48]
mov eax, dword [rax + 0x20]
mov rcx, qword [rsp + 0x38]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0xb0], rax
mov rax, qword [rsp + 0x48]
mov eax, dword [rax + 0x24]
mov rcx, qword [rsp + 0x38]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x60], rax
mov dword [rsp + 0x24], 0
jmp 0x7ff670dab1a0
mov eax, dword [rsp + 0x24]
inc eax
mov dword [rsp + 0x24], eax
mov rax, qword [rsp + 0x48]
mov eax, dword [rax + 0x1c]
cmp dword [rsp + 0x24], eax
jae 0x7ff670dab2f6
movsxd rax, dword [rsp + 0x24]
mov rcx, qword [rsp + 0xb0]
mov eax, dword [rcx + rax*4]
mov rcx, qword [rsp + 0x38]
add rcx, rax
mov rax, rcx
mov rcx, qword [rsp + 0x168]
sub rax, rcx
movzx edx, byte [rcx]
cmp dl, byte [rcx + rax]
jne 0x7ff670dab1eb
inc rcx
test dl, dl
jne 0x7ff670dab1d8
xor eax, eax
jmp 0x7ff670dab1f0
sbb eax, eax
or eax, 1
test eax, eax
jne 0x7ff670dab2f1
movzx eax, byte [rsp + 0x170]
test eax, eax
jne 0x7ff670dab28b
mov eax, dword [rsp + 0x20]
imul rax, rax, 0x128
movsxd rcx, dword [rsp + 0x24]
mov rdx, qword [rsp + 0x60]
movzx ecx, word [rdx + rcx*2]
mov rdx, qword [rsp + 0x68]
mov ecx, dword [rdx + rcx*4]
mov rdx, qword [rsp + 0x40]
add rcx, qword [rdx + rax + 0x18]
mov rax, rcx
mov qword [rsp + 0xb8], rax
mov r8d, 0x8000
xor edx, edx
mov rcx, qword [rsp + 0x28]
call qword [sym.imp.kernel32.dll_VirtualFree]
mov rax, qword [rsp + 0xb8]
mov qword [rsp + 0xc0], rax
lea rcx, [rsp + 0x100]
call fcn.7ff670d89f30
nop
lea rcx, [rsp + 0x120]
call fcn.7ff670d89f30
mov rax, qword [rsp + 0xc0]
jmp 0x7ff670dab32b
movsxd rax, dword [rsp + 0x24]
mov rcx, qword [rsp + 0x60]
movzx eax, word [rcx + rax*2]
mov rcx, qword [rsp + 0x68]
mov eax, dword [rcx + rax*4]
mov qword [rsp + 0xc8], rax
mov r8d, 0x8000
xor edx, edx
mov rcx, qword [rsp + 0x28]
call qword [sym.imp.kernel32.dll_VirtualFree]
mov rax, qword [rsp + 0xc8]
mov qword [rsp + 0xd0], rax
lea rcx, [rsp + 0x100]
call fcn.7ff670d89f30
nop
lea rcx, [rsp + 0x120]
call fcn.7ff670d89f30
mov rax, qword [rsp + 0xd0]
jmp 0x7ff670dab32b
jmp 0x7ff670dab196
lea rcx, [rsp + 0x100]
call fcn.7ff670d89f30
nop
lea rcx, [rsp + 0x120]
call fcn.7ff670d89f30
jmp 0x7ff670daaeba
mov r8d, 0x8000
xor edx, edx
mov rcx, qword [rsp + 0x28]
call qword [sym.imp.kernel32.dll_VirtualFree]
xor eax, eax
mov rcx, qword [rsp + 0x140]
xor rcx, rsp
call fcn.7ff670dbe840
add rsp, 0x158
ret