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

Disassembly:
push r15
push r14
push r12
push rsi
push rdi
push rbx
sub rsp, 0x48
mov rdi, rdx
mov rsi, rcx
mov rax, qword [0x140305920]
cmp rax, 2
jne 0x1402c26b7
lea rbx, [0x140305930]
mov rcx, rbx
call sub.kernel32.dll_AcquireSRWLockExclusive
mov rax, qword [0x1403f6a78]
shl rax, 1
test rax, rax
jne 0x1402c26c1
xor eax, eax
movzx ecx, byte [0x140305938]
test cl, cl
jne 0x1402c26d7
mov r9, qword [0x140305950]
test r9, r9
je 0x1402c2522
mov r14, r9
dec r14
mov qword [0x140305950], r14
mov rdx, qword [0x140305940]
mov rcx, qword [rdx + r9*8 - 8]
je 0x1402c254e
mov rbx, qword [rdx]
mov qword [rdx], rcx
xor r11d, r11d
mov r8, r14
sub r8, 2
cmovae r11, r8
mov r10d, 1
xor r8d, r8d
cmp r9, 4
jae 0x1402c24e0
cmp r14, 2
je 0x1402c2511
jmp 0x1402c2594
mov r14, qword [rdx + r10*8]
cmp r14, qword [rdx + r10*8 + 8]
mov r14, r8
mov r8, r10
sbb r8, 0xffffffffffffffff
mov r10, qword [rdx + r8*8]
mov qword [rdx + r14*8], r10
lea r10, [r8*2 + 1]
cmp r10, r11
jbe 0x1402c24e0
add r9, 0xfffffffffffffffe
cmp r10, r9
jne 0x1402c2563
lea r9, [rdx + r10*8]
mov r11, qword [rdx + r10*8]
mov qword [rdx + r8*8], r11
mov r8, r10
jmp 0x1402c2567
mov rbx, qword [0x140305958]
mov rcx, rbx
inc rcx
je 0x1402c283b
mov qword [0x140305958], rcx
mov r14d, 0x40
mov ecx, 0x40
test rbx, rbx
jne 0x1402c25a8
jmp 0x1402c25b0
mov rbx, rcx
mov r14d, 0x40
mov ecx, 0x40
test rbx, rbx
jne 0x1402c25a8
jmp 0x1402c25b0
lea r9, [rdx + r8*8]
mov qword [r9], rcx
mov r9, r8
nop dword [rax]
lea r10, [r9 - 1]
mov r8, r10
shr r8, 1
mov r11, qword [rdx + r8*8]
cmp r11, rcx
jbe 0x1402c2697
mov qword [rdx + r9*8], r11
mov r9, r8
cmp r10, 2
jae 0x1402c2570
mov qword [rdx + r8*8], rcx
mov r14d, 0x40
mov ecx, 0x40
test rbx, rbx
je 0x1402c25b0
bsr rcx, rbx
xor rcx, 0x3f
sub r14, rcx
xor ecx, ecx
mov rdx, r14
sub rdx, 1
cmovae rcx, rdx
mov r15d, 1
shl r15, cl
mov r12, rbx
btc r12, rcx
test rbx, rbx
cmove r12, rbx
test al, al
jne 0x1402c25f5
movabs rax, 0x7fffffffffffffff
mov rcx, qword [0x1403f6a78]
test rcx, rax
jne 0x1402c2801
lea rcx, [0x140305930]
call sub.kernel32.dll_ReleaseSRWLockExclusive
mov qword [rdi], 1
mov qword [rdi + 8], rbx
mov qword [rdi + 0x10], r14
mov qword [rdi + 0x18], r15
mov qword [rdi + 0x20], r12
mov ecx, dword [0x140305980]
test ecx, ecx
je 0x1402c270b
dec ecx
call sub.kernel32.dll_TlsGetValue
cmp rax, 1
jbe 0x1402c2641
mov rdi, rax
cmp qword [rax + 8], 0
jne 0x1402c27dd
mov ecx, dword [0x140305980]
test ecx, ecx
je 0x1402c272d
dec ecx
call sub.kernel32.dll_TlsGetValue
test rax, rax
je 0x1402c2749
mov rdi, rax
cmp rax, 1
jne 0x1402c27b3
lea rax, [0x1403b0840]
mov qword [rsp + 0x20], rax
lea rcx, str.cannot_access_a_Thread_Local_Storage_value_during_or_after_destruction_rustc_cc66ad468955717ab92600c770da8c1601a4ff33library_std_src_threadlocal.rs
lea r9, [0x1403aa7a0]
lea r8, [rsp + 0x30]
mov edx, 0x46
call fcn.14013bd80
ud2
mov r8, r9
mov qword [rdx + r9*8], rcx
mov r14d, 0x40
mov ecx, 0x40
test rbx, rbx
jne 0x1402c25a8
jmp 0x1402c25b0
call fcn.1402c2140
jmp 0x1402c2444
call fcn.140294b10
xor al, 1
movzx ecx, byte [0x140305938]
test cl, cl
je 0x1402c2477
mov qword [rsp + 0x30], rbx
mov byte [rsp + 0x38], al
lea rax, [0x1403aa8b0]
mov qword [rsp + 0x20], rax
lea rcx, str.called__Result::unwrap____on_an__Err__value
lea r9, [0x1403aa7c0]
lea r8, [rsp + 0x30]
mov edx, 0x2b
call fcn.14013bd80
ud2
lea rcx, [0x140305968]
call fcn.14028f0b0
mov ecx, eax
call sub.kernel32.dll_TlsGetValue
cmp rax, 1
ja 0x1402c2633
jmp 0x1402c2641
lea rcx, [0x140305968]
call fcn.14028f0b0
mov ecx, eax
call sub.kernel32.dll_TlsGetValue
test rax, rax
jne 0x1402c265f
movzx eax, byte [0x1403f6a90]
mov rcx, qword [0x1403f6548]
test rcx, rcx
jne 0x1402c2774
call sub.kernel32.dll_GetProcessHeap
test rax, rax
je 0x1402c282a
mov rcx, rax
mov qword [0x1403f6548], rax
mov r8d, 0x18
xor edx, edx
call sub.kernel32.dll_HeapAlloc
test rax, rax
je 0x1402c282a
mov rdi, rax
lea rax, [0x140305968]
mov qword [rdi], rax
mov qword [rdi + 8], 0
mov ecx, dword [0x140305980]
test ecx, ecx
je 0x1402c281a
dec ecx
mov rdx, rdi
call sub.kernel32.dll_TlsSetValue
cmp qword [rdi + 8], 0
movups xmm0, xmmword [rdi + 8]
movaps xmmword [rsp + 0x30], xmm0
mov qword [rdi + 8], 1
mov qword [rdi + 0x10], 0
je 0x1402c27dd
lea rcx, [rsp + 0x38]
call fcn.1402c1e90
add rdi, 0x10
mov qword [rdi], rbx
mov qword [rsi], rbx
mov qword [rsi + 8], r14
mov qword [rsi + 0x10], r15
mov qword [rsi + 0x18], r12
add rsp, 0x48
pop rbx
pop rdi
pop rsi
pop r12
pop r14
pop r15
ret
call fcn.140294b10
test al, al
jne 0x1402c25f5
mov byte [0x140305938], 1
jmp 0x1402c25f5
lea rcx, [0x140305968]
call fcn.14028f0b0
mov ecx, eax
jmp 0x1402c27ab
mov ecx, 8
mov edx, 0x18
call fcn.1400eb190
ud2
lea rcx, str.Ran_out_of_thread_IDs_Users_sh1n_.cargo_registry_src_rsproxy.cn_8f6827c7555bfaf8_thread_local_1.1.7_src_thread_id.rs
lea r8, [0x1403aa880]
mov edx, 0x15
call fcn.14013ddc0
ud2