Function at 0x1400046d0
Capabilities:
Allocate thread local storage
Get thread local storage value
Set thread local storage value

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
mov eax, 0x1580
call fcn.1400067d0
sub rsp, rax
mov rax, qword [0x14003a010]
xor rax, rsp
mov qword [rsp + 0x1570], rax
xor ebp, ebp
mov rsi, rcx
mov dword [rsp + 0x20], ebp
mov edi, ebp
mov ecx, dword [0x14003a044]
cmp ecx, 0xffffffff
jne 0x140008b44
mov ebx, dword [0x14003a044]
cmp ebx, 0xffffffff
jne 0x14000475d
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, ebx
je 0x140008b58
mov ebx, eax
test dil, 1
jne 0x140008b79
cmp ebx, 0xffffffff
je 0x140008b8c
mov eax, 0xffffffff
lock cmpxchg dword [0x14003a044], ebx
cmp eax, 0xffffffff
jne 0x140008bdf
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
jne 0x140008bf2
test dil, 4
jne 0x140008c15
xor edx, edx
lea rcx, [rsp + 0x570]
mov r8d, 0x1000
call sub.VCRUNTIME140.dll_memset
lea rdx, [rsp + 0x570]
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
mov ecx, 0x1000
call qword [sym.imp.mozglue.dll_moz_xmalloc]
mov r8d, 0x1000
lea rdx, [rsp + 0x570]
mov rcx, rax
mov rdi, rax
call sub.VCRUNTIME140.dll_memcpy
mov rdx, rdi
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
mov rax, qword gs:[0x58]
mov edx, 4
mov dword [rsi + 4], 0xffffffff
mov dword [rsi + 8], ebp
mov rcx, qword [rax]
mov eax, dword [rdx + rcx]
cmp dword [0x14003c198], eax
jle 0x140004838
lea rcx, [0x14003c198]
call fcn.140005c78
cmp dword [0x14003c198], 0xffffffff
jne 0x140004838
mov ecx, 8
call qword [sym.imp.mozglue.dll_moz_xmalloc]
test rax, rax
je 0x140008c28
xor ecx, ecx
mov qword [rsp + 0x40], rcx
mov qword [rax], rcx
lea rcx, [0x14003c198]
mov qword [0x14003c190], rax
call fcn.140005c18
mov rbx, qword [0x14003c190]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_AcquireSRWLockExclusive]
mov r9, qword [0x14003a958]
lea r10, [0x14003a960]
mov r8d, ebp
mov eax, r8d
lea rcx, [r9 + 1]
add rcx, rax
movzx edx, cl
lea rax, [rdx + rdx*2]
cmp dword [r10 + rax*8], ebp
jne 0x140008c30
lea rax, [rdx + rdx*2]
mov qword [0x14003a958], rdx
mov dword [r10 + rax*8], 1
mov qword [r10 + rax*8 + 8], rbp
mov dword [rsi + 4], edx
mov eax, dword [r10 + rax*8 + 0x10]
mov dword [rsi + 8], eax
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
mov eax, dword [rsi + 4]
mov dword [rsp + 0x28], 0xffffffff
mov dword [rsp + 0x30], eax
cmp eax, 0xffffffff
je 0x140008c45
mov eax, dword [rsi + 4]
mov dword [rsp + 0x38], 0x100
mov dword [rsp + 0x20], eax
cmp eax, 0x100
jge 0x140008c94
mov dword [rsi], 1
mov rcx, qword [rsp + 0x1570]
xor rcx, rsp
call fcn.1400057b0
lea r11, [rsp + 0x1580]
mov rbx, qword [r11 + 0x18]
mov rbp, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rsp, r11
pop rdi
ret
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
jne 0x1400047cc
jmp 0x140004719
mov r8d, 0x73
lea rdx, str.z:_build_build_src_security_sandbox_chromium_base_threading_thread_local_storage.cc
lea rcx, [rsp + 0x48]
call fcn.140009bb8
mov edi, 1
jmp 0x140004734
and edi, 0xfffffffe
lea rcx, [rsp + 0x48]
call fcn.140009e04
nop
jmp 0x14000473e
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
je 0x140008b9b
mov ebx, eax
jmp 0x140008bb8
or edi, 2
lea rdx, str.z:_build_build_src_security_sandbox_chromium_base_threading_thread_local_storage.cc
mov r8d, 0x7d
lea rcx, [rsp + 0x150]
call fcn.140009bb8
test dil, 2
je 0x140008bce
and edi, 0xfffffffd
lea rcx, [rsp + 0x150]
call fcn.140009e04
mov ecx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_TlsFree]
nop
jmp 0x140004747
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_TlsFree]
mov ebx, dword [0x14003a044]
jmp 0x14000475d
or edi, 4
lea rdx, str.z:_build_build_src_security_sandbox_chromium_base_threading_thread_local_storage.cc
mov r8d, 0x8f
lea rcx, [rsp + 0x258]
call fcn.140009bb8
nop
jmp 0x14000476e
lea rcx, [rsp + 0x258]
call fcn.140009e04
nop
jmp 0x140004778
mov rax, rbp
jmp 0x140004825
inc r8d
cmp r8d, 0x100
jl 0x140004859
jmp 0x140004897
lea r8, str.slot____kInvalidSlotValue
lea rdx, [rsp + 0x28]
lea rcx, [rsp + 0x30]
call fcn.140009698
test rax, rax
je 0x1400048b8
mov r9, rax
lea rdx, str.z:_build_build_src_security_sandbox_chromium_base_threading_thread_local_storage.cc
mov r8d, 0x11d
lea rcx, [rsp + 0x360]
call fcn.140009c58
lea rcx, [rsp + 0x360]
call fcn.140009e04
nop
jmp 0x1400048b8
lea r8, str.slot____kThreadLocalStorageSize
lea rdx, [rsp + 0x38]
lea rcx, [rsp + 0x20]
call fcn.140009698
test rax, rax
je 0x1400048d2
mov r9, rax
lea rdx, str.z:_build_build_src_security_sandbox_chromium_base_threading_thread_local_storage.cc
mov r8d, 0x11e
lea rcx, [rsp + 0x468]
call fcn.140009c58
lea rcx, [rsp + 0x468]
call fcn.140009e04
nop
jmp 0x1400048d2