Function at 0x14004abd0
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, 0x38
mov r15, rdx
mov rdi, rcx
mov rax, qword [0x1400dd028]
xor rax, rsp
mov qword [rsp + 0x30], rax
cmp rcx, 0x10
ja 0x14004ae0a
lea rax, [rdi - 1]
test rdi, rax
sete al
test rdi, rdi
setne cl
test cl, al
je 0x14004b0ac
mov r14, qword [0x1400e4a58]
test r14, r14
je 0x14004b0af
mov eax, 0x40
mov ecx, 0x40
test r15, r15
je 0x14004ac3e
bsr rcx, r15
xor rcx, 0x3f
sub rax, rcx
lea rcx, [0x1400cba70]
mov cl, byte [rax + rcx]
mov rdx, r15
shr rdx, cl
and edx, 7
lea rcx, [0x1400cbac0]
mov rcx, qword [rcx + rax*8]
and rcx, r15
lea rax, [rdx + rax*8]
cmp rcx, 1
sbb rax, 0xffffffffffffffff
lea rcx, [0x1400cb250]
movzx r13d, word [rcx + rax*2 + 0x400]
mov byte [rsp + 0x2f], 0
cmp byte [r14 + 2], 0
je 0x14004b13b
mov edi, dword [0x1400e78f0]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, rax
test ebx, ebx
jne 0x14004b038
cmp rdi, 1
jbe 0x14004b197
add qword [rdi + 0x298], 1
cmp r13w, 0x29
jb 0x14004ad97
add qword [rdi + 0x2b8], 1
add qword [rdi + 0x2a8], 1
lea rax, [r13*4]
add rax, r13
lea rdi, [r14 + rax*8]
add rdi, 0x10
lea rsi, [r14 + 8]
mov ebx, 1
xor ebp, ebp
mov r12, qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
mov r13d, 0x40
mov rcx, rsi
call r12
test al, al
jne 0x14004ad37
jmp 0x14004af89
pause
dec eax
jne 0x14004ad16
add ebp, ebx
add ebx, ebx
cmp ebx, 0x40
cmovge ebx, r13d
cmp ebp, 0x3e8
jl 0x14004ad07
mov rcx, rsi
call sub.KERNEL32.dll_AcquireSRWLockExclusive
mov rax, qword [rdi]
mov rbx, qword [rax]
test rbx, rbx
je 0x14004ade7
mov byte [rsp + 0x2f], 0
mov rcx, qword [rbx]
test rcx, rcx
je 0x14004ad63
mov rdx, rcx
not rdx
cmp qword [rbx + 8], rdx
jne 0x14004b332
bswap rcx
mov qword [rax], rcx
inc word [rax + 0x18]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
mov rcx, qword [rsp + 0x30]
xor rcx, rsp
call fcn.14005b820
mov rax, rbx
add rsp, 0x38
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov rsi, r13
shl rsi, 4
mov rbp, rdi
add rbp, rsi
cmp qword [rdi + rsi], 0
je 0x14004af5e
inc qword [rdi + 0x2a0]
mov rbx, qword [rbp]
mov rax, qword [rbx]
test rax, rax
je 0x14004add2
mov rcx, rax
not rcx
cmp qword [rbx + 8], rcx
jne 0x14004b332
bswap rax
dec byte [rdi + rsi + 8]
mov qword [rbp], rax
test rbx, rbx
jne 0x14004ad76
jmp 0x14004acdc
lea rax, [rsp + 0x2f]
mov qword [rsp + 0x20], rax
mov rcx, rdi
mov rdx, r14
xor r8d, r8d
mov r9, r15
call fcn.140038f30
mov rbx, rax
jmp 0x14004ad6d
mov r14, qword [0x1400e4a58]
test r14, r14
je 0x14004b20f
lea r12, [rdi - 1]
test rdi, r12
sete al
test rdi, rdi
setne cl
test cl, al
je 0x14004b29b
cmp r15, rdi
jae 0x14004af38
cmp rdi, r15
jb 0x14004b29e
bsr rax, rdi
xor rax, 0xffffffffffffffc0
lea rcx, [0x1400cba70]
mov cl, byte [rax + rcx + 0x41]
mov rdx, rdi
shr rdx, cl
and edx, 7
lea rcx, [0x1400cbac0]
mov rcx, qword [rcx + rax*8 + 0x208]
and rcx, rdi
lea rax, [rdx + rax*8]
add rax, 0x208
cmp rcx, 1
sbb rax, 0xffffffffffffffff
lea rcx, [0x1400cb250]
movzx r15d, word [rcx + rax*2 + 0x400]
mov byte [rsp + 0x2e], 0
cmp byte [r14 + 2], 0
je 0x14004b2a6
mov esi, dword [0x1400e78f0]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov ecx, esi
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rsi, rax
test ebx, ebx
jne 0x14004b065
cmp rsi, 1
jbe 0x14004b337
inc qword [rsi + 0x298]
cmp r15w, 0x29
jae 0x14004af98
mov rbp, r15
shl rbp, 4
mov r13, rsi
add r13, rbp
cmp qword [rsi + rbp], 0
je 0x14004b072
inc qword [rsi + 0x2a0]
mov rbx, qword [r13]
mov rax, qword [rbx]
test rax, rax
je 0x14004af1c
mov rcx, rax
not rcx
cmp qword [rbx + 8], rcx
jne 0x14004b332
bswap rax
dec byte [rsi + rbp + 8]
mov qword [r13], rax
test rbx, rbx
je 0x14004afa6
test r12, rbx
je 0x14004ad76
int3
mov rax, r15
dec rax
je 0x14004af57
bsr rcx, rax
xor rcx, 0x3f
neg cl
mov edi, 1
shl rdi, cl
jmp 0x14004ae3b
mov ecx, 0x40
jmp 0x14004af48
inc qword [rdi + 0x2b0]
inc qword [rdi + 0x2a8]
mov rcx, rdi
mov rdx, r13
call fcn.14004e510
mov rbx, qword [rbp]
test rbx, rbx
jne 0x14004adba
jmp 0x14004acdc
mov eax, ebx
test ebx, ebx
jg 0x14004ad16
jmp 0x14004ad1e
inc qword [rsi + 0x2b8]
inc qword [rsi + 0x2a8]
lea rax, [r15 + r15*4]
lea rsi, [r14 + rax*8]
add rsi, 0x10
lea r15, [r14 + 8]
mov ebx, 1
xor ebp, ebp
mov r13, qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
mov rcx, r15
call r13
test al, al
jne 0x14004aff8
jmp 0x14004b09d
pause
dec eax
jne 0x14004afd3
add ebp, ebx
add ebx, ebx
cmp ebx, 0x40
mov eax, 0x40
cmovge ebx, eax
cmp ebp, 0x3e8
jl 0x14004afc4
mov rcx, r15
call sub.KERNEL32.dll_AcquireSRWLockExclusive
mov rax, qword [rsi]
mov rbx, qword [rax]
test rbx, rbx
je 0x14004b045
mov byte [rsp + 0x2e], 0
mov rcx, qword [rbx]
test rcx, rcx
je 0x14004b020
mov rdx, rcx
not rdx
cmp qword [rbx + 8], rdx
jne 0x14004b332
bswap rcx
mov qword [rax], rcx
inc word [rax + 0x18]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
jmp 0x14004af2c
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x14004acaf
lea rax, [rsp + 0x2e]
mov qword [rsp + 0x20], rax
mov rcx, rsi
mov rdx, r14
xor r8d, r8d
mov r9, rdi
call fcn.140038f30
mov rbx, rax
jmp 0x14004b02a
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x14004aec5
inc qword [rsi + 0x2b0]
inc qword [rsi + 0x2a8]
mov rcx, rsi
mov rdx, r15
call fcn.14004e510
mov rbx, qword [r13]
test rbx, rbx
jne 0x14004af04
jmp 0x14004afa6
mov eax, ebx
test ebx, ebx
jg 0x14004afd3
jmp 0x14004afdb
int3
mov cl, 1
xor eax, eax
lock cmpxchg byte [0x1400e4a60], cl
jne 0x14004b0b1
mov r14, qword [0x1400e4a58]
test r14, r14
jne 0x14004b12f
mov dword [0x1400e4a68], 0x1000000
lea r14, [0x1400e4a68]
mov byte [0x1400e4a6e], 1
mov byte [0x1400e5ea0], 0
mov qword [0x1400e5f78], 0
lea rcx, [0x1400e4a70]
mov r8d, 0x1408
xor edx, edx
call fcn.14005e0e0
lea rcx, [0x1400e5ea8]
mov r8d, 0xca
xor edx, edx
call fcn.14005e0e0
mov rcx, r14
mov edx, 0x1010100
call fcn.14001abf0
mov qword [0x1400e4a58], r14
mov byte [0x1400e4a60], 0
jmp 0x14004ac27
lea rax, [r13*4]
add rax, r13
lea rdi, [r14 + rax*8]
add rdi, 0x10
lea rsi, [r14 + 8]
mov ebx, 1
xor ebp, ebp
mov r12, qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
mov r13d, 0x40
mov rcx, rsi
call r12
test al, al
jne 0x14004ad37
jmp 0x14004b35e
pause
dec eax
jne 0x14004b179
add ebp, ebx
add ebx, ebx
cmp ebx, 0x40
cmovge ebx, r13d
cmp ebp, 0x3e8
jl 0x14004b166
jmp 0x14004ad2f
je 0x14004acdc
mov byte [r14 + 2], 0
mov rcx, r14
call fcn.14004e290
mov rdi, rax
mov byte [r14 + 2], 1
inc qword [rax + 0x298]
cmp r13w, 0x29
jae 0x14004b37c
mov rsi, r13
shl rsi, 4
mov r12, rdi
add r12, rsi
cmp qword [rdi + rsi], 0
je 0x14004b38f
inc qword [rdi + 0x2a0]
mov rbx, qword [r12]
mov rax, qword [rbx]
test rax, rax
je 0x14004b1ff
mov rcx, rax
not rcx
cmp qword [rbx + 8], rcx
jne 0x14004b332
bswap rax
dec byte [rdi + rsi + 8]
mov qword [r12], rax
jmp 0x14004addd
mov cl, 1
xor eax, eax
lock cmpxchg byte [0x1400e4a60], cl
jne 0x14004b211
mov r14, qword [0x1400e4a58]
test r14, r14
jne 0x14004b28f
mov dword [0x1400e4a68], 0x1000000
lea r14, [0x1400e4a68]
mov byte [0x1400e4a6e], 1
mov byte [0x1400e5ea0], 0
mov qword [0x1400e5f78], 0
lea rcx, [0x1400e4a70]
mov r8d, 0x1408
xor edx, edx
call fcn.14005e0e0
lea rcx, [0x1400e5ea8]
mov r8d, 0xca
xor edx, edx
call fcn.14005e0e0
mov rcx, r14
mov edx, 0x1010100
call fcn.14001abf0
mov qword [0x1400e4a58], r14
mov byte [0x1400e4a60], 0
jmp 0x14004ae1a
int3
mov rcx, r15
call fcn.1400b2710
lea rax, [r15 + r15*4]
lea r15, [r14 + rax*8]
add r15, 0x10
lea rsi, [r14 + 8]
mov ebx, 1
xor ebp, ebp
mov r13, qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
mov rcx, rsi
call r13
test al, al
jne 0x14004b2f8
jmp 0x14004b36d
pause
dec eax
jne 0x14004b2d3
add ebp, ebx
add ebx, ebx
cmp ebx, 0x40
mov eax, 0x40
cmovge ebx, eax
cmp ebp, 0x3e8
jl 0x14004b2c4
mov rcx, rsi
call sub.KERNEL32.dll_AcquireSRWLockExclusive
mov rax, qword [r15]
mov rbx, qword [rax]
test rbx, rbx
je 0x14004b3ba
mov byte [rsp + 0x2e], 0
mov rcx, qword [rbx]
test rcx, rcx
je 0x14004b320
mov rdx, rcx
not rdx
cmp qword [rbx + 8], rdx
jne 0x14004b332
bswap rcx
mov qword [rax], rcx
inc word [rax + 0x18]
mov rcx, rsi
jmp 0x14004b02d
call 0x140084730
je 0x14004afa6
mov byte [r14 + 2], 0
mov rcx, r14
call fcn.14004e290
mov rsi, rax
mov byte [r14 + 2], 1
inc qword [rax + 0x298]
jmp 0x14004aed6
mov eax, ebx
test ebx, ebx
jg 0x14004b179
jmp 0x14004b181
mov eax, ebx
test ebx, ebx
jg 0x14004b2d3
jmp 0x14004b2db
inc qword [rdi + 0x2b8]
inc qword [rdi + 0x2a8]
jmp 0x14004acdc
inc qword [rdi + 0x2b0]
inc qword [rdi + 0x2a8]
mov rcx, rdi
mov rdx, r13
call fcn.14004e510
mov rbx, qword [r12]
test rbx, rbx
jne 0x14004b1e7
jmp 0x14004acdc
lea rax, [rsp + 0x2e]
mov qword [rsp + 0x20], rax
mov rcx, r15
mov rdx, r14
xor r8d, r8d
mov r9, rdi
call fcn.140038f30
mov rbx, rax
jmp 0x14004b32a