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

Disassembly:
push rbp
sub rsp, 0x140
lea rbp, [rsp + 0x20]
mov ecx, dword [0x1401a1a4c]
cmp ecx, 0xffffffff
mov qword [rbp + 0xf0], r15
mov qword [rbp + 0xf8], r14
mov qword [rbp + 0x100], r13
mov qword [rbp + 0x108], r12
mov qword [rbp + 0xd8], rdi
mov qword [rbp + 0xe0], rsi
mov qword [rbp + 0xe8], rbx
mov qword [rbp + 0xd0], 0xfffffffffffffffe
jne 0x1400cf329
mov qword [rbp + 0x118], 0
xor ebx, ebx
mov eax, dword [0x1401a1a40]
jmp 0x1400cf349
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rbx, rax
test rbx, rbx
mov eax, dword [0x1401aba08]
mov qword [rbp + 0x118], rbx
cmove eax, dword [0x1401a1a40]
cmp eax, dword [0x1401a1a44]
je 0x1400cf35a
mov rdx, qword [rbp + 0x118]
jmp 0x1400cf3c8
test rbx, rbx
je 0x1400cf38e
lea rdx, [rbx + 8]
or eax, 0xffffffff
lock xadd dword [rdx], eax
dec eax
test eax, eax
jne 0x1400cf38e
mov rax, qword [rbx]
mov rcx, rbx
xor edx, edx
call qword [rax]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov rcx, rax
xor edx, edx
mov r8, rbx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rbx, qword [rbp + 0xe8]
mov rsi, qword [rbp + 0xe0]
mov rdi, qword [rbp + 0xd8]
mov r12, qword [rbp + 0x108]
mov r13, qword [rbp + 0x100]
mov r14, qword [rbp + 0xf8]
mov r15, qword [rbp + 0xf0]
lea rsp, [rbp + 0x120]
pop rbp
ret
mov rbx, qword [rdx + 0x18]
cmp qword [rdx + 0x28], 0
je 0x1400cf3da
test rbx, rbx
jne 0x1400cf3e3
jmp 0x1400cf43e
test rbx, rbx
je 0x1400cf4e5
mov rax, qword [rbx + 8]
mov qword [rdx + 0x18], rax
mov rcx, qword [rbx]
test rcx, rcx
je 0x1400cf41a
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_htonl]
mov rsi, qword [rbx]
mov rcx, rsi
xor edx, edx
mov rax, qword [rsi]
call qword [rax]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov rcx, rax
xor edx, edx
mov r8, rsi
call qword [sym.imp.KERNEL32.dll_HeapFree]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov rcx, rax
xor edx, edx
mov r8, rbx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rdx, qword [rbp + 0x118]
mov rbx, qword [rdx + 0x18]
test rbx, rbx
jne 0x1400cf3e3
mov rsi, qword [rdx + 0x20]
mov rbx, qword [rsi]
cmp rbx, rsi
je 0x1400cf3c8
mov qword [rbp], rbx
mov rdx, rbx
cmp byte [rbx + 0x19], 0
jne 0x1400cf493
mov rax, qword [rbx + 0x10]
cmp byte [rax + 0x19], 0
je 0x1400cf487
mov rax, qword [rbx + 8]
cmp byte [rax + 0x19], 0
jne 0x1400cf482
cmp rbx, qword [rax + 0x10]
jne 0x1400cf482
mov rbx, rax
mov rax, qword [rax + 8]
cmp byte [rax + 0x19], 0
je 0x1400cf46f
mov rbx, rax
jmp 0x1400cf493
mov rbx, rax
mov rax, qword [rax]
cmp byte [rax + 0x19], 0
je 0x1400cf487
mov edi, dword [0x1401a1a48]
mov rcx, qword [rdx + 0x28]
test rcx, rcx
mov eax, dword [0x1401aba0c]
cmove eax, edi
cmp eax, edi
je 0x1400cf4bc
mov rdx, qword [rdx + 0x38]
test rdx, rdx
je 0x1400cf4bc
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_htonl]
mov rcx, qword [rbp + 0x118]
lea rdx, [rbp + 0x110]
add rcx, 0x20
mov r8, qword [rbp]
call fcn.1400cedd0
cmp rbx, rsi
jne 0x1400cf44e
jmp 0x1400cf351
xor edx, edx
xor eax, eax
mov qword [rbp + 0xc0], rax
lea rdi, [0x1401aba10]
mov qword [rbp + 0x10], rax
xor ecx, ecx
xor eax, eax
mov qword [rbp + 0xc8], rdi
mov dword [rbp], 0xc15730e2
mov dword [rbp + 4], 0x7f0725e3
mov byte [rbp + 8], dl
mov byte [rbp + 0x18], dl
lock cmpxchg dword [rdi], ecx
cmp eax, dword [rbp]
je 0x1400cfd07
lea rax, [0x1401aba10]
mov r14, rax
mov r13, rax
mov r12, rax
mov rsi, rax
mov rbx, rax
mov r15, rax
shr r14, 4
and r15, 0xf
shr r13, 8
and r14, 0xf
shr r12, 0xc
and r13, 0xf
shr rsi, 0x10
and r12, 0xf
shr rbx, 0x24
and rsi, 0xf
and rbx, 0xf
mov rdx, rax
add r15d, 0x41
add r14d, 0x41
add r13d, 0x41
add r12d, 0x41
add esi, 0x41
add ebx, 0x41
mov rcx, rax
mov rdi, rax
mov dword [rbp + 0x80], r15d
mov r15, rax
mov dword [rbp + 0x78], r14d
mov r14, rax
mov dword [rbp + 0x90], r13d
mov r13, rax
mov dword [rbp + 0x88], r12d
mov r12, rax
mov dword [rbp + 0xa0], esi
mov rsi, rax
mov dword [rbp + 0xb8], ebx
mov rbx, rax
shr rdx, 0x28
shr rcx, 0x2c
and rdx, 0xf
shr rdi, 0x38
and rcx, 0xf
shr r15, 0x14
and rdi, 0xf
shr r14, 0x18
and r15, 0xf
shr r13, 0x1c
and r14, 0xf
shr r12, 0x20
and r13, 0xf
shr rsi, 0x30
and r12, 0xf
shr rbx, 0x34
and rsi, 0xf
shr rax, 0x3c
and rbx, 0xf
add edx, 0x41
add ecx, 0x41
add edi, 0x41
add eax, 0x41
mov dword [rbp + 0xb0], edx
add r15d, 0x41
mov dword [rbp + 0x70], ecx
add r14d, 0x41
mov dword [rbp + 0xa8], edi
add r13d, 0x41
mov dword [rbp + 0x98], eax
add r12d, 0x41
add esi, 0x41
add ebx, 0x41
lea rdi, [0x1401aba10]
xor eax, eax
mov ecx, dword [rbp + 4]
lock cmpxchg dword [rdi], ecx
test eax, eax
jne 0x1400cfaf9
mov rdi, qword [rbp + 0x10]
test rdi, rdi
jne 0x1400cf807
cmp byte [rbp + 0x18], 0
jne 0x1400cf7d5
mov rax, qword [0x1401e5a60]
mov qword [rbp + 0x18], rax
mov rdx, qword [0x1401e5a68]
mov qword [rbp + 0x20], rdx
mov rcx, qword [0x1401e5a70]
mov qword [rbp + 0x28], rcx
mov rdi, qword [0x1401e5a78]
mov qword [rbp + 0x30], rdi
mov r8, qword [0x1401e5a80]
mov qword [rbp + 0x38], r8
mov r9, qword [0x1401e5a88]
mov qword [rbp + 0x40], r9
mov r10d, dword [0x1401e5a90]
mov dword [rbp + 0x48], r10d
movzx r11d, word [0x1401e5a94]
mov word [rbp + 0x4c], r11w
mov al, byte [0x1401e5a96]
mov byte [rbp + 0x4e], al
mov byte [rbp + 0x5a], sil
mov byte [rbp + 0x5b], bl
mov eax, dword [rbp + 0x80]
mov edx, dword [rbp + 0x78]
mov ecx, dword [rbp + 0x90]
mov edi, dword [rbp + 0x88]
mov r8d, dword [rbp + 0xa0]
mov r9d, dword [rbp + 0xb8]
mov r10d, dword [rbp + 0xb0]
mov r11d, dword [rbp + 0x70]
mov ebx, dword [rbp + 0xa8]
mov esi, dword [rbp + 0x98]
mov byte [rbp + 0x4e], al
mov byte [rbp + 0x4f], dl
mov byte [rbp + 0x50], cl
mov byte [rbp + 0x51], dil
mov byte [rbp + 0x52], r8b
mov byte [rbp + 0x53], r15b
mov byte [rbp + 0x54], r14b
mov byte [rbp + 0x55], r13b
mov byte [rbp + 0x56], r12b
mov byte [rbp + 0x57], r9b
mov byte [rbp + 0x58], r10b
mov byte [rbp + 0x59], r11b
mov byte [rbp + 0x5c], bl
mov byte [rbp + 0x5d], sil
mov byte [rbp + 0x5e], 0
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov r9d, eax
mov edx, r9d
mov ecx, r9d
mov ebx, r9d
mov esi, r9d
mov edi, r9d
mov r8d, r9d
shr edx, 4
mov eax, r9d
shr ecx, 8
and eax, 0xf
shr ebx, 0xc
and edx, 0xf
shr esi, 0x10
and ecx, 0xf
shr edi, 0x14
and ebx, 0xf
shr r8d, 0x18
and esi, 0xf
shr r9d, 0x1c
and edi, 0xf
and r8d, 0xf
add eax, 0x41
add edx, 0x41
add ecx, 0x41
add ebx, 0x41
add esi, 0x41
add edi, 0x41
add r8d, 0x41
add r9d, 0x41
mov byte [rbp + 0x5e], al
mov byte [rbp + 0x5f], dl
mov byte [rbp + 0x60], cl
mov byte [rbp + 0x61], bl
mov byte [rbp + 0x62], sil
mov byte [rbp + 0x63], dil
mov byte [rbp + 0x64], r8b
mov byte [rbp + 0x65], r9b
mov byte [rbp + 0x66], 0
mov ecx, 0x100002
xor edx, edx
lea r8, [rbp + 0x18]
call qword [sym.imp.KERNEL32.dll_OpenEventA]
mov rdi, rax
mov rcx, qword [rbp + 0x10]
test rcx, rcx
je 0x1400cf7fe
cmp rcx, 0xffffffffffffffff
je 0x1400cf7fe
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbp + 0x10], rdi
test rdi, rdi
je 0x1400cf811
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ResetEvent]
nop
call fcn.1400cedb0
nop
mov rbx, qword [rbp + 0xc8]
cmp byte [rbp + 8], 0
jne 0x1400cf835
lea rdx, [rbx + 4]
mov eax, 1
lock xadd dword [rdx], eax
mov byte [rbp + 8], 1
mov rdx, rbx
mov eax, dword [rbp]
xchg dword [rdx], eax
mov rsi, qword [rbp + 0x10]
test rsi, rsi
jne 0x1400cfaa8
xor ecx, ecx
lea rdi, [rbx + 4]
xor eax, eax
lock cmpxchg dword [rdi], ecx
cmp eax, 1
jg 0x1400cf864
mov rsi, qword [rbp + 0x10]
jmp 0x1400cfaa3
cmp byte [rbp + 0x18], 0
jne 0x1400cfa73
mov rax, qword [0x1401e5a60]
mov qword [rbp + 0x18], rax
mov rcx, qword [0x1401e5a68]
mov qword [rbp + 0x20], rcx
mov rsi, qword [0x1401e5a70]
mov qword [rbp + 0x28], rsi
mov rdi, qword [0x1401e5a78]
mov qword [rbp + 0x30], rdi
mov r8, qword [0x1401e5a80]
mov qword [rbp + 0x38], r8
mov r9, qword [0x1401e5a88]
mov qword [rbp + 0x40], r9
mov r10d, dword [0x1401e5a90]
mov dword [rbp + 0x48], r10d
movzx r11d, word [0x1401e5a94]
mov word [rbp + 0x4c], r11w
mov r12b, byte [0x1401e5a96]
mov byte [rbp + 0x4e], r12b
mov rax, rbx
mov rcx, rbx
and rax, 0xf
mov rsi, rbx
mov rdi, rbx
mov r8, rbx
add eax, 0x41
mov r9, rbx
mov byte [rbp + 0x4e], al
mov rax, rbx
shr rax, 0x30
mov r10, rbx
and rax, 0xf
mov r11, rbx
mov r12, rbx
mov r13, rbx
add eax, 0x41
mov r14, rbx
mov byte [rbp + 0x5a], al
mov rax, rbx
shr rax, 0x34
mov r15, rbx
and rax, 0xf
shr rcx, 4
add eax, 0x41
and rcx, 0xf
mov byte [rbp + 0x5b], al
mov rax, rbx
shr rsi, 8
shr rdi, 0xc
and rsi, 0xf
shr r8, 0x10
and rdi, 0xf
shr r9, 0x14
and r8, 0xf
shr r10, 0x18
and r9, 0xf
shr r11, 0x1c
and r10, 0xf
shr r12, 0x20
and r11, 0xf
shr r13, 0x24
and r12, 0xf
shr r14, 0x28
and r13, 0xf
shr r15, 0x2c
and r14, 0xf
shr rax, 0x38
and r15, 0xf
shr rbx, 0x3c
and rax, 0xf
add ecx, 0x41
add esi, 0x41
add edi, 0x41
add r8d, 0x41
add r9d, 0x41
add r10d, 0x41
add r11d, 0x41
add r12d, 0x41
add r13d, 0x41
add r14d, 0x41
add r15d, 0x41
add eax, 0x41
add ebx, 0x41
mov byte [rbp + 0x4f], cl
mov byte [rbp + 0x50], sil
mov byte [rbp + 0x51], dil
mov byte [rbp + 0x52], r8b
mov byte [rbp + 0x53], r9b
mov byte [rbp + 0x54], r10b
mov byte [rbp + 0x55], r11b
mov byte [rbp + 0x56], r12b
mov byte [rbp + 0x57], r13b
mov byte [rbp + 0x58], r14b
mov byte [rbp + 0x59], r15b
mov byte [rbp + 0x5c], al
mov byte [rbp + 0x5d], bl
mov byte [rbp + 0x5e], 0
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov r9d, eax
mov edx, r9d
mov ecx, r9d
mov ebx, r9d
mov esi, r9d
mov edi, r9d
mov r8d, r9d
shr edx, 4
mov eax, r9d
shr ecx, 8
and eax, 0xf
shr ebx, 0xc
and edx, 0xf
shr esi, 0x10
and ecx, 0xf
shr edi, 0x14
and ebx, 0xf
shr r8d, 0x18
and esi, 0xf
shr r9d, 0x1c
and edi, 0xf
and r8d, 0xf
add eax, 0x41
add edx, 0x41
add ecx, 0x41
add ebx, 0x41
add esi, 0x41
add edi, 0x41
add r8d, 0x41
add r9d, 0x41
mov byte [rbp + 0x5e], al
mov byte [rbp + 0x5f], dl
mov byte [rbp + 0x60], cl
mov byte [rbp + 0x61], bl
mov byte [rbp + 0x62], sil
mov byte [rbp + 0x63], dil
mov byte [rbp + 0x64], r8b
mov byte [rbp + 0x65], r9b
mov byte [rbp + 0x66], 0
xor ecx, ecx
mov edx, 1
xor r8d, r8d
lea r9, [rbp + 0x18]
call qword [sym.imp.KERNEL32.dll_CreateEventA]
mov rsi, rax
mov rcx, qword [rbp + 0x10]
test rcx, rcx
je 0x1400cfa9f
cmp rcx, 0xffffffffffffffff
je 0x1400cfa9f
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbp + 0x10], rsi
test rsi, rsi
je 0x1400cfab5
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov rsi, qword [rbp + 0x10]
test rsi, rsi
je 0x1400cfac9
cmp rsi, 0xffffffffffffffff
je 0x1400cfac9
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [0x1401a1a4c]
cmp ecx, 0xffffffff
jne 0x1400cfae0
mov rbx, qword [rbp + 0x118]
jmp 0x1400cf35a
mov rdx, qword [rbp + 0xc0]
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
mov rbx, qword [rbp + 0x118]
jmp 0x1400cf35a
cmp byte [rbp + 8], 0
jne 0x1400cfce0
lea rdx, [0x1401aba14]
mov eax, 1
lock xadd dword [rdx], eax
xor ecx, ecx
lea rdi, [0x1401aba10]
xor eax, eax
mov byte [rbp + 8], 1
lock cmpxchg dword [rdi], ecx
cmp eax, dword [rbp]
je 0x1400cfab1
mov rcx, qword [rbp + 0x10]
test rcx, rcx
jne 0x1400cfce4
cmp byte [rbp + 0x18], 0
jne 0x1400cfca9
mov rax, qword [0x1401e5a60]
mov qword [rbp + 0x18], rax
mov rdx, qword [0x1401e5a68]
mov qword [rbp + 0x20], rdx
mov rcx, qword [0x1401e5a70]
mov qword [rbp + 0x28], rcx
mov rdi, qword [0x1401e5a78]
mov qword [rbp + 0x30], rdi
mov r8, qword [0x1401e5a80]
mov qword [rbp + 0x38], r8
mov r9, qword [0x1401e5a88]
mov qword [rbp + 0x40], r9
mov r10d, dword [0x1401e5a90]
mov dword [rbp + 0x48], r10d
movzx r11d, word [0x1401e5a94]
mov word [rbp + 0x4c], r11w
mov al, byte [0x1401e5a96]
mov byte [rbp + 0x4e], al
mov eax, dword [rbp + 0x80]
mov edx, dword [rbp + 0x78]
mov byte [rbp + 0x4e], al
mov byte [rbp + 0x4f], dl
mov ecx, dword [rbp + 0x90]
mov edi, dword [rbp + 0x88]
mov r8d, dword [rbp + 0xa0]
mov r9d, dword [rbp + 0xb8]
mov r10d, dword [rbp + 0xb0]
mov r11d, dword [rbp + 0x70]
mov eax, dword [rbp + 0xa8]
mov edx, dword [rbp + 0x98]
mov byte [rbp + 0x50], cl
mov byte [rbp + 0x51], dil
mov byte [rbp + 0x52], r8b
mov byte [rbp + 0x53], r15b
mov byte [rbp + 0x54], r14b
mov byte [rbp + 0x55], r13b
mov byte [rbp + 0x56], r12b
mov byte [rbp + 0x57], r9b
mov byte [rbp + 0x58], r10b
mov byte [rbp + 0x59], r11b
mov byte [rbp + 0x5a], sil
mov byte [rbp + 0x5b], bl
mov byte [rbp + 0x5c], al
mov byte [rbp + 0x5d], dl
mov byte [rbp + 0x5e], 0
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov r11d, eax
mov edx, r11d
mov ecx, r11d
mov edi, r11d
mov r8d, r11d
mov r9d, r11d
mov r10d, r11d
shr edx, 4
mov eax, r11d
shr ecx, 8
and eax, 0xf
shr edi, 0xc
and edx, 0xf
shr r8d, 0x10
and ecx, 0xf
shr r9d, 0x14
and edi, 0xf
shr r10d, 0x18
and r8d, 0xf
shr r11d, 0x1c
and r9d, 0xf
and r10d, 0xf
add eax, 0x41
add edx, 0x41
add ecx, 0x41
add edi, 0x41
add r8d, 0x41
add r9d, 0x41
add r10d, 0x41
add r11d, 0x41
mov byte [rbp + 0x5e], al
mov byte [rbp + 0x5f], dl
mov byte [rbp + 0x60], cl
mov byte [rbp + 0x61], dil
mov byte [rbp + 0x62], r8b
mov byte [rbp + 0x63], r9b
mov byte [rbp + 0x64], r10b
mov byte [rbp + 0x65], r11b
mov byte [rbp + 0x66], 0
xor ecx, ecx
mov edx, 1
xor r8d, r8d
lea r9, [rbp + 0x18]
call qword [sym.imp.KERNEL32.dll_CreateEventA]
mov qword [rbp + 0x68], rax
mov rcx, qword [rbp + 0x10]
test rcx, rcx
je 0x1400cfcd6
cmp rcx, 0xffffffffffffffff
je 0x1400cfcd6
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, qword [rbp + 0x68]
mov qword [rbp + 0x10], rax
jmp 0x1400cfcef
mov rcx, qword [rbp + 0x10]
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
xor ecx, ecx
lea rdi, [0x1401aba10]
xor eax, eax
lock cmpxchg dword [rdi], ecx
cmp eax, dword [rbp]
jne 0x1400cf645
mov rsi, qword [rbp + 0x10]
jmp 0x1400cfab5