Function at 0x1400337c0
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 [0x1400f4028]
xor rax, rsp
mov qword [rsp + 0x50], rax
cmp rcx, 0x10
ja 0x140033a34
lea rax, [rbx - 1]
test rbx, rax
sete al
test rbx, rbx
setne cl
test cl, al
je 0x140033d6f
mov r15, qword [0x1400fa5d0]
test r15, r15
je 0x140033d72
movabs rax, 0xaaaaaaaaaaaaaaaa
mov edx, 0x40
mov ecx, 0x40
test r12, r12
je 0x140033838
bsr rcx, r12
xor rcx, 0x3f
sub rdx, rcx
lea rcx, [0x1400e0740]
mov cl, byte [rdx + rcx]
mov rbp, r12
shr rbp, cl
and ebp, 7
lea rcx, [0x1400e0790]
mov rcx, qword [rcx + rdx*8]
and rcx, r12
lea rdx, [rdx*8]
add rdx, rbp
cmp rcx, 1
sbb rdx, 0xffffffffffffffff
lea rcx, [0x1400dff20]
movzx r14d, word [rcx + rdx*2 + 0x400]
mov byte [rsp + 0x4f], 0
mov qword [rsp + 0x40], rax
cmp byte [r15], 2
je 0x140033d7f
cmp byte [r15 + 2], 0
je 0x140033d97
mov ebx, dword [0x1400fde78]
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 0x140033c56
cmp rbx, 2
jb 0x140033dd8
inc qword [rbx + 0x5a0]
cmp word [0x1400f7260], r14w
jb 0x140033965
mov rsi, r14
shl rsi, 4
mov rbp, rbx
add rbp, rsi
mov rdi, qword [rbx + rsi]
test rdi, rdi
je 0x140033c24
inc qword [rbx + 0x5a8]
mov rax, qword [rdi]
test rax, rax
je 0x140033bfe
mov rcx, rax
not rcx
cmp qword [rdi + 8], rcx
jne 0x140033e50
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 0x140033973
mov rcx, qword [rsp + 0x50]
xor rcx, rsp
call fcn.140069700
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 0x1400339c4
jmp 0x140033c6a
pause
dec eax
jne 0x14003399f
add ebx, edi
add edi, edi
cmp edi, 0x40
mov eax, 0x40
cmovge edi, eax
cmp ebx, 0x3e8
jl 0x140033991
mov rcx, r14
call sub.KERNEL32.dll_AcquireSRWLockExclusive
mov rax, qword [rsi]
mov rdi, qword [rax]
test rdi, rdi
je 0x140033a0b
mov byte [rsp + 0x4f], 0
mov rcx, qword [rdi]
test rcx, rcx
je 0x140033bf7
mov rdx, rcx
not rdx
cmp qword [rdi + 8], rdx
jne 0x140033e50
bswap rcx
prefetcht0 byte [rcx]
mov qword [rax], rcx
inc word [rax + 0x18]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
jmp 0x140033944
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
int3
mov r14, qword [0x1400fa5d0]
test r14, r14
je 0x140033e55
lea rsi, [rbx - 1]
test rbx, rsi
sete al
test rbx, rbx
setne cl
test cl, al
je 0x140033e62
cmp rbx, 0x100001
jae 0x140033e65
cmp rbx, 0x4001
jb 0x140033a7f
cmp r12, 0xf0001
jae 0x140033ea4
cmp rbx, 0x4000
ja 0x140033d58
cmp r12, rbx
jae 0x140033c05
mov r15, rbx
mov ebx, 0x4000
cmp r15, r12
jb 0x140033e98
movabs rax, 0xaaaaaaaaaaaaaaaa
mov edx, 0x40
mov ecx, 0x40
test r15, r15
je 0x140033ac7
bsr rcx, r15
xor rcx, 0x3f
sub rdx, rcx
lea rcx, [0x1400e0740]
mov cl, byte [rdx + rcx]
mov rbp, r15
shr rbp, cl
and ebp, 7
lea rcx, [0x1400e0790]
mov rcx, qword [rcx + rdx*8]
and rcx, r15
lea rdx, [rdx*8]
add rdx, rbp
cmp rcx, 1
sbb rdx, 0xffffffffffffffff
lea rcx, [0x1400dff20]
movzx r13d, word [rcx + rdx*2 + 0x400]
mov byte [rsp + 0x4f], 0
mov qword [rsp + 0x40], rax
cmp byte [r14], 2
je 0x140033e68
mov qword [rsp + 0x38], rsi
cmp byte [r14 + 2], 0
je 0x140033df0
cmp rbx, 0x4000
ja 0x140033df0
mov esi, dword [0x1400fde78]
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 0x140033d38
cmp rsi, 2
jb 0x140033e80
inc qword [rsi + 0x5a0]
cmp word [0x1400f7260], r13w
jb 0x140033d45
mov rbp, r13
shl rbp, 4
mov r12, rsi
add r12, rbp
mov rdi, qword [rsi + rbp]
test rdi, rdi
je 0x140033c79
inc qword [rsi + 0x5a8]
mov rax, qword [rdi]
test rax, rax
je 0x140033c63
mov rcx, rax
not rcx
cmp qword [rdi + 8], rcx
jne 0x140033e50
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 0x140033c9f
test qword [rsp + 0x38], rdi
je 0x140033944
int3
xor ecx, ecx
jmp 0x1400339f6
xor eax, eax
jmp 0x140033921
mov rax, r12
dec rax
je 0x140033c4f
bsr rcx, rax
xor rcx, 0x3f
neg cl
mov ebx, 1
shl rbx, cl
jmp 0x140033a95
inc qword [rbx + 0x5b8]
inc qword [rbx + 0x5b0]
mov rcx, rbx
mov rdx, r14
int3
mov ecx, 0x40
jmp 0x140033c15
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x1400338bf
xor eax, eax
jmp 0x140033bc2
mov eax, edi
test edi, edi
jg 0x14003399f
jmp 0x1400339a7
inc qword [rsi + 0x5b8]
inc qword [rsi + 0x5b0]
mov rcx, rsi
mov rdx, r13
int3
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 0x140033cf8
jmp 0x140033d60
pause
dec eax
jne 0x140033cd3
add ebp, edi
add edi, edi
cmp edi, 0x40
mov eax, 0x40
cmovge edi, eax
cmp ebp, 0x3e8
jl 0x140033cc4
mov rcx, r12
call sub.KERNEL32.dll_AcquireSRWLockExclusive
mov rax, qword [rsi]
mov rdi, qword [rax]
test rdi, rdi
jne 0x140033e25
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
int3
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
jmp 0x140033be9
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x140033b60
inc qword [rsi + 0x5c0]
inc qword [rsi + 0x5b0]
jmp 0x140033c9f
mov r15, r12
jmp 0x140033aa6
mov eax, edi
test edi, edi
jg 0x140033cd3
jmp 0x140033cdb
int3
int3
mov al, byte [0x1400f7258]
cmp al, 2
jne 0x140033893
int3
lea rsi, [r14 + r14*4]
lea r14, [r15 + 8]
mov rcx, r14
int3
lea r8, [rsp + 0x40]
mov rcx, r15
mov edx, r14d
int3
lea r12, [r14 + 8]
mov rcx, r12
int3
mov byte [rsp + 0x4f], 0
mov rcx, qword [rdi]
test rcx, rcx
je 0x140033ea0
mov rdx, rcx
not rdx
cmp qword [rdi + 8], rdx
jne 0x140033e50
bswap rcx
prefetcht0 byte [rcx]
mov qword [rax], rcx
inc word [rax + 0x18]
jmp 0x140033d2a
call fcn.140094b70
int3
int3
int3
mov al, byte [0x1400f7258]
cmp al, 2
jne 0x140033b22
int3
lea r8, [rsp + 0x40]
mov rcx, r14
mov edx, r13d
int3
mov rcx, r12
int3
xor ecx, ecx
jmp 0x140033e44
int3