Function at 0x14004f330
Capabilities:
Allocate thread local storage
Get thread local storage value
Set thread local storage value

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x58
mov r14, rdx
mov r15, rcx
mov rdi, qword [0x14009e138]
test rdi, rdi
jne 0x14004f3ef
lea rcx, [0x14009e528]
call fcn.140049930
mov rdi, qword [0x14009e138]
test rdi, rdi
jne 0x14004f3e3
mov rdi, qword [0x14009e140]
call sub.KERNEL32.dll_TlsAlloc
cmp eax, 0xffffffff
je 0x14004f6c8
mov esi, eax
test rdi, rdi
je 0x14004f3cf
call sub.KERNEL32.dll_GetProcessHeap
mov r8d, 0x18
mov rcx, rax
xor edx, edx
call sub.KERNEL32.dll_HeapAlloc
test rax, rax
je 0x14004f6b7
mov rcx, rax
mov qword [rax], rdi
mov qword [rax + 8], 0
mov dword [rax + 0x10], esi
mov rax, qword [0x14009e4d0]
mov qword [rcx + 8], rax
lock cmpxchg qword [0x14009e4d0], rcx
jne 0x14004f3c0
mov edi, esi
mov rax, rdi
xchg qword [0x14009e138], rax
test esi, esi
je 0x14004f6e2
lea rcx, [0x14009e528]
call fcn.140049a90
mov ecx, edi
call sub.KERNEL32.dll_TlsGetValue
test rax, rax
jne 0x14004f4e9
call sub.KERNEL32.dll_GetProcessHeap
mov r8d, 0x18
mov rcx, rax
xor edx, edx
call sub.KERNEL32.dll_HeapAlloc
test rax, rax
je 0x14004f6b7
mov rsi, rax
mov qword [rax], 8
xorps xmm0, xmm0
movups xmmword [rax + 8], xmm0
mov rbx, qword [0x14009e138]
test rbx, rbx
jne 0x14004f4df
lea rcx, [0x14009e528]
call fcn.140049930
mov rbx, qword [0x14009e138]
test rbx, rbx
jne 0x14004f4d3
mov rbx, qword [0x14009e140]
call sub.KERNEL32.dll_TlsAlloc
cmp eax, 0xffffffff
je 0x14004f6c8
mov edi, eax
test rbx, rbx
je 0x14004f4bf
call sub.KERNEL32.dll_GetProcessHeap
mov r8d, 0x18
mov rcx, rax
xor edx, edx
call sub.KERNEL32.dll_HeapAlloc
test rax, rax
je 0x14004f6b7
mov rcx, rax
mov qword [rax], rbx
mov qword [rax + 8], 0
mov dword [rax + 0x10], edi
mov rax, qword [0x14009e4d0]
nop dword [rax + rax]
mov qword [rcx + 8], rax
lock cmpxchg qword [0x14009e4d0], rcx
jne 0x14004f4b0
mov ebx, edi
mov rax, rbx
xchg qword [0x14009e138], rax
test edi, edi
je 0x14004f6e2
lea rcx, [0x14009e528]
call fcn.140049a90
mov ecx, ebx
mov rdx, rsi
call sub.KERNEL32.dll_TlsSetValue
mov rdi, qword [0x14009e138]
test rdi, rdi
jne 0x14004f59f
lea rcx, [0x14009e528]
call fcn.140049930
mov rdi, qword [0x14009e138]
test rdi, rdi
jne 0x14004f593
mov rdi, qword [0x14009e140]
call sub.KERNEL32.dll_TlsAlloc
cmp eax, 0xffffffff
je 0x14004f6c8
mov esi, eax
test rdi, rdi
je 0x14004f57f
call sub.KERNEL32.dll_GetProcessHeap
mov r8d, 0x18
mov rcx, rax
xor edx, edx
call sub.KERNEL32.dll_HeapAlloc
test rax, rax
je 0x14004f6b7
mov rcx, rax
mov qword [rax], rdi
mov qword [rax + 8], 0
mov dword [rax + 0x10], esi
mov rax, qword [0x14009e4d0]
nop word [rax + rax]
mov qword [rcx + 8], rax
lock cmpxchg qword [0x14009e4d0], rcx
jne 0x14004f570
mov edi, esi
mov rax, rdi
xchg qword [0x14009e138], rax
test esi, esi
je 0x14004f6e2
lea rcx, [0x14009e528]
call fcn.140049a90
mov ecx, edi
call sub.KERNEL32.dll_TlsGetValue
mov rbx, rax
mov rsi, qword [rax + 0x10]
cmp rsi, qword [rax + 8]
jne 0x14004f62e
mov rax, rsi
inc rax
je 0x14004f6b0
lea rcx, [rsi + rsi]
cmp rcx, rax
cmova rax, rcx
mov ecx, 0x10
xor r13d, r13d
mul rcx
mov r12, rax
setno al
jo 0x14004f6b0
mov r13b, al
shl r13, 3
xor edi, edi
test rsi, rsi
setne al
test rsi, rsi
je 0x14004f633
shl rsi, 4
mov dil, al
shl rdi, 3
mov rbp, qword [rbx]
mov qword [rsp + 0x28], rsi
mov qword [rsp + 0x30], rdi
test rsi, rsi
je 0x14004f647
test r12, r12
je 0x14004f69c
mov rcx, rbp
mov rdx, rsi
mov r8, rdi
mov r9, r12
call fcn.140030840
jmp 0x14004f65e
mov rdi, qword [rbx]
jmp 0x14004f679
mov qword [rsp + 0x28], r12
mov qword [rsp + 0x30], r13
test r12, r12
jne 0x14004f64c
mov rdi, r13
jmp 0x14004f66a
test r12, r12
je 0x14004f66a
call sub.KERNEL32.dll_GetProcessHeap
mov rcx, rax
xor edx, edx
mov r8, r12
call sub.KERNEL32.dll_HeapAlloc
mov rdi, rax
test rax, rax
je 0x14004f721
shr r12, 4
mov qword [rbx], rdi
mov qword [rbx + 8], r12
mov rsi, qword [rbx + 0x10]
shl rsi, 4
mov qword [rdi + rsi], r15
mov qword [rdi + rsi + 8], r14
add qword [rbx + 0x10], 1
add rsp, 0x58
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
call sub.KERNEL32.dll_GetProcessHeap
mov rcx, rax
xor edx, edx
mov r8, rbp
call sub.KERNEL32.dll_HeapFree
jmp 0x14004f66a
call fcn.1400309f0
ud2
mov ecx, 0x18
mov edx, 8
call fcn.1400308f0
ud2
lea rcx, [0x14008cb32]
lea r8, [0x14008cb60]
mov edx, 0x2e
call fcn.140049a60
ud2
lea rax, str.assertion_failed:_key___0srclibstd_syswindows_thread_local.rssrclibstdpanicking.rs
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x30], 1
mov qword [rsp + 0x38], 0
lea rax, [0x1400965e0]
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x50], 0
lea rcx, [rsp + 0x28]
call fcn.14004a8f0
ud2
mov rcx, r12
mov rdx, r13
call fcn.1400308f0
ud2