Function at 0x140018008
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov dword [rax + 0x20], r9d
mov qword [rax + 0x18], r8
mov qword [rax + 0x10], rdx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x40
mov r13, rcx
mov r14, rdx
mov ecx, dword [0x14003d17c]
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_TlsGetValue]
or ebx, 0xffffffff
mov rsi, rax
test rax, rax
jne 0x140018063
mov ebx, dword [0x14003d17c]
lea rdx, [rsp + 0x38]
and dword [rsp + 0x38], eax
lea rsi, [rsp + 0x38]
mov ecx, ebx
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_TlsSetValue]
inc dword [rsi]
mov r10, qword [0x14003d048]
lea r9, [0x14003d048]
lea r11, [0x140035650]
mov r15d, 0x1df
cmp r10, r9
je 0x1400180d8
test byte [r10 + 0x1c], 1
je 0x1400180d8
mov eax, dword [rsi]
lea ecx, [rax + rax*4]
cmp ecx, 0x1e1
ja 0x1400180a3
mov eax, ecx
mov ecx, r15d
sub rcx, rax
jmp 0x1400180a5
xor ecx, ecx
lea r9, [rcx + r11]
mov qword [rsp + 0x20], r13
mov rcx, qword [r10 + 0x10]
lea r8, [0x1400367b8]
mov edx, 0x42
call fcn.140001370
mov r10, qword [0x14003d048]
lea r9, [0x14003d048]
lea r11, [0x140035650]
xor dl, dl
mov byte [rsp + 0x30], 0
mov rax, r14
mov byte [rsp + 0x31], dl
neg rax
sbb ebp, ebp
not ebp
and ebp, 0x80070057
mov edi, ebp
test r14, r14
je 0x1400183c8
xor r12d, r12d
cmp dword [rsp + 0x98], r12d
jbe 0x1400183c8
mov r8, qword [rsp + 0x90]
lea rdi, [r8 + 0x20]
cmp dword [rdi - 0x10], 4
jne 0x1400181dc
lea rcx, [r12 + r12*2]
add rcx, rcx
mov rax, qword [r8 + rcx*8]
cmp rax, qword [0x140036638]
jne 0x1400181dc
mov rax, qword [r8 + rcx*8 + 8]
cmp rax, qword [0x140036640]
jne 0x1400181dc
cmp dword [rdi], 0xd
jne 0x1400181dc
cmp dword [rdi + 4], 0x10
jne 0x1400181dc
mov r14, qword [rdi + 8]
test r14, r14
je 0x1400181dc
cmp r10, r9
je 0x1400181b0
test byte [r10 + 0x1c], 4
je 0x1400181b0
mov eax, dword [rsi]
inc eax
lea ecx, [rax + rax*4]
cmp ecx, 0x1e1
ja 0x14001818c
mov eax, ecx
mov rcx, r15
sub rcx, rax
jmp 0x14001818e
xor ecx, ecx
lea r9, [rcx + r11]
mov qword [rsp + 0x20], r14
mov rcx, qword [r10 + 0x10]
mov edx, 0x43
call fcn.140014cb8
mov r10, qword [0x14003d048]
mov dl, byte [rsp + 0x31]
mov rax, qword [r14]
cmp rax, qword [0x1400366d8]
jne 0x140018278
mov rax, qword [r14 + 8]
cmp rax, qword [0x1400366e0]
jne 0x140018278
mov al, 1
mov byte [rsp + 0x30], al
jmp 0x14001827c
cmp dword [rdi - 0x10], 3
jne 0x140018278
lea rcx, [r12 + r12*2]
add rcx, rcx
mov rax, qword [r8 + rcx*8]
cmp rax, qword [0x140036700]
jne 0x140018278
mov rax, qword [r8 + rcx*8 + 8]
cmp rax, qword [0x140036708]
jne 0x140018278
cmp dword [rdi], 0x11
jne 0x140018278
cmp dword [rdi + 4], 0
jbe 0x140018278
mov rax, qword [rdi + 8]
test rax, rax
je 0x140018278
cmp byte [rax], 0xff
sete dl
mov byte [rsp + 0x31], dl
cmp r10, r9
je 0x140018278
test byte [r10 + 0x1c], 4
je 0x140018278
mov eax, dword [rsi]
inc eax
lea ecx, [rax + rax*4]
cmp ecx, 0x1e1
ja 0x14001824b
mov eax, ecx
mov rcx, r15
sub rcx, rax
jmp 0x14001824d
xor ecx, ecx
movzx eax, dl
lea r9, [rcx + r11]
mov rcx, qword [r10 + 0x10]
lea r8, [0x1400367b8]
mov edx, 0x44
mov dword [rsp + 0x20], eax
call fcn.140001304
mov r10, qword [0x14003d048]
mov dl, byte [rsp + 0x31]
mov al, byte [rsp + 0x30]
test al, al
je 0x140018284
test dl, dl
jne 0x1400182b4
inc r12d
add rdi, 0x30
cmp r12d, dword [rsp + 0x98]
jae 0x1400183c6
mov r8, qword [rsp + 0x90]
lea r9, [0x14003d048]
lea r11, [0x140035650]
jmp 0x14001811b
mov rcx, qword [rsp + 0x88]
lea rdx, [r13 + 0xc8]
call qword [sym.imp.api_ms_win_shcore_obsolete_l1_1_0.dll_SHStrDupW]
mov edi, eax
test eax, eax
jns 0x140018345
mov r10, qword [0x14003d048]
lea rbp, [0x14003d048]
cmp r10, rbp
je 0x14001841b
test byte [r10 + 0x1c], 0x10
je 0x1400183cf
mov ecx, dword [rsi]
inc ecx
lea eax, [rcx + rcx*4]
cmp eax, 0x1e1
ja 0x140018307
mov rcx, r15
sub rcx, rax
jmp 0x140018309
xor ecx, ecx
mov edx, 0x45
mov rax, qword [r13 + 0x88]
lea r14, [0x140035650]
lea r9, [rcx + r14]
mov dword [rsp + 0x28], edi
mov rcx, qword [r10 + 0x10]
lea r8, [0x1400367b8]
mov qword [rsp + 0x20], rax
call fcn.14000d534
mov r10, qword [0x14003d048]
jmp 0x1400183d6
mov rcx, qword [r13 + 0xf8]
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_SetEvent]
test eax, eax
je 0x140018361
xor edi, edi
mov r10, qword [0x14003d048]
jmp 0x1400183c8
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
movzx edi, ax
or edi, 0x80070000
test eax, eax
cmovle edi, eax
mov eax, 0x80004005
test edi, edi
cmovns edi, eax
test edi, edi
jns 0x140018358
mov r10, qword [0x14003d048]
lea rbp, [0x14003d048]
cmp r10, rbp
je 0x14001841b
test byte [r10 + 0x1c], 0x10
je 0x1400183cf
mov eax, dword [rsi]
inc eax
lea ecx, [rax + rax*4]
cmp ecx, 0x1e1
ja 0x1400183ba
mov eax, ecx
mov rcx, r15
sub rcx, rax
jmp 0x1400183bc
xor ecx, ecx
mov edx, 0x46
jmp 0x14001830e
mov edi, ebp
lea rbp, [0x14003d048]
lea r14, [0x140035650]
cmp r10, rbp
je 0x14001841b
test byte [r10 + 0x1c], 1
je 0x14001841b
mov eax, dword [rsi]
lea ecx, [rax + rax*4]
cmp ecx, 0x1e1
ja 0x1400183f6
mov eax, ecx
sub r15, rax
jmp 0x1400183f9
xor r15d, r15d
mov rcx, qword [r10 + 0x10]
lea r9, [r15 + r14]
mov edx, 0x47
mov dword [rsp + 0x28], edi
lea r8, [0x1400367b8]
mov qword [rsp + 0x20], r13
call fcn.140001730
or eax, 0xffffffff
add dword [rsi], eax
cmp ebx, eax
je 0x14001843b
mov ecx, ebx
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_TlsGetValue]
test rax, rax
je 0x14001843b
xor edx, edx
mov ecx, ebx
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_TlsSetValue]
mov eax, edi
mov rbx, qword [rsp + 0x80]
add rsp, 0x40
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret