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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x3c
mov ebx, dword [ebp + 8]
nop dword [eax]
mov eax, dword [ebx]
jmp 0x4c9671
mov eax, esi
mov ecx, 2
lock cmpxchg dword [ebx], ecx
je 0x4c9b66
mov esi, eax
test eax, eax
je 0x4c9660
cmp esi, 1
jne 0x4c9690
cmp byte [ebp + 0xc], 0
jne 0x4c9660
jmp 0x4c9c73
cmp esi, 3
je 0x4c9ba2
mov eax, esi
and eax, 3
cmp eax, 2
je 0x4c96ba
jmp 0x4c9ca7
mov eax, esi
and eax, 3
cmp eax, 2
jne 0x4c9650
mov dword [ebp - 0x44], esi
mov eax, dword [0x503060]
test eax, eax
je 0x4c96e0
push eax
call sub.kernel32.dll_TlsGetValue
cmp eax, 1
ja 0x4c96f8
jmp 0x4c9710
push 0x503060
call fcn.004cb880
add esp, 4
push eax
call sub.kernel32.dll_TlsGetValue
cmp eax, 1
jbe 0x4c9710
cmp dword [eax], 0
mov edi, eax
je 0x4c9710
add edi, 4
jmp 0x4c97d0
mov eax, dword [0x503060]
test eax, eax
je 0x4c9730
push eax
call sub.kernel32.dll_TlsGetValue
test eax, eax
je 0x4c9747
mov esi, eax
cmp eax, 1
jne 0x4c97a0
jmp 0x4c9c22
push 0x503060
call fcn.004cb880
add esp, 4
push eax
call sub.kernel32.dll_TlsGetValue
test eax, eax
jne 0x4c9723
mov eax, dword [0x5880e0]
test eax, eax
jne 0x4c9762
call sub.kernel32.dll_GetProcessHeap
test eax, eax
je 0x4c9bf2
mov dword [0x5880e0], eax
push 0x10
push 0
push eax
call sub.kernel32.dll_HeapAlloc
test eax, eax
je 0x4c9bf2
mov dword [eax], 0
mov dword [eax + 0xc], 0x503060
mov esi, eax
mov eax, dword [0x503060]
test eax, eax
jne 0x4c9799
push 0x503060
call fcn.004cb880
add esp, 4
push esi
push eax
call sub.kernel32.dll_TlsSetValue
mov ecx, dword [esi + 8]
cmp dword [esi], 0
movq xmm0, qword [0x5665a0]
lea edi, [esi + 4]
movq qword [esi], xmm0
mov dword [esi + 8], 0
je 0x4c97d0
test ecx, ecx
je 0x4c97d0
lock dec dword [ecx]
jne 0x4c97d0
call fcn.004b1570
nop dword [eax]
cmp dword [edi], 0
jne 0x4c9bc2
mov dword [edi], 0xffffffff
mov esi, dword [edi + 4]
test esi, esi
jne 0x4c987a
mov dword [ebp - 0x34], 0
mov eax, dword [0x5880e0]
test eax, eax
jne 0x4c980c
call sub.kernel32.dll_GetProcessHeap
test eax, eax
je 0x4c9be1
mov dword [0x5880e0], eax
push 0x20
push 0
push eax
call sub.kernel32.dll_HeapAlloc
test eax, eax
je 0x4c9be1
movsd xmm0, qword [0x5665b0]
mov esi, eax
movsd qword [eax], xmm0
mov dword [ebp - 0x3c], eax
mov dword [eax + 0x10], 0
movq xmm0, qword [0x5880d8]
movd eax, xmm0
pshufd xmm0, xmm0, 0x55
movd edx, xmm0
nop dword [eax + eax]
mov ebx, eax
mov ecx, edx
add ebx, 1
adc ecx, 0
jb 0x4c9baa
lock cmpxchg8b qword [0x5880d8]
jne 0x4c9850
mov dword [esi + 8], ebx
mov ebx, dword [ebp + 8]
mov dword [esi + 0xc], ecx
mov byte [esi + 0x18], 0
mov dword [edi + 4], esi
lock inc dword [esi]
jle 0x4c9bbe
mov eax, dword [ebp - 0x44]
inc dword [edi]
mov dword [ebp - 0x18], esi
mov byte [ebp - 0x10], 0
lea edx, [ebp - 0x16]
mov ecx, eax
and ecx, 0xfffffffc
mov dword [ebp - 0x14], ecx
lock cmpxchg dword [ebx], edx
je 0x4c98d0
mov esi, eax
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x4c96b0
lock dec dword [eax]
jne 0x4c96b0
mov ecx, dword [ebp - 0x18]
call fcn.004b1570
jmp 0x4c96b0
movzx eax, byte [ebp - 0x10]
test al, al
je 0x4c990b
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x4c9650
lock dec dword [eax]
jne 0x4c9650
mov ecx, dword [ebp - 0x18]
call fcn.004b1570
jmp 0x4c9650
movzx eax, byte [ebp - 0x10]
mov ebx, dword [ebp + 8]
test al, al
jne 0x4c98d8
mov eax, dword [0x503060]
test eax, eax
jne 0x4c9921
push 0x503060
call fcn.004cb880
add esp, 4
push eax
call sub.kernel32.dll_TlsGetValue
cmp eax, 1
jbe 0x4c9940
cmp dword [eax], 0
mov esi, eax
je 0x4c9940
add esi, 4
jmp 0x4c9a00
mov eax, dword [0x503060]
test eax, eax
jne 0x4c9956
push 0x503060
call fcn.004cb880
add esp, 4
push eax
call sub.kernel32.dll_TlsGetValue
test eax, eax
je 0x4c9970
mov edi, eax
cmp eax, 1
jne 0x4c99c9
jmp 0x4c9c5a
mov eax, dword [0x5880e0]
test eax, eax
jne 0x4c998b
call sub.kernel32.dll_GetProcessHeap
test eax, eax
je 0x4c9c49
mov dword [0x5880e0], eax
push 0x10
push 0
push eax
call sub.kernel32.dll_HeapAlloc
test eax, eax
je 0x4c9c49
mov dword [eax], 0
mov dword [eax + 0xc], 0x503060
mov edi, eax
mov eax, dword [0x503060]
test eax, eax
jne 0x4c99c2
push 0x503060
call fcn.004cb880
add esp, 4
push edi
push eax
call sub.kernel32.dll_TlsSetValue
mov ecx, dword [edi + 8]
cmp dword [edi], 0
movq xmm0, qword [0x5665a0]
lea esi, [edi + 4]
movq qword [edi], xmm0
mov dword [edi + 8], 0
je 0x4c9a00
test ecx, ecx
je 0x4c9a00
lock dec dword [ecx]
jne 0x4c9a00
call fcn.004b1570
nop word cs:[eax + eax]
nop
cmp dword [esi], 0
jne 0x4c9c00
mov dword [esi], 0xffffffff
mov edi, dword [esi + 4]
test edi, edi
jne 0x4c9aa7
mov dword [ebp - 0x34], 0
mov eax, dword [0x5880e0]
test eax, eax
jne 0x4c9a3c
call sub.kernel32.dll_GetProcessHeap
test eax, eax
je 0x4c9c38
mov dword [0x5880e0], eax
push 0x20
push 0
push eax
call sub.kernel32.dll_HeapAlloc
test eax, eax
je 0x4c9c38
movsd xmm0, qword [0x5665b0]
mov edi, eax
movsd qword [eax], xmm0
mov dword [ebp - 0x3c], eax
mov dword [eax + 0x10], 0
movq xmm0, qword [0x5880d8]
movd eax, xmm0
pshufd xmm0, xmm0, 0x55
movd edx, xmm0
nop dword [eax + eax]
mov ebx, eax
mov ecx, edx
add ebx, 1
adc ecx, 0
jb 0x4c9bb4
lock cmpxchg8b qword [0x5880d8]
jne 0x4c9a80
mov dword [edi + 8], ebx
mov dword [edi + 0xc], ecx
mov byte [edi + 0x18], 0
mov dword [esi + 4], edi
lock inc dword [edi]
jle 0x4c9bbe
inc dword [esi]
mov dword [ebp - 0x1c], edi
mov ebx, 0
lock dec byte [edi + 0x18]
je 0x4c9ae4
mov esi, dword [0x588100]
add edi, 0x18
test esi, esi
je 0x4c9afd
nop dword [eax]
push 0xffffffffffffffff
push 1
push 0x5668ec
push edi
call esi
mov al, 1
lock cmpxchg byte [edi], bl
jne 0x4c9ad0
mov eax, dword [ebp - 0x1c]
lock dec dword [eax]
jne 0x4c9900
mov ecx, dword [ebp - 0x1c]
call fcn.004b1570
jmp 0x4c9900
mov ecx, dword [0x503038]
cmp ecx, 0xffffffff
jne 0x4c9b47
mov dword [ebp - 0x40], 0xffffffff
mov eax, dword [0x50304c]
push 0
push 0
push 0xc0000000
lea ecx, [ebp - 0x40]
push ecx
call eax
test eax, eax
jne 0x4c9cbb
mov ecx, dword [ebp - 0x40]
mov eax, 0xffffffff
lock cmpxchg dword [0x503038], ecx
je 0x4c9b47
mov esi, eax
push ecx
call sub.kernel32.dll_CloseHandle
mov ecx, esi
mov eax, dword [0x503054]
push 0
push 0
push edi
push ecx
call eax
xor eax, eax
xchg byte [edi], al
mov eax, dword [ebp - 0x1c]
lock dec dword [eax]
jne 0x4c9900
jmp 0x4c9af0
mov eax, dword [ebp + 0x14]
cmp esi, 1
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x14], 1
sete byte [ebp - 0x30]
mov dword [ebp - 0x34], 3
mov eax, dword [eax + 0x10]
lea ecx, [ebp - 0x34]
push ecx
push dword [ebp + 0x10]
call eax
add esp, 8
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x18]
push eax
call fcn.004c9d80
add esp, 4
add esp, 0x3c
pop esi
pop edi
pop ebx
pop ebp
ret
call fcn.004c31f0
jmp 0x4c9cfe
call fcn.004c31f0
jmp 0x4c9cfe
ud2
lea eax, [ebp - 0x34]
push 0x5681c0
push 0x5669dc
push eax
push 0x10
push str.already_borrowedlibrary_std_srcio_stdio.rs
call fcn.00414e90
add esp, 0x14
ud2
push 8
push 0x20
call fcn.004085f0
add esp, 8
jmp 0x4c9cfe
push 4
push 0x10
call fcn.004085f0
add esp, 8
ud2
lea eax, [ebp - 0x34]
push 0x5681c0
push 0x5669dc
push eax
push 0x10
push str.already_borrowedlibrary_std_srcio_stdio.rs
call fcn.00414e90
add esp, 0x14
jmp 0x4c9cfe
push 0x5676c8
push 0x5e
push str.use_of_std::thread::current___is_not_possible_after_the_threads_local_data_has_been_destroyed
call fcn.004148e0
add esp, 0xc
ud2
push 8
push 0x20
call fcn.004085f0
add esp, 8
jmp 0x4c9cfe
push 4
push 0x10
call fcn.004085f0
add esp, 8
jmp 0x4c9cfe
push 0x5676c8
push 0x5e
push str.use_of_std::thread::current___is_not_possible_after_the_threads_local_data_has_been_destroyed
call fcn.004148e0
add esp, 0xc
jmp 0x4c9cfe
mov dword [ebp - 0x34], 0x568018
mov dword [ebp - 0x30], 1
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x24], str._rustc_59e7a308e40fbc6b0901c9a8ee8ed51b17f9e772librarycore_src_sliceiter.rs
mov dword [ebp - 0x20], 0
lea eax, [ebp - 0x34]
push dword [ebp + 0x18]
push eax
call fcn.00414c50
add esp, 8
ud2
push dword [ebp + 0x18]
push 0x40
push str.assertion_failed:_state_and_queue.addr____STATE_MASK__RUNNINGOnce_instance_has_previously_been_poisoned
call fcn.00414ad0
add esp, 0xc
ud2
mov dword [ebp - 0x48], eax
lea eax, [ebp - 0x48]
mov dword [ebp - 0x34], 0x568f20
mov dword [ebp - 0x30], 1
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x3c], eax
lea eax, [ebp - 0x3c]
mov dword [ebp - 0x38], 0x41af80
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], 1
lea eax, [ebp - 0x34]
push 0x568f54
push eax
call fcn.00414c50
add esp, 8
ud2