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

Disassembly:
push rsi
push rdi
push r13
push r14
push r15
sub rsp, 0x530
mov qword [rsp + 0x1a0], 0xfffffffffffffffe
mov qword [rsp + 0x578], rbx
mov rax, qword [0x140105358]
xor rax, rsp
mov qword [rsp + 0x528], rax
mov rbx, r8
mov r15, rdx
mov rdi, rcx
mov dword [rcx + 0x80], r9d
mov eax, dword [rsp + 0x580]
mov dword [rcx + 0x84], eax
mov byte [rcx + 0x89], 0
test eax, eax
jne 0x140022ba5
mov dword [rcx + 0x84], r9d
add rcx, 0x18
call fcn.14003a210
lea rax, vtable.type_info.0
mov qword [rsp + 0x170], rax
xor r14d, r14d
mov qword [rsp + 0x178], r14
lea r8, [0x140055d00]
lea rdx, [rsp + 0x170]
mov rcx, qword [rdi + 8]
call fcn.14001c9c0
mov qword [rsp + 0xc8], rax
mov qword [rsp + 0xd0], r14
mov qword [rsp + 0xd8], r14
xor eax, eax
mov byte [rsp + 0x30], al
movzx r8d, al
lea rcx, [rsp + 0xd0]
call fcn.1400452c0
nop
xor eax, eax
mov qword [rsp + 0x3f0], rax
mov qword [rsp + 0x3f8], rax
mov qword [rsp + 0x400], rax
mov qword [rsp + 0x408], rax
mov qword [rsp + 0x410], rax
mov qword [rsp + 0x418], rax
mov qword [rsp + 0x438], 0xf
mov qword [rsp + 0x430], r14
mov byte [rsp + 0x420], al
or rsi, 0xffffffffffffffff
mov r9, rsi
xor r8d, r8d
mov rdx, r15
lea rcx, [rsp + 0x420]
call fcn.140002500
nop
mov qword [rsp + 0x458], 0xf
mov qword [rsp + 0x450], r14
mov byte [rsp + 0x440], r14b
mov r9, rsi
xor r8d, r8d
mov rdx, rbx
lea rcx, [rsp + 0x440]
call fcn.140002500
movdqa xmm0, xmmword [0x1400db350]
movdqa xmmword [rsp + 0x3f0], xmm0
mov qword [rsp + 0x400], r14
mov qword [rsp + 0x408], r14
xorps xmm0, xmm0
movdqa xmmword [rsp + 0x410], xmm0
lea r8, [rsp + 0x3f0]
lea rdx, [rsp + 0x128]
call fcn.14003a850
nop
mov qword [rsp + 0x140], r14
mov qword [rsp + 0x148], r14
mov qword [rsp + 0x150], r14
mov rdx, qword [rsp + 0x128]
test rdx, rdx
jne 0x140022f22
lea rcx, [rsp + 0x1f0]
call fcn.1400392a0
nop
lea rcx, [rsp + 0x4a0]
call fcn.140022360
nop
mov rdx, rax
lea rcx, [rsp + 0x200]
call fcn.140044be0
lea rdx, str.ERROR
mov rcx, rax
call fcn.140044990
lea rdx, str.e:cryptonight_bitmonero_mastercontribepeeinclude_net_net_helper.h
mov rcx, rax
call fcn.140044990
lea rdx, [0x1400d6914]
mov rcx, rax
call fcn.140044990
mov edx, 0x91
mov rcx, rax
call fcn.140037330
lea rdx, [0x1400d68a4]
mov rcx, rax
call fcn.140044990
lea rdx, str.Failed_to_resolve
mov rcx, rax
call fcn.140044990
mov rdx, r15
mov rcx, rax
call fcn.140044be0
mov rbx, rax
mov rcx, rax
call fcn.140037970
mov rcx, rbx
call fcn.140037ab0
nop
cmp qword [rsp + 0x4b8], 0x10
jb 0x140022dd1
mov rcx, qword [rsp + 0x4a0]
call fcn.1400855f8
lea rdx, [rsp + 0x480]
lea rcx, [rsp + 0x1f0]
call fcn.140039410
nop
mov r9b, 1
xor edx, edx
lea r8d, [rdx + 2]
mov rcx, rax
call fcn.140022240
nop
cmp qword [rsp + 0x498], 0x10
jb 0x140022e11
mov rcx, qword [rsp + 0x480]
call fcn.1400855f8
inc qword [0x140133b98]
lea rcx, [rsp + 0x288]
call fcn.140039340
lea rax, vtable.std::ios_base.0
mov qword [rsp + 0x288], rax
lea rcx, [rsp + 0x288]
call fcn.140067028
nop
mov rbx, qword [rsp + 0x130]
test rbx, rbx
je 0x140022e77
mov eax, esi
lock xadd dword [rbx + 8], eax
dec eax
jne 0x140022e77
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax]
mov eax, esi
lock xadd dword [rbx + 0xc], eax
dec eax
jne 0x140022e77
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + reloc.WS2_32.dll_htonl]
nop
cmp qword [rsp + 0x458], 0x10
jb 0x140022e8f
mov rcx, qword [rsp + 0x440]
call fcn.1400855f8
mov qword [rsp + 0x458], 0xf
mov qword [rsp + 0x450], r14
mov byte [rsp + 0x440], 0
cmp qword [rsp + 0x438], 0x10
jb 0x140022ec3
mov rcx, qword [rsp + 0x420]
call fcn.1400855f8
mov qword [rsp + 0x438], 0xf
mov qword [rsp + 0x430], r14
mov byte [rsp + 0x420], 0
mov rcx, qword [rsp + 0xd8]
test rcx, rcx
je 0x140022f1b
mov eax, esi
lock xadd dword [rcx + 8], eax
dec eax
jne 0x140022f1b
mov rbx, qword [rsp + 0xd8]
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax]
lock dec dword [rbx + 0xc]
jne 0x140022f1b
mov rcx, qword [rsp + 0xd8]
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_htonl]
xor al, al
jmp 0x140023485
mov rax, qword [rsp + 0x138]
lea rcx, [rax + rax*2]
shl rcx, 5
add rcx, qword [rdx]
mov eax, dword [rcx]
mov dword [rsp + 0xa0], eax
mov eax, dword [rcx + 4]
mov dword [rsp + 0xa4], eax
mov eax, dword [rcx + 8]
mov dword [rsp + 0xa8], eax
mov eax, dword [rcx + 0xc]
mov dword [rsp + 0xac], eax
mov eax, dword [rcx + 0x10]
mov dword [rsp + 0xb0], eax
mov eax, dword [rcx + 0x14]
mov dword [rsp + 0xb4], eax
mov ecx, dword [rcx + 0x18]
mov dword [rsp + 0xb8], ecx
mov rax, qword [rsp + 0xa0]
mov qword [rsp + 0x460], rax
mov rax, qword [rsp + 0xa8]
mov qword [rsp + 0x468], rax
mov rax, qword [rsp + 0xb0]
mov qword [rsp + 0x470], rax
mov dword [rsp + 0x478], ecx
mov eax, reloc.WS2_32.dll_socket
mov ecx, 2
cmp word [rsp + 0xa0], cx
cmove eax, ecx
mov dword [rsp + 0x50], eax
lea rdx, [rsp + 0x50]
lea rcx, [rdi + 0x18]
call fcn.14003a0e0
mov r14, qword [rsp + 0x588]
mov rbx, qword [r14 + 0x10]
cmp qword [r14 + 0x18], 0x10
jb 0x140022ff0
mov rcx, qword [r14]
jmp 0x140022ff3
mov rcx, r14
mov r8d, 7
cmp rbx, r8
cmovb r8, rbx
test r8, r8
jne 0x140023009
xor eax, eax
jmp 0x140023015
lea rdx, str.0.0.0.0
call fcn.140090900
cdqe
test rax, rax
jne 0x14002302f
cmp rbx, 7
jae 0x140023026
mov eax, esi
jmp 0x14002302f
xor eax, eax
cmp rbx, 7
setne al
test eax, eax
sete al
test al, al
sete al
test al, al
je 0x140023225
cmp qword [r14 + 0x18], 0x10
jb 0x14002304b
mov r14, qword [r14]
mov r8d, 1
cmp rbx, r8
cmovb r8, rbx
test r8, r8
jne 0x140023061
xor eax, eax
jmp 0x140023070
lea rdx, [0x1400d783c]
mov rcx, r14
call fcn.140090900
cdqe
test rax, rax
jne 0x14002308a
cmp rbx, 1
jae 0x140023081
mov eax, esi
jmp 0x14002308a
xor eax, eax
cmp rbx, 1
setne al
test eax, eax
sete al
test al, al
sete al
test al, al
je 0x140023225
xor eax, eax
test rbx, rbx
setne al
test eax, eax
sete al
test al, al
sete al
test al, al
je 0x140023225
cmp qword [r15 + 0x18], 0x10
jb 0x1400230c0
mov r15, qword [r15]
xor ebx, ebx
mov dword [rsp + 0x58], ebx
call fcn.14006cb10
mov qword [rsp + 0x60], rax
xor eax, eax
mov qword [rsp + 0x68], rax
mov qword [rsp + 0x70], rax
mov dword [rsp + 0x78], ebx
lea rax, [rsp + 0x58]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x78]
lea r8, [rsp + 0x68]
mov rdx, r15
lea ecx, [rbx + 0x17]
call fcn.14001e7e0
test eax, eax
jg 0x14002311a
xor eax, eax
mov ecx, eax
mov qword [rsp + 0xf8], rax
mov edx, ebx
mov dword [rsp + 0x100], ebx
jmp 0x140023137
mov rax, qword [rsp + 0x68]
mov rcx, qword [rsp + 0x70]
mov qword [rsp + 0xf8], rcx
mov edx, dword [rsp + 0x78]
mov dword [rsp + 0x100], edx
mov qword [rsp + 0xf0], rax
cmp dword [rsp + 0x58], ebx
jne 0x140023184
mov dword [rsp + 0x1ac], ebx
xor r8d, r8d
mov qword [rsp + 0x1b0], r8
mov qword [rsp + 0x1b8], r8
mov qword [rsp + 0x80], 1
mov qword [rsp + 0x88], rax
mov qword [rsp + 0x90], rcx
mov dword [rsp + 0x98], edx
jmp 0x1400231f3
mov dword [rsp + 0x34], ebx
lea rax, [rsp + 0x58]
mov qword [rsp + 0x20], rax
xor r9d, r9d
lea r8, [rsp + 0x34]
mov rdx, r15
lea ecx, [r9 + 2]
call fcn.14001e7e0
mov ecx, dword [rsp + 0x34]
test eax, eax
cmovle ecx, ebx
mov dword [rsp + 0x118], ecx
cmp dword [rsp + 0x58], ebx
jne 0x14002321b
xor edx, edx
mov qword [rsp + 0x1d0], rdx
mov qword [rsp + 0x1d8], rdx
mov dword [rsp + 0x80], ebx
mov dword [rsp + 0x84], ecx
mov qword [rsp + 0x88], rdx
mov qword [rsp + 0x90], rdx
mov dword [rsp + 0x98], ebx
lea rdx, [rsp + 0x80]
lea rcx, [rsp + 0x4c0]
call fcn.140020d00
lea rdx, [rsp + 0x4c0]
lea rcx, [rdi + 0x18]
call fcn.14003a360
jmp 0x140023227
lea rcx, [rsp + 0x58]
call fcn.14001c660
xor ebx, ebx
movsxd rax, dword [rdi + 0x80]
imul rax, rax, 0x3e8
mov qword [rsp + 0x120], rax
lea rcx, [rdi + 0x90]
lea rdx, [rsp + 0x120]
call fcn.14003a7a0
call fcn.14006cb10
mov dword [rsp + 0x40], 0x2733
mov qword [rsp + 0x48], rax
movaps xmm0, xmmword [rsp + 0x40]
movdqa xmmword [rsp + 0xe0], xmm0
lea rax, [rsp + 0xe0]
mov qword [rsp + 0x190], rax
lea r8, [rsp + 0x190]
lea rdx, [rsp + 0x460]
lea rcx, [rdi + 0x18]
call fcn.140045b40
nop word [rax + rax]
call fcn.14006cb10
cmp qword [rsp + 0xe8], rax
mov eax, dword [rsp + 0xe0]
jne 0x1400233aa
cmp eax, 0x2733
jne 0x1400233aa
mov dword [rsp + 0x40], ebx
call fcn.14006cb10
mov qword [rsp + 0x48], rax
mov rbx, qword [rdi + 0x10]
xor ecx, ecx
mov eax, ecx
lock xadd dword [rbx + 0x30], eax
test eax, eax
jne 0x140023315
mov rcx, rbx
call fcn.14001d4a0
xor ebx, ebx
mov dword [rsp + 0x180], ebx
call fcn.14006cb10
mov qword [rsp + 0x188], rax
movaps xmm0, xmmword [rsp + 0x180]
movdqa xmmword [rsp + 0x40], xmm0
jmp 0x140023395
mov qword [rsp + 0xc0], rcx
mov qword [rsp + 0x158], rbx
lea rax, [rsp + 0xc0]
mov qword [rsp + 0x160], rax
mov ecx, dword [0x140133c18]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov qword [rsp + 0x168], rax
lea rdx, [rsp + 0x158]
mov ecx, dword [0x140133c18]
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
nop
lea r8, [rsp + 0x40]
mov rcx, rbx
call fcn.14001d790
nop
mov rdx, qword [rsp + 0x168]
mov ecx, dword [0x140133c18]
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
nop
mov rcx, qword [rsp + 0xc0]
test rcx, rcx
je 0x140023393
call fcn.1400855f8
xor ebx, ebx
cmp dword [rsp + 0x40], 0
je 0x1400232a0
lea rcx, [rsp + 0x40]
call fcn.14001c660
test eax, eax
jne 0x140023448
cmp qword [rdi + 0x18], 0xffffffffffffffff
je 0x140023448
mov byte [rdi + 0x89], 1
movabs rax, 0x7fffffffffffffff
mov qword [rsp + 0x108], rax
mov dword [rsp + 0x54], 0xffffffff
lea r8, [rsp + 0x108]
lea rdx, [rsp + 0x54]
lea rcx, [rsp + 0x110]
call fcn.14003fdf0
lea rcx, [rdi + 0x90]
lea rdx, [rsp + 0x110]
call fcn.14003a720
nop
lea rcx, [rsp + 0x140]
call fcn.140024510
nop
lea rcx, [rsp + 0x128]
call fcn.140024510
nop
lea rcx, [rsp + 0x3f0]
call fcn.1400244b0
nop
lea rcx, [rsp + 0xc8]
call fcn.1400244a0
mov al, 1
jmp 0x140023485
lea rcx, [rsp + 0x140]
call fcn.140024510
nop
lea rcx, [rsp + 0x128]
call fcn.140024510
nop
lea rcx, [rsp + 0x3f0]
call fcn.1400244b0
nop
lea rcx, [rsp + 0xc8]
call fcn.1400244a0
xor al, al
jmp 0x140023485
mov rcx, qword [rsp + 0x528]
xor rcx, rsp
call fcn.140084a30
mov rbx, qword [rsp + 0x578]
add rsp, 0x530
pop r15
pop r14
pop r13
pop rdi
pop rsi
ret