Function at 0x140014850
Capabilities:
Check mutex on windows
Get thread local storage value
Resolve dns
Set thread local storage value

Disassembly:
push rbp
push rsi
push r15
sub rsp, 0x60
mov rax, qword [0x140067008]
xor rax, rsp
mov qword [rsp + 0x50], rax
mov rsi, rcx
lea rcx, str.worker
call fcn.140007690
xor r15d, r15d
mov eax, 1
mov dword [rsp + 0x40], r15d
lock xadd dword [0x14006a908], eax
inc eax
xor r9d, r9d
xor r8d, r8d
mov dword [rsp + 0x44], eax
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventA]
mov qword [rsp + 0x48], rax
mov rax, qword [rsi + 0x188]
test rax, rax
je 0x1400148bc
lea edx, [r15 + 1]
mov rcx, rsi
call rax
mov edx, 0x4560
mov ecx, 1
call fcn.140031998
mov rbp, rax
test rax, rax
jne 0x1400148f9
lea r8, str.Cannot_create_new_connection_struct__OOM
mov qword [0x14006ade0], rsi
lea rdx, [0x140059f14]
lea rcx, [0x14006a950]
call fcn.1400079a0
jmp 0x140014b91
mov ecx, dword [0x14006aeb8]
lea rdx, [rsp + 0x40]
mov qword [rsp + 0x88], rbx
mov qword [rsp + 0x90], rdi
mov qword [rsp + 0x98], r14
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
lea rax, [rbp + 0x560]
mov dword [rbp + 0x534], 0x4000
mov qword [rbp + 0x518], rax
xor r8d, r8d
mov qword [rbp + 0x490], rsi
xor edx, edx
mov rax, qword [rsi + 0x198]
xor ecx, ecx
mov qword [rbp + 0x78], rax
call qword [sym.imp.KERNEL32.dll_CreateMutexA]
mov qword [rbp + 0x558], rax
mov rcx, qword [rsi + 0x1c0]
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ecx, dword [rsi + 0x5c4]
mov eax, dword [rsi + 0x5c0]
cmp eax, ecx
jne 0x140014a05
mov eax, dword [rsi]
test eax, eax
jne 0x140014a05
mov ecx, dword [0x14006aeb8]
lea rbx, [rsi + 0x5c8]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rcx, rbx
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
movsxd r9, dword [rbx + 0x28]
mov rcx, rbx
mov rdx, qword [rdi + 8]
mov r8, qword [rbx + 0x30]
mov qword [r8 + r9*8], rdx
inc dword [rbx + 0x28]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rcx, qword [rsi + 0x1c0]
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov rcx, qword [rdi + 8]
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, qword [rsi + 0x1c0]
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ecx, dword [rsi + 0x5c4]
mov eax, dword [rsi + 0x5c0]
cmp eax, ecx
je 0x140014986
mov ecx, dword [rsi + 0x5c4]
mov eax, dword [rsi + 0x5c0]
cmp eax, ecx
jle 0x140014ab9
mov ecx, dword [rsi + 0x5c4]
mov eax, 0x66666667
imul ecx
sar edx, 3
mov eax, edx
shr eax, 0x1f
add edx, eax
lea eax, [rdx + rdx*4]
shl eax, 2
sub ecx, eax
movsxd rax, ecx
lea rcx, [rax + rax*2]
add rcx, rcx
movups xmm0, xmmword [rsi + rcx*8 + 0x200]
movups xmmword [rbp + 0x4a8], xmm0
movups xmm1, xmmword [rsi + rcx*8 + 0x210]
movups xmmword [rbp + 0x4b8], xmm1
movups xmm0, xmmword [rsi + rcx*8 + 0x220]
movups xmmword [rbp + 0x4c8], xmm0
mov eax, dword [rsi + 0x5c4]
inc eax
mov dword [rsi + 0x5c4], eax
mov eax, dword [rsi + 0x5c4]
cmp eax, 0x14
jle 0x140014ab9
nop dword [rax + rax]
mov eax, dword [rsi + 0x5c4]
sub eax, 0x14
mov dword [rsi + 0x5c4], eax
mov eax, dword [rsi + 0x5c0]
sub eax, 0x14
mov dword [rsi + 0x5c0], eax
mov eax, dword [rsi + 0x5c4]
cmp eax, 0x14
jg 0x140014a90
lea rcx, [rsi + 0x600]
call fcn.140008c70
mov rcx, qword [rsi + 0x1c0]
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov eax, dword [rsi]
test eax, eax
jne 0x140014b79
xor ecx, ecx
call fcn.1400315f0
movzx ecx, word [rbp + 0x4c2]
mov qword [rbp + 0x4d8], rax
call qword [sym.imp.WS2_32.dll_ntohs]
lea rcx, [rbp + 0x4c0]
mov byte [rbp + 0x38], r15b
movzx eax, ax
lea r8, [rbp + 0x38]
mov dword [rbp + 0x70], eax
test rcx, rcx
je 0x140014b38
cmp word [rcx], 2
jne 0x140014b38
mov edx, reloc.WS2_32.dll_recv
mov dword [rsp + 0x30], 2
mov dword [rsp + 0x28], r15d
mov qword [rsp + 0x20], r15
lea r9d, [rdx + 0x20]
call qword [sym.imp.WS2_32.dll_getnameinfo]
movzx eax, byte [rbp + 0x4d0]
mov dword [rbp + 0x74], eax
test al, al
je 0x140014b64
mov rdx, qword [rbp + 0x490]
mov rcx, rbp
mov r8, qword [0x140067d28]
mov rdx, qword [rdx + 8]
call fcn.140012e70
test eax, eax
je 0x140014b6c
mov rcx, rbp
call fcn.140014400
mov rcx, rbp
call fcn.140013c70
jmp 0x140014960
mov rdi, qword [rsp + 0x90]
mov rbx, qword [rsp + 0x88]
mov r14, qword [rsp + 0x98]
mov rcx, qword [rsi + 0x1c0]
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [rsi + 0x1bc]
lea rcx, [rsi + 0x1c8]
dec eax
mov dword [rsi + 0x1bc], eax
call fcn.140008c70
mov rcx, qword [rsi + 0x1c0]
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov ecx, dword [0x14006aeb8]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbp + 0x558]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rbp
call fcn.14002da28
xor eax, eax
mov rcx, qword [rsp + 0x50]
xor rcx, rsp
call fcn.14002b5c0
add rsp, 0x60
pop r15
pop rsi
pop rbp
ret