Function at 0x40caf3
Capabilities:
Create thread
Receive data
Receive data on socket
Resolve dns

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2f0
mov eax, dword [0x4294a4]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
push esi
push edi
mov edi, dword [0x44618c]
xor ebx, ebx
mov eax, edi
xor ecx, ecx
cmp eax, ebx
je 0x40cb8f
mov eax, dword [eax + 0x4584]
inc ecx
cmp eax, ebx
jne 0x40cb19
cmp ecx, 0x64
jl 0x40cb8f
lea eax, [ebp - 0x2e8]
push eax
lea eax, [ebp - 0x2e4]
push eax
push ebx
push 0x204
lea eax, [ebp - 0x264]
push eax
push dword [ebp + 8]
mov esi, 0x80
mov dword [ebp - 0x2e8], esi
call dword [sym.imp.WS2_32.dll_recvfrom]
test eax, eax
jle 0x40cb87
push 2
push ebx
push ebx
push 0x28
lea eax, [ebp - 0x58]
push eax
push esi
lea eax, [ebp - 0x2e4]
push eax
call dword [sym.imp.WS2_32.dll_getnameinfo]
lea eax, [ebp - 0x58]
push eax
push str.max_number_of_threads_reached__connection_from__s_dropped
push 1
call fcn.0040764f
add esp, 0xc
or eax, 0xffffffff
jmp 0x40cdf7
mov esi, edi
jmp 0x40cba2
cmp dword [esi + 4], ebx
je 0x40cb9c
cmp dword [esi], ebx
je 0x40cba6
mov esi, dword [esi + 0x4584]
cmp esi, ebx
jne 0x40cb93
xor eax, eax
cmp esi, ebx
sete al
mov dword [ebp - 0x2ec], eax
cmp eax, ebx
je 0x40cbfe
cmp edi, ebx
je 0x40cbcf
mov eax, dword [edi + 0x4584]
cmp eax, ebx
je 0x40cbcb
mov edi, eax
cmp edi, ebx
jne 0x40cbbb
cmp edi, ebx
jne 0x40cbe2
push 0x4588
push 1
call fcn.00411f00
mov dword [0x44618c], eax
jmp 0x40cbf4
push 0x4588
push 1
call fcn.00411f00
mov dword [edi + 0x4584], eax
pop ecx
mov esi, eax
pop ecx
mov dword [esi + 0x4584], ebx
mov eax, esi
call fcn.0040c890
lea edx, [ebp - 0x2e8]
push edx
lea edi, [esi + 0x4268]
push edi
push ebx
mov eax, 0x204
push eax
lea ecx, [esi + 0x42e8]
push ecx
push dword [ebp + 8]
mov dword [ebp - 0x2e8], eax
call dword [sym.imp.WS2_32.dll_recvfrom]
cmp eax, ebx
jge 0x40cc70
call fcn.004104c7
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.Error_:_RecvFrom_returns__d:___s_
push ebx
call fcn.0040764f
add esp, 0x10
cmp dword [esi + 4], ebx
jne 0x40cdf4
mov eax, dword [0x44618c]
jmp 0x40cc61
mov eax, ecx
mov ecx, dword [eax + 0x4584]
cmp ecx, esi
jne 0x40cc5f
jmp 0x40cd04
push edi
mov ebx, eax
lea ecx, [esi + 0x42e8]
call fcn.0040c9d6
pop ecx
push 0xa
test eax, eax
je 0x40cd1c
xor ebx, ebx
push ebx
push ebx
push 0x28
lea eax, [ebp - 0x30]
push eax
push 0x80
push edi
call dword [sym.imp.WS2_32.dll_getnameinfo]
cmp word [edi], 0x17
jne 0x40ccd5
lea eax, [esi + 0x4270]
call fcn.0040c25c
test al, al
je 0x40ccd5
lea eax, [ebp - 0x29]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x40ccba
sub eax, edx
inc eax
push eax
lea eax, [ebp - 0x29]
push eax
lea eax, [ebp - 0x30]
push eax
call fcn.00413830
add esp, 0xc
lea eax, [ebp - 0x30]
push eax
push str.Warning_:_Unaccepted_request_received_from__s
push 1
call fcn.0040764f
add esp, 0xc
cmp dword [esi + 4], ebx
jne 0x40cdf4
mov eax, dword [0x44618c]
jmp 0x40ccfa
mov eax, ecx
mov ecx, dword [eax + 0x4584]
cmp ecx, esi
jne 0x40ccf8
mov ecx, dword [esi + 0x4584]
push esi
mov dword [eax + 0x4584], ecx
call fcn.00411ec6
pop ecx
jmp 0x40cdf4
push 0x20
lea eax, [ebp - 0x28]
push eax
push 0x28
lea eax, [ebp - 0x58]
push eax
push 0x80
push edi
call dword [sym.imp.WS2_32.dll_getnameinfo]
cmp word [edi], 0x17
jne 0x40cd6a
lea eax, [esi + 0x4270]
call fcn.0040c25c
test al, al
je 0x40cd6a
lea eax, [ebp - 0x51]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40cd4f
sub eax, edx
inc eax
push eax
lea eax, [ebp - 0x51]
push eax
lea eax, [ebp - 0x58]
push eax
call fcn.00413830
add esp, 0xc
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x58]
push eax
xor edi, edi
push str.Connection_received_from__s_on_port__s
inc edi
push edi
call fcn.0040764f
xor ebx, ebx
add esp, 0x10
mov dword [esi], edi
cmp dword [ebp - 0x2ec], ebx
je 0x40cdd3
lea edi, [esi + 0xc]
push edi
push ebx
push esi
push 0x40e7b0
push 0x2000
push ebx
call dword [sym.imp.KERNEL32.dll_CreateThread]
push esi
push dword [0x44618c]
mov dword [esi + 8], eax
push dword [esi + 0x18]
push dword [edi]
push str.Thread__d_transfer__d_started__records__p__p__n
call fcn.00410209
push dword [esi + 8]
push str.thread__d_started
push 9
call fcn.0040764f
add esp, 0x20
jmp 0x40cdf4
push dword [esi + 0x18]
push dword [esi + 0xc]
push str.waking_up_thread__d_for_transfer__d_n
call fcn.00410209
mov esi, dword [esi + 0x10]
add esp, 0xc
cmp esi, ebx
je 0x40cdf4
push esi
call dword [sym.imp.KERNEL32.dll_SetEvent]
xor eax, eax
inc eax
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00411a98
leave
ret