Function at 0x1400760e0
Capabilities:
Get thread local storage value
Set 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 qword [rsp + 0x50], r9
mov qword [rsp + 0x48], r8
mov byte [rsp + 0x27], dl
mov rsi, rcx
mov rax, qword [rcx]
lea r15, [rsp + 0x2a]
lea r14, [0x140189070]
xor ebp, ebp
lea r12, [0x1401ae469]
mov r13, rax
test rax, rax
jne 0x140076156
jmp 0x14007613b
cmp byte [rsp + 0x27], 0
je 0x1400766e7
mov rax, r13
mov ecx, 2
lock cmpxchg qword [rsi], rcx
je 0x1400765c4
mov r13, rax
test rax, rax
je 0x14007613b
cmp r13, 1
je 0x140076130
cmp r13, 3
je 0x1400766d6
mov eax, r13d
and eax, 3
cmp eax, 2
je 0x14007618f
jmp 0x1400766e7
mov eax, r13d
and eax, 3
cmp eax, 2
jne 0x1400765b0
mov ecx, dword [0x140189088]
test ecx, ecx
je 0x1400761b9
dec ecx
call sub.kernel32.dll_TlsGetValue
cmp rax, 2
jb 0x1400761d0
mov rdi, rax
cmp qword [rax + 8], 0
je 0x1400761d0
add rdi, 0x10
jmp 0x1400762b0
mov rcx, r14
call fcn.14006ae00
mov ecx, eax
call sub.kernel32.dll_TlsGetValue
cmp rax, 2
jae 0x1400761a6
nop
mov ecx, dword [0x140189088]
test ecx, ecx
je 0x140076253
dec ecx
call sub.kernel32.dll_TlsGetValue
test rax, rax
jne 0x140076270
movzx eax, byte [0x140228121]
mov rax, qword [0x140228110]
test rax, rax
jne 0x140076212
call sub.kernel32.dll_GetProcessHeap
test rax, rax
je 0x1400766e7
mov qword [0x140228110], rax
mov r8d, 0x18
mov rcx, rax
xor edx, edx
call sub.kernel32.dll_HeapAlloc
test rax, rax
je 0x1400766e7
mov rbx, rax
mov qword [rax], r14
mov qword [rax + 8], 0
mov ecx, dword [0x140189088]
test ecx, ecx
je 0x14007632d
dec ecx
mov rdx, rbx
call sub.kernel32.dll_TlsSetValue
jmp 0x14007627d
mov rcx, r14
call fcn.14006ae00
mov ecx, eax
call sub.kernel32.dll_TlsGetValue
test rax, rax
je 0x1400761ea
nop word [rax + rax]
mov rbx, rax
cmp rax, 1
je 0x1400766e7
lea rdi, [rbx + 0x10]
mov rcx, qword [rbx + 0x10]
cmp qword [rbx + 8], 0
mov qword [rbx + 8], 1
mov qword [rbx + 0x10], 0
je 0x1400762b0
test rcx, rcx
je 0x1400762b0
lock dec qword [rcx]
jne 0x1400762b0
call fcn.140066d40
nop dword [rax]
mov rax, qword [rdi]
test rax, rax
je 0x140076310
lock inc qword [rax]
jle 0x1400766e7
mov rcx, r13
add rcx, 0xfffffffffffffffe
mov qword [rsp + 0x28], rax
mov byte [rsp + 0x38], 0
mov qword [rsp + 0x30], rcx
mov rax, r13
lock cmpxchg qword [rsi], r15
je 0x140076580
mov r13, rax
mov rax, qword [rsp + 0x28]
test rax, rax
je 0x140076180
lock dec qword [rax]
jne 0x140076180
mov rcx, qword [rsp + 0x28]
call fcn.140066d40
jmp 0x140076180
call fcn.14006d510
cmp qword [rdi], 0
jne 0x1400766e7
mov qword [rdi], rax
lock inc qword [rax]
jg 0x1400762c2
jmp 0x1400766e7
mov rcx, r14
call fcn.14006ae00
mov ecx, eax
jmp 0x140076249
mov ecx, dword [0x140189088]
test ecx, ecx
je 0x14007636a
dec ecx
call sub.kernel32.dll_TlsGetValue
cmp rax, 2
jb 0x140076380
mov rdi, rax
cmp qword [rax + 8], 0
je 0x140076380
add rdi, 0x10
jmp 0x140076460
mov rcx, r14
call fcn.14006ae00
mov ecx, eax
call sub.kernel32.dll_TlsGetValue
cmp rax, 2
jae 0x140076357
nop
mov ecx, dword [0x140189088]
test ecx, ecx
je 0x140076403
dec ecx
call sub.kernel32.dll_TlsGetValue
test rax, rax
jne 0x140076420
movzx eax, byte [0x140228121]
mov rax, qword [0x140228110]
test rax, rax
jne 0x1400763c2
call sub.kernel32.dll_GetProcessHeap
test rax, rax
je 0x1400766e7
mov qword [0x140228110], rax
mov r8d, 0x18
mov rcx, rax
xor edx, edx
call sub.kernel32.dll_HeapAlloc
test rax, rax
je 0x1400766e7
mov rbx, rax
mov qword [rax], r14
mov qword [rax + 8], 0
mov ecx, dword [0x140189088]
test ecx, ecx
je 0x140076565
dec ecx
mov rdx, rbx
call sub.kernel32.dll_TlsSetValue
jmp 0x14007642d
mov rcx, r14
call fcn.14006ae00
mov ecx, eax
call sub.kernel32.dll_TlsGetValue
test rax, rax
je 0x14007639a
nop word [rax + rax]
mov rbx, rax
cmp rax, 1
je 0x1400766e7
lea rdi, [rbx + 0x10]
mov rcx, qword [rbx + 0x10]
cmp qword [rbx + 8], 0
mov qword [rbx + 8], 1
mov qword [rbx + 0x10], 0
je 0x140076460
test rcx, rcx
je 0x140076460
lock dec qword [rcx]
jne 0x140076460
call fcn.140066d40
nop dword [rax]
mov r13, qword [rdi]
test r13, r13
je 0x140076540
lock inc qword [r13]
jle 0x1400766e7
lock dec byte [r13 + 0x28]
je 0x1400764ad
lea rdi, [r13 + 0x28]
mov rbx, qword [0x140228100]
test rbx, rbx
je 0x1400764c5
nop
mov r8d, 1
mov rcx, rdi
mov rdx, r12
mov r9d, 0xffffffff
call rbx
mov al, 1
lock cmpxchg byte [rdi], bpl
jne 0x140076490
lock dec qword [r13]
jne 0x140076580
mov rcx, r13
call fcn.140066d40
jmp 0x140076580
mov rcx, qword [0x140189098]
cmp rcx, 0xffffffffffffffff
jne 0x14007651e
mov qword [rsp + 0x40], 0xffffffffffffffff
mov rax, qword [0x1401890a8]
lea rcx, [rsp + 0x40]
mov edx, 0xc0000000
xor r8d, r8d
xor r9d, r9d
call rax
test eax, eax
jne 0x1400766e7
mov rcx, qword [rsp + 0x40]
mov rax, 0xffffffffffffffff
lock cmpxchg qword [0x140189098], rcx
je 0x14007651e
mov rbx, rax
call sub.kernel32.dll_CloseHandle
mov rcx, rbx
mov rax, qword [0x1401890a0]
mov rdx, rdi
xor r8d, r8d
xor r9d, r9d
call rax
xor eax, eax
xchg byte [rdi], al
lock dec qword [r13]
jne 0x140076580
jmp 0x1400764b8
call fcn.14006d510
cmp qword [rdi], 0
jne 0x1400766e7
mov r13, rax
mov qword [rdi], rax
lock inc qword [r13]
jg 0x140076477
jmp 0x1400766e7
mov rcx, r14
call fcn.14006ae00
mov ecx, eax
jmp 0x1400763f9
movzx eax, byte [rsp + 0x38]
test al, al
je 0x140076340
mov rax, qword [rsp + 0x28]
test rax, rax
je 0x1400765b0
lock dec qword [rax]
jne 0x1400765b0
mov rcx, qword [rsp + 0x28]
call fcn.140066d40
nop word [rax + rax]
mov rax, qword [rsi]
mov r13, rax
test rax, rax
jne 0x140076156
jmp 0x14007613b
cmp r13, 1
mov qword [rsp + 0x28], 3
sete byte [rsp + 0x30]
lea rdx, [rsp + 0x28]
mov rcx, qword [rsp + 0x48]
mov rax, qword [rsp + 0x50]
call qword [rax + 0x20]
mov rax, qword [rsp + 0x28]
xchg qword [rsi], rax
mov ecx, eax
and ecx, 3
cmp ecx, 2
jne 0x1400766e7
add rax, 0xfffffffffffffffe
je 0x1400766d6
lea rsi, [rsp + 0x28]
jmp 0x14007661c
mov rax, r15
test r15, r15
je 0x1400766d6
mov rdi, qword [rax]
mov r15, qword [rax + 8]
mov qword [rax], 0
test rdi, rdi
je 0x1400766e7
mov byte [rax + 0x10], 1
mov al, 1
xchg byte [rdi + 0x28], al
cmp al, 0xff
jne 0x140076655
lea rbx, [rdi + 0x28]
mov rax, qword [0x140228108]
test rax, rax
je 0x140076665
mov rcx, rbx
call rax
lock dec qword [rdi]
jne 0x140076610
mov rcx, rdi
call fcn.140066d40
jmp 0x140076610
mov rcx, qword [0x140189098]
cmp rcx, 0xffffffffffffffff
jne 0x1400766b8
mov qword [rsp + 0x28], 0xffffffffffffffff
mov rax, qword [0x1401890a8]
mov rcx, rsi
mov edx, 0xc0000000
xor r8d, r8d
xor r9d, r9d
call rax
test eax, eax
jne 0x1400766e7
mov rcx, qword [rsp + 0x28]
mov rax, 0xffffffffffffffff
lock cmpxchg qword [0x140189098], rcx
je 0x1400766b8
mov r14, rax
call sub.kernel32.dll_CloseHandle
mov rcx, r14
mov rax, qword [str._M_a_]
mov rdx, rbx
xor r8d, r8d
xor r9d, r9d
call rax
lock dec qword [rdi]
jne 0x140076610
jmp 0x14007665b
add rsp, 0x58
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
ud2