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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x810
mov eax, dword [0x43600c]
xor eax, ebp
mov dword [esp + 0x808], eax
mov eax, dword [0x436028]
cmp eax, 0xffffffff
mov dword [esp + 4], eax
jne 0x40a9f2
lea edi, [esp + 4]
push edi
call fcn.0040ae70
add esp, 4
test al, al
je 0x40ab31
mov ecx, dword [esp + 4]
cmp ecx, 0xffffffff
je 0x40ab57
xor eax, eax
dec eax
lock cmpxchg dword [0x436028], ecx
mov eax, dword [esp + 4]
jne 0x40ab9f
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, eax
and edi, 3
jne 0x40aa62
mov edi, 0x800
lea ebx, [esp + 8]
push edi
push 0
push ebx
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [esp + 0xb]
push eax
push dword [esp + 8]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
push edi
call sub.mozglue.dll_void____cdecl_operator_new___unsigned_int_
add esp, 4
mov esi, eax
push edi
push ebx
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov eax, esi
or eax, 3
push eax
push dword [esp + 8]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov ecx, dword [esp + 0x808]
xor ecx, ebp
call fcn.0042ee00
mov eax, esi
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
lea esi, [esp + 8]
mov ecx, esi
push 1
push 2
call fcn.00402180
push str.GetTlsVectorStateAndValue_key___TlsVectorState::kUninitialized
push esi
call fcn.00402560
add esp, 8
push 0x4324fc
push eax
call fcn.00402560
add esp, 8
mov ebx, dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___int_]
mov ecx, esi
push edi
call ebx
push str._vs.
push esi
call fcn.00402560
add esp, 8
mov ecx, esi
push 0
call ebx
push 0x4324fa
push esi
call fcn.00402560
add esp, 8
push 0x18
call sub.mozglue.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
lea edi, [esp + 0xc]
mov esi, eax
mov ecx, edi
push eax
call fcn.00403050
lea ebx, [esp + 0x58]
mov eax, dword [ebx - 0x50]
mov eax, dword [eax + 4]
mov dword [esp + eax + 8], 0x4300b0
mov eax, dword [ebx - 0x50]
mov eax, dword [eax + 4]
lea ecx, [eax - 0x50]
mov dword [esp + eax + 4], ecx
mov ecx, edi
mov dword [ebx - 0x4c], 0x4300c0
call fcn.00402800
mov ecx, edi
call dword [sym.imp.MSVCP140.dll_public_virtual:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::destructor_void_]
mov ecx, ebx
call dword [sym.imp.MSVCP140.dll_public_virtual:_void___thiscall_std::ios_base::destructor_void_]
lea edi, [esp + 8]
mov ecx, edi
push esi
push 0xec
push str._builds_worker_checkouts_gecko_security_sandbox_chromium_base_threading_thread_local_storage.cc
call fcn.00402280
mov ecx, edi
call fcn.004022e0
jmp 0x40aa00
lea esi, [esp + 8]
mov ecx, esi
push str.PlatformThreadLocalStorage::AllocTLS_key_
push 0xd0
push str._builds_worker_checkouts_gecko_security_sandbox_chromium_base_threading_thread_local_storage.cc
call fcn.00402240
mov ecx, esi
call fcn.004022e0
jmp 0x40a9d0
push edi
call fcn.0040ae70
add esp, 4
test al, al
je 0x40ab6b
cmp dword [esp + 4], 0xffffffff
jne 0x40ab8c
lea esi, [esp + 8]
mov ecx, esi
push str.PlatformThreadLocalStorage::AllocTLS_key___key___PlatformThreadLocalStorage::TLS_KEY_OUT_OF_INDEXES
push 0xda
push str._builds_worker_checkouts_gecko_security_sandbox_chromium_base_threading_thread_local_storage.cc
call fcn.00402240
mov ecx, esi
call fcn.004022e0
push 0xffffffffffffffff
call fcn.0040ae90
add esp, 4
mov ecx, dword [esp + 4]
jmp 0x40a9dd
push eax
call fcn.0040ae90
add esp, 4
mov eax, dword [0x436028]
mov dword [esp + 4], eax
jmp 0x40a9f2