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

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x20], r9
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x1f]
sub rsp, 0x90
mov r15, rcx
mov rdi, r8
mov ecx, dword [0x14003d17c]
mov esi, edx
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_TlsGetValue]
or ebx, 0xffffffff
xor r14d, r14d
mov r12, rax
test rax, rax
jne 0x1400293dd
mov ebx, dword [0x14003d17c]
lea rdx, [rbp - 9]
mov ecx, ebx
mov dword [rbp - 9], r14d
lea r12, [rbp - 9]
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_TlsSetValue]
inc dword [r12]
mov r10, qword [0x14003d048]
lea rax, [0x14003d048]
lea rdx, [0x140035650]
mov r13d, 0x1df
cmp r10, rax
je 0x14002944b
test byte [r10 + 0x1c], 1
je 0x14002944b
mov eax, dword [r12]
lea ecx, [rax + rax*4]
cmp ecx, 0x1e1
ja 0x140029421
mov eax, ecx
mov ecx, r13d
sub rcx, rax
jmp 0x140029424
mov rcx, r14
lea r9, [rcx + rdx]
mov qword [rsp + 0x30], rdi
mov rcx, qword [r10 + 0x10]
lea r8, [0x140036f48]
mov edx, 0x1c
mov dword [rsp + 0x28], esi
mov qword [rsp + 0x20], r15
call fcn.1400013dc
mov dword [rbp - 1], r14d
mov qword [rbp + 7], r14
mov dword [rbp + 0xf], r14d
mov byte [rbp + 0x67], r14b
mov byte [rbp - 0x11], r14b
mov dword [rbp - 0xd], r14d
test esi, esi
je 0x14002985c
test rdi, rdi
je 0x14002985c
cmp qword [r15 + 8], r14
je 0x140029485
mov r14d, 0x800704df
jmp 0x140029862
mov r8, rdi
lea rcx, [rbp - 1]
mov edx, esi
call fcn.140028564
mov r14d, eax
test eax, eax
js 0x140029862
lea r8, [rbp + 0x67]
mov edx, 1
lea rcx, [rbp - 1]
call fcn.140028848
mov r14d, eax
test eax, eax
js 0x140029862
mov sil, byte [rbp + 0x67]
mov al, sil
and al, 0x20
mov byte [rbp - 0xf], al
je 0x14002952d
mov r14d, 0x80070032
mov rdx, qword [0x14003d048]
lea rax, [0x14003d048]
cmp rdx, rax
je 0x140029862
test byte [rdx + 0x1c], 0x10
je 0x140029862
mov eax, dword [r12]
inc eax
lea ecx, [rax + rax*4]
cmp ecx, 0x1e1
ja 0x14002950b
mov eax, ecx
mov rcx, r13
sub rcx, rax
jmp 0x14002950d
xor ecx, ecx
movzx eax, sil
lea r9, [0x140035650]
add r9, rcx
mov dword [rsp + 0x28], r14d
mov rcx, qword [rdx + 0x10]
mov dword [rsp + 0x20], eax
call fcn.1400282c0
test r14d, r14d
js 0x140029862
lea r8, [rbp - 0x11]
mov edx, 1
lea rcx, [rbp - 1]
call fcn.140028848
mov r14d, eax
test eax, eax
js 0x140029862
mov al, sil
lea rcx, [rbp - 1]
and al, 0x10
mov byte [rbp - 0x10], al
je 0x140029587
lea r8, [rbp + 0x67]
mov byte [rbp + 0x67], 0
mov edx, 1
call fcn.140028848
mov r14d, eax
test eax, eax
js 0x140029862
movzx edx, byte [rbp + 0x67]
mov dword [rbp + 0x67], edx
jmp 0x1400295ae
lea r8, [rbp - 0xd]
mov edx, 4
call fcn.140028848
mov r14d, eax
test eax, eax
js 0x140029862
mov ecx, dword [rbp - 0xd]
call qword [sym.imp.WS2_32.dll_ntohl]
mov edx, eax
mov dword [rbp + 0x67], eax
lea edi, [rdx + 0x207]
or ecx, 0xffffffff
mov eax, 0x207
cmp edi, eax
cmovae ecx, edi
sbb r14d, r14d
and r14d, 0x80070216
mov dword [r15 + 0x10], ecx
cmp edi, eax
jb 0x140029862
mov ecx, ecx
lea rdx, [0x140035918]
call fcn.140030598
mov qword [r15 + 8], rax
test rax, rax
jne 0x1400295f9
mov r14d, 0x8007000e
jmp 0x140029862
mov r8d, dword [r15 + 0x10]
xor edx, edx
mov rcx, rax
call sub.msvcrt.dll_memset
mov edx, dword [rbp + 0x67]
mov eax, 0x207
cmp edi, eax
jb 0x140029862
mov rcx, qword [r15 + 8]
mov r8b, byte [rbp - 0x11]
mov al, byte [rcx]
xor al, sil
and al, 7
xor byte [rcx], al
mov rcx, qword [r15 + 8]
mov al, byte [rcx]
xor al, sil
and al, 8
xor byte [rcx], al
mov rcx, qword [r15 + 8]
mov al, byte [rcx]
and al, 0xef
or al, byte [rbp - 0x10]
mov byte [rcx], al
mov rcx, qword [r15 + 8]
mov al, byte [rcx]
and al, 0xdf
or al, byte [rbp - 0xf]
mov byte [rcx], al
mov rcx, qword [r15 + 8]
mov al, byte [rcx]
xor al, sil
and al, 0x40
xor byte [rcx], al
mov rcx, qword [r15 + 8]
mov al, byte [rcx]
xor al, sil
and al, 0x7f
xor al, sil
mov byte [rcx], al
mov rax, qword [r15 + 8]
mov byte [rax + 1], r8b
mov rax, qword [r15 + 8]
mov dword [rax + 4], edx
mov rax, qword [0x14003d048]
lea rdi, [0x14003d048]
cmp rax, rdi
je 0x140029739
test byte [rax + 0x1c], 4
je 0x140029739
mov eax, dword [r12]
inc eax
lea ecx, [rax + rax*4]
cmp ecx, 0x1e1
ja 0x1400296b7
mov eax, ecx
mov rcx, r13
sub rcx, rax
jmp 0x1400296b9
xor ecx, ecx
mov rax, qword [r15 + 8]
lea r9, [0x140035650]
movzx r11d, r8b
add r9, rcx
mov ecx, dword [rbp + 0x67]
mov dword [rsp + 0x58], ecx
movzx esi, byte [rax]
mov rcx, qword [0x14003d048]
mov r10d, esi
mov dword [rsp + 0x50], r11d
mov r8d, esi
mov edx, esi
shr r10d, 6
mov eax, esi
shr r8d, 5
mov rcx, qword [rcx + 0x10]
mov edi, esi
shr edi, 7
and r10d, 1
mov dword [rsp + 0x48], edi
and r8d, 1
mov dword [rsp + 0x40], r10d
and esi, 7
mov dword [rsp + 0x38], r8d
shr edx, 4
shr eax, 3
and edx, 1
mov dword [rsp + 0x30], edx
and eax, 1
mov dword [rsp + 0x28], eax
mov dword [rsp + 0x20], esi
call fcn.14002810c
lea rdi, [0x14003d048]
mov r8, qword [r15 + 8]
test byte [r8], 8
je 0x140029758
add r8, 8
lea rcx, [rbp - 1]
mov edx, 1
call fcn.140028848
mov r14d, eax
test r14d, r14d
js 0x140029862
mov rax, qword [r15 + 8]
lea rcx, [rbp - 1]
movzx edx, byte [rax + 1]
lea r8, [rax + 9]
call fcn.140028848
mov r14d, eax
test eax, eax
js 0x140029862
mov rax, qword [r15 + 8]
lea rcx, [rbp - 1]
movzx edx, byte [rax + 8]
lea r8, [rax + 0x108]
call fcn.140028848
mov r14d, eax
test eax, eax
js 0x140029862
mov rax, qword [r15 + 8]
lea rcx, [rbp - 1]
mov edx, dword [rax + 4]
lea r8, [rax + 0x207]
call fcn.140028848
mov r14d, eax
test eax, eax
js 0x140029862
mov r8d, dword [rbp + 0xf]
mov dword [r15 + 0x14], r8d
mov rcx, qword [0x14003d048]
cmp rcx, rdi
je 0x140029828
test byte [rcx + 0x1c], 4
je 0x140029828
mov eax, dword [r12]
inc eax
lea edx, [rax + rax*4]
cmp edx, 0x1e1
ja 0x1400297fb
mov eax, edx
mov rdx, r13
sub rdx, rax
jmp 0x1400297fd
xor edx, edx
mov rcx, qword [rcx + 0x10]
lea r9, [0x140035650]
add r9, rdx
mov dword [rsp + 0x20], r8d
mov edx, 0x1f
lea r8, [0x140036f48]
call fcn.140001304
mov rcx, qword [0x14003d048]
mov rdx, qword [rbp + 0x77]
test rdx, rdx
je 0x140029843
mov rax, qword [r15 + 8]
mov cl, byte [rax]
shr cl, 7
mov byte [rdx], cl
mov rcx, qword [0x14003d048]
mov rdx, qword [rbp + 0x7f]
test rdx, rdx
je 0x140029883
mov rax, qword [r15 + 8]
mov cl, byte [rax]
shr cl, 6
and cl, 1
mov byte [rdx], cl
jmp 0x14002987c
mov r14d, 0x80070057
mov rcx, qword [r15 + 8]
call fcn.14003010c
and qword [r15 + 8], 0
lea rdi, [0x14003d048]
and dword [r15 + 0x14], 0
mov rcx, qword [0x14003d048]
cmp rcx, rdi
je 0x1400298d0
test byte [rcx + 0x1c], 1
je 0x1400298d0
mov eax, dword [r12]
lea edx, [rax + rax*4]
cmp edx, 0x1e1
ja 0x1400298a4
mov eax, edx
sub r13, rax
jmp 0x1400298a7
xor r13d, r13d
mov rcx, qword [rcx + 0x10]
lea r9, [0x140035650]
add r9, r13
mov dword [rsp + 0x28], r14d
mov edx, 0x20
mov qword [rsp + 0x20], r15
lea r8, [0x140036f48]
call fcn.140001730
or eax, 0xffffffff
add dword [r12], eax
cmp ebx, eax
je 0x1400298f2
mov ecx, ebx
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_TlsGetValue]
test rax, rax
je 0x1400298f2
xor edx, edx
mov ecx, ebx
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_TlsSetValue]
mov eax, r14d
mov rbx, qword [rsp + 0xd0]
add rsp, 0x90
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret