Function at 0x140022800
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 0x140022865
mov dword [rcx + 0x84], r9d
add rcx, 0x18
call fcn.140039d70
lea rax, vtable.type_info.0
mov qword [rsp + 0x170], rax
xor r14d, r14d
mov qword [rsp + 0x178], r14
lea r8, [0x140055860]
lea rdx, [rsp + 0x170]
mov rcx, qword [rdi + 8]
call fcn.14001c680
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.140044e20
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 [0x1400db270]
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.14003a3b0
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 0x140022be2
lea rcx, [rsp + 0x1f0]
call fcn.140038e00
nop
lea rcx, [rsp + 0x4a0]
call fcn.140022020
nop
mov rdx, rax
lea rcx, [rsp + 0x200]
call fcn.140044740
lea rdx, str.ERROR
mov rcx, rax
call fcn.1400444f0
lea rdx, str.e:cryptonight_bitmonero_mastercontribepeeinclude_net_net_helper.h
mov rcx, rax
call fcn.1400444f0
lea rdx, [0x1400d68f4]
mov rcx, rax
call fcn.1400444f0
mov edx, 0x91
mov rcx, rax
call fcn.140036e90
lea rdx, [0x1400d6884]
mov rcx, rax
call fcn.1400444f0
lea rdx, str.Failed_to_resolve
mov rcx, rax
call fcn.1400444f0
mov rdx, r15
mov rcx, rax
call fcn.140044740
mov rbx, rax
mov rcx, rax
call fcn.1400374d0
mov rcx, rbx
call fcn.140037610
nop
cmp qword [rsp + 0x4b8], 0x10
jb 0x140022a91
mov rcx, qword [rsp + 0x4a0]
call fcn.140085158
lea rdx, [rsp + 0x480]
lea rcx, [rsp + 0x1f0]
call fcn.140038f70
nop
mov r9b, 1
xor edx, edx
lea r8d, [rdx + 2]
mov rcx, rax
call fcn.140021f00
nop
cmp qword [rsp + 0x498], 0x10
jb 0x140022ad1
mov rcx, qword [rsp + 0x480]
call fcn.140085158
inc qword [0x140133b08]
lea rcx, [rsp + 0x288]
call fcn.140038ea0
lea rax, vtable.std::ios_base.0
mov qword [rsp + 0x288], rax
lea rcx, [rsp + 0x288]
call fcn.140066b88
nop
mov rbx, qword [rsp + 0x130]
test rbx, rbx
je 0x140022b37
mov eax, esi
lock xadd dword [rbx + 8], eax
dec eax
jne 0x140022b37
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax]
mov eax, esi
lock xadd dword [rbx + 0xc], eax
dec eax
jne 0x140022b37
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + reloc.WS2_32.dll_htonl]
nop
cmp qword [rsp + 0x458], 0x10
jb 0x140022b4f
mov rcx, qword [rsp + 0x440]
call fcn.140085158
mov qword [rsp + 0x458], 0xf
mov qword [rsp + 0x450], r14
mov byte [rsp + 0x440], 0
cmp qword [rsp + 0x438], 0x10
jb 0x140022b83
mov rcx, qword [rsp + 0x420]
call fcn.140085158
mov qword [rsp + 0x438], 0xf
mov qword [rsp + 0x430], r14
mov byte [rsp + 0x420], 0
mov rcx, qword [rsp + 0xd8]
test rcx, rcx
je 0x140022bdb
mov eax, esi
lock xadd dword [rcx + 8], eax
dec eax
jne 0x140022bdb
mov rbx, qword [rsp + 0xd8]
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax]
lock dec dword [rbx + 0xc]
jne 0x140022bdb
mov rcx, qword [rsp + 0xd8]
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_htonl]
xor al, al
jmp 0x140023145
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.140039c40
mov r14, qword [rsp + 0x588]
mov rbx, qword [r14 + 0x10]
cmp qword [r14 + 0x18], 0x10
jb 0x140022cb0
mov rcx, qword [r14]
jmp 0x140022cb3
mov rcx, r14
mov r8d, 7
cmp rbx, r8
cmovb r8, rbx
test r8, r8
jne 0x140022cc9
xor eax, eax
jmp 0x140022cd5
lea rdx, str.0.0.0.0
call fcn.140090520
cdqe
test rax, rax
jne 0x140022cef
cmp rbx, 7
jae 0x140022ce6
mov eax, esi
jmp 0x140022cef
xor eax, eax
cmp rbx, 7
setne al
test eax, eax
sete al
test al, al
sete al
test al, al
je 0x140022ee5
cmp qword [r14 + 0x18], 0x10
jb 0x140022d0b
mov r14, qword [r14]
mov r8d, 1
cmp rbx, r8
cmovb r8, rbx
test r8, r8
jne 0x140022d21
xor eax, eax
jmp 0x140022d30
lea rdx, [0x1400d779c]
mov rcx, r14
call fcn.140090520
cdqe
test rax, rax
jne 0x140022d4a
cmp rbx, 1
jae 0x140022d41
mov eax, esi
jmp 0x140022d4a
xor eax, eax
cmp rbx, 1
setne al
test eax, eax
sete al
test al, al
sete al
test al, al
je 0x140022ee5
xor eax, eax
test rbx, rbx
setne al
test eax, eax
sete al
test al, al
sete al
test al, al
je 0x140022ee5
cmp qword [r15 + 0x18], 0x10
jb 0x140022d80
mov r15, qword [r15]
xor ebx, ebx
mov dword [rsp + 0x58], ebx
call fcn.14006c660
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.14001e4a0
test eax, eax
jg 0x140022dda
xor eax, eax
mov ecx, eax
mov qword [rsp + 0xf8], rax
mov edx, ebx
mov dword [rsp + 0x100], ebx
jmp 0x140022df7
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 0x140022e44
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 0x140022eb3
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.14001e4a0
mov ecx, dword [rsp + 0x34]
test eax, eax
cmovle ecx, ebx
mov dword [rsp + 0x118], ecx
cmp dword [rsp + 0x58], ebx
jne 0x140022edb
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.1400209c0
lea rdx, [rsp + 0x4c0]
lea rcx, [rdi + 0x18]
call fcn.140039ec0
jmp 0x140022ee7
lea rcx, [rsp + 0x58]
call fcn.14001c320
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.14003a300
call fcn.14006c660
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.1400456a0
nop word [rax + rax]
call fcn.14006c660
cmp qword [rsp + 0xe8], rax
mov eax, dword [rsp + 0xe0]
jne 0x14002306a
cmp eax, 0x2733
jne 0x14002306a
mov dword [rsp + 0x40], ebx
call fcn.14006c660
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 0x140022fd5
mov rcx, rbx
call fcn.14001d160
xor ebx, ebx
mov dword [rsp + 0x180], ebx
call fcn.14006c660
mov qword [rsp + 0x188], rax
movaps xmm0, xmmword [rsp + 0x180]
movdqa xmmword [rsp + 0x40], xmm0
jmp 0x140023055
mov qword [rsp + 0xc0], rcx
mov qword [rsp + 0x158], rbx
lea rax, [rsp + 0xc0]
mov qword [rsp + 0x160], rax
mov ecx, dword [0x140133b88]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov qword [rsp + 0x168], rax
lea rdx, [rsp + 0x158]
mov ecx, dword [0x140133b88]
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
nop
lea r8, [rsp + 0x40]
mov rcx, rbx
call fcn.14001d450
nop
mov rdx, qword [rsp + 0x168]
mov ecx, dword [0x140133b88]
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
nop
mov rcx, qword [rsp + 0xc0]
test rcx, rcx
je 0x140023053
call fcn.140085158
xor ebx, ebx
cmp dword [rsp + 0x40], 0
je 0x140022f60
lea rcx, [rsp + 0x40]
call fcn.14001c320
test eax, eax
jne 0x140023108
cmp qword [rdi + 0x18], 0xffffffffffffffff
je 0x140023108
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.14003f950
lea rcx, [rdi + 0x90]
lea rdx, [rsp + 0x110]
call fcn.14003a280
nop
lea rcx, [rsp + 0x140]
call fcn.1400241d0
nop
lea rcx, [rsp + 0x128]
call fcn.1400241d0
nop
lea rcx, [rsp + 0x3f0]
call fcn.140024170
nop
lea rcx, [rsp + 0xc8]
call fcn.140024160
mov al, 1
jmp 0x140023145
lea rcx, [rsp + 0x140]
call fcn.1400241d0
nop
lea rcx, [rsp + 0x128]
call fcn.1400241d0
nop
lea rcx, [rsp + 0x3f0]
call fcn.140024170
nop
lea rcx, [rsp + 0xc8]
call fcn.140024160
xor al, al
jmp 0x140023145
mov rcx, qword [rsp + 0x528]
xor rcx, rsp
call fcn.140084590
mov rbx, qword [rsp + 0x578]
add rsp, 0x530
pop r15
pop r14
pop r13
pop rdi
pop rsi
ret