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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [0x454004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov ebx, ecx
mov ecx, str.worker
push edi
call fcn.00406270
mov dword [ebp - 0x10], 0
mov eax, 1
lock xadd dword [0x456930], 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 0x411bea
push 1
push ebx
call eax
add esp, 8
push 0x4320
push 1
call fcn.004296e8
mov edi, eax
add esp, 8
test edi, edi
jne 0x411c21
push str.Cannot_create_new_connection_struct__OOM
push 0x44c068
push 0x456960
mov dword [0x456bd0], ebx
call fcn.004064e0
add esp, 0xc
jmp 0x411d1f
lea eax, [ebp - 0x10]
push eax
push dword [0x456c8c]
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.004119f0
test eax, eax
je 0x411d1f
lea esi, [edi + 0x290]
push 0
call fcn.0042933f
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 0x411ccf
cmp word [esi], 2
jne 0x411ccf
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 0x411cfc
mov edx, dword [edi + 0x270]
mov ecx, edi
push dword [0x454ae4]
mov edx, dword [edx + 4]
call fcn.00410280
add esp, 4
test eax, eax
je 0x411d03
mov ecx, edi
call fcn.004115e0
mov ecx, edi
call fcn.00410e80
lea edx, [edi + 0x27c]
mov ecx, ebx
call fcn.004119f0
test eax, eax
jne 0x411c83
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 0x411d7b
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 0x411d77
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 0x411d64
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 [0x456c8c]
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.00425f00
mov ecx, dword [ebp - 4]
add esp, 4
xor ecx, ebp
xor eax, eax
pop edi
pop esi
pop ebx
call fcn.00423c62
mov esp, ebp
pop ebp
ret