Function at 0x14000aa40
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
mov rax, rsp
push rbp
push r12
push r13
mov rbp, rsp
sub rsp, 0x80
mov qword [rbp - 0x20], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
mov rax, qword [0x140022218]
xor rax, rsp
mov qword [rbp - 8], rax
mov rsi, rcx
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
lea r13, [0x140024670]
mov ecx, dword [0x140023468]
cmp ecx, 0xffffffff
je 0x14000aaa9
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, rax
test rax, rax
je 0x14000aaa9
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x14000aab4
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rdi, r13
mov r9d, MsiGetComponentPathW
mov r8, rsi
lea rdx, [0x14001d7d8]
mov rcx, rdi
call fcn.140007350
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov ecx, dword [0x140023468]
cmp ecx, 0xffffffff
je 0x14000aaf7
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, rax
test rax, rax
je 0x14000aaf7
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x14000ab02
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rdi, r13
xor r12d, r12d
mov qword [rbp - 0x48], r12
mov qword [rbp - 0x40], r12
mov qword [rbp - 0x38], rdi
mov dword [rbp - 0x30], 0xff
mov ecx, dword [0x14002346c]
cmp ecx, 0xffffffff
je 0x14000ab6d
cmp dword [0x140023470], 0xffffffff
je 0x14000ab6d
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov qword [rbp - 0x48], rax
mov ecx, dword [0x140023470]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov qword [rbp - 0x40], rax
lea rdx, str.SetPrivilege
mov ecx, dword [0x14002346c]
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
lea rdx, [rbp - 0x48]
mov ecx, dword [0x140023470]
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
mov rdi, qword [rbp - 0x38]
test rdi, rdi
je 0x14000ab7b
mov rcx, rdi
call fcn.140005d90
nop
lea r8, [rbp - 0x28]
mov rdx, rsi
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
test eax, eax
jne 0x14000ac02
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov ecx, dword [0x140023468]
cmp ecx, 0xffffffff
je 0x14000abb9
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, rax
test rax, rax
je 0x14000abb9
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x14000abc4
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rdi, r13
mov dword [rsp + 0x28], 0xad
lea rax, [0x14001d4b8]
mov qword [rsp + 0x20], rax
lea r9, str.LookupPrivilegeValue_failed
xor r8d, r8d
lea rdx, [0x14001d7d8]
mov rcx, rdi
call fcn.140007770
nop
lea rcx, [rbp - 0x48]
call fcn.1400044b0
xor eax, eax
jmp 0x14000ae56
mov qword [rbp - 0x50], r12
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rcx, qword [rbp - 0x50]
test rcx, rcx
je 0x14000ac1d
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbp - 0x50], r12
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
nop
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rcx, rax
lea r8, [rbp - 0x50]
mov edx, 0x28
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x14000ace2
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov ecx, dword [0x140023468]
cmp ecx, 0xffffffff
je 0x14000ac75
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, rax
test rax, rax
je 0x14000ac75
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x14000ac80
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rdi, r13
mov dword [rsp + 0x28], 0xb4
lea rax, [0x14001d4b8]
mov qword [rsp + 0x20], rax
lea r9, str.OpenProcessToken_failed
xor r8d, r8d
lea rdx, [0x14001d7d8]
mov rcx, rdi
call fcn.140007770
nop
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rcx, qword [rbp - 0x50]
test rcx, rcx
je 0x14000acc9
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbp - 0x50], r12
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
nop
lea rcx, [rbp - 0x48]
call fcn.1400044b0
xor eax, eax
jmp 0x14000ae56
mov dword [rbp - 0x18], 1
mov rax, qword [rbp - 0x28]
mov qword [rbp - 0x14], rax
mov dword [rbp - 0xc], 2
mov qword [rsp + 0x28], r12
mov qword [rsp + 0x20], r12
mov r9d, 0x10
lea r8, [rbp - 0x18]
xor edx, edx
mov rcx, qword [rbp - 0x50]
call qword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
jne 0x14000ad83
call fcn.140004c10
mov rcx, rax
mov dword [rsp + 0x28], 0xcb
lea rax, [0x14001d4b8]
mov qword [rsp + 0x20], rax
lea r9, str.AdjustTokenPrivileges_failed
xor r8d, r8d
lea rdx, [0x14001d7d8]
call fcn.140007770
nop
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rcx, qword [rbp - 0x50]
test rcx, rcx
je 0x14000ad6a
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbp - 0x50], r12
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
nop
lea rcx, [rbp - 0x48]
call fcn.1400044b0
xor eax, eax
jmp 0x14000ae56
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x514
jne 0x14000adf4
call fcn.140004c10
mov rcx, rax
mov dword [rsp + 0x28], 0xd1
lea rax, [0x14001d4b8]
mov qword [rsp + 0x20], rax
lea r9, str.Privilege_was_not_assigned
xor r8d, r8d
lea rdx, [0x14001d7d8]
call fcn.140007770
nop
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rcx, qword [rbp - 0x50]
test rcx, rcx
je 0x14000adde
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbp - 0x50], r12
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
nop
lea rcx, [rbp - 0x48]
call fcn.1400044b0
xor eax, eax
jmp 0x14000ae56
call fcn.140004c10
mov rcx, rax
mov dword [rsp + 0x28], 0xd5
lea rax, [0x14001d4b8]
mov qword [rsp + 0x20], rax
xor r9d, r9d
lea r8d, [r9 + 1]
lea rdx, [0x14001d7d8]
call fcn.140007770
nop
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rcx, qword [rbp - 0x50]
test rcx, rcx
je 0x14000ae3f
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbp - 0x50], r12
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
nop
lea rcx, [rbp - 0x48]
call fcn.1400044b0
mov eax, 1
mov rcx, qword [rbp - 8]
xor rcx, rsp
call fcn.14000c410
lea r11, [rsp + 0x80]
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r13
pop r12
pop rbp
ret