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

Disassembly:
sub rsp, 0x68
cmp dword [0x14013ea58], 0
je 0x14003cae7
mov qword [rsp + 0x60], rdi
mov rdi, qword [0x14013ea60]
test rdi, rdi
je 0x14003cad8
mov qword [rsp + 0x70], rbx
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [rdi]
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, ebx
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_SetLastError]
test rdi, rdi
je 0x14003cac4
movups xmm0, xmmword [rdi + 0x10]
mov qword [rsp + 0x78], rbp
lea rcx, [rsp + 0x20]
mov qword [rsp + 0x80], rsi
movaps xmmword [rsp + 0x20], xmm0
call fcn.14003a670
xor esi, esi
lea rcx, [rdi + 0x38]
lea rdx, [rsp + 0x40]
mov qword [rsp + 0x40], rcx
mov qword [rsp + 0x58], rsi
mov qword [rsp + 0x50], rsi
mov qword [rsp + 0x48], rsi
lea rbp, [rsi - 1]
xchg qword [rcx], rdx
test rdx, rdx
je 0x14003c968
lea rax, [rsp + 0x40]
xchg qword [rdx + 8], rax
xor eax, eax
lock cmpxchg qword [rdx + 0x18], rbp
lea rcx, [rax - 1]
cmp rcx, 0xfffffffffffffffd
ja 0x14003c95e
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEvent]
lea rcx, [rsp + 0x50]
call fcn.14003af00
mov rcx, qword [rsp + 0x40]
mov rbx, rsi
mov dword [rdi + 0x28], 7
lock xadd qword [rsp + 0x48], rbx
test rbx, rbx
jne 0x14003c9ad
lea rax, [rsp + 0x40]
lock cmpxchg qword [rcx], rsi
lea rcx, [rsp + 0x40]
cmp rcx, rax
je 0x14003c9d2
lea rcx, [rsp + 0x58]
call fcn.14003af00
mov rbx, rsi
lock xadd qword [rsp + 0x48], rbx
jmp 0x14003c9b7
lea rcx, [rsp + 0x58]
call fcn.14003af00
xor eax, eax
lock cmpxchg qword [rbx + 0x10], rbp
lea rcx, [rax - 1]
cmp rcx, 0xfffffffffffffffd
ja 0x14003c9d2
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov rax, qword [rdi + 0x178]
test rax, rax
je 0x14003ca44
nop
mov rcx, qword [rax]
mov rdx, qword [rcx + 0x28]
mov r8, qword [rcx + 0x10]
mov qword [rcx + 0x10], rdi
mov r9, qword [rdx + 0x18]
test r9, r9
je 0x14003ca00
mov rax, qword [rdx + 0x10]
mov qword [r9 + 0x10], rax
mov r9, qword [rdx + 0x10]
test r9, r9
je 0x14003ca11
mov rax, qword [rdx + 0x18]
mov qword [r9 + 0x18], rax
cmp qword [r8 + 0x178], rdx
jne 0x14003ca25
mov rax, qword [rdx + 0x18]
mov qword [r8 + 0x178], rax
mov rdx, qword [rcx + 0x28]
mov eax, ebp
xchg dword [rdx + 8], eax
mov rcx, qword [rcx + 0x20]
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov rax, qword [rdi + 0x178]
test rax, rax
jne 0x14003c9e0
cmp dword [rdi + 0x184], 1
mov rbp, qword [rsp + 0x78]
jne 0x14003caa8
mov rax, qword [rdi + 0x10]
test rax, rax
je 0x14003ca92
movups xmm0, xmmword [rdi + 0x10]
mov rbx, qword [rax + 8]
lea rcx, [rsp + 0x30]
mov rsi, qword [rax + 0x40]
movaps xmmword [rsp + 0x30], xmm0
call fcn.14003b5d0
test rsi, rsi
je 0x14003ca84
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test rbx, rbx
je 0x14003ca92
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, qword [0x14013ea60]
test rax, rax
je 0x14003caa8
mov ecx, dword [rax]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
mov rsi, qword [rsp + 0x80]
mov eax, 1
mov rbx, qword [rsp + 0x70]
mov rdi, qword [rsp + 0x60]
add rsp, 0x68
ret
mov rbx, qword [rsp + 0x70]
mov eax, 1
mov rdi, qword [rsp + 0x60]
add rsp, 0x68
ret
mov rdi, qword [rsp + 0x60]
mov eax, 1
add rsp, 0x68
ret
mov eax, 1
add rsp, 0x68
ret