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

Disassembly:
mov rax, rsp
sub rsp, 0x1e8
mov qword [rax - 0x18], r14
mov r14, qword [rcx]
test r14, r14
je 0x180002922
mov qword [rax + 0x20], rdi
mov qword [rax - 8], r12
mov qword [rax - 0x10], r13
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
xor r12d, r12d
mov qword [rax + 0x18], rsi
mov qword [rax - 0x20], r15
mov edi, r12d
nop
lea rcx, [r14 + 0x48]
add edi, 1
mov r15d, r12d
mov dword [rsp + 0x20], edi
call fcn.180001910
mov rbx, qword [r14 + 0x48]
cmp rbx, 0xfffffffffffffffd
mov r11, qword [r14 + 0x178]
mov qword [r14 + 0x180], r11
jae 0x180002115
cmp dword [rbx + 8], 0
jne 0x180002096
mov eax, r12d
xchg dword [rbx], eax
test eax, eax
je 0x180002115
test eax, eax
jns 0x180002115
mov rcx, qword [rbx + 0x20]
call qword [sym.imp.KERNEL32.dll_SetEvent]
jmp 0x180002115
lea rcx, [rsp + 0x130]
call fcn.180001710
lea rdx, [rsp + 0xb0]
mov rcx, qword [rax]
mov rax, qword [rax + 8]
mov qword [rdx], rcx
mov qword [rdx + 8], rax
mov rax, qword [rbx + 0x10]
lea rcx, [rsp + 0xc0]
mov qword [rcx], rax
mov rax, qword [rbx + 0x18]
mov qword [rcx + 8], rax
mov rax, qword [rsp + 0xb0]
cmp qword [rsp + 0xc0], rax
jne 0x180002115
mov eax, dword [rsp + 0xb8]
cmp dword [rsp + 0xc8], eax
jne 0x180002115
cmp dword [rbx + 8], 1
jne 0x1800020fe
add dword [rbx + 4], 0xffffffff
jne 0x180002115
mov eax, r12d
mov qword [rbx + 0x10], r12
xchg dword [rbx], eax
test eax, eax
jns 0x180002115
mov rcx, qword [rbx + 0x20]
call qword [sym.imp.KERNEL32.dll_SetEvent]
lea rcx, [r14 + 0x48]
call fcn.180001910
mov rsi, qword [r14 + 0x180]
test rsi, rsi
je 0x180002836
nop
mov rbp, qword [rsi + 8]
mov ebx, r12d
cmp qword [rbp + 0x10], 0xfffffffffffffffd
jb 0x180002303
lea rcx, [0x1804d8500]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov r11, qword [rbp + 0x10]
cmp r11, 0xffffffffffffffff
jne 0x1800021b8
lea edx, [r11 + 0x29]
lea ecx, [rdx - 0x27]
call fcn.18028c898
test rax, rax
mov rdi, rax
jne 0x180002179
lea ebx, [rax + 0xc]
mov qword [rbp + 0x10], rax
jmp 0x1800022e8
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
mov dword [rax], r12d
mov dword [rax + 4], r12d
mov dword [rax + 8], r12d
mov qword [rax + 0x10], r12
call qword [sym.imp.KERNEL32.dll_CreateEventA]
test rax, rax
mov qword [rdi + 0x20], rax
jne 0x1800021af
mov rcx, rdi
lea ebx, [rax + 0x1c]
call fcn.180281a3c
mov rdi, r12
mov qword [rbp + 0x10], rdi
jmp 0x1800022e8
cmp r11, 0xfffffffffffffffe
jne 0x18000224f
mov rax, qword [0x1803c3de0]
test rax, rax
je 0x1800021dc
cmp dword [rax], 1
jne 0x1800021dc
lea ebx, [r11 + 0x2a]
jmp 0x1800022e8
mov edx, 0x28
lea ecx, [rdx - 0x27]
call fcn.18028c898
test rax, rax
mov rdi, rax
jne 0x1800021fd
lea ebx, [rax + 0xc]
mov qword [rbp + 0x10], rax
jmp 0x1800022e8
mov dword [rax], r12d
mov dword [rax + 4], r12d
mov rax, qword [0x1803c3de0]
test rax, rax
je 0x180002215
mov ecx, dword [rax + 4]
jmp 0x180002218
mov ecx, r12d
mov dword [rdi + 8], ecx
xor r9d, r9d
xor r8d, r8d
xor ecx, ecx
xor edx, edx
mov qword [rdi + 0x10], r12
call qword [sym.imp.KERNEL32.dll_CreateEventA]
test rax, rax
mov qword [rdi + 0x20], rax
jne 0x180002246
mov rcx, rdi
lea ebx, [rax + 0x1c]
call fcn.180281a3c
mov rdi, r12
mov qword [rbp + 0x10], rdi
jmp 0x1800022e8
cmp r11, 0xfffffffffffffffd
jne 0x1800022dd
mov rax, qword [0x1803c3de8]
test rax, rax
je 0x180002270
cmp dword [rax], 1
jne 0x180002270
lea ebx, [r11 + 0x2b]
jmp 0x1800022e8
mov edx, 0x28
lea ecx, [rdx - 0x27]
call fcn.18028c898
test rax, rax
mov rdi, rax
jne 0x18000228e
lea ebx, [rax + 0xc]
mov qword [rbp + 0x10], rax
jmp 0x1800022e8
mov dword [rax], r12d
mov dword [rax + 4], r12d
mov rax, qword [0x1803c3de8]
test rax, rax
je 0x1800022a6
mov ecx, dword [rax + 4]
jmp 0x1800022a9
mov ecx, r12d
mov dword [rdi + 8], ecx
xor r9d, r9d
xor r8d, r8d
xor ecx, ecx
xor edx, edx
mov qword [rdi + 0x10], r12
call qword [sym.imp.KERNEL32.dll_CreateEventA]
test rax, rax
mov qword [rdi + 0x20], rax
jne 0x1800022d7
mov rcx, rdi
lea ebx, [rax + 0x1c]
call fcn.180281a3c
mov rdi, r12
mov qword [rbp + 0x10], rdi
jmp 0x1800022e8
test r11, r11
mov eax, reloc.WS2_32.dll_shutdown
cmove ebx, eax
lea rcx, [0x1804d8500]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test ebx, ebx
je 0x180002303
mov ebp, 1
jmp 0x1800023a1
mov rdi, qword [rbp + 0x10]
xor eax, eax
mov ebp, 1
lock cmpxchg dword [rdi], ebp
jne 0x18000233f
cmp dword [rdi + 8], 0
je 0x1800023a1
lea rcx, [rsp + 0x180]
mov dword [rdi + 4], ebp
call fcn.180001710
mov rcx, qword [rax]
mov qword [rdi + 0x10], rcx
mov rax, qword [rax + 8]
mov qword [rdi + 0x18], rax
jmp 0x1800023a1
cmp dword [rdi + 8], ebp
jne 0x18000239c
lea rcx, [rsp + 0x160]
call fcn.180001710
lea rdx, [rsp + 0x60]
mov rcx, qword [rax]
mov rax, qword [rax + 8]
mov qword [rdx], rcx
mov qword [rdx + 8], rax
mov rax, qword [rdi + 0x10]
lea rcx, [rsp + 0xe0]
mov qword [rcx], rax
mov rax, qword [rdi + 0x18]
mov qword [rcx + 8], rax
mov rax, qword [rsp + 0x60]
cmp qword [rsp + 0xe0], rax
jne 0x18000239c
mov eax, dword [rsp + 0x68]
cmp dword [rsp + 0xe8], eax
jne 0x18000239c
add dword [rdi + 4], ebp
jmp 0x1800023a1
mov ebx, reloc.WS2_32.dll_recv
cmp ebx, 0x10
jne 0x180002476
mov rbx, qword [r14 + 0x48]
cmp rbx, 0xfffffffffffffffd
jae 0x180002469
cmp dword [rbx + 8], 0
jne 0x1800023ea
mov eax, r12d
xchg dword [rbx], eax
test eax, eax
je 0x180002469
test eax, eax
jns 0x180002469
mov rcx, qword [rbx + 0x20]
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov ecx, ebp
call qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x180002819
lea rcx, [rsp + 0x1a0]
call fcn.180001710
lea rdx, [rsp + 0x80]
mov rcx, qword [rax]
mov rax, qword [rax + 8]
mov qword [rdx], rcx
mov qword [rdx + 8], rax
mov rax, qword [rbx + 0x10]
lea rcx, [rsp + 0x100]
mov qword [rcx], rax
mov rax, qword [rbx + 0x18]
mov qword [rcx + 8], rax
mov rax, qword [rsp + 0x80]
cmp qword [rsp + 0x100], rax
jne 0x180002469
mov eax, dword [rsp + 0x88]
cmp dword [rsp + 0x108], eax
jne 0x180002469
cmp dword [rbx + 8], 1
jne 0x180002452
add dword [rbx + 4], 0xffffffff
jne 0x180002469
mov eax, r12d
mov qword [rbx + 0x10], r12
xchg dword [rbx], eax
test eax, eax
jns 0x180002469
mov rcx, qword [rbx + 0x20]
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov ecx, ebp
call qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x180002819
mov rax, qword [rsi + 0x10]
mov qword [r14 + 0x180], rax
mov rbp, qword [rsi + 8]
mov ecx, dword [rbp]
mov r12, qword [rbp + 8]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, dword [rbp]
xor edx, edx
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test rdi, rdi
je 0x180002647
mov ecx, dword [rsp + 0x20]
cmp ecx, 4
jg 0x180002647
mov rbx, qword [r14 + 0x48]
cmp rbx, 0xfffffffffffffffd
jae 0x18000256f
cmp dword [rbx + 8], 0
jne 0x1800024ed
xor eax, eax
xchg dword [rbx], eax
test eax, eax
je 0x18000256f
test eax, eax
jns 0x18000256f
mov rcx, qword [rbx + 0x20]
call qword [sym.imp.KERNEL32.dll_SetEvent]
jmp 0x18000256f
lea rcx, [rsp + 0x140]
call fcn.180001710
lea rdx, [rsp + 0xa0]
mov rcx, qword [rax]
mov rax, qword [rax + 8]
mov qword [rdx], rcx
mov qword [rdx + 8], rax
mov rax, qword [rbx + 0x10]
lea rcx, [rsp + 0x120]
mov qword [rcx], rax
mov rax, qword [rbx + 0x18]
mov qword [rcx + 8], rax
mov rax, qword [rsp + 0xa0]
cmp qword [rsp + 0x120], rax
jne 0x18000256f
mov eax, dword [rsp + 0xa8]
cmp dword [rsp + 0x128], eax
jne 0x18000256f
cmp dword [rbx + 8], 1
jne 0x180002555
add dword [rbx + 4], 0xffffffff
jne 0x18000256f
xor eax, eax
mov qword [rbx + 0x10], 0
xchg dword [rbx], eax
test eax, eax
jns 0x18000256f
mov rcx, qword [rbx + 0x20]
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov rbx, qword [rbp + 0x10]
cmp rbx, 0xfffffffffffffffd
jae 0x180002635
cmp dword [rbx + 8], 0
jne 0x1800025b3
xor eax, eax
xchg dword [rbx], eax
test eax, eax
je 0x180002635
test eax, eax
jns 0x180002635
mov rcx, qword [rbx + 0x20]
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov rcx, rdi
add r15d, 1
call r12
xor r12d, r12d
jmp 0x180002819
lea rcx, [rsp + 0x150]
call fcn.180001710
lea rdx, [rsp + 0xf0]
mov rcx, qword [rax]
mov rax, qword [rax + 8]
mov qword [rdx], rcx
mov qword [rdx + 8], rax
mov rax, qword [rbx + 0x10]
lea rcx, [rsp + 0xd0]
mov qword [rcx], rax
mov rax, qword [rbx + 0x18]
mov qword [rcx + 8], rax
mov rax, qword [rsp + 0xf0]
cmp qword [rsp + 0xd0], rax
jne 0x180002635
mov eax, dword [rsp + 0xf8]
cmp dword [rsp + 0xd8], eax
jne 0x180002635
cmp dword [rbx + 8], 1
jne 0x18000261b
add dword [rbx + 4], 0xffffffff
jne 0x180002635
xor eax, eax
mov qword [rbx + 0x10], 0
xchg dword [rbx], eax
test eax, eax
jns 0x180002635
mov rcx, qword [rbx + 0x20]
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov rcx, rdi
add r15d, 1
call r12
xor r12d, r12d
jmp 0x180002819
mov rcx, qword [rsi + 0x20]
mov rax, qword [rsi + 0x10]
test rcx, rcx
je 0x180002658
mov qword [rcx + 0x10], rax
test rax, rax
je 0x180002661
mov qword [rax + 0x20], rcx
mov rcx, qword [rsi]
cmp qword [rcx + 0x178], rsi
jne 0x180002674
mov qword [rcx + 0x178], rax
mov rcx, qword [rsi]
cmp qword [rcx + 0x180], rsi
jne 0x180002687
mov qword [rcx + 0x180], rax
mov rcx, qword [rsi + 0x28]
mov rax, qword [rsi + 0x18]
test rcx, rcx
je 0x180002698
mov qword [rcx + 0x18], rax
test rax, rax
je 0x1800026a1
mov qword [rax + 0x28], rcx
mov rcx, qword [rsi + 8]
cmp qword [rcx + 0x18], rsi
jne 0x1800026af
mov qword [rcx + 0x18], rax
mov rcx, rsi
call fcn.180281a3c
mov rbx, qword [r14 + 0x48]
cmp rbx, 0xfffffffffffffffd
jae 0x180002777
cmp dword [rbx + 8], 0
jne 0x1800026f2
xor r12d, r12d
mov eax, r12d
xchg dword [rbx], eax
test eax, eax
je 0x18000277f
test eax, eax
jns 0x18000277f
mov rcx, qword [rbx + 0x20]
call qword [sym.imp.KERNEL32.dll_SetEvent]
jmp 0x18000277f
lea rcx, [rsp + 0x170]
call fcn.180001710
lea rdx, [rsp + 0x110]
mov rcx, qword [rax]
mov rax, qword [rax + 8]
mov qword [rdx], rcx
mov qword [rdx + 8], rax
mov rax, qword [rbx + 0x10]
lea rcx, [rsp + 0x30]
mov qword [rcx], rax
mov rax, qword [rbx + 0x18]
mov qword [rcx + 8], rax
mov rax, qword [rsp + 0x110]
cmp qword [rsp + 0x30], rax
jne 0x180002772
mov eax, dword [rsp + 0x118]
cmp dword [rsp + 0x38], eax
jne 0x18000276d
cmp dword [rbx + 8], 1
jne 0x180002751
add dword [rbx + 4], 0xffffffff
jne 0x18000277c
xor r12d, r12d
mov eax, r12d
mov qword [rbx + 0x10], r12
xchg dword [rbx], eax
test eax, eax
jns 0x18000277f
mov rcx, qword [rbx + 0x20]
call qword [sym.imp.KERNEL32.dll_SetEvent]
jmp 0x18000277f
xor r12d, r12d
jmp 0x18000277f
xor r12d, r12d
jmp 0x18000277f
xor r12d, r12d
jmp 0x18000277f
xor r12d, r12d
mov rbx, qword [rbp + 0x10]
cmp rbx, 0xfffffffffffffffd
jae 0x180002819
cmp dword [rbx + 8], 0
jne 0x1800027ac
mov eax, r12d
xchg dword [rbx], eax
test eax, eax
je 0x180002819
test eax, eax
jns 0x180002819
mov rcx, qword [rbx + 0x20]
call qword [sym.imp.KERNEL32.dll_SetEvent]
jmp 0x180002819
lea rcx, [rsp + 0x190]
call fcn.180001710
lea rdx, [rsp + 0x40]
mov rcx, qword [rax]
mov rax, qword [rax + 8]
mov qword [rdx], rcx
mov qword [rdx + 8], rax
mov rax, qword [rbx + 0x10]
lea rcx, [rsp + 0x50]
mov qword [rcx], rax
mov rax, qword [rbx + 0x18]
mov qword [rcx + 8], rax
mov rax, qword [rsp + 0x40]
cmp qword [rsp + 0x50], rax
jne 0x180002819
mov eax, dword [rsp + 0x48]
cmp dword [rsp + 0x58], eax
jne 0x180002819
cmp dword [rbx + 8], 1
jne 0x180002802
add dword [rbx + 4], 0xffffffff
jne 0x180002819
mov eax, r12d
mov qword [rbx + 0x10], r12
xchg dword [rbx], eax
test eax, eax
jns 0x180002819
mov rcx, qword [rbx + 0x20]
call qword [sym.imp.KERNEL32.dll_SetEvent]
lea rcx, [r14 + 0x48]
call fcn.180001910
mov rsi, qword [r14 + 0x180]
test rsi, rsi
jne 0x180002130
mov edi, dword [rsp + 0x20]
mov rbx, qword [r14 + 0x48]
cmp rbx, 0xfffffffffffffffd
jae 0x1800028e1
cmp dword [rbx + 8], 0
jne 0x18000286b
mov eax, r12d
xchg dword [rbx], eax
test eax, eax
je 0x1800028e1
test eax, eax
jns 0x1800028e1
mov rcx, qword [rbx + 0x20]
call qword [sym.imp.KERNEL32.dll_SetEvent]
jmp 0x1800028e1
lea rcx, [rsp + 0x1b0]
call fcn.180001710
lea rdx, [rsp + 0x70]
mov rcx, qword [rax]
mov rax, qword [rax + 8]
mov qword [rdx], rcx
mov qword [rdx + 8], rax
mov rax, qword [rbx + 0x10]
lea rcx, [rsp + 0x90]
mov qword [rcx], rax
mov rax, qword [rbx + 0x18]
mov qword [rcx + 8], rax
mov rax, qword [rsp + 0x70]
cmp qword [rsp + 0x90], rax
jne 0x1800028e1
mov eax, dword [rsp + 0x78]
cmp dword [rsp + 0x98], eax
jne 0x1800028e1
cmp dword [rbx + 8], 1
jne 0x1800028ca
add dword [rbx + 4], 0xffffffff
jne 0x1800028e1
mov eax, r12d
mov qword [rbx + 0x10], r12
xchg dword [rbx], eax
test eax, eax
jns 0x1800028e1
mov rcx, qword [rbx + 0x20]
call qword [sym.imp.KERNEL32.dll_SetEvent]
test r15d, r15d
jne 0x180002040
mov r15, qword [rsp + 0x1c8]
mov r13, qword [rsp + 0x1d8]
mov r12, qword [rsp + 0x1e0]
mov rdi, qword [rsp + 0x208]
mov rsi, qword [rsp + 0x200]
mov rbp, qword [rsp + 0x1f8]
mov rbx, qword [rsp + 0x1f0]
mov r14, qword [rsp + 0x1d0]
add rsp, 0x1e8
ret