Function at 0x7ff7c0056400
Capabilities:
Allocate thread local storage

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x90
mov rax, qword [0x7ff7c01ca008]
xor rax, rsp
mov qword [rsp + 0x88], rax
mov rbx, rdx
test rcx, rcx
je 0x7ff7c0056448
movzx eax, word [rcx]
mov word [rsp + 0x30], ax
add ax, 2
mov word [rsp + 0x32], ax
mov rax, qword [rcx + 8]
jmp 0x7ff7c0056457
mov dword [rsp + 0x30], 0x3e003c
lea rax, [0x7ff7c01523d8]
mov r8b, 2
mov qword [rsp + 0x38], rax
lea rdx, [0x7ff7c01cdc58]
lea rcx, [rsp + 0x78]
call qword [sym.imp.ntdll.dll_RtlInitializeSid]
xor edx, edx
lea rcx, [rsp + 0x78]
call qword [sym.imp.ntdll.dll_RtlSubAuthoritySid]
mov edx, 1
lea rcx, [rsp + 0x78]
mov dword [rax], 0x20
call qword [sym.imp.ntdll.dll_RtlSubAuthoritySid]
lea rcx, ds:[rsp + 0x78]
mov dword [rax], 0x220
call qword [sym.imp.ntdll.dll_RtlLengthSid]
lea rcx, [0x7ff7c01cae18]
mov edi, eax
call qword [sym.imp.ntdll.dll_RtlLengthSid]
mov rcx, qword [0x7ff7c01d3cd0]
mov edx, 4
add eax, 0x48
add edi, eax
mov r8d, edi
call qword [sym.imp.kernel32.dll_HeapAlloc_1]
mov rcx, rax
mov edx, 1
mov rbp, rax
call qword [sym.imp.ntdll.dll_RtlCreateSecurityDescriptor]
lea edx, [rdi - 0x28]
mov edi, 2
mov r8d, edi
lea rcx, [rbp + 0x28]
call qword [sym.imp.ntdll.dll_RtlCreateAcl]
lea r9, [rsp + 0x78]
mov r8d, 0x1f0001
mov edx, edi
lea rcx, [rbp + 0x28]
call qword [sym.imp.ntdll.dll_RtlAddAccessAllowedAce]
lea r9, [0x7ff7c01cae18]
mov edx, edi
lea r8d, [rdi - 1]
lea rcx, [rbp + 0x28]
call qword [sym.imp.ntdll.dll_RtlAddAccessAllowedAce]
xor r9d, r9d
lea r8, [rbp + 0x28]
mov dl, 1
mov rcx, rbp
call qword [sym.imp.ntdll.dll_RtlSetDaclSecurityDescriptor]
xor ecx, ecx
mov dword [rsp + 0x48], 0x30
mov qword [rsp + 0x50], rcx
lea rax, [rsp + 0x30]
mov qword [rsp + 0x70], rcx
lea r8d, [rdi + 2]
mov dword [rsp + 0x20], ecx
lea rdx, [rsp + 0x48]
lea rcx, [0x7ff7c01d85b8]
mov dword [rsp + 0x60], 0x40
mov r9d, 0xb0
mov qword [rsp + 0x58], rax
mov qword [rsp + 0x68], rbp
call qword [sym.imp.ntdll.dll_NtCreatePort]
mov rcx, qword [0x7ff7c01d3cd0]
mov r8, rbp
xor edx, edx
mov esi, eax
call qword [sym.imp.ntdll.dll_RtlFreeHeap]
nop word [rax + rax]
test esi, esi
js 0x7ff7c00566b5
call qword [sym.imp.kernel32.dll_TlsAlloc]
mov dword [0x7ff7c01d85b0], eax
nop dword [rax]
nop dword [rax + rax]
xor edx, edx
lea rcx, [0x7ff7c0055ec0]
call sym.ProcessHacker.exe_PhCreateThread2
sub rdi, 1
jne 0x7ff7c00565c0
lea r9d, [rdi + 1]
mov byte [rsp + 0x20], 1
xor r8d, r8d
lea rcx, [0x7ff7c01d3208]
mov edx, 0x1f0003
call qword [sym.imp.ntdll.dll_NtCreateEvent]
test eax, eax
js 0x7ff7c00566b7
lea r9d, [rdi + 1]
mov byte [rsp + 0x20], dil
xor r8d, r8d
lea rcx, [0x7ff7c01d3200]
mov edx, 0x1f0003
call qword [sym.imp.ntdll.dll_NtCreateEvent]
mov edi, eax
test eax, eax
jns 0x7ff7c0056632
mov rcx, qword [0x7ff7c01d3208]
call qword [sym.imp.ntdll.dll_NtClose]
mov eax, edi
jmp 0x7ff7c00566b7
test rbx, rbx
je 0x7ff7c0056660
mov rax, qword [0x7ff7c01d3208]
mov qword [rbx + 8], rax
mov rax, qword [0x7ff7c01d3200]
mov qword [rbx + 0x10], rax
lock or dword [rsp], 0
cmp byte [rbx], 0
je 0x7ff7c0056660
xor eax, eax
jmp 0x7ff7c00566b7
mov rcx, qword [0x7ff7c01d3208]
xor r8d, r8d
xor edx, edx
call qword [sym.imp.ntdll.dll_NtWaitForSingleObject]
test rbx, rbx
je 0x7ff7c005667c
cmp byte [rbx], 0
jne 0x7ff7c00566b1
mov rcx, qword [0x7ff7c01d3200]
lea r8, [rsp + 0x40]
xor edx, edx
mov qword [rsp + 0x40], 0xfffffffffa0a1f00
call qword [sym.imp.ntdll.dll_NtWaitForSingleObject]
mov edi, eax
test rbx, rbx
je 0x7ff7c00566aa
cmp byte [rbx], 0
jne 0x7ff7c00566b1
cmp eax, 0x102
jne 0x7ff7c0056660
mov eax, edi
jmp 0x7ff7c00566b7
mov eax, esi
mov rcx, qword [rsp + 0x88]
xor rcx, rsp
call fcn.7ff7c0121390
lea r11, [rsp + 0x90]
mov rbx, qword [r11 + 0x10]
mov rbp, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rsp, r11
pop rdi
nop
ret