Function at 0x140023140
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
push rdi
sub rsp, 0x170
mov rax, qword [0x14003b040]
xor rax, rsp
mov qword [rsp + 0x168], rax
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x120], 0
lea r9, [rsp + 0x120]
mov r8d, dword [rsp + 0x120]
mov rdx, qword [rsp + 0x30]
mov ecx, 0xb
call qword [sym.imp.ntdll.dll_NtQuerySystemInformation]
mov dword [rsp + 0x38], eax
cmp dword [rsp + 0x38], 0xc0000004
jne 0x140023206
mov r8d, 0x8000
xor edx, edx
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, dword [rsp + 0x120]
mov r9d, 4
mov r8d, 0x3000
mov edx, eax
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov qword [rsp + 0x30], rax
lea r9, [rsp + 0x120]
mov r8d, dword [rsp + 0x120]
mov rdx, qword [rsp + 0x30]
mov ecx, 0xb
call qword [sym.imp.ntdll.dll_NtQuerySystemInformation]
mov dword [rsp + 0x38], eax
jmp 0x1400231a1
cmp dword [rsp + 0x38], 0
jge 0x140023227
mov r8d, 0x8000
xor edx, edx
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_VirtualFree]
xor eax, eax
jmp 0x14002375c
mov rax, qword [rsp + 0x30]
mov qword [rsp + 0x48], rax
mov dword [rsp + 0x28], 0
jmp 0x140023245
mov eax, dword [rsp + 0x28]
inc eax
mov dword [rsp + 0x28], eax
mov rax, qword [rsp + 0x48]
mov eax, dword [rax]
cmp dword [rsp + 0x28], eax
jae 0x140023747
mov eax, dword [rsp + 0x28]
imul rax, rax, 0x128
mov rcx, qword [rsp + 0x48]
lea rax, [rcx + rax + 8]
mov ecx, dword [rsp + 0x28]
imul rcx, rcx, 0x128
mov rdx, qword [rsp + 0x48]
movzx ecx, word [rdx + rcx + 0x2e]
lea rax, [rax + rcx + 0x28]
mov rdx, rax
lea rcx, [rsp + 0x148]
call fcn.1400190e0
nop
lea rcx, [rsp + 0x148]
call fcn.140018ef0
mov rdx, qword [rsp + 0x180]
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__stricmp]
test eax, eax
jne 0x140023735
mov eax, dword [rsp + 0x28]
imul rax, rax, 0x128
mov rcx, qword [rsp + 0x48]
lea rax, [rcx + rax + 0x30]
mov rdx, rax
lea rcx, [rsp + 0x128]
call fcn.1400190e0
nop
lea rax, [rsp + 0x20]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
lea rax, [rsp + 0x21]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
lea rax, [rsp + 0x22]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
movzx r9d, byte [rsp + 0x20]
movzx r8d, byte [rsp + 0x21]
movzx edx, byte [rsp + 0x22]
lea rcx, [rsp + 0xe0]
call fcn.14002b870
mov rcx, rax
call fcn.140028730
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
mov rdx, rax
lea rcx, [rsp + 0x100]
call fcn.1400190e0
mov qword [rsp + 0x80], rax
mov rax, qword [rsp + 0x80]
mov qword [rsp + 0x88], rax
mov rax, qword [rsp + 0x88]
mov qword [rsp + 0x90], rax
lea rdx, [0x140032930]
mov rcx, qword [rsp + 0x90]
call fcn.140019040
mov qword [rsp + 0x98], rax
lea rax, [rsp + 0x23]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
lea rax, [rsp + 0x24]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
lea rax, [rsp + 0x25]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
movzx r9d, byte [rsp + 0x23]
movzx r8d, byte [rsp + 0x24]
movzx edx, byte [rsp + 0x25]
lea rcx, [rsp + 0xf0]
call fcn.14002b820
mov rcx, rax
call fcn.140028730
xor r8d, r8d
mov rdx, rax
lea rcx, [rsp + 0x128]
call fcn.140018e80
mov qword [rsp + 0xa0], rax
mov r9, qword [rsp + 0x98]
mov r8d, 0xc
mov rdx, qword [rsp + 0xa0]
lea rcx, [rsp + 0x128]
call fcn.140018fe0
nop
lea rcx, [rsp + 0x100]
call fcn.1400190b0
lea rcx, [rsp + 0x128]
call fcn.140018ef0
mov r8d, 1
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LoadLibraryExA]
mov qword [rsp + 0x40], rax
mov rax, qword [rsp + 0x40]
mov qword [rsp + 0x68], rax
mov rax, qword [rsp + 0x68]
movzx eax, word [rax]
cmp eax, 0x5a4d
je 0x1400234ad
mov qword [rsp + 0xa8], 0
lea rcx, [rsp + 0x128]
call fcn.1400190b0
nop
lea rcx, [rsp + 0x148]
call fcn.1400190b0
mov rax, qword [rsp + 0xa8]
jmp 0x14002375c
mov rax, qword [rsp + 0x68]
movsxd rax, dword [rax + 0x3c]
mov rcx, qword [rsp + 0x40]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x58], rax
mov rax, qword [rsp + 0x58]
cmp dword [rax], 0x4550
je 0x140023507
mov qword [rsp + 0xb0], 0
lea rcx, [rsp + 0x128]
call fcn.1400190b0
nop
lea rcx, [rsp + 0x148]
call fcn.1400190b0
mov rax, qword [rsp + 0xb0]
jmp 0x14002375c
mov eax, 8
imul rax, rax, 0
mov rcx, qword [rsp + 0x58]
cmp dword [rcx + rax + 0x88], 0
jne 0x140023553
mov qword [rsp + 0xb8], 0
lea rcx, [rsp + 0x128]
call fcn.1400190b0
nop
lea rcx, [rsp + 0x148]
call fcn.1400190b0
mov rax, qword [rsp + 0xb8]
jmp 0x14002375c
mov eax, 8
imul rax, rax, 0
mov rcx, qword [rsp + 0x58]
mov eax, dword [rcx + rax + 0x88]
mov rcx, qword [rsp + 0x40]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x50], rax
mov rax, qword [rsp + 0x50]
mov eax, dword [rax + 0x1c]
mov rcx, qword [rsp + 0x40]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x60], rax
mov rax, qword [rsp + 0x50]
mov eax, dword [rax + 0x20]
mov rcx, qword [rsp + 0x40]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0xc0], rax
mov rax, qword [rsp + 0x50]
mov eax, dword [rax + 0x24]
mov rcx, qword [rsp + 0x40]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x70], rax
mov dword [rsp + 0x2c], 0
jmp 0x1400235d7
mov eax, dword [rsp + 0x2c]
inc eax
mov dword [rsp + 0x2c], eax
mov rax, qword [rsp + 0x50]
mov eax, dword [rax + 0x1c]
cmp dword [rsp + 0x2c], eax
jae 0x140023727
movsxd rax, dword [rsp + 0x2c]
mov rcx, qword [rsp + 0xc0]
mov eax, dword [rcx + rax*4]
mov rcx, qword [rsp + 0x40]
add rcx, rax
mov rax, rcx
mov rcx, qword [rsp + 0x188]
sub rax, rcx
movzx edx, byte [rcx]
cmp dl, byte [rcx + rax]
jne 0x140023622
inc rcx
test dl, dl
jne 0x14002360f
xor eax, eax
jmp 0x140023627
sbb eax, eax
or eax, 1
test eax, eax
jne 0x140023722
movzx eax, byte [rsp + 0x190]
test eax, eax
jne 0x1400236c2
mov eax, dword [rsp + 0x28]
imul rax, rax, 0x128
movsxd rcx, dword [rsp + 0x2c]
mov rdx, qword [rsp + 0x70]
movzx ecx, word [rdx + rcx*2]
mov rdx, qword [rsp + 0x60]
mov ecx, dword [rdx + rcx*4]
mov rdx, qword [rsp + 0x48]
add rcx, qword [rdx + rax + 0x18]
mov rax, rcx
mov qword [rsp + 0xc8], rax
mov r8d, 0x8000
xor edx, edx
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov rax, qword [rsp + 0xc8]
mov qword [rsp + 0xd0], rax
lea rcx, [rsp + 0x128]
call fcn.1400190b0
nop
lea rcx, [rsp + 0x148]
call fcn.1400190b0
mov rax, qword [rsp + 0xd0]
jmp 0x14002375c
movsxd rax, dword [rsp + 0x2c]
mov rcx, qword [rsp + 0x70]
movzx eax, word [rcx + rax*2]
mov rcx, qword [rsp + 0x60]
mov eax, dword [rcx + rax*4]
mov qword [rsp + 0xd8], rax
mov r8d, 0x8000
xor edx, edx
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov rax, qword [rsp + 0xd8]
mov qword [rsp + 0x78], rax
lea rcx, [rsp + 0x128]
call fcn.1400190b0
nop
lea rcx, [rsp + 0x148]
call fcn.1400190b0
mov rax, qword [rsp + 0x78]
jmp 0x14002375c
jmp 0x1400235cd
lea rcx, [rsp + 0x128]
call fcn.1400190b0
nop
lea rcx, [rsp + 0x148]
call fcn.1400190b0
jmp 0x14002323b
mov r8d, 0x8000
xor edx, edx
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_VirtualFree]
xor eax, eax
mov rcx, qword [rsp + 0x168]
xor rcx, rsp
call fcn.14002fd60
add rsp, 0x170
pop rdi
ret