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

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0xa80]
sub rsp, 0xb80
mov rax, qword [0x1401b8010]
xor rax, rsp
mov qword [rbp + 0xa70], rax
mov esi, edx
mov r14, rcx
mov qword [rbp], rcx
xor r15d, r15d
mov dword [rsp + 0x40], r15d
lea rcx, [rbp - 0x78]
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
nop
lea rbx, [0x14017d970]
mov qword [rbp - 0x80], rbx
mov ecx, dword [0x1401c1658]
mov eax, dword [0x1401c165c]
lea r12, [0x140000000]
add ecx, eax
je 0x14012222f
mov dword [rsp + 0x50], r15d
call fcn.140005ad0
mov qword [rsp + 0x48], rax
lock inc dword [rsp + 0x50]
mov dword [rsp + 0x40], 2
mov rax, qword [rsp + 0x48]
test rax, rax
jne 0x1401221f3
call fcn.140005ad0
mov qword [rsp + 0x48], rax
lock inc dword [rsp + 0x50]
mov rcx, qword [rsp + 0x48]
mov dword [rsp + 0x78], 0x20
mov qword [rsp + 0x30], rbx
lea rax, str._s_start:
mov qword [rsp + 0x28], rax
lea rax, str._CScopeTrace::operator___
mov qword [rsp + 0x20], rax
mov r9, r12
lea r8, [rsp + 0x78]
movsx edx, r15w
call fcn.140004c90
nop
mov edi, dword [rsp + 0x40]
test dil, 2
je 0x140122273
and edi, 0xfffffffd
mov dword [rsp + 0x40], edi
mov qword [rsp + 0x48], r15
mov eax, 0xffffffff
lock xadd dword [rsp + 0x50], eax
cmp eax, 1
js 0x14012226a
call fcn.140005e40
mov eax, 0xffffffff
lock xadd dword [rsp + 0x50], eax
cmp eax, 1
jns 0x140122255
lock inc dword [rsp + 0x50]
mov edi, dword [rsp + 0x40]
mov rax, qword [0x1401c0ff8]
cmp eax, 0xffffffff
je 0x140122293
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rcx, rax
mov rax, qword [0x1401c0ff8]
jmp 0x140122299
mov ecx, dword [0x1401c0ffc]
lea edx, [rcx + 1]
cmp eax, 0xffffffff
je 0x1401222ac
movsxd rdx, edx
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
mov qword [r14], r15
or edi, 1
mov dword [rsp + 0x40], edi
mov ebx, 0x208
mov r8d, ebx
lea rdx, [rbp + 0x250]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
dec eax
cmp eax, 0x206
ja 0x140122a07
test esi, esi
js 0x140122481
mov eax, 0x22
cmp ax, word [rbp + 0x250]
je 0x140122361
lea r9, [rbp + 0x250]
lea r8, [0x14017d918]
mov edx, ebx
lea rcx, [rbp + 0x660]
call fcn.14004d6b0
test eax, eax
js 0x140122481
mov r8d, ebx
lea rcx, [rbp + 0x250]
lea rdx, [rbp + 0x660]
lea rax, [rbp + 0x250]
sub rdx, rax
nop
lea rax, [r8 + 0x7ffffdf6]
test rax, rax
je 0x140122352
movzx eax, word [rdx + rcx]
test ax, ax
je 0x140122352
mov word [rcx], ax
add rcx, 2
sub r8, 1
jne 0x140122330
lea rax, [rcx - 2]
test r8, r8
cmovne rax, rcx
mov word [rax], r15w
lfence
mov r9d, esi
lea r8, str.crash_d
mov edx, 0x20
lea rcx, [rbp + 0x210]
call fcn.14004d6b0
test eax, eax
js 0x14012247d
mov rcx, rbx
lea rax, [rbp + 0x250]
cmp word [rax], 0
je 0x1401223a1
add rax, 2
sub rcx, 1
jne 0x140122391
mov rax, rbx
sub rax, rcx
test rcx, rcx
cmove rax, r15
mov r8d, 0x7ffffffe
je 0x140122406
mov rdx, rbx
sub rdx, rax
lea rcx, [rbp + 0x250]
lea rcx, [rcx + rax*2]
je 0x1401223f7
mov eax, r8d
lea r10, [0x1401631a4]
sub r10, rcx
test rax, rax
je 0x1401223f7
movzx r9d, word [r10 + rcx]
test r9w, r9w
je 0x1401223f7
mov word [rcx], r9w
add rcx, 2
dec rax
sub rdx, 1
jne 0x1401223d6
lea rax, [rcx - 2]
test rdx, rdx
cmovne rax, rcx
mov word [rax], r15w
mov rcx, rbx
lea rax, [rbp + 0x250]
cmp word [rax], 0
je 0x140122420
add rax, 2
sub rcx, 1
jne 0x140122410
mov rax, rbx
sub rax, rcx
test rcx, rcx
cmove rax, r15
je 0x14012247d
sub rbx, rax
lea rcx, [rbp + 0x250]
lea rcx, [rcx + rax*2]
je 0x14012246e
lea rdx, [rbp + 0x210]
sub rdx, rcx
nop dword [rax]
test r8, r8
je 0x14012246e
movzx eax, word [rdx + rcx]
test ax, ax
je 0x14012246e
mov word [rcx], ax
add rcx, 2
dec r8
sub rbx, 1
jne 0x140122450
lea rax, [rcx - 2]
test rbx, rbx
cmovne rax, rcx
mov word [rax], r15w
mov edi, dword [rsp + 0x40]
lea rax, [r12 + 0x181628]
mov qword [rbp + 0x118], rax
lea rcx, [rbp + 0x1b0]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_ios_wchar_t__struct_std::char_traits_wchar_t__::constructor_void____ptr64]
nop
or edi, 8
mov dword [rsp + 0x40], edi
xor r9d, r9d
xor r8d, r8d
lea rdx, [rbp + 0x120]
lea rcx, [rbp + 0x118]
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::constructor_class_std::basic_streambuf_wchar_t__struct_std::char_traits_wchar_t______ptr64__bool____ptr64]
nop
mov rax, qword [rbp + 0x118]
movsxd rcx, dword [rax + 4]
lea r13, vtable.std::basic_ostringstream_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__.0
mov qword [rbp + rcx + 0x118], r13
mov rax, qword [rbp + 0x118]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0x88]
mov dword [rbp + rcx + 0x114], edx
lea rcx, [rbp + 0x120]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_streambuf_wchar_t__struct_std::char_traits_wchar_t__::constructor_void____ptr64]
lea r12, vtable.std::basic_stringbuf_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__.0
mov qword [rbp + 0x120], r12
mov qword [rbp + 0x188], r15
mov dword [rbp + 0x190], 4
mov rax, qword [rbp + 0x118]
movsxd rcx, dword [rax + 4]
lea rax, vtable.logger_stream.0
mov qword [rbp + rcx + 0x118], rax
mov rax, qword [rbp + 0x118]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0x98]
mov dword [rbp + rcx + 0x114], edx
mov ecx, dword [0x1401c1658]
mov eax, dword [0x1401c165c]
add ecx, eax
je 0x1401225b1
mov dword [rsp + 0x60], r15d
call fcn.140005ad0
mov qword [rsp + 0x58], rax
lock inc dword [rsp + 0x60]
or dword [rsp + 0x40], 0x20
mov rax, qword [rsp + 0x58]
test rax, rax
jne 0x140122592
call fcn.140005ad0
mov qword [rsp + 0x58], rax
lock inc dword [rsp + 0x60]
mov rax, qword [rsp + 0x58]
cmp qword [rax], 0
je 0x1401225b1
mov rax, qword [rax + 0x58]
test rax, rax
je 0x1401225b1
call qword [case.0x140077645.0]
movzx ebx, al
jmp 0x1401225b3
xor bl, bl
mov edi, dword [rsp + 0x40]
test dil, 0x20
je 0x1401225fe
and edi, 0xffffffdf
mov dword [rsp + 0x40], edi
mov qword [rsp + 0x58], r15
mov eax, 0xffffffff
lock xadd dword [rsp + 0x60], eax
cmp eax, 1
js 0x1401225f5
nop dword [rax]
call fcn.140005e40
mov eax, 0xffffffff
lock xadd dword [rsp + 0x60], eax
cmp eax, 1
jns 0x1401225e0
lock inc dword [rsp + 0x60]
mov edi, dword [rsp + 0x40]
mov byte [rbp + 0x198], bl
mov dword [rbp + 0x19c], 0x10
lea rax, [0x14017d9c0]
mov qword [rbp + 0x1a0], rax
or edi, 4
mov dword [rsp + 0x40], edi
test bl, bl
je 0x140122659
lea rdx, str.restart_path_for_seccenter:
lea rcx, [rbp + 0x118]
call fcn.1400062b0
movzx ebx, byte [rbp + 0x198]
test bl, bl
je 0x140122659
lea rdx, [rbp + 0x250]
lea rcx, [rbp + 0x118]
call fcn.140006540
nop
lea rcx, [rbp + 0x1b0]
call fcn.140004f20
lea rcx, [rbp + 0x1b0]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_ios_wchar_t__struct_std::char_traits_wchar_t__::destructor_void____ptr64]
mov byte [rbp - 0x70], 0
lea rax, [rbp + 0x250]
mov qword [rbp - 0x68], rax
xorps xmm0, xmm0
movdqa xmmword [rbp - 0x60], xmm0
mov qword [rbp - 0x50], r15
mov byte [rbp - 8], 0
mov ecx, 0x78
call qword [sym.imp.mfc140u.dll_CMFCRibbonInfo::XElementButtonLinkCtrl::XElementButtonLinkCtrl]
mov rbx, rax
mov qword [rbp + 8], rax
test rax, rax
je 0x14012276d
mov byte [rax], 0
mov qword [rax + 8], r15
mov qword [rax + 0x10], r15
mov qword [rax + 0x18], r15
mov qword [rax + 0x20], r15
mov byte [rax + 0x68], 0
mov dword [rax + 0x70], r15d
lea rcx, [rbp - 0x70]
call fcn.140059920
mov dword [rbx + 0x70], eax
movzx eax, byte [rbp - 0x70]
mov byte [rbx], al
mov rax, qword [rbp - 0x68]
mov qword [rbx + 8], rax
mov rax, qword [rbp - 0x60]
mov qword [rbx + 0x10], rax
mov rax, qword [rbp - 0x58]
mov qword [rbx + 0x18], rax
mov rax, qword [rbp - 0x50]
mov qword [rbx + 0x20], rax
lea rsi, [rbx + 0x28]
movzx eax, byte [rsi + 0x40]
cmp byte [rbp - 8], 0
je 0x140122743
test al, al
je 0x140122719
lea rdx, [rbp - 0x48]
mov rcx, rsi
call fcn.1400022f0
jmp 0x14012276b
mov qword [rbp + 0x10], rsi
mov qword [rsi + 0x38], r15
mov rcx, qword [rbp - 0x10]
test rcx, rcx
je 0x14012273d
mov rax, qword [rcx]
mov rdx, rsi
mov rax, qword [rax]
call qword [case.0x140077645.0]
mov qword [rsi + 0x38], rax
mov byte [rsi + 0x40], 1
jmp 0x14012276b
test al, al
je 0x14012276b
mov rcx, qword [rsi + 0x38]
test rcx, rcx
je 0x140122767
mov rax, qword [rcx]
cmp rcx, rsi
setne dl
mov rax, qword [rax + 0x20]
call qword [case.0x140077645.0]
mov qword [rsi + 0x38], r15
mov byte [rsi + 0x40], 0
jmp 0x140122770
mov rbx, r15
or edi, 0x40
mov dword [rsp + 0x40], edi
lea rax, [rbp + 0x18]
cmp r14, rax
je 0x1401227c3
mov rsi, qword [r14]
mov qword [r14], rbx
test rsi, rsi
je 0x140122808
mov rcx, qword [rsi + 0x20]
call fcn.140059e80
lea r8, [rsi + 0x28]
cmp byte [rsi + 0x68], 0
je 0x1401227be
mov rcx, qword [rsi + 0x60]
test rcx, rcx
je 0x1401227be
mov rax, qword [rcx]
cmp rcx, r8
setne dl
mov rax, qword [rax + 0x20]
call qword [case.0x140077645.0]
mov qword [rsi + 0x60], r15
mov rcx, rsi
jmp 0x1401227fe
test rbx, rbx
je 0x140122808
mov rcx, qword [rbx + 0x20]
call fcn.140059e80
lea rdx, [rbx + 0x28]
cmp byte [rbx + 0x68], 0
je 0x1401227fb
mov rcx, qword [rbx + 0x60]
test rcx, rcx
je 0x1401227fb
mov rax, qword [rcx]
cmp rcx, rdx
setne dl
mov rax, qword [rax + 0x20]
call qword [case.0x140077645.0]
mov qword [rbx + 0x60], r15
mov rcx, rbx
mov edx, 0x78
call fcn.14007e2a0
lea rax, [0x140000000]
lea rax, [rax + 0x181628]
mov qword [rbp + 0x20], rax
lea rcx, [rbp + 0xb8]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_ios_wchar_t__struct_std::char_traits_wchar_t__::constructor_void____ptr64]
nop
bts edi, 8
mov dword [rsp + 0x40], edi
xor r9d, r9d
xor r8d, r8d
lea rdx, [rbp + 0x28]
lea rcx, [rbp + 0x20]
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::constructor_class_std::basic_streambuf_wchar_t__struct_std::char_traits_wchar_t______ptr64__bool____ptr64]
nop
mov rax, qword [rbp + 0x20]
movsxd rcx, dword [rax + 4]
mov qword [rbp + rcx + 0x20], r13
mov rax, qword [rbp + 0x20]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0x88]
mov dword [rbp + rcx + 0x1c], edx
lea rcx, [rbp + 0x28]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_streambuf_wchar_t__struct_std::char_traits_wchar_t__::constructor_void____ptr64]
mov qword [rbp + 0x28], r12
mov qword [rbp + 0x90], r15
mov dword [rbp + 0x98], 4
mov rax, qword [rbp + 0x20]
movsxd rcx, dword [rax + 4]
lea rax, vtable.logger_stream.0
mov qword [rbp + rcx + 0x20], rax
mov rax, qword [rbp + 0x20]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0x98]
mov dword [rbp + rcx + 0x1c], edx
mov ecx, dword [0x1401c1658]
mov eax, dword [0x1401c165c]
add ecx, eax
je 0x14012290d
mov dword [rsp + 0x70], r15d
call fcn.140005ad0
mov qword [rsp + 0x68], rax
lock inc dword [rsp + 0x70]
or dword [rsp + 0x40], 0x400
mov rax, qword [rsp + 0x68]
test rax, rax
jne 0x1401228ee
call fcn.140005ad0
mov qword [rsp + 0x68], rax
lock inc dword [rsp + 0x70]
mov rax, qword [rsp + 0x68]
cmp qword [rax], 0
je 0x14012290d
mov rax, qword [rax + 0x58]
test rax, rax
je 0x14012290d
call qword [case.0x140077645.0]
movzx ebx, al
jmp 0x14012290f
xor bl, bl
mov eax, dword [rsp + 0x40]
bt eax, 0xa
jae 0x140122954
btr eax, 0xa
mov dword [rsp + 0x40], eax
mov qword [rsp + 0x68], r15
mov eax, 0xffffffff
lock xadd dword [rsp + 0x70], eax
cmp eax, 1
js 0x14012294b
call fcn.140005e40
mov eax, 0xffffffff
lock xadd dword [rsp + 0x70], eax
cmp eax, 1
jns 0x140122936
lock inc dword [rsp + 0x70]
mov eax, dword [rsp + 0x40]
mov byte [rbp + 0xa0], bl
mov dword [rbp + 0xa4], 0x10
lea rcx, str.CSecurityCenterApp::LoadCrashHandler
mov qword [rbp + 0xa8], rcx
bts eax, 7
mov dword [rsp + 0x40], eax
test bl, bl
je 0x1401229b1
lea rdx, str.crash_handler_initialization_error0x
lea rcx, [rbp + 0x20]
call fcn.140006540
movzx ebx, byte [rbp + 0xa0]
test bl, bl
je 0x1401229b1
lea rdx, [0x140047cc0]
lea rcx, [rbp + 0x20]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___class_std::ios_base____ptr64____cdecl___class_std::ios_base____ptr64_____ptr64]
movzx ebx, byte [rbp + 0xa0]
mov rax, qword [r14]
test bl, bl
je 0x1401229c6
mov edx, dword [rax + 0x70]
lea rcx, [rbp + 0x20]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___long_int____ptr64]
nop
lea rcx, [rbp + 0xb8]
call fcn.140004f20
lea rcx, [rbp + 0xb8]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_ios_wchar_t__struct_std::char_traits_wchar_t__::destructor_void____ptr64]
nop
cmp byte [rbp - 8], 0
je 0x140122a07
mov rcx, qword [rbp - 0x10]
test rcx, rcx
je 0x140122a07
mov rax, qword [rcx]
lea rdx, [rbp - 0x48]
cmp rcx, rdx
setne dl
mov rax, qword [rax + 0x20]
call qword [case.0x140077645.0]
nop
lea rcx, [rbp - 0x80]
call fcn.140032660
mov rax, r14
mov rcx, qword [rbp + 0xa70]
xor rcx, rsp
call fcn.14007e250
mov rbx, qword [rsp + 0xbd0]
add rsp, 0xb80
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret