Function at 0x5c9940
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 0x5c9984
jmp 0x5c996a
cmp byte [ebp + 0xc], 0
je 0x5c9c07
mov ecx, dword [ebp + 8]
mov eax, ebx
mov edx, 2
lock cmpxchg dword [ecx], edx
je 0x5c9b64
mov ebx, eax
test eax, eax
je 0x5c996a
cmp ebx, 1
je 0x5c9960
cmp ebx, 3
je 0x5c9ba3
mov eax, ebx
and eax, 3
cmp eax, 2
je 0x5c99be
jmp 0x5c9c36
mov eax, ebx
and eax, 3
cmp eax, 2
jne 0x5c9b50
mov eax, dword [0x714da0]
test eax, eax
je 0x5c99ff
dec eax
push eax
call sub.KERNEL32.dll_TlsGetValue
cmp eax, 2
jb 0x5c99df
cmp dword [eax + 4], 0
mov edi, eax
jne 0x5c9aa0
mov eax, dword [0x714da0]
test eax, eax
je 0x5c9a19
dec eax
push eax
call sub.KERNEL32.dll_TlsGetValue
test eax, eax
je 0x5c9a30
mov edi, eax
cmp eax, 1
jne 0x5c9a70
jmp 0x5c9bed
push 0x714da0
call fcn.005c8000
add esp, 4
push eax
call sub.KERNEL32.dll_TlsGetValue
cmp eax, 2
jae 0x5c99d3
jmp 0x5c99df
push 0x714da0
call fcn.005c8000
add esp, 4
push eax
call sub.KERNEL32.dll_TlsGetValue
test eax, eax
jne 0x5c99f3
mov eax, dword [0x6b6a34]
movzx eax, byte [eax]
push 4
push 0xc
call fcn.004ed010
add esp, 8
test eax, eax
je 0x5c9bfe
mov dword [eax], 0x714da0
mov dword [eax + 4], 0
mov edi, eax
mov eax, dword [0x714da0]
test eax, eax
je 0x5c9b0c
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 0x5c9aa0
test eax, eax
je 0x5c9aa0
lock dec dword [eax]
jne 0x5c9aa0
lea ecx, [ebp - 0x2c]
call fcn.00589210
nop
add edi, 8
mov esi, dword [edi]
test esi, esi
jne 0x5c9ac3
sub esp, 4
push 0
call fcn.0059fbf0
add esp, 8
cmp dword [edi], 0
mov esi, eax
jne 0x5c9bab
mov dword [edi], esi
lock inc dword [esi]
jle 0x5c9beb
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 0x5c9b25
mov ebx, eax
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x5c99b0
lock dec dword [eax]
jne 0x5c99b0
lea ecx, [ebp - 0x18]
call fcn.00589210
jmp 0x5c99b0
push 0x714da0
call fcn.005c8000
add esp, 4
jmp 0x5c9a69
call fcn.0059f3d0
movzx eax, byte [ebp - 0x10]
test al, al
je 0x5c9b20
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x5c9b50
lock dec dword [eax]
jne 0x5c9b50
lea ecx, [ebp - 0x18]
call fcn.00589210
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 0x5c9984
jmp 0x5c996a
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 0x5c9c80
add esp, 4
add esp, 0x30
pop esi
pop edi
pop ebx
pop ebp
ret
lea eax, [ebp - 0x38]
mov dword [ebp - 0x38], esi
mov dword [ebp - 0x30], 0x6e14b8
mov dword [ebp - 0x2c], 1
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x28], str.called__Option::unwrap____on_a__None__value_rustc_07dca489ac2d933c78d3c5158e3f43beefeb02celibrarycore_srcio_borrowed_buf.rs_rustc_07dca489ac2d933c78d3c5158e3f43beefeb02celibrary_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 0x6e1510
push eax
call fcn.004faa60
add esp, 8
ud2
push 0x6e25e8
push 0x5e
push str.use_of_std::thread::current___is_not_possible_after_the_threads_local_data_has_been_destroyed
call fcn.004fa840
push 0xc
push 4
call fcn.004ed3a0
mov dword [ebp - 0x30], 0x6e58b0
mov dword [ebp - 0x2c], 1
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x28], str.called__Option::unwrap____on_a__None__value_rustc_07dca489ac2d933c78d3c5158e3f43beefeb02celibrarycore_srcio_borrowed_buf.rs_rustc_07dca489ac2d933c78d3c5158e3f43beefeb02celibrary_alloc_srccollections_btree_navigate.rs
mov dword [ebp - 0x24], 0
lea eax, [ebp - 0x30]
push dword [ebp + 0x18]
push eax
call fcn.004faa60
push dword [ebp + 0x18]
push 0x40
push str.assertion_failed:_state_and_queue.addr____STATE_MASK__RUNNING
call fcn.004faaf0
mov edi, eax
lea eax, [ebp - 0x18]
push eax
call 0x5c9c80
add esp, 4
jmp 0x5c9c79
push edi
call fcn.0050ffb0
nop
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x30
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
mov eax, dword [eax + 4]
xchg dword [ecx], eax
mov ecx, eax
and ecx, 3
cmp ecx, 2
mov dword [ebp - 0x1c], ecx
jne 0x5c9dcf
add eax, 0xfffffffe
je 0x5c9d71
lea edi, [ebp - 0x10]
jmp 0x5c9cca
test ebx, ebx
mov eax, ebx
je 0x5c9d71
mov esi, dword [eax]
mov ebx, dword [eax + 4]
mov dword [eax], 0
test esi, esi
je 0x5c9d79
mov dword [ebp - 0x10], esi
mov byte [eax + 8], 1
mov cl, 1
xchg byte [esi + 0x18], cl
cmp cl, 0xff
jne 0x5c9cfd
mov eax, dword [0x7151ac]
add esi, 0x18
test eax, eax
je 0x5c9d0e
push esi
call eax
mov eax, dword [ebp - 0x10]
lock dec dword [eax]
jne 0x5c9cc0
mov ecx, edi
call fcn.00589210
jmp 0x5c9cc0
mov ecx, dword [0x714d5c]
cmp ecx, 0xffffffff
jne 0x5c9d56
mov dword [ebp - 0x14], 0xffffffff
mov eax, dword [0x714d6c]
push 0
push 0
push 0xc0000000
lea ecx, [ebp - 0x14]
push ecx
call eax
test eax, eax
jne 0x5c9d8a
mov ecx, dword [ebp - 0x14]
mov eax, 0xffffffff
lock cmpxchg dword [0x714d5c], ecx
je 0x5c9d56
push ecx
mov dword [ebp - 0x20], eax
call sub.KERNEL32.dll_CloseHandle
mov ecx, dword [ebp - 0x20]
mov eax, dword [0x714d70]
push 0
push 0
push esi
push ecx
call eax
mov eax, dword [ebp - 0x10]
lock dec dword [eax]
jne 0x5c9cc0
jmp 0x5c9d05
add esp, 0x30
pop esi
pop edi
pop ebx
pop ebp
ret
push 0x6e5924
push 0x2b
push str.called__Option::unwrap____on_a__None__value_rustc_07dca489ac2d933c78d3c5158e3f43beefeb02celibrarycore_srcio_borrowed_buf.rs_rustc_07dca489ac2d933c78d3c5158e3f43beefeb02celibrary_alloc_srccollections_btree_navigate.rs
call fcn.004faaf0
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x24]
mov dword [ebp - 0x3c], 0x6e54e0
mov dword [ebp - 0x38], 1
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x18], fcn.00509570
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x30], 1
lea eax, [ebp - 0x3c]
push 0x6e5518
push eax
call fcn.004faa60
add esp, 8
ud2
mov dword [ebp - 0x3c], 0
lea eax, [ebp - 0x3c]
lea ecx, [ebp - 0x1c]
mov edx, 0x6e58f8
push 0x6e5934
push eax
call fcn.00584af0
mov ecx, dword [ebp - 0x10]
mov esi, eax
lock dec dword [ecx]
jne 0x5c9dfe
lea ecx, [ebp - 0x10]
call fcn.00589210
push esi
call fcn.0050ffb0
nop word cs:[eax + eax]
nop
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x14
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
mov esi, dword [ecx + 4]
test esi, esi
je 0x5c9e51
nop word cs:[eax + eax]
mov edx, dword [esi + 0x18]
mov edi, dword [esi + 0x10]
mov esi, dword [esi + 0x1c]
movzx ebx, word [edx]
cmp ebx, 0x17
je 0x5c9e76
cmp ebx, 2
je 0x5c9e58
test esi, esi
jne 0x5c9e30
mov dword [ecx + 4], 0
mov word [eax], 2
jmp 0x5c9ec1
cmp edi, 0xf
mov dword [ecx + 4], esi
jbe 0x5c9ec9
mov ecx, dword [edx + 4]
movzx edx, word [edx + 2]
xor esi, esi
rol dx, 8
mov dword [ebp - 0x20], ecx
mov word [ebp - 0x1c], dx
jmp 0x5c9e98
cmp edi, 0x1b
mov dword [ecx + 4], esi
jbe 0x5c9eda
movzx ecx, word [edx + 2]
movups xmm0, xmmword [edx + 8]
mov edi, dword [edx + 4]
mov edx, dword [edx + 0x18]
mov si, 1
rol cx, 8
movups xmmword [ebp - 0x1e], xmm0
movzx ebx, word [ebp - 0x10]
movsd xmm0, qword [ebp - 0x20]
movsd xmm1, qword [ebp - 0x18]
mov word [eax + 0x12], bx
movsd qword [eax + 0xa], xmm1
movsd qword [eax + 2], xmm0
mov word [eax], si
mov dword [eax + 0x14], edi
mov dword [eax + 0x18], edx
mov word [eax + 0x1c], cx
add esp, 0x14
pop esi
pop edi
pop ebx
pop ebp
ret
push 0x6e59a8
push 0x42
push str.assertion_failed:_len_as_usize___mem::size_of::_c::sockaddr_in___library_std_src_sys_common_net.rs
call fcn.004faaf0
push 0x6e59fc
push 0x43
push 0x6e59b8
call fcn.004faaf0
nop dword [eax + eax]
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
push dword [eax]
call sub.WS2_32.dll_freeaddrinfo
pop ebp
ret