Function at 0x140021540
Capabilities:
Get thread local storage value
Set thread local storage value
Terminate process

Disassembly:
mov qword [rsp + 0x20], rsi
push rbp
lea rbp, [rsp - 0x57]
sub rsp, 0x100
mov edx, 2
xor ecx, ecx
mov esi, r9d
call qword [sym.imp.ole32.dll_CoInitializeEx]
mov ecx, 0x8003
call qword [sym.imp.KERNEL32.dll_SetErrorMode]
mov rax, qword gs:[0x30]
mov rcx, qword [rax + 0x60]
mov rax, qword [rcx + 0x10]
mov qword [0x14015f358], rax
call fcn.1400c1240
test eax, eax
jns 0x1400215a4
mov eax, 1
mov rsi, qword [rsp + 0x128]
add rsp, 0x100
pop rbp
ret
call fcn.140022520
test al, al
je 0x14002158e
mov qword [rsp + 0x110], rbx
lea rcx, [rbp - 0x71]
mov qword [rsp + 0x118], rdi
mov qword [rsp + 0x120], r14
mov dword [rbp - 0x71], 8
mov dword [rbp - 0x6d], 0x8029
call qword [sym.imp.COMCTL32.dll_InitCommonControlsEx]
lea rcx, [rbp + 0xf]
call sym.ProcessHacker.exe_PhGetOwnTokenAttributes
mov rcx, qword [rax]
test rcx, rcx
je 0x14002162a
lea r8, [rbp - 0x69]
mov edx, 1
call fcn.1400ba160
test eax, eax
js 0x14002162a
mov rbx, qword [rbp - 0x69]
xor r8d, r8d
mov dl, 1
mov rcx, qword [rbx]
call sym.ProcessHacker.exe_PhGetSidFullName
mov rcx, qword [sym.ProcessHacker.exe_PhHeapHandle]
mov r8, rbx
xor edx, edx
mov qword [0x140159d10], rax
call qword [sym.imp.ntdll.dll_RtlFreeHeap]
xor r8d, r8d
lea rcx, [0x140155fe8]
mov dl, 1
call sym.ProcessHacker.exe_PhGetSidFullName
mov qword [0x140159d30], rax
test rax, rax
jne 0x14002165d
lea edx, [rax + 0x26]
lea rcx, str.NT_AUTHORITYSYSTEM
call sym.ProcessHacker.exe_PhCreateStringEx
mov qword [0x140159d30], rax
mov rax, qword gs:[0x30]
xor edx, edx
mov rcx, qword [rax + 0x60]
mov rcx, qword [rcx + 0x10]
call sym.ProcessHacker.exe_PhGetDllFileName
mov qword [0x14015f348], rax
lea rdx, [rbp - 0x75]
mov rax, qword gs:[0x30]
xor r14d, r14d
mov ebx, r14d
mov rcx, qword [rax + 0x60]
mov rcx, qword [rcx + 0x10]
call sym.ProcessHacker.exe_PhGetDllFileName
mov rdi, rax
test rax, rax
je 0x1400216d2
mov eax, dword [rbp - 0x75]
test eax, eax
je 0x1400216bc
mov rcx, qword [rdi + 8]
mov edx, eax
add rdx, rdx
call sym.ProcessHacker.exe_PhCreateStringEx
mov rbx, rax
lea rcx, [rdi - 0x10]
or edx, 0xffffffff
lock xadd dword [rcx + 8], edx
cmp edx, 1
jne 0x1400216d2
call fcn.1400ae900
cmp qword [0x14015f348], r14
mov rdi, qword [rsp + 0x118]
mov qword [0x14015f350], rbx
jne 0x140021709
mov edx, 0x22
lea rcx, [0x140129dc8]
call sym.ProcessHacker.exe_PhCreateStringEx
mov rbx, qword [0x14015f350]
mov qword [0x14015f348], rax
test rbx, rbx
jne 0x14002171a
call sym.ProcessHacker.exe_PhReferenceEmptyString
mov qword [0x14015f350], rax
call fcn.140022ee0
call fcn.140086980
call fcn.140023080
mov rcx, qword [0x14015f320]
test rcx, rcx
je 0x140021743
call fcn.140085d70
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_ExitProcess]
call fcn.1400226a0
lea rcx, str.AllowOnlyOneInstance
call sym.ProcessHacker.exe_PhGetIntegerSetting
test eax, eax
je 0x140021769
test dword [0x14015f2e0], 0xb08
jne 0x140021769
call fcn.140022010
lea rcx, str.EnableKph
call sym.ProcessHacker.exe_PhGetIntegerSetting
test eax, eax
je 0x140021787
test byte [0x14015f2e0], 0x18
jne 0x140021787
call fcn.140022360
test byte [0x14015f2e0], 8
je 0x1400217d6
cmp qword [0x14015f300], r14
je 0x1400217d6
cmp qword [0x14015f310], r14
je 0x1400217d6
call fcn.14000eb00
mov ebx, eax
test eax, eax
jns 0x1400217cd
test dword [0x14015f2e0], 0x2000
jne 0x1400217cd
xor r9d, r9d
lea rdx, str.Unable_to_execute_the_command
mov r8d, eax
xor ecx, ecx
call sym.ProcessHacker.exe_PhShowStatus
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_ExitProcess]
mov ecx, dword [0x14015dac4]
mov dword [0x14015be00], r14d
mov qword [0x14015c008], r14
mov qword [0x14015c010], r14
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, dword [0x14015dac4]
lea rdx, [0x14015be00]
mov qword [0x14015c018], rax
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
jne 0x140021821
mov ecx, 0xc0000001
call qword [sym.imp.ntdll.dll_RtlRaiseStatus]
int3
lea rax, [0x140159a60]
mov ecx, 0x14
nop dword [rax]
mov qword [rax + 8], rax
mov qword [rax], rax
add rax, 0x20
sub rcx, 1
jne 0x140021830
call fcn.1400c5490
call fcn.1400d47f0
call fcn.1400d2b00
call fcn.1400d0010
call fcn.1400cfb20
mov ecx, 0x31
call qword [sym.imp.USER32.dll_GetSystemMetrics]
mov ecx, 0x32
mov dword [0x140152fd0], eax
call qword [sym.imp.USER32.dll_GetSystemMetrics]
mov ecx, 0xb
mov dword [0x140152fd4], eax
call qword [sym.imp.USER32.dll_GetSystemMetrics]
mov ecx, 0xc
mov dword [0x140152d28], eax
call qword [sym.imp.USER32.dll_GetSystemMetrics]
test dword [0x14015f2e0], 0x100
mov dword [0x140152d2c], eax
je 0x1400218bf
mov rcx, qword [0x14015f2f0]
call fcn.140043010
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_ExitProcess]
lea rcx, str.EnablePlugins
call sym.ProcessHacker.exe_PhGetIntegerSetting
mov ecx, dword [0x14015f2e0]
test eax, eax
je 0x14002193d
bt ecx, 0xa
jb 0x14002193d
mov byte [0x140159a44], 1
lea rax, [0x14015c5d0]
mov ecx, 0x22
nop
mov qword [rax + 8], rax
mov qword [rax], rax
mov qword [rax + 0x10], r14
mov qword [rax + 0x18], r14
add rax, 0x20
sub rcx, 1
jne 0x1400218f0
cmp dword [sym.ProcessHacker.exe_WindowsVersion], 0x33
ja 0x140021930
lea rax, str.ExtendedTools.dll
mov qword [rbp - 0x39], 0x22
mov dl, 1
mov qword [rbp - 0x31], rax
lea rcx, [rbp - 0x39]
call fcn.140065640
call fcn.140065a00
mov ecx, dword [0x14015f2e0]
jmp 0x140021944
mov byte [0x140159a44], r14b
bt ecx, 9
jae 0x140021a62
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.USER32.dll_PostMessageW]
xor r9d, r9d
lea rcx, [rbp + 0x1f]
xor r8d, r8d
xor edx, edx
call qword [sym.imp.USER32.dll_GetMessageW]
lea rax, str.BaseNamedObjectsPhSvcApiPort
mov dword [rbp - 0x59], 0x3e003c
lea r8, [0x140065200]
mov qword [rbp - 0x51], rax
xor edx, edx
mov qword [rbp - 0x61], 0xfffffffff70f2e80
lea rcx, str.Client
call sym.ProcessHacker.exe_PhCreateObjectType
mov qword [0x14015f190], rax
lea rcx, [rbp - 0x59]
lea rax, [0x14015f1a0]
mov qword [0x14015f1a8], rax
mov qword [0x14015f1a0], rax
call fcn.140064c00
mov ebx, eax
test eax, eax
js 0x140021a59
mov r9d, 1
mov byte [rsp + 0x20], 1
xor r8d, r8d
lea rcx, [0x14015f180]
mov edx, 0x1f0003
call qword [sym.imp.ntdll.dll_NtCreateEvent]
mov ebx, eax
test eax, eax
js 0x140021a59
mov r9d, 1
mov byte [rsp + 0x20], r14b
xor r8d, r8d
lea rcx, [0x14015f188]
mov edx, 0x1f0003
call qword [sym.imp.ntdll.dll_NtCreateEvent]
mov ebx, eax
test eax, eax
jns 0x140021a29
mov rcx, qword [0x14015f180]
call qword [sym.imp.ntdll.dll_NtClose]
jmp 0x140021a59
mov ebx, 0x102
nop
mov rcx, qword [0x14015f180]
xor r8d, r8d
xor edx, edx
call qword [sym.imp.ntdll.dll_NtWaitForSingleObject]
mov rcx, qword [0x14015f188]
lea r8, [rbp - 0x61]
xor edx, edx
call qword [sym.imp.ntdll.dll_NtWaitForSingleObject]
cmp eax, ebx
jne 0x140021a30
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_ExitProcess]
lea rax, str.BaseNamedObjectszzzzzzzzzzzzz2Mutant
mov dword [rbp - 0x49], 0x4e004c
mov qword [rbp - 0x41], rax
lea r8, [rbp - 0x21]
lea rax, [rbp - 0x49]
mov dword [rbp - 0x21], 0x30
xorps xmm0, xmm0
mov qword [rbp - 0x11], rax
xor r9d, r9d
mov qword [rbp - 0x19], r14
mov edx, 0x1f0001
mov dword [rbp - 9], r14d
lea rcx, [rbp - 0x29]
movdqu xmmword [rbp - 1], xmm0
call qword [sym.imp.ntdll.dll_NtCreateMutant]
mov al, 3
mov byte [rbp - 0x79], r14b
movzx r8d, al
mov r9d, 2
mov eax, dword [0x14015f32c]
test eax, eax
movzx edx, al
cmovne r8d, edx
or rcx, 0xffffffffffffffff
mov byte [rbp - 0x78], r8b
lea edx, [r9 + 0x10]
lea r8, [rbp - 0x79]
call qword [sym.imp.ntdll.dll_NtSetInformationProcess]
mov ecx, esi
call fcn.140023160
test al, al
jne 0x140021b22
lea r8, str.Unable_to_initialize_the_main_window.
mov edx, 0x10
xor ecx, ecx
call sym.ProcessHacker.exe_PhShowMessage
mov rbx, qword [rsp + 0x110]
mov eax, 1
mov r14, qword [rsp + 0x120]
mov rsi, qword [rsp + 0x128]
add rsp, 0x100
pop rbp
ret
lea rcx, [0x14015be00]
call sym.ProcessHacker.exe_PhDrainAutoPool
call fcn.140021b40
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_ExitProcess]