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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [0x452004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov ebx, ecx
mov ecx, str.worker
push edi
call fcn.004060f0
mov dword [ebp - 0x10], 0
mov eax, 1
lock xadd dword [0x454910], eax
inc eax
push 0
push 0
push 0
push 0
mov dword [ebp - 0xc], eax
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov dword [ebp - 8], eax
mov eax, dword [ebx + 0xc4]
test eax, eax
je 0x411a7a
push 1
push ebx
call eax
add esp, 8
push 0x4320
push 1
call fcn.00428038
mov edi, eax
add esp, 8
test edi, edi
jne 0x411ab1
push str.Cannot_create_new_connection_struct__OOM
push 0x44a068
push 0x454940
mov dword [0x454bb0], ebx
call fcn.00406360
add esp, 0xc
jmp 0x411baf
lea eax, [ebp - 0x10]
push eax
push dword [0x454c6c]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
push 0
lea eax, [edi + 0x320]
mov dword [edi + 0x2f4], 0x4000
push 0
mov dword [edi + 0x2e0], eax
mov dword [edi + 0x270], ebx
mov eax, dword [ebx + 0xcc]
push 0
mov dword [edi + 0x60], eax
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
lea edx, [edi + 0x27c]
mov dword [edi + 0x318], eax
mov ecx, ebx
call fcn.00411880
test eax, eax
je 0x411baf
lea esi, [edi + 0x290]
push 0
call fcn.00427b7f
add esp, 4
mov dword [edi + 0x2a8], eax
movzx eax, word [edi + 0x292]
mov dword [edi + 0x2ac], edx
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
movzx eax, ax
mov dword [edi + 0x58], eax
lea eax, [edi + 0x1c]
mov byte [eax], 0
test esi, esi
je 0x411b5f
cmp word [esi], 2
jne 0x411b5f
push 2
push 0
push 0
push 0x30
push eax
push 0x10
push esi
call dword [sym.imp.WS2_32.dll_getnameinfo]
mov cl, byte [edi + 0x2a0]
movzx eax, cl
mov dword [edi + 0x5c], eax
test cl, cl
je 0x411b8c
mov edx, dword [edi + 0x270]
mov ecx, edi
push dword [0x452ae4]
mov edx, dword [edx + 4]
call fcn.00410110
add esp, 4
test eax, eax
je 0x411b93
mov ecx, edi
call fcn.00411470
mov ecx, edi
call fcn.00410d10
lea edx, [edi + 0x27c]
mov ecx, ebx
call fcn.00411880
test eax, eax
jne 0x411b13
push 0xffffffffffffffff
push dword [ebx + 0xe4]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [ebx + 0xe0]
lea esi, [ebx + 0xe8]
dec eax
push esi
mov dword [ebx + 0xe0], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esi + 0x18], 0
je 0x411c0b
mov eax, dword [esi + 0x1c]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov eax, dword [esi + 0x18]
mov edx, 1
cmp eax, edx
jle 0x411c07
mov eax, dword [esi + 0x1c]
lea ecx, [eax + edx*4]
inc edx
mov eax, dword [ecx]
mov dword [ecx - 4], eax
mov eax, dword [esi + 0x18]
cmp edx, eax
jl 0x411bf4
dec eax
mov dword [esi + 0x18], eax
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push dword [ebx + 0xe4]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push 0
push dword [0x454c6c]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
push dword [ebp - 8]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [edi + 0x318]
call esi
push edi
call fcn.00424740
mov ecx, dword [ebp - 4]
add esp, 4
xor ecx, ebp
xor eax, eax
pop edi
pop esi
pop ebx
call fcn.00422702
mov esp, ebp
pop ebp
ret