Function at 0x1000a366c
Capabilities:
Get thread local storage value

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x60
mov ecx, dword [0x1000de268]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, dword [rsp + 0x40]
xor edi, edi
mov r13, qword [rax + 0x28]
xor eax, eax
and ecx, 0x80000000
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x50], rax
mov dword [rsp + 0x40], ecx
mov eax, dword [r13]
mov r12d, 0xfffffff
mov esi, edi
and eax, r12d
lea r15, [0x1000e2e00]
je 0x1000a397e
mov r8d, dword [r13]
lea r9, [r13 + 8]
mov ecx, r8d
shr ecx, 0x1c
and ecx, 1
je 0x1000a36e0
mov rdx, qword [r9]
jmp 0x1000a36e3
mov rdx, r9
lea r10d, [rax - 1]
mov r14, qword [rdx + r10*8]
cmp ecx, edi
je 0x1000a36f2
mov r9, qword [r9]
and r8d, r12d
lea eax, [r10 + 1]
lea rcx, [r9 + r10*8]
sub r8d, r10d
lea rdx, [r9 + rax*8]
dec r8d
shl r8, 3
call sub.msvcrt.dll_memmove
mov r11d, dword [r13]
lea eax, [r11 - 1]
xor eax, r11d
and eax, r12d
xor eax, r11d
mov dword [r13], eax
test byte [r14 + 0x88], 0x80
je 0x1000a3925
mov rcx, r14
call fcn.10009dda8
mov rbp, rax
cmp rax, rdi
jne 0x1000a3751
test byte [r14 + 0x88], 0x80
jne 0x1000a3937
mov ecx, dword [rsp + 0x40]
mov r9d, edi
mov r8d, ecx
and r8d, r12d
jbe 0x1000a3791
mov edx, ecx
mov r10, rdi
shr edx, 0x1c
and edx, 1
cmp edx, edi
lea rax, [rsp + 0x48]
cmovne rax, qword [rsp + 0x48]
mov rbx, qword [r10 + rax]
cmp qword [rbx], rbp
je 0x1000a3906
inc r9d
add r10, 8
cmp r8d, r9d
ja 0x1000a376b
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov edx, 8
lea r8d, [rdx + 0x18]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rbx, rax
cmp rax, rdi
je 0x1000a37c2
and dword [rax + 8], 0x80000000
xor eax, eax
mov qword [rbx + 0x10], rax
mov qword [rbx + 0x18], rax
cmp rbx, rdi
je 0x1000a395b
mov qword [rbx], rbp
mov ecx, dword [rsp + 0x40]
mov eax, 0xfffffff
mov r12d, ecx
and r12d, eax
lea ebp, [r12 + 1]
cmp ebp, r12d
jb 0x1000a37ef
cmp ebp, eax
ja 0x1000a37ef
mov esi, edi
jmp 0x1000a37f7
or ebp, 0xffffffff
mov esi, 0x80070216
cmp esi, edi
jl 0x1000a38f8
bt ecx, 0x1c
jb 0x1000a381d
cmp r12d, 2
jne 0x1000a381d
lea rcx, [rsp + 0x40]
mov edx, ebp
call fcn.10007d8e8
mov ecx, dword [rsp + 0x40]
mov esi, eax
cmp esi, edi
jl 0x1000a38f8
bt ecx, 0x1c
mov eax, dword [0x1000e2e18]
jae 0x1000a3851
test al, 1
jne 0x1000a384c
or eax, 1
mov dword [0x1000e2e18], eax
lea rax, [0x100011f78]
mov qword [0x1000e2e00], rax
mov rcx, r15
jmp 0x1000a3873
test al, 2
jne 0x1000a386c
or eax, 2
mov dword [0x1000e2e18], eax
lea rax, fcn.1000a4148
mov qword [0x1000e2df8], rax
lea rcx, [0x1000e2df8]
mov rax, qword [rcx]
lea rdx, [rsp + 0xa8]
mov r9d, ebp
mov qword [rsp + 0x20], rdx
lea rdx, [rsp + 0x40]
mov r8d, r12d
call qword [rax + 0x10]
cmp eax, edi
mov esi, eax
jl 0x1000a38f4
mov r8d, dword [rsp + 0x40]
mov rdx, qword [rsp + 0xa8]
and r8d, 0xfffffff
lea rcx, [rdx + 8]
sub r8d, r12d
shl r8, 3
call sub.msvcrt.dll_memmove
mov eax, dword [rsp + 0x40]
mov r12d, 0xfffffff
xor ebp, eax
and ebp, r12d
xor eax, ebp
bt eax, 0x1d
mov dword [rsp + 0x40], eax
jae 0x1000a38e3
mov rax, qword [rsp + 0xa8]
xor ecx, ecx
mov qword [rax], rcx
mov rax, qword [rsp + 0xa8]
mov qword [rax], rbx
mov ecx, dword [rsp + 0x40]
jmp 0x1000a38fe
mov ecx, dword [rsp + 0x40]
mov r12d, 0xfffffff
cmp esi, edi
jl 0x1000a3a76
cmp esi, edi
jl 0x1000a3929
lea rcx, [rbx + 8]
mov r8, r14
mov edx, dword [rcx]
and edx, r12d
call fcn.10005fe4c
cmp eax, edi
mov esi, eax
jl 0x1000a39c2
mov ecx, dword [rsp + 0x40]
mov eax, dword [r13]
and eax, r12d
je 0x1000a3964
jmp 0x1000a36c8
mov edx, 2
mov rcx, r14
call fcn.1000a0cb8
cmp eax, edi
mov esi, eax
jl 0x1000a39c2
and dword [r13], 0xf0000000
mov ecx, dword [rsp + 0x40]
mov r12b, 1
jmp 0x1000a3967
mov ecx, dword [rsp + 0x40]
mov esi, 0x8007000e
mov r12b, dil
cmp esi, edi
jl 0x1000a3a70
cmp r12b, dil
mov r12d, 0xfffffff
jne 0x1000a3a76
mov r13d, edi
test r12d, ecx
jbe 0x1000a3ac1
mov r14, rdi
bt ecx, 0x1c
lea rax, [rsp + 0x48]
cmovb rax, qword [rsp + 0x48]
mov rbx, qword [r14 + rax]
mov eax, dword [rbx + 8]
and eax, r12d
cmp eax, 0x19
jb 0x1000a39cb
mov rcx, qword [rbx]
mov edx, 2
call fcn.1000a0cb8
cmp eax, edi
mov esi, eax
jge 0x1000a3a56
mov ecx, dword [rsp + 0x40]
jmp 0x1000a3a76
mov r12d, edi
cmp eax, edi
jbe 0x1000a3a49
mov rbp, rdi
bt dword [rbx + 8], 0x1c
jae 0x1000a39e2
mov rsi, qword [rbx + 0x10]
jmp 0x1000a39e6
lea rsi, [rbx + 0x10]
mov rsi, qword [rsi + rbp]
mov rcx, rsi
test byte [rsi + 0x88], 4
je 0x1000a39ff
xor edx, edx
call fcn.1000a0cb8
jmp 0x1000a3a2f
mov rax, qword [rsi]
call qword [rax + 0x100]
mov rdx, qword [0x1000e2050]
mov r8, qword [rax]
mov rcx, rax
call qword [r8 + 0x50]
mov rdx, qword [rbx]
lea rcx, [rsp + 0x30]
mov byte [rsp + 0x30], al
mov qword [rsp + 0x38], rsi
call fcn.1000a0dc0
cmp eax, edi
mov esi, eax
jl 0x1000a3a49
mov eax, dword [rbx + 8]
inc r12d
add rbp, 8
and eax, 0xfffffff
cmp eax, r12d
ja 0x1000a39d5
and dword [rbx + 8], 0xf0000000
mov r12d, 0xfffffff
mov ecx, dword [rsp + 0x40]
inc r13d
add r14, 8
mov eax, ecx
and eax, r12d
cmp eax, r13d
jbe 0x1000a3a76
jmp 0x1000a398d
mov r12d, 0xfffffff
test r12d, ecx
jbe 0x1000a3ac1
mov rbp, rdi
bt ecx, 0x1c
lea rax, [rsp + 0x48]
cmovb rax, qword [rsp + 0x48]
mov rbx, qword [rax + rbp]
lea rcx, [rbx + 8]
call fcn.10007d870
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rbx
mov rcx, rax
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov ecx, dword [rsp + 0x40]
inc edi
mov eax, ecx
add rbp, 8
and eax, r12d
cmp edi, eax
jb 0x1000a3a7e
bt ecx, 0x1c
mov eax, dword [0x1000e2e18]
jae 0x1000a3aea
test al, 1
jne 0x1000a3b0c
or eax, 1
mov dword [0x1000e2e18], eax
lea rax, [0x100011f78]
mov qword [0x1000e2e00], rax
jmp 0x1000a3b0c
test al, 2
jne 0x1000a3b05
or eax, 2
mov dword [0x1000e2e18], eax
lea rax, fcn.1000a4148
mov qword [0x1000e2df8], rax
lea r15, [0x1000e2df8]
mov rax, qword [r15]
lea rdx, [rsp + 0x40]
mov rcx, r15
call qword [rax]
mov rbx, qword [rsp + 0xb0]
mov eax, esi
add rsp, 0x60
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret