Function at 0x140020e60
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 [0x1401604d8], rax
call fcn.1400c09c0
test eax, eax
jns 0x140020ec4
mov eax, 1
mov rsi, qword [rsp + 0x128]
add rsp, 0x100
pop rbp
ret
call fcn.140021c50
test al, al
je 0x140020eae
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 0x140020f4a
lea r8, [rbp - 0x69]
mov edx, 1
call fcn.1400ba040
test eax, eax
js 0x140020f4a
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 [0x14015ae90], rax
call qword [sym.imp.ntdll.dll_RtlFreeHeap]
xor r8d, r8d
lea rcx, [0x140157158]
mov dl, 1
call sym.ProcessHacker.exe_PhGetSidFullName
mov qword [0x14015aeb0], rax
test rax, rax
jne 0x140020f7d
lea edx, [rax + 0x26]
lea rcx, str.NT_AUTHORITYSYSTEM
call sym.ProcessHacker.exe_PhCreateStringEx
mov qword [0x14015aeb0], 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 [0x1401604c8], 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 0x140020ff2
mov eax, dword [rbp - 0x75]
test eax, eax
je 0x140020fdc
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 0x140020ff2
call fcn.1400ae580
cmp qword [0x1401604c8], r14
mov rdi, qword [rsp + 0x118]
mov qword [0x1401604d0], rbx
jne 0x140021029
mov edx, 0x22
lea rcx, [0x140129f08]
call sym.ProcessHacker.exe_PhCreateStringEx
mov rbx, qword [0x1401604d0]
mov qword [0x1401604c8], rax
test rbx, rbx
jne 0x14002103a
call sym.ProcessHacker.exe_PhReferenceEmptyString
mov qword [0x1401604d0], rax
call fcn.140022610
call fcn.140084d70
call fcn.1400227b0
mov rcx, qword [0x1401604a0]
test rcx, rcx
je 0x140021063
call fcn.140084100
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_ExitProcess]
call fcn.140021dd0
lea rcx, str.AllowOnlyOneInstance
call sym.ProcessHacker.exe_PhGetIntegerSetting
test eax, eax
je 0x140021089
test dword [0x140160460], 0xb08
jne 0x140021089
call fcn.140021930
lea rcx, str.EnableKph
call sym.ProcessHacker.exe_PhGetIntegerSetting
test eax, eax
je 0x1400210a7
test byte [0x140160460], 0x10
jne 0x1400210a7
call fcn.140021b80
test byte [0x140160460], 8
je 0x1400210f6
cmp qword [0x140160480], r14
je 0x1400210f6
cmp qword [0x140160490], r14
je 0x1400210f6
call fcn.14000e900
mov ebx, eax
test eax, eax
jns 0x1400210ed
test dword [0x140160460], 0x2000
jne 0x1400210ed
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 [0x14015ec30]
mov dword [0x14015cf80], r14d
mov qword [0x14015d188], r14
mov qword [0x14015d190], r14
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, dword [0x14015ec30]
lea rdx, [0x14015cf80]
mov qword [0x14015d198], rax
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
jne 0x140021141
mov ecx, 0xc0000001
call qword [sym.imp.ntdll.dll_RtlRaiseStatus]
int3
lea rax, [0x14015abe0]
mov ecx, 0x14
nop dword [rax]
mov qword [rax + 8], rax
mov qword [rax], rax
add rax, 0x20
sub rcx, 1
jne 0x140021150
call fcn.1400c17f0
call fcn.1400d3f50
call fcn.1400d2260
call fcn.1400cf770
call fcn.1400cf280
mov ecx, 0x31
call qword [sym.imp.USER32.dll_GetSystemMetrics]
mov ecx, 0x32
mov dword [0x140153fc0], eax
call qword [sym.imp.USER32.dll_GetSystemMetrics]
mov ecx, 0xb
mov dword [0x140153fc4], eax
call qword [sym.imp.USER32.dll_GetSystemMetrics]
mov ecx, 0xc
mov dword [0x140153d18], eax
call qword [sym.imp.USER32.dll_GetSystemMetrics]
test dword [0x140160460], 0x100
mov dword [0x140153d1c], eax
je 0x1400211df
mov rcx, qword [0x140160470]
call fcn.140042650
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_ExitProcess]
lea rcx, str.EnablePlugins
call sym.ProcessHacker.exe_PhGetIntegerSetting
mov ecx, dword [0x140160460]
test eax, eax
je 0x14002125d
bt ecx, 0xa
jb 0x14002125d
mov byte [0x14015abc4], 1
lea rax, [0x14015d730]
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 0x140021210
cmp dword [sym.ProcessHacker.exe_WindowsVersion], 0x33
ja 0x140021250
lea rax, str.ExtendedTools.dll
mov qword [rbp - 0x39], 0x22
mov dl, 1
mov qword [rbp - 0x31], rax
lea rcx, [rbp - 0x39]
call fcn.1400649a0
call fcn.140064d60
mov ecx, dword [0x140160460]
jmp 0x140021264
mov byte [0x14015abc4], r14b
bt ecx, 9
jae 0x140021382
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, [0x140064560]
mov qword [rbp - 0x51], rax
xor edx, edx
mov qword [rbp - 0x61], 0xfffffffff70f2e80
lea rcx, str.Client
call sym.ProcessHacker.exe_PhCreateObjectType
mov qword [0x140160310], rax
lea rcx, [rbp - 0x59]
lea rax, [0x140160320]
mov qword [0x140160328], rax
mov qword [0x140160320], rax
call fcn.140063fe0
mov ebx, eax
test eax, eax
js 0x140021379
mov r9d, 1
mov byte [rsp + 0x20], 1
xor r8d, r8d
lea rcx, [0x140160300]
mov edx, 0x1f0003
call qword [sym.imp.ntdll.dll_NtCreateEvent]
mov ebx, eax
test eax, eax
js 0x140021379
mov r9d, 1
mov byte [rsp + 0x20], r14b
xor r8d, r8d
lea rcx, [0x140160308]
mov edx, 0x1f0003
call qword [sym.imp.ntdll.dll_NtCreateEvent]
mov ebx, eax
test eax, eax
jns 0x140021349
mov rcx, qword [0x140160300]
call qword [sym.imp.ntdll.dll_NtClose]
jmp 0x140021379
mov ebx, 0x102
nop
mov rcx, qword [0x140160300]
xor r8d, r8d
xor edx, edx
call qword [sym.imp.ntdll.dll_NtWaitForSingleObject]
mov rcx, qword [0x140160308]
lea r8, [rbp - 0x61]
xor edx, edx
call qword [sym.imp.ntdll.dll_NtWaitForSingleObject]
cmp eax, ebx
jne 0x140021350
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_ExitProcess]
lea rax, str.BaseNamedObjectsProcessHacker2Mutant
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 [0x1401604ac]
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.140022900
test al, al
jne 0x140021442
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, [0x14015cf80]
call sym.ProcessHacker.exe_PhDrainAutoPool
call fcn.140021460
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_ExitProcess]