Function at 0x1007f980
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, 0x30
mov eax, dword [ebp + 8]
lea ecx, [ebp - 0x18]
mov eax, dword [eax]
mov dword [ebp - 0x34], ecx
mov ebx, eax
test eax, eax
jne 0x1007f9c4
jmp 0x1007f9aa
cmp byte [ebp + 0xc], 0
je 0x1007fc55
mov ecx, dword [ebp + 8]
mov eax, ebx
mov edx, 2
lock cmpxchg dword [ecx], edx
je 0x1007fba4
mov ebx, eax
test eax, eax
je 0x1007f9aa
cmp ebx, 1
je 0x1007f9a0
cmp ebx, 3
je 0x1007fbe3
mov eax, ebx
and eax, 3
cmp eax, 2
je 0x1007f9fe
jmp 0x1007fc89
mov eax, ebx
and eax, 3
cmp eax, 2
jne 0x1007fb90
mov eax, dword [0x100d411c]
test eax, eax
je 0x1007fa3f
dec eax
push eax
call sub.KERNEL32.dll_TlsGetValue
cmp eax, 2
jb 0x1007fa1f
cmp dword [eax + 4], 0
mov edi, eax
jne 0x1007fae0
mov eax, dword [0x100d411c]
test eax, eax
je 0x1007fa59
dec eax
push eax
call sub.KERNEL32.dll_TlsGetValue
test eax, eax
je 0x1007fa70
mov edi, eax
cmp eax, 1
jne 0x1007fab0
jmp 0x1007fc3f
push 0x100d411c
call fcn.1007e000
add esp, 4
push eax
call sub.KERNEL32.dll_TlsGetValue
cmp eax, 2
jae 0x1007fa13
jmp 0x1007fa1f
push 0x100d411c
call fcn.1007e000
add esp, 4
push eax
call sub.KERNEL32.dll_TlsGetValue
test eax, eax
jne 0x1007fa33
mov eax, dword [0x100f5654]
movzx eax, byte [eax]
push 4
push 0xc
call fcn.10004670
add esp, 8
test eax, eax
je 0x1007fc31
mov dword [eax], 0x100d411c
mov dword [eax + 4], 0
mov edi, eax
mov eax, dword [0x100d411c]
test eax, eax
je 0x1007fb4c
dec eax
push edi
push eax
call sub.KERNEL32.dll_TlsSetValue
mov ecx, dword [edi + 4]
mov eax, dword [edi + 8]
test ecx, ecx
mov dword [ebp - 0x30], ecx
mov dword [ebp - 0x2c], eax
mov dword [edi + 4], 1
mov dword [edi + 8], 0
je 0x1007fae0
test eax, eax
je 0x1007fae0
lock dec dword [eax]
jne 0x1007fae0
lea ecx, [ebp - 0x2c]
call fcn.1003ebd0
nop
add edi, 8
mov esi, dword [edi]
test esi, esi
jne 0x1007fb03
sub esp, 4
push 0
call fcn.100556a0
add esp, 8
cmp dword [edi], 0
mov esi, eax
jne 0x1007fbef
mov dword [edi], esi
lock inc dword [esi]
jle 0x1007fbeb
mov ecx, dword [ebp + 8]
mov eax, ebx
mov dword [ebp - 0x18], esi
mov byte [ebp - 0x10], 0
lea edx, [ebp - 0x16]
add eax, 0xfffffffe
mov dword [ebp - 0x14], eax
mov eax, ebx
lock cmpxchg dword [ecx], edx
je 0x1007fb65
mov ebx, eax
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x1007f9f0
lock dec dword [eax]
jne 0x1007f9f0
lea ecx, [ebp - 0x18]
call fcn.1003ebd0
jmp 0x1007f9f0
push 0x100d411c
call fcn.1007e000
add esp, 4
jmp 0x1007faa9
call fcn.10054e70
movzx eax, byte [ebp - 0x10]
test al, al
je 0x1007fb60
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x1007fb90
lock dec dword [eax]
jne 0x1007fb90
lea ecx, [ebp - 0x18]
call fcn.1003ebd0
nop word cs:[eax + eax]
nop dword [eax + eax]
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov ebx, eax
test eax, eax
jne 0x1007f9c4
jmp 0x1007f9aa
mov eax, dword [ebp + 8]
cmp ebx, 1
mov dword [ebp - 0x30], 3
sete byte [ebp - 0x2c]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x14], 1
mov eax, dword [eax + 0x10]
lea ecx, [ebp - 0x30]
push ecx
push dword [ebp + 0x10]
call eax
add esp, 8
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x18]
push eax
call fcn.1007fce0
add esp, 4
add esp, 0x30
pop esi
pop edi
pop ebx
pop ebp
ret
ud2
lea eax, [ebp - 0x38]
mov dword [ebp - 0x38], esi
mov dword [ebp - 0x30], 0x100da3a8
mov dword [ebp - 0x2c], 1
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x28], str.called__Option::unwrap____on_a__None__value_rustc_82e1608dfa6e0b5569232559e3d385fea5a93112librarycore_srcio_borrowed_buf.rs_rustc_82e1608dfa6e0b5569232559e3d385fea5a93112library_alloc_srccollections_btree_navigate.rs
mov dword [ebp - 0x3c], edi
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x34], eax
lea eax, [ebp - 0x30]
push 0x100da400
push eax
call fcn.100b0d70
add esp, 8
ud2
push 0xc
push 4
call fcn.100a32d0
add esp, 8
ud2
push 0x100db4d8
push 0x5e
push str.use_of_std::thread::current___is_not_possible_after_the_threads_local_data_has_been_destroyed
call fcn.100b0b40
add esp, 0xc
ud2
mov dword [ebp - 0x30], 0x100de764
mov dword [ebp - 0x2c], 1
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x28], str.called__Option::unwrap____on_a__None__value_rustc_82e1608dfa6e0b5569232559e3d385fea5a93112librarycore_srcio_borrowed_buf.rs_rustc_82e1608dfa6e0b5569232559e3d385fea5a93112library_alloc_srccollections_btree_navigate.rs
mov dword [ebp - 0x24], 0
lea eax, [ebp - 0x30]
push dword [ebp + 0x18]
push eax
call fcn.100b0d70
add esp, 8
ud2
push dword [ebp + 0x18]
push 0x40
push str.assertion_failed:_state_and_queue.addr____STATE_MASK__RUNNING
call fcn.100b0df0
add esp, 0xc
ud2