Function at 0x140004220
Capabilities:
Allocate or change rwx memory
Encode data using xor
Get system information on windows
Make suspicious ntquerysysteminformation call

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rdi
push r14
lea rbp, [rsp - 0x50]
sub rsp, 0x150
mov rax, qword [0x140026010]
xor rax, rsp
mov qword [rbp + 0x40], rax
xor ebx, ebx
lea r9, [rbp - 0x50]
mov r14, rcx
mov dword [rbp - 0x50], ebx
xor r8d, r8d
xor edx, edx
mov edi, ebx
lea ecx, [rbx + 0x40]
call qword [sym.imp.ntdll.dll_NtQuerySystemInformation]
cmp eax, 0xc0000004
jne 0x1400042b6
nop word [rax + rax]
xor edx, edx
mov r8d, 0x8000
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov edx, dword [rbp - 0x50]
xor ecx, ecx
mov r8d, 0x3000
lea r9d, [rcx + 4]
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov r8d, dword [rbp - 0x50]
lea r9, [rbp - 0x50]
mov rdx, rax
mov ecx, 0x40
mov rdi, rax
call qword [sym.imp.ntdll.dll_NtQuerySystemInformation]
cmp eax, 0xc0000004
je 0x140004270
mov qword [rsp + 0x178], rsi
mov qword [rsp + 0x180], r15
test eax, eax
js 0x1400049b1
test rdi, rdi
je 0x1400049c7
mov r15, rbx
mov esi, ebx
cmp qword [rdi], rbx
jbe 0x140004349
mov rax, rbx
nop dword [rax]
nop dword [rax + rax]
lea rax, [rax + rax*4]
movups xmm0, xmmword [rdi + rax*8 + 0x10]
movups xmmword [rbp - 0x70], xmm0
movups xmm0, xmmword [rdi + rax*8 + 0x20]
movups xmmword [rbp - 0x60], xmm0
movsd xmm0, qword [rdi + rax*8 + 0x30]
movsd qword [rbp - 0x10], xmm0
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
movups xmm1, xmmword [rbp - 0x70]
mov ecx, eax
movdqa xmm0, xmm1
psrldq xmm0, 8
movq rax, xmm0
cmp rax, rcx
jne 0x140004336
cmp qword [rbp - 0x60], r14
je 0x140004344
inc esi
mov eax, esi
cmp rax, qword [rdi]
jb 0x1400042f0
jmp 0x1400049b6
movq r15, xmm1
xor edx, edx
mov r8d, 0x8000
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualFree]
test r15, r15
je 0x1400049c7
lea r8, [r15 + 8]
mov qword [rbp + 0x30], rbx
mov r9d, 8
lea rdx, [rbp + 0x30]
mov rcx, r14
call fcn.140002c40
test al, al
je 0x140004911
mov r8, qword [rbp + 0x30]
test r8, r8
je 0x140004911
add r8, 8
mov qword [rbp + 0x38], rbx
mov r9d, 8
lea rdx, [rbp + 0x38]
mov rcx, r14
call fcn.140002c40
test al, al
je 0x140004871
mov r8, qword [rbp + 0x38]
test r8, r8
je 0x140004871
add r8, 0x28
mov qword [rbp + 0x28], rbx
mov r9d, 8
lea rdx, [rbp + 0x28]
mov rcx, r14
call fcn.140002c40
test al, al
je 0x1400047c9
mov r8, qword [rbp + 0x28]
test r8, r8
je 0x1400047c9
xorps xmm0, xmm0
lea rdx, [rbp - 0x48]
add r8, 0x58
mov r9d, 0x10
mov rcx, r14
movups xmmword [rbp - 0x48], xmm0
call fcn.140002c40
test al, al
je 0x140004732
movzx eax, word [rbp - 0x48]
test ax, ax
je 0x140004732
mov ecx, eax
mov eax, 2
shr rcx, 1
inc rcx
mul rcx
mov rcx, 0xffffffffffffffff
cmovo rax, rcx
mov rcx, rax
call fcn.140015f24
movzx r8d, word [rbp - 0x48]
xor edx, edx
add r8, 2
mov rcx, rax
mov rdi, rax
call sub.VCRUNTIME140.dll_memset
movzx r9d, word [rbp - 0x48]
mov rdx, rdi
mov r8, qword [rbp - 0x40]
mov rcx, r14
call fcn.140002c40
test al, al
jne 0x14000452d
mov dword [rbp - 0x30], 0xce72ce09
mov ecx, 0x31ae
mov dword [rbp - 0x2c], 0xce75ce09
mov dword [rbp - 0x28], 0xce36ce10
mov dword [rbp - 0x24], 0xce35ce31
mov dword [rbp - 0x20], 0xce3fce3f
mov dword [rbp - 0x1c], 0xce29ce7c
mov dword [rbp - 0x18], 0xce7fce31
mov dword [rbp - 0x14], 0xce04ce12
mov dword [rbp - 0x10], 0xce07ce03
mov dword [rbp - 0xc], 0xce01ce44
mov dword [rbp - 8], 0xce0ece14
mov dword [rbp - 4], 0xce0cce1e
mov dword [rbp], 0xce4bce18
mov dword [rbp + 4], 0xce0cce02
mov dword [rbp + 8], 0xce0ace03
mov word [rbp + 0xc], bx
mov byte [rbp + 0xe], 1
nop dword [rax]
movzx eax, bx
sub ax, cx
xor word [rbp + rbx*2 - 0x30], ax
inc rbx
cmp rbx, 0x1e
jb 0x1400044f0
mov byte [rbp + 0xe], 0
lea rdx, [rbp - 0x30]
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcout]
call fcn.14000a700
lea rdx, [0x14000a8e0]
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64____cdecl___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64_____ptr64]
jmp 0x1400049c7
mov rax, qword [rbp + 0x28]
mov word [rbp - 0x48], bx
add rax, 0x58
je 0x140004664
mov qword [rsp + 0x38], rbx
lea rcx, [rbp - 0x48]
mov qword [rbp - 0x18], rax
lea r8, [rbp - 0x30]
lea rax, [rbp + 0x20]
mov qword [rbp - 0x20], rcx
mov qword [rsp + 0x30], rax
mov r9d, 0x28
mov dword [rsp + 0x28], ebx
mov edx, 0x80862007
mov rcx, r14
mov qword [rsp + 0x20], rbx
mov qword [rbp - 0x28], rbx
mov qword [rbp - 0x30], 0x33
mov qword [rbp - 0x10], 0x10
mov dword [rbp + 0x20], ebx
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x140004664
mov dword [rbp - 0x30], 0xce78ce09
mov ecx, 0x31ae
mov dword [rbp - 0x2c], 0xce75ce09
mov dword [rbp - 0x28], 0xce3ace1b
mov dword [rbp - 0x24], 0xce37ce0d
mov dword [rbp - 0x20], 0xce34ce36
mov dword [rbp - 0x1c], 0xce39ce3d
mov dword [rbp - 0x18], 0xce3bce3b
mov dword [rbp - 0x14], 0xce13ce24
mov dword [rbp - 0x10], 0xce15ce0b
mov dword [rbp - 0xc], 0xce17ce01
mov dword [rbp - 8], 0xce47ce15
mov dword [rbp - 4], 0xce05ce2b
mov dword [rbp], 0xce0ace0f
mov dword [rbp + 4], 0xce08ce02
mov dword [rbp + 8], 0xce55ce0a
mov dword [rbp + 0xc], 0xce50
mov byte [rbp + 0x10], 1
movzx eax, bx
sub ax, cx
xor word [rbp + rbx*2 - 0x30], ax
inc rbx
cmp rbx, 0x1f
jb 0x140004612
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcout]
lea rdx, [rbp - 0x30]
mov byte [rbp + 0x10], 0
call fcn.14000a700
mov rcx, rax
mov rdx, rdi
call fcn.14000a700
lea rdx, [0x14000a8e0]
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64____cdecl___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64_____ptr64]
mov rcx, rdi
call fcn.140015b70
mov al, 1
jmp 0x1400049c9
mov dword [rsp + 0x40], 0xce72ce09
mov ecx, 0x31ae
mov dword [rsp + 0x44], 0xce75ce09
mov dword [rsp + 0x48], 0xce36ce10
mov dword [rsp + 0x4c], 0xce35ce31
mov dword [rsp + 0x50], 0xce3fce3f
mov dword [rsp + 0x54], 0xce29ce7c
mov dword [rsp + 0x58], 0xce7fce31
mov dword [rsp + 0x5c], 0xce13ce17
mov dword [rsp + 0x60], 0xce17ce0b
mov dword [rsp + 0x64], 0xce45ce01
mov dword [rsp + 0x68], 0xce15ce02
mov dword [rsp + 0x6c], 0xce1fce01
mov dword [rsp + 0x70], 0xce19ce0f
mov dword [rsp + 0x74], 0xce03ce4c
mov dword [rsp + 0x78], 0xce02ce0f
mov dword [rsp + 0x7c], 0xce51ce15
mov dword [rbp - 0x80], 0xce16ce1e
mov dword [rbp - 0x7c], 0xce12ce1a
mov dword [rbp - 0x78], 0xce1fce02
mov word [rbp - 0x74], bx
mov byte [rbp - 0x72], 1
nop word [rax + rax]
movzx eax, bx
sub ax, cx
xor word [rsp + rbx*2 + 0x40], ax
inc rbx
cmp rbx, 0x26
jb 0x140004710
mov byte [rbp - 0x72], 0
lea rdx, [rsp + 0x40]
jmp 0x14000450c
mov dword [rbp - 0x30], 0xce72ce09
mov ecx, 0x31ae
mov dword [rbp - 0x2c], 0xce75ce09
mov dword [rbp - 0x28], 0xce36ce10
mov dword [rbp - 0x24], 0xce35ce31
mov dword [rbp - 0x20], 0xce3fce3f
mov dword [rbp - 0x1c], 0xce29ce7c
mov dword [rbp - 0x18], 0xce7fce31
mov dword [rbp - 0x14], 0xce08ce06
mov dword [rbp - 0x10], 0xce07ce0c
mov dword [rbp - 0xc], 0xce01ce44
mov dword [rbp - 8], 0xce0ece14
mov dword [rbp - 4], 0xce0cce1e
mov dword [rbp], 0xce4bce18
mov dword [rbp + 4], 0xce0cce02
mov dword [rbp + 8], 0xce0ace03
mov word [rbp + 0xc], bx
mov byte [rbp + 0xe], 1
nop dword [rax + rax]
movzx eax, bx
sub ax, cx
xor word [rbp + rbx*2 - 0x30], ax
inc rbx
cmp rbx, 0x1e
jb 0x1400047b0
jmp 0x140004504
mov dword [rbp - 0x30], 0xce72ce09
mov ecx, 0x31ae
mov dword [rbp - 0x2c], 0xce75ce09
mov dword [rbp - 0x28], 0xce36ce10
mov dword [rbp - 0x24], 0xce35ce31
mov dword [rbp - 0x20], 0xce3fce3f
mov dword [rbp - 0x1c], 0xce29ce7c
mov dword [rbp - 0x18], 0xce7fce31
mov dword [rbp - 0x14], 0xce08ce06
mov dword [rbp - 0x10], 0xce07ce0c
mov dword [rbp - 0xc], 0xce01ce44
mov dword [rbp - 8], 0xce0ece14
mov dword [rbp - 4], 0xce0cce1e
mov dword [rbp], 0xce34ce18
mov dword [rbp + 4], 0xce08ce1f
mov dword [rbp + 8], 0xce1bce0d
mov dword [rbp + 0xc], 0xce1ece19
mov dword [rbp + 0x10], 0xce1c
mov byte [rbp + 0x14], 1
nop dword [rax]
movzx eax, bx
sub ax, cx
xor word [rbp + rbx*2 - 0x30], ax
inc rbx
cmp rbx, 0x21
jb 0x140004850
mov byte [rbp + 0x14], 0
lea rdx, [rbp - 0x30]
jmp 0x14000450c
mov dword [rbp - 0x30], 0xce72ce09
mov ecx, 0x31ae
mov dword [rbp - 0x2c], 0xce75ce09
mov dword [rbp - 0x28], 0xce36ce10
mov dword [rbp - 0x24], 0xce35ce31
mov dword [rbp - 0x20], 0xce3fce3f
mov dword [rbp - 0x1c], 0xce29ce7c
mov dword [rbp - 0x18], 0xce7fce31
mov dword [rbp - 0x14], 0xce08ce06
mov dword [rbp - 0x10], 0xce07ce0c
mov dword [rbp - 0xc], 0xce01ce44
mov dword [rbp - 8], 0xce0ece14
mov dword [rbp - 4], 0xce0cce1e
mov dword [rbp], 0xce34ce18
mov dword [rbp + 4], 0xce0fce03
mov dword [rbp + 8], 0xce0ace04
mov dword [rbp + 0xc], 0xce05ce13
mov word [rbp + 0x10], bx
mov byte [rbp + 0x12], 1
nop
movzx eax, bx
sub ax, cx
xor word [rbp + rbx*2 - 0x30], ax
inc rbx
cmp rbx, 0x20
jb 0x1400048f0
mov byte [rbp + 0x12], 0
lea rdx, [rbp - 0x30]
jmp 0x14000450c
mov dword [rbp - 0x30], 0xce72ce09
mov ecx, 0x31ae
mov dword [rbp - 0x2c], 0xce75ce09
mov dword [rbp - 0x28], 0xce36ce10
mov dword [rbp - 0x24], 0xce35ce31
mov dword [rbp - 0x20], 0xce3fce3f
mov dword [rbp - 0x1c], 0xce29ce7c
mov dword [rbp - 0x18], 0xce7fce31
mov dword [rbp - 0x14], 0xce08ce06
mov dword [rbp - 0x10], 0xce07ce0c
mov dword [rbp - 0xc], 0xce01ce44
mov dword [rbp - 8], 0xce11ce03
mov dword [rbp - 4], 0xce0ace01
mov dword [rbp], 0xce34ce0f
mov dword [rbp + 4], 0xce0fce03
mov dword [rbp + 8], 0xce0ace04
mov dword [rbp + 0xc], 0xce05ce13
mov word [rbp + 0x10], bx
mov byte [rbp + 0x12], 1
nop
movzx eax, bx
sub ax, cx
xor word [rbp + rbx*2 - 0x30], ax
inc rbx
cmp rbx, 0x20
jb 0x140004990
mov byte [rbp + 0x12], 0
lea rdx, [rbp - 0x30]
jmp 0x14000450c
test rdi, rdi
je 0x1400049c7
mov r8d, 0x8000
xor edx, edx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualFree]
xor al, al
mov r15, qword [rsp + 0x180]
mov rsi, qword [rsp + 0x178]
mov rcx, qword [rbp + 0x40]
xor rcx, rsp
call fcn.140015b50
mov rbx, qword [rsp + 0x188]
add rsp, 0x150
pop r14
pop rdi
pop rbp
ret