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

Disassembly:
mov rax, rsp
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x38]
sub rsp, 0x110
mov qword [rbp - 0x28], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
mov r10, r8
mov r11, rdx
mov rdi, rcx
mov dword [rcx + 0x18], r9d
cmp r9d, 1
je 0x140081a59
add qword [rcx + 0x20], r8
mov r9, qword [rcx + 0x10]
mov rdx, qword [r9 + 0x58]
movsxd rcx, dword [rdx]
cmp rcx, r8
cmovb r8, rcx
sub ecx, r8d
mov dword [rdx], ecx
mov rcx, qword [r9 + 0x40]
movsxd rax, r8d
add qword [rcx], rax
mov rax, qword [r9 + 0x40]
mov rcx, qword [rax]
mov rax, qword [r9 + 0x38]
sub ecx, dword [rax]
mov rax, qword [r9 + 0x50]
mov dword [rax], ecx
mov r15d, dword [r11]
xor ebx, ebx
test r15d, r15d
jne 0x140081893
mov rax, qword [rdi]
cmp qword [rdi + 0x20], rax
mov r9d, 0x10000
jb 0x140081896
mov r9, rbx
mov qword [rbp + 0x40], r9
mov rsi, qword [rdi + 0x10]
mov r8, qword [rsi + 0x68]
mov rax, qword [rsi + 0x40]
mov rdx, qword [rax]
mov rax, qword [rsi + 0x38]
sub rdx, qword [rax]
sub r8, rdx
mov qword [rsp + 0x40], r8
mov rcx, qword [rsi + 0x80]
sub rcx, qword [rsi + 0x70]
sub rcx, rdx
lea rax, [rbp + 0x40]
lea rdx, [rsp + 0x40]
cmp r8, r9
cmovb rax, rdx
mov edx, 0x200
cmp rcx, rdx
cmova rdx, rcx
mov r14, qword [rax]
cmp r14, rdx
cmovae r14, rdx
test r15d, r15d
jne 0x1400818f6
test r10, r10
je 0x1400818ff
test r14, r14
jne 0x140081ac7
movups xmm0, xmmword [rdi + 0x38]
movups xmmword [rsp + 0x78], xmm0
movups xmm1, xmmword [r11]
movups xmmword [rbp - 0x78], xmm1
mov rax, qword [rdi + 0x20]
mov qword [rbp - 0x68], rax
lea rsi, [rdi + 0x30]
mov r14, qword [rdi + 0x28]
mov rdi, qword [rsi]
mov ecx, dword [0x1402d3934]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
je 0x140081946
cmp qword [rax], rdi
je 0x140081a3a
mov rax, qword [rax + 0x10]
test rax, rax
jne 0x140081934
lea rax, [rsp + 0x78]
mov qword [rbp - 0x20], rax
lea rdx, [rsp + 0x78]
mov ecx, 0x60
call fcn.14001a0a0
mov rdi, rax
mov qword [rax + 0x20], rbx
lea rax, [fcn.140076e80]
mov qword [rdi + 0x28], rax
mov qword [rdi], rbx
mov qword [rdi + 8], rbx
mov qword [rdi + 0x10], rbx
mov qword [rdi + 0x18], rbx
mov dword [rdi + 0x30], ebx
movups xmm0, xmmword [rsp + 0x78]
movups xmmword [rdi + 0x38], xmm0
movups xmm1, xmmword [rbp - 0x78]
movups xmmword [rdi + 0x48], xmm1
mov rax, qword [rbp - 0x68]
mov qword [rdi + 0x58], rax
mov r8, rdi
mov rdx, rsi
mov rcx, r14
call fcn.14001c990
mov qword [rbp - 0x10], rbx
mov qword [rbp - 0x18], rbx
test al, al
je 0x140081a35
mov rax, qword [rsi]
mov qword [rsp + 0x60], rax
mov ecx, dword [0x1402d3934]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov qword [rsp + 0x70], rax
lea rax, [rsp + 0x60]
mov qword [rsp + 0x68], rax
lea rdx, [rsp + 0x60]
mov ecx, dword [0x1402d3934]
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
nop
mov rax, qword [r14 + 0x28]
mov qword [rsp + 0x50], rax
mov rax, qword [rsi]
mov qword [rsp + 0x58], rax
call fcn.1400a9490
xor r9d, r9d
lea r8, [rbp - 8]
mov rdx, rdi
mov rcx, qword [r14 + 0x28]
call fcn.140076e80
nop
lea rcx, [rsp + 0x50]
call fcn.14001c760
nop
mov rdx, qword [rsp + 0x70]
mov ecx, dword [0x1402d3934]
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
nop
jmp 0x140081c01
cmp qword [rax + 8], rbx
je 0x140081946
lea rdx, [rsp + 0x78]
lea rcx, [rsp + 0x78]
call fcn.140079280
nop
jmp 0x140081c01
xor ebx, ebx
cmp dword [rdx], ebx
jne 0x140081a6e
mov rax, qword [rcx]
cmp qword [rcx + 0x20], rax
mov r9d, 0x10000
jb 0x140081a71
mov r9, rbx
mov qword [rbp + 0x40], r9
mov rsi, qword [rcx + 0x10]
mov rax, qword [rsi + 0x40]
mov rcx, qword [rsi + 0x38]
mov rdx, qword [rcx]
sub rdx, qword [rax]
mov rcx, qword [rsi + 0x68]
add rcx, rdx
mov qword [rsp + 0x48], rcx
mov r8, qword [rsi + 0x80]
sub r8, qword [rsi + 0x70]
add r8, rdx
lea rax, [rbp + 0x40]
lea rdx, [rsp + 0x48]
cmp rcx, r9
cmovb rax, rdx
mov edx, 0x200
cmp r8, rdx
cmova rdx, r8
mov r14, qword [rax]
cmp r14, rdx
cmovae r14, rdx
mov rdx, r14
mov rcx, rsi
call fcn.140070120
mov rax, qword [rsi + 0x40]
mov r12, qword [rax]
mov qword [rbp - 0x50], r12
mov qword [rbp - 0x48], r14
mov rax, qword [rdi + 8]
mov r13, qword [rax]
lea r15, [rax + 8]
lea rdx, [rdi + 0x38]
mov ecx, 0xa8
call fcn.14001a0a0
mov rsi, rax
mov rcx, qword [r15 + 0x18]
test rcx, rcx
je 0x140081b0e
lock inc dword [rcx + 0xc]
mov rcx, qword [r15 + 0x18]
mov rdx, qword [r15 + 0x10]
mov qword [rbp - 0x60], rdx
movzx eax, byte [r15 + 8]
mov qword [rsi + 0x20], rbx
lea r8, [0x140082230]
mov qword [rsi + 0x28], r8
mov qword [rsi], rbx
mov qword [rsi + 8], rbx
mov qword [rsi + 0x10], 0
mov qword [rsi + 0x18], rbx
mov dword [rsi + 0x30], ebx
mov byte [rsi + 0x38], al
mov qword [rsi + 0x40], rbx
mov qword [rsi + 0x48], rbx
test rcx, rcx
je 0x140081b58
lock inc dword [rcx + 0xc]
mov rdx, qword [rbp - 0x60]
mov qword [rsi + 0x40], rdx
mov qword [rsi + 0x48], rcx
movups xmm0, xmmword [rbp - 0x50]
movups xmmword [rsi + 0x50], xmm0
mov rax, qword [rdi]
mov qword [rsi + 0x60], rax
mov rax, qword [rdi + 8]
mov qword [rsi + 0x68], rax
mov rax, qword [rdi + 0x10]
mov qword [rsi + 0x70], rax
mov eax, dword [rdi + 0x18]
mov dword [rsi + 0x78], eax
mov rax, qword [rdi + 0x20]
mov qword [rsi + 0x80], rax
movups xmm0, xmmword [rdi + 0x28]
movups xmmword [rsi + 0x88], xmm0
movups xmm0, xmmword [rdi + 0x38]
movups xmmword [rsi + 0x98], xmm0
test rcx, rcx
je 0x140081bc0
mov eax, 0xffffffff
lock xadd dword [rcx + 0xc], eax
sub eax, 1
jne 0x140081bc0
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_htonl]
mov qword [rbp - 0x38], r12
mov dword [rbp - 0x40], r14d
mov qword [rbp - 0x30], r14
test byte [r15 + 8], 0x10
je 0x140081bdc
test r14, r14
jne 0x140081bdc
mov al, 1
jmp 0x140081bde
xor eax, eax
lea rcx, [r13 + 0x28]
mov qword [rsp + 0x30], rsi
mov byte [rsp + 0x28], al
mov dword [rsp + 0x20], ebx
mov r9d, 1
lea r8, [rbp - 0x40]
mov rdx, r15
call fcn.140061410
lea r11, [rsp + 0x110]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret