Function at 0x14008a460
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 rbp
push rdi
push rsi
push rbx
sub rsp, 0xb8
mov ecx, dword [0x140548540]
cmp ecx, 0xffffffff
je 0x14008a74c
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov r12, rax
test rax, rax
je 0x14008a74c
cmp qword [rax + 0x50], 0
mov rbx, qword [rax + 0x18]
je 0x14008a55b
nop dword [rax + rax]
mov rsi, qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov rdi, qword [sym.imp.KERNEL32.dll_HeapFree]
mov rbp, rsi
jmp 0x14008a50b
mov rax, qword [rbx + 8]
mov rcx, qword [rbx]
mov r14, rbp
mov qword [r12 + 0x18], rax
test rcx, rcx
je 0x14008a4f5
mov rax, qword [rcx]
call qword [rax + 0x10]
mov r13, qword [rbx]
mov r14, rsi
mov rax, qword [r13]
mov rcx, r13
call qword [rax]
call rsi
mov rcx, rax
mov r8, r13
xor edx, edx
call rdi
call r14
mov rcx, rax
mov r8, rbx
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rbx, qword [r12 + 0x18]
test rbx, rbx
jne 0x14008a4c0
cmp qword [r12 + 0x50], 0
je 0x14008a568
lea rbx, [r12 + 0x30]
nop dword [rax]
mov r13, qword [r12 + 0x40]
mov rcx, qword [r13 + 0x30]
test rcx, rcx
je 0x14008a53b
mov rdx, qword [r13 + 0x38]
test rdx, rdx
je 0x14008a53b
call qword [r13 + 0x28]
mov rdx, rbx
mov rcx, r13
call fcn.140535540
mov rcx, rax
call fcn.14053f080
sub qword [r12 + 0x50], 1
jne 0x14008a520
mov rbx, qword [r12 + 0x18]
test rbx, rbx
jne 0x14008a4a8
nop dword [rax]
lea rbx, [0x1406a3aa8]
mov byte [rsp + 0x48], 0
movabs rax, 0x7f0725e3c15730e2
mov rsi, qword [sym.imp.KERNEL32.dll_WaitForSingleObjectEx]
mov qword [rsp + 0x40], rax
mov eax, ebx
mov rbp, rbx
mov r13, rbx
shr al, 4
mov r14, rbx
mov byte [rsp + 0x58], 0
mov qword [rsp + 0x50], 0
add eax, 0x41
mov byte [rsp + 0x20], al
mov rax, rbx
sar rax, 8
and eax, 0xf
add eax, 0x41
mov byte [rsp + 0x36], al
mov rax, rbx
sar rax, 0xc
and eax, 0xf
add eax, 0x41
mov byte [rsp + 0x37], al
mov rax, rbx
sar rax, 0x10
and eax, 0xf
add eax, 0x41
mov byte [rsp + 0x38], al
mov rax, rbx
sar rax, 0x14
and eax, 0xf
add eax, 0x41
mov byte [rsp + 0x39], al
mov rax, rbx
sar rax, 0x18
and eax, 0xf
add eax, 0x41
mov byte [rsp + 0x3a], al
mov rax, rbx
sar rax, 0x1c
and eax, 0xf
add eax, 0x41
mov byte [rsp + 0x3b], al
mov rax, rbx
sar rax, 0x20
and eax, 0xf
add eax, 0x41
mov byte [rsp + 0x3c], al
mov rax, rbx
sar rax, 0x24
and eax, 0xf
add eax, 0x41
mov byte [rsp + 0x3d], al
mov rax, rbx
sar rax, 0x28
and eax, 0xf
add eax, 0x41
mov byte [rsp + 0x3e], al
mov rax, rbx
sar rax, 0x2c
and eax, 0xf
add eax, 0x41
sar rbp, 0x30
mov byte [rsp + 0x3f], al
mov rax, rbx
sar r13, 0x34
and ebp, 0xf
sar r14, 0x38
shr rax, 0x3c
and r13d, 0xf
add ebp, 0x41
and r14d, 0xf
mov rdi, rax
add r13d, 0x41
add r14d, 0x41
add edi, 0x41
jmp 0x14008a6c5
lock add dword [0x1406a3aac], 1
mov byte [rsp + 0x48], 1
mov eax, dword [0x1406a3aa8]
cmp eax, dword [rsp + 0x40]
je 0x14008a7b4
mov rcx, qword [rsp + 0x50]
test rcx, rcx
je 0x14008a7e1
xor r8d, r8d
mov edx, 0xffffffff
call rsi
mov eax, dword [0x1406a3aa8]
cmp eax, dword [rsp + 0x40]
je 0x14008a7b4
mov edx, dword [rsp + 0x44]
xor eax, eax
lock cmpxchg dword [0x1406a3aa8], edx
test eax, eax
je 0x14008a760
cmp byte [rsp + 0x48], 0
je 0x14008a690
mov rcx, qword [rsp + 0x50]
jmp 0x14008a6bb
mov eax, dword [0x1406a3aac]
cmp eax, 1
jg 0x14008abb0
mov r15, qword [rsp + 0x50]
test r15, r15
jne 0x14008a7ab
mov ecx, dword [0x140548540]
cmp ecx, 0xffffffff
je 0x14008a725
xor edx, edx
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
lock sub dword [r12 + 8], 1
jne 0x14008a74c
mov rax, qword [r12]
mov rcx, r12
call qword [rax]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, r12
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
nop
add rsp, 0xb8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov r15, qword [rsp + 0x50]
test r15, r15
je 0x14008a9bf
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_ResetEvent]
call fcn.14008f050
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp byte [rsp + 0x48], 0
mov dword [0x140548540], eax
je 0x14008aa08
mov eax, dword [rsp + 0x40]
xchg dword [0x1406a3aa8], eax
mov r15, qword [rsp + 0x50]
test r15, r15
je 0x14008a6f5
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov rcx, qword [rsp + 0x50]
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x14008a712
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [0x140548540]
cmp ecx, 0xffffffff
je 0x14008a725
jmp 0x14008a71d
cmp byte [rsp + 0x58], 0
je 0x14008a829
lea r9, [rsp + 0x58]
xor r8d, r8d
mov edx, 1
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventA]
mov rcx, qword [rsp + 0x50]
mov r15, rax
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
jbe 0x14008a819
mov qword [rsp + 0x50], r15
jmp 0x14008a6c5
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsp + 0x50], r15
jmp 0x14008a6c5
mov eax, dword [0x140638870]
movdqu xmm1, xmmword [str.LocalC15730E2_145C_4c5e_B005_3BC753F42475_once_flag]
movdqu xmm2, xmmword [0x140638850]
movdqu xmm3, xmmword [0x140638860]
mov dword [rsp + 0x88], eax
movzx eax, word [0x140638874]
movups xmmword [rsp + 0x58], xmm1
mov word [rsp + 0x8c], ax
mov eax, ebx
and eax, 0xf
movups xmmword [rsp + 0x68], xmm2
add eax, 0x41
movups xmmword [rsp + 0x78], xmm3
mov byte [rsp + 0x8e], al
movzx eax, byte [rsp + 0x20]
mov byte [rsp + 0x8f], al
movzx eax, byte [rsp + 0x36]
mov byte [rsp + 0x90], al
movzx eax, byte [rsp + 0x37]
mov byte [rsp + 0x91], al
movzx eax, byte [rsp + 0x38]
mov byte [rsp + 0x92], al
movzx eax, byte [rsp + 0x39]
mov byte [rsp + 0x93], al
movzx eax, byte [rsp + 0x3a]
mov byte [rsp + 0x94], al
movzx eax, byte [rsp + 0x3b]
mov byte [rsp + 0x95], al
movzx eax, byte [rsp + 0x3c]
mov byte [rsp + 0x96], al
movzx eax, byte [rsp + 0x3d]
mov byte [rsp + 0x97], al
movzx eax, byte [rsp + 0x3e]
mov byte [rsp + 0x98], al
movzx eax, byte [rsp + 0x3f]
mov byte [rsp + 0x99], al
mov byte [rsp + 0x9a], bpl
mov byte [rsp + 0x9b], r13b
mov byte [rsp + 0x9c], r14b
mov byte [rsp + 0x9d], dil
mov byte [rsp + 0x9e], 0
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov edx, eax
mov byte [rsp + 0xa6], 0
and edx, 0xf
add edx, 0x41
mov byte [rsp + 0x9e], dl
mov edx, eax
shr dl, 4
add edx, 0x41
mov byte [rsp + 0x9f], dl
mov edx, eax
shr edx, 8
and edx, 0xf
add edx, 0x41
mov byte [rsp + 0xa0], dl
mov edx, eax
shr edx, 0xc
and edx, 0xf
add edx, 0x41
mov byte [rsp + 0xa1], dl
mov edx, eax
shr edx, 0x10
and edx, 0xf
add edx, 0x41
mov byte [rsp + 0xa2], dl
mov edx, eax
shr edx, 0x14
and edx, 0xf
add edx, 0x41
mov byte [rsp + 0xa3], dl
mov edx, eax
shr eax, 0x1c
shr edx, 0x18
add eax, 0x41
and edx, 0xf
mov byte [rsp + 0xa5], al
add edx, 0x41
mov byte [rsp + 0xa4], dl
jmp 0x14008a7e8
cmp byte [rsp + 0x58], 0
je 0x14008aa1a
mov ecx, 0x100002
lea r8, [rsp + 0x58]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_OpenEventA]
mov rcx, qword [rsp + 0x50]
mov r15, rax
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x14008a9f0
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsp + 0x50], r15
test r15, r15
je 0x14008a777
jmp 0x14008a76e
lock add dword [0x1406a3aac], 1
mov byte [rsp + 0x48], 1
jmp 0x14008a793
mov eax, dword [0x140638870]
movdqu xmm0, xmmword [str.LocalC15730E2_145C_4c5e_B005_3BC753F42475_once_flag]
movdqu xmm1, xmmword [0x140638850]
movdqu xmm2, xmmword [0x140638860]
mov dword [rsp + 0x88], eax
movzx eax, word [0x140638874]
movups xmmword [rsp + 0x58], xmm0
mov word [rsp + 0x8c], ax
mov eax, ebx
and eax, 0xf
movups xmmword [rsp + 0x68], xmm1
add eax, 0x41
movups xmmword [rsp + 0x78], xmm2
mov byte [rsp + 0x8e], al
movzx eax, byte [rsp + 0x20]
mov byte [rsp + 0x8f], al
movzx eax, byte [rsp + 0x36]
mov byte [rsp + 0x90], al
movzx eax, byte [rsp + 0x37]
mov byte [rsp + 0x91], al
movzx eax, byte [rsp + 0x38]
mov byte [rsp + 0x92], al
movzx eax, byte [rsp + 0x39]
mov byte [rsp + 0x93], al
movzx eax, byte [rsp + 0x3a]
mov byte [rsp + 0x94], al
movzx eax, byte [rsp + 0x3b]
mov byte [rsp + 0x95], al
movzx eax, byte [rsp + 0x3c]
mov byte [rsp + 0x96], al
movzx eax, byte [rsp + 0x3d]
mov byte [rsp + 0x97], al
movzx eax, byte [rsp + 0x3e]
mov byte [rsp + 0x98], al
movzx eax, byte [rsp + 0x3f]
mov byte [rsp + 0x99], al
mov byte [rsp + 0x9a], bpl
mov byte [rsp + 0x9b], r13b
mov byte [rsp + 0x9c], r14b
mov byte [rsp + 0x9d], dil
mov byte [rsp + 0x9e], 0
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov byte [rsp + 0xa6], 0
mov edx, eax
and edx, 0xf
add edx, 0x41
mov byte [rsp + 0x9e], dl
mov edx, eax
shr dl, 4
add edx, 0x41
mov byte [rsp + 0x9f], dl
mov edx, eax
shr edx, 8
and edx, 0xf
add edx, 0x41
mov byte [rsp + 0xa0], dl
mov edx, eax
shr edx, 0xc
and edx, 0xf
add edx, 0x41
mov byte [rsp + 0xa1], dl
mov edx, eax
shr edx, 0x10
and edx, 0xf
add edx, 0x41
mov byte [rsp + 0xa2], dl
mov edx, eax
shr edx, 0x14
and edx, 0xf
add edx, 0x41
mov byte [rsp + 0xa3], dl
mov edx, eax
shr eax, 0x1c
shr edx, 0x18
add eax, 0x41
and edx, 0xf
mov byte [rsp + 0xa5], al
add edx, 0x41
mov byte [rsp + 0xa4], dl
jmp 0x14008a9c6
cmp byte [rsp + 0x58], 0
je 0x14008abee
xor ecx, ecx
lea r9, [rsp + 0x58]
xor r8d, r8d
mov edx, 1
call qword [sym.imp.KERNEL32.dll_CreateEventA]
mov rcx, qword [rsp + 0x50]
mov r15, rax
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x14008abe4
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsp + 0x50], r15
jmp 0x14008a709
mov eax, dword [0x140638870]
movzx edi, dil
movzx r14d, r14b
mov edx, ebx
movzx ecx, byte [rsp + 0x3a]
shl rdi, 8
movzx r13d, r13b
and edx, 0xf
mov dword [rsp + 0x88], eax
movzx eax, word [0x140638874]
or rdi, r14
add edx, 0x41
shl rdi, 8
movzx ebp, bpl
movzx edx, dl
movdqu xmm3, xmmword [str.LocalC15730E2_145C_4c5e_B005_3BC753F42475_once_flag]
mov word [rsp + 0x8c], ax
movzx eax, byte [rsp + 0x3b]
or rdi, r13
shl rdi, 8
movdqu xmm4, xmmword [0x140638850]
movdqu xmm5, xmmword [0x140638860]
mov byte [rsp + 0x9e], 0
shl rax, 8
or rdi, rbp
movups xmmword [rsp + 0x58], xmm3
or rax, rcx
movzx ecx, byte [rsp + 0x39]
shl rdi, 8
movups xmmword [rsp + 0x68], xmm4
shl rax, 8
movups xmmword [rsp + 0x78], xmm5
or rax, rcx
movzx ecx, byte [rsp + 0x38]
shl rax, 8
or rax, rcx
movzx ecx, byte [rsp + 0x37]
shl rax, 8
or rax, rcx
movzx ecx, byte [rsp + 0x36]
shl rax, 8
or rax, rcx
movzx ecx, byte [rsp + 0x20]
shl rax, 8
or rax, rcx
movzx ecx, byte [rsp + 0x3f]
shl rax, 8
or rdi, rcx
movzx ecx, byte [rsp + 0x3e]
or rax, rdx
shl rdi, 8
mov qword [rsp + 0x20], rax
or rdi, rcx
movzx ecx, byte [rsp + 0x3d]
shl rdi, 8
or rdi, rcx
movzx ecx, byte [rsp + 0x3c]
shl rdi, 8
or rdi, rcx
mov qword [rsp + 0x28], rdi
movdqu xmm0, xmmword [rsp + 0x20]
movups xmmword [rsp + 0x8e], xmm0
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov byte [rsp + 0xa6], 0
mov edx, eax
and edx, 0xf
add edx, 0x41
mov byte [rsp + 0x9e], dl
mov edx, eax
shr dl, 4
add edx, 0x41
mov byte [rsp + 0x9f], dl
mov edx, eax
shr edx, 8
and edx, 0xf
add edx, 0x41
mov byte [rsp + 0xa0], dl
mov edx, eax
shr edx, 0xc
and edx, 0xf
add edx, 0x41
mov byte [rsp + 0xa1], dl
mov edx, eax
shr edx, 0x10
and edx, 0xf
add edx, 0x41
mov byte [rsp + 0xa2], dl
mov edx, eax
shr edx, 0x14
and edx, 0xf
add edx, 0x41
mov byte [rsp + 0xa3], dl
mov edx, eax
shr eax, 0x1c
shr edx, 0x18
add eax, 0x41
and edx, 0xf
mov byte [rsp + 0xa5], al
add edx, 0x41
mov byte [rsp + 0xa4], dl
jmp 0x14008abb7