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

Disassembly:
push ebp
mov ebp, esp
push esi
sub esp, 0x18
mov eax, dword [ebp + 8]
mov eax, dword [eax]
cmp byte [eax], 0
mov byte [eax], 0
je 0x419ce1
mov byte [ebp - 5], 0
mov eax, dword [0x476064]
cmp eax, 3
jne 0x419b12
cmp byte [ebp - 5], 0
je 0x419b20
add esp, 0x18
pop esi
pop ebp
ret
lea ecx, [ebp - 5]
call 0x419d70
cmp byte [ebp - 5], 0
jne 0x419b0c
mov eax, dword [0x462068]
test eax, eax
je 0x419b6d
dec eax
push eax
call sub.kernel32.dll_TlsGetValue
cmp eax, 2
jb 0x419b82
cmp byte [eax + 4], 0
mov esi, eax
je 0x419b82
mov eax, dword [0x476084]
add esi, 5
cmp eax, esi
jne 0x419c1e
mov eax, dword [0x476088]
inc eax
jne 0x419c3d
mov ecx, str.lock_count_overflow_in_reentrant_mutexlibrary_std_src_sync_remutex.rs
mov edx, 0x26
push 0x466924
call fcn.00408bc0
mov ecx, 0x462068
call fcn.004193f0
push eax
call sub.kernel32.dll_TlsGetValue
cmp eax, 2
jae 0x419b35
mov eax, dword [0x462068]
test eax, eax
je 0x419bba
dec eax
push eax
call sub.kernel32.dll_TlsGetValue
test eax, eax
je 0x419bce
mov esi, eax
cmp eax, 1
jne 0x419c08
lea eax, [ebp - 0x1c]
mov ecx, str.cannot_access_a_Thread_Local_Storage_value_during_or_after_destruction_rustc_25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04library_std_src_threadlocal.rs
mov edx, 0x46
push 0x4666dc
push 0x465acc
push eax
call fcn.00408b30
mov ecx, 0x462068
call fcn.004193f0
push eax
call sub.kernel32.dll_TlsGetValue
test eax, eax
jne 0x419b96
movzx eax, byte [0x476104]
mov ecx, 8
call fcn.0043d720
test eax, eax
je 0x419cf7
mov dword [eax], 0x462068
mov byte [eax + 4], 0
mov esi, eax
mov eax, dword [0x462068]
test eax, eax
je 0x419cd2
dec eax
push esi
push eax
call sub.kernel32.dll_TlsSetValue
mov word [esi + 4], 1
mov eax, dword [0x476084]
add esi, 5
cmp eax, esi
je 0x419b4d
lea eax, [0x476080]
push eax
call sub.kernel32.dll_TryAcquireSRWLockExclusive
test al, al
je 0x419b0c
mov eax, 1
mov dword [0x476084], esi
mov dword [0x476088], eax
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 1
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x14], 0
mov word [ebp - 0xc], 0
cmp dword [0x476068], 0
jne 0x419ceb
mov dword [0x476068], 0xffffffff
lea ecx, [0x47606c]
call fcn.00419dc0
mov eax, dword [ebp - 0xc]
movsd xmm0, qword [ebp - 0x1c]
movsd xmm1, qword [ebp - 0x14]
mov dword [0x47607c], eax
movsd qword [0x476074], xmm1
movsd qword [0x47606c], xmm0
inc dword [0x476068]
dec dword [0x476088]
jne 0x419b0c
mov dword [0x476084], 0
lea eax, [0x476080]
push eax
call sub.kernel32.dll_ReleaseSRWLockExclusive
add esp, 0x18
pop esi
pop ebp
ret
mov ecx, 0x462068
call fcn.004193f0
jmp 0x419c01
mov ecx, 0x466898
call fcn.00408ba0
mov ecx, 0x4666ac
call fcn.00408400
ud2
mov ecx, 4
mov edx, 8
call fcn.004068b0
mov esi, eax
mov eax, dword [ebp - 0xc]
movsd xmm0, qword [ebp - 0x1c]
movsd xmm1, qword [ebp - 0x14]
mov dword [0x47607c], eax
movsd qword [0x476074], xmm1
movsd qword [0x47606c], xmm0
inc dword [0x476068]
jmp 0x419d3c
dec dword [0x476088]
jne 0x419d5a
mov dword [0x476084], 0
lea eax, [0x476080]
push eax
call sub.kernel32.dll_ReleaseSRWLockExclusive
push esi
call fcn.004558c0
call fcn.00408ed0
nop word cs:[eax + eax]
nop
mov eax, dword [0x476064]
cmp eax, 3
jne 0x419d7b
ret
push ebp
mov ebp, esp
sub esp, 0x14
lea eax, [0x476068]
mov dword [ebp - 0x14], ecx
mov ecx, 0x476064
mov edx, 1
mov dword [ebp - 0x10], eax
lea eax, [ebp - 1]
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0x14]
mov dword [ebp - 8], eax
lea eax, [ebp - 8]
push 0x4668a8
push 0x4668b8
push eax
call fcn.00418cd0
add esp, 0x20
pop ebp
ret