Function at 0x140001974
Capabilities:
Check mutex on windows
Create thread
Get session user name

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 fcn.1400015ec
test eax, eax
je 0x140001bf8
mov rax, qword [0x140019d70]
cmp dword [rax + 0x10], 0
je 0x140001a32
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 0x140001a32
mov r10, qword [0x140019d68]
lea r9, [rsp + 0x30]
and dword [rsp + 0x30], 0
mov edi, 4
mov edx, edi
mov rcx, rax
lea r8d, [rdi + 0x3c]
call qword [r10 + 0x30]
mov r8d, edi
lea rdx, [rsp + 0x38]
mov rcx, rbx
call fcn.140003900
mov rax, qword [0x140019d68]
lea r9, [rsp + 0x30]
mov r8d, dword [rsp + 0x30]
mov edx, edi
mov rcx, rbx
call qword [rax + 0x30]
mov rax, qword [0x140019d70]
cmp dword [rax + 4], 0
je 0x140001a7f
xor edx, edx
lea rcx, [rbp - 0x70]
mov r8d, 0x101
call fcn.140003d50
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.140004784
test eax, eax
jne 0x140001bf8
mov rax, qword [0x140019d70]
cmp dword [rax + 8], 0
je 0x140001b0a
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.Global_v5EPQFOImpTLaGZes3Nl1JSKHku8AyCw
mov qword [rsp + 0x50], rax
lea rcx, [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_CreateMutexA]
mov qword [0x140019d80], rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x140001b51
cmp eax, 5
je 0x140001b51
mov rcx, qword [0x140019d80]
test rcx, rcx
je 0x140001c12
and qword [rsp + 0x38], 0
lea rdx, [rsp + 0x30]
and dword [rsp + 0x30], 0
lea rcx, [rsp + 0x38]
call fcn.140001c38
test eax, eax
je 0x140001bf8
mov r8, qword [0x140019d70]
cmp dword [r8 + 0x14], 0
je 0x140001b75
mov r8, qword [r8 + 0x18]
mov edx, dword [rsp + 0x30]
mov rcx, qword [rsp + 0x38]
call fcn.1400028e8
jmp 0x140001be6
mov rcx, qword [0x140019d80]
test rcx, rcx
je 0x140001c12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor ecx, ecx
mov qword [0x140019d80], rcx
jmp 0x140001bff
mov rax, qword [0x140019d68]
mov r9d, 0x40
mov edi, dword [rsp + 0x30]
mov r8d, 0x3000
mov edx, edi
xor ecx, ecx
call qword [rax + 0x28]
mov rbx, rax
test rax, rax
je 0x140001be6
mov rdx, qword [rsp + 0x38]
mov r8d, edi
mov rcx, rax
call fcn.140003900
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 rcx, rax
mov qword [0x140019d88], rax
or edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, qword [0x140019d88]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, qword [0x140019d70]
cmp dword [rax + 0xc], 0
je 0x140001bf8
call fcn.140001f4c
mov rcx, qword [0x140019d80]
test rcx, rcx
je 0x140001c12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
and qword [0x140019d80], 0
xor eax, eax
mov rcx, qword [rbp + 0xa0]
xor rcx, rsp
call fcn.140002b90
lea r11, [rsp + 0x1b0]
mov rbx, qword [r11 + 0x10]
mov rdi, qword [r11 + 0x18]
mov rsp, r11
pop rbp
ret