Function at 0x14003e480
Capabilities:
Get 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 r12, rdx
mov rbx, rcx
mov rax, qword [0x14010e038]
xor rax, rsp
mov qword [rsp + 0x50], rax
cmp rcx, 0x10
ja 0x14003e6f4
lea rax, [rbx - 1]
test rbx, rax
sete al
test rbx, rbx
setne cl
test cl, al
je 0x14003ea2f
mov r15, qword [0x140115208]
test r15, r15
je 0x14003ea32
movabs rax, 0xaaaaaaaaaaaaaaaa
mov edx, 0x40
mov ecx, 0x40
test r12, r12
je 0x14003e4f8
bsr rcx, r12
xor rcx, 0x3f
sub rdx, rcx
lea rcx, [0x1400f8ce0]
mov cl, byte [rdx + rcx]
mov rbp, r12
shr rbp, cl
and ebp, 7
lea rcx, [0x1400f8d30]
mov rcx, qword [rcx + rdx*8]
and rcx, r12
lea rdx, [rdx*8]
add rdx, rbp
cmp rcx, 1
sbb rdx, 0xffffffffffffffff
lea rcx, [0x1400f84c8]
movzx r14d, word [rcx + rdx*2 + 0x400]
mov byte [rsp + 0x4f], 0
mov qword [rsp + 0x40], rax
cmp byte [r15], 2
je 0x14003ea3f
cmp byte [r15 + 2], 0
je 0x14003ea57
mov ebx, dword [0x140118b20]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rbx, rax
test edi, edi
jne 0x14003e916
cmp rbx, 2
jb 0x14003ea98
inc qword [rbx + 0x5a0]
cmp word [0x140111550], r14w
jb 0x14003e625
mov rsi, r14
shl rsi, 4
mov rbp, rbx
add rbp, rsi
mov rdi, qword [rbx + rsi]
test rdi, rdi
je 0x14003e8e4
inc qword [rbx + 0x5a8]
mov rax, qword [rdi]
test rax, rax
je 0x14003e8be
mov rcx, rax
not rcx
cmp qword [rdi + 8], rcx
jne 0x14003eb10
bswap rax
prefetcht0 byte [rax]
dec byte [rbx + rsi + 8]
mov qword [rbp], rax
movzx eax, word [rbx + rsi + 0xa]
mov qword [rsp + 0x40], rax
movzx eax, word [rbx + rsi + 0xa]
sub qword [rbx + 0x590], rax
test rdi, rdi
je 0x14003e633
mov rcx, qword [rsp + 0x50]
xor rcx, rsp
call fcn.14007c600
mov rax, rdi
add rsp, 0x58
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
inc qword [rbx + 0x5c0]
inc qword [rbx + 0x5b0]
lea rax, [r14 + r14*4]
lea rsi, [r15 + rax*8]
add rsi, 0x10
lea r14, [r15 + 8]
mov edi, 1
xor ebx, ebx
mov rbp, qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
mov rcx, r14
call rbp
test al, al
jne 0x14003e684
jmp 0x14003e92a
pause
dec eax
jne 0x14003e65f
add ebx, edi
add edi, edi
cmp edi, 0x40
mov eax, 0x40
cmovge edi, eax
cmp ebx, 0x3e8
jl 0x14003e651
mov rcx, r14
call sub.KERNEL32.dll_AcquireSRWLockExclusive
mov rax, qword [rsi]
mov rdi, qword [rax]
test rdi, rdi
je 0x14003e6cb
mov byte [rsp + 0x4f], 0
mov rcx, qword [rdi]
test rcx, rcx
je 0x14003e8b7
mov rdx, rcx
not rdx
cmp qword [rdi + 8], rdx
jne 0x14003eb10
bswap rcx
prefetcht0 byte [rcx]
mov qword [rax], rcx
inc word [rax + 0x18]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
jmp 0x14003e604
lea rax, [rsp + 0x4f]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], 0x4000
mov rcx, rsi
mov rdx, r15
xor r8d, r8d
mov r9, r12
call fcn.140054d10
mov rdi, rax
jmp 0x14003e6bd
mov r14, qword [0x140115208]
test r14, r14
je 0x14003eb15
lea rsi, [rbx - 1]
test rbx, rsi
sete al
test rbx, rbx
setne cl
test cl, al
je 0x14003eb22
cmp rbx, 0x100001
jae 0x14003eb25
cmp rbx, 0x4001
jb 0x14003e73f
cmp r12, 0xf0001
jae 0x14003eb64
cmp rbx, 0x4000
ja 0x14003ea18
cmp r12, rbx
jae 0x14003e8c5
mov r15, rbx
mov ebx, 0x4000
cmp r15, r12
jb 0x14003eb58
movabs rax, 0xaaaaaaaaaaaaaaaa
mov edx, 0x40
mov ecx, 0x40
test r15, r15
je 0x14003e787
bsr rcx, r15
xor rcx, 0x3f
sub rdx, rcx
lea rcx, [0x1400f8ce0]
mov cl, byte [rdx + rcx]
mov rbp, r15
shr rbp, cl
and ebp, 7
lea rcx, [0x1400f8d30]
mov rcx, qword [rcx + rdx*8]
and rcx, r15
lea rdx, [rdx*8]
add rdx, rbp
cmp rcx, 1
sbb rdx, 0xffffffffffffffff
lea rcx, [0x1400f84c8]
movzx r13d, word [rcx + rdx*2 + 0x400]
mov byte [rsp + 0x4f], 0
mov qword [rsp + 0x40], rax
cmp byte [r14], 2
je 0x14003eb28
mov qword [rsp + 0x38], rsi
cmp byte [r14 + 2], 0
je 0x14003eab0
cmp rbx, 0x4000
ja 0x14003eab0
mov esi, dword [0x140118b20]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov ecx, esi
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rsi, rax
test edi, edi
jne 0x14003e9f8
cmp rsi, 2
jb 0x14003eb40
inc qword [rsi + 0x5a0]
cmp word [0x140111550], r13w
jb 0x14003ea05
mov rbp, r13
shl rbp, 4
mov r12, rsi
add r12, rbp
mov rdi, qword [rsi + rbp]
test rdi, rdi
je 0x14003e939
inc qword [rsi + 0x5a8]
mov rax, qword [rdi]
test rax, rax
je 0x14003e923
mov rcx, rax
not rcx
cmp qword [rdi + 8], rcx
jne 0x14003eb10
bswap rax
prefetcht0 byte [rax]
dec byte [rsi + rbp + 8]
mov qword [r12], rax
movzx eax, word [rsi + rbp + 0xa]
mov qword [rsp + 0x40], rax
movzx eax, word [rsi + rbp + 0xa]
sub qword [rsi + 0x590], rax
test rdi, rdi
je 0x14003e95f
test qword [rsp + 0x38], rdi
je 0x14003e604
int3
xor ecx, ecx
jmp 0x14003e6b6
xor eax, eax
jmp 0x14003e5e1
mov rax, r12
dec rax
je 0x14003e90f
bsr rcx, rax
xor rcx, 0x3f
neg cl
mov ebx, 1
shl rbx, cl
jmp 0x14003e755
inc qword [rbx + 0x5b8]
inc qword [rbx + 0x5b0]
mov rcx, rbx
mov rdx, r14
call fcn.140071d60
mov rdi, qword [rbp]
test rdi, rdi
jne 0x14003e5bf
jmp 0x14003e633
mov ecx, 0x40
jmp 0x14003e8d5
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x14003e57f
xor eax, eax
jmp 0x14003e882
mov eax, edi
test edi, edi
jg 0x14003e65f
jmp 0x14003e667
inc qword [rsi + 0x5b8]
inc qword [rsi + 0x5b0]
mov rcx, rsi
mov rdx, r13
call fcn.140071d60
mov rdi, qword [r12]
test rdi, rdi
jne 0x14003e860
lea rax, [r13*4]
add rax, r13
lea rsi, [r14 + rax*8]
add rsi, 0x10
lea r12, [r14 + 8]
mov edi, 1
xor ebp, ebp
mov r13, qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
mov rcx, r12
call r13
test al, al
jne 0x14003e9b8
jmp 0x14003ea20
pause
dec eax
jne 0x14003e993
add ebp, edi
add edi, edi
cmp edi, 0x40
mov eax, 0x40
cmovge edi, eax
cmp ebp, 0x3e8
jl 0x14003e984
mov rcx, r12
call sub.KERNEL32.dll_AcquireSRWLockExclusive
mov rax, qword [rsi]
mov rdi, qword [rax]
test rdi, rdi
jne 0x14003eae5
lea rax, [rsp + 0x4f]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rbx
mov rcx, rsi
mov rdx, r14
xor r8d, r8d
mov r9, r15
call fcn.140054d10
mov rdi, rax
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
jmp 0x14003e8a9
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x14003e820
inc qword [rsi + 0x5c0]
inc qword [rsi + 0x5b0]
jmp 0x14003e95f
mov r15, r12
jmp 0x14003e766
mov eax, edi
test edi, edi
jg 0x14003e993
jmp 0x14003e99b
int3
call fcn.1400c9fc0
mov r15, rax
jmp 0x14003e4d7
mov al, byte [0x140111548]
cmp al, 2
jne 0x14003e553
call fcn.1400cf580
jmp 0x14003e553
lea rsi, [r14 + r14*4]
lea r14, [r15 + 8]
mov rcx, r14
call fcn.14006c7e0
mov rax, qword [r15 + rsi*8 + 0x10]
mov rdi, qword [rax]
test rdi, rdi
jne 0x14003e68f
lea rcx, [r15 + rsi*8]
add rcx, 0x10
lea rax, [rsp + 0x4f]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], 0x4000
jmp 0x14003e6e1
lea r8, [rsp + 0x40]
mov rcx, r15
mov edx, r14d
call fcn.14004c260
mov rdi, rax
jmp 0x14003e5ff
lea r12, [r14 + 8]
mov rcx, r12
call fcn.14006c7e0
lea rcx, [r13*4]
add rcx, r13
cmp rbx, 0x4000
ja 0x14003eb67
mov rax, qword [r14 + rcx*8 + 0x10]
mov rdi, qword [rax]
test rdi, rdi
je 0x14003eb67
mov byte [rsp + 0x4f], 0
mov rcx, qword [rdi]
test rcx, rcx
je 0x14003eb60
mov rdx, rcx
not rdx
cmp qword [rdi + 8], rdx
jne 0x14003eb10
bswap rcx
prefetcht0 byte [rcx]
mov qword [rax], rcx
inc word [rax + 0x18]
jmp 0x14003e9ea
call fcn.1400a8610
call fcn.1400c9fc0
mov r14, rax
jmp 0x14003e704
int3
int3
mov al, byte [0x140111548]
cmp al, 2
jne 0x14003e7e2
call fcn.1400cf580
jmp 0x14003e7e2
lea r8, [rsp + 0x40]
mov rcx, r14
mov edx, r13d
call fcn.14004c260
mov rdi, rax
jmp 0x14003e8a0
mov rcx, r12
call fcn.1400d2d60
xor ecx, ecx
jmp 0x14003eb04
int3
lea rcx, [r14 + rcx*8]
add rcx, 0x10
lea rax, [rsp + 0x4f]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rbx
jmp 0x14003e9d9