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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2f0
mov eax, dword [0x427484]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
push esi
push edi
mov edi, dword [0x443aac]
xor ebx, ebx
mov eax, edi
xor ecx, ecx
cmp eax, ebx
je 0x40b378
mov eax, dword [eax + 0x4584]
inc ecx
cmp eax, ebx
jne 0x40b302
cmp ecx, 0x64
jl 0x40b378
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 0x40b370
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.00407001
add esp, 0xc
or eax, 0xffffffff
jmp 0x40b5e0
mov esi, edi
jmp 0x40b38b
cmp dword [esi + 4], ebx
je 0x40b385
cmp dword [esi], ebx
je 0x40b38f
mov esi, dword [esi + 0x4584]
cmp esi, ebx
jne 0x40b37c
xor eax, eax
cmp esi, ebx
sete al
mov dword [ebp - 0x2ec], eax
cmp eax, ebx
je 0x40b3e7
cmp edi, ebx
je 0x40b3b8
mov eax, dword [edi + 0x4584]
cmp eax, ebx
je 0x40b3b4
mov edi, eax
cmp edi, ebx
jne 0x40b3a4
cmp edi, ebx
jne 0x40b3cb
push 0x4588
push 1
call fcn.004102d6
mov dword [0x443aac], eax
jmp 0x40b3dd
push 0x4588
push 1
call fcn.004102d6
mov dword [edi + 0x4584], eax
pop ecx
mov esi, eax
pop ecx
mov dword [esi + 0x4584], ebx
mov eax, esi
call fcn.0040b079
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 0x40b459
call fcn.0040e9cb
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.Error_:_RecvFrom_returns__d:___s_
push ebx
call fcn.00407001
add esp, 0x10
cmp dword [esi + 4], ebx
jne 0x40b5dd
mov eax, dword [0x443aac]
jmp 0x40b44a
mov eax, ecx
mov ecx, dword [eax + 0x4584]
cmp ecx, esi
jne 0x40b448
jmp 0x40b4ed
push edi
mov ebx, eax
lea ecx, [esi + 0x42e8]
call fcn.0040b1bf
pop ecx
push 0xa
test eax, eax
je 0x40b505
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 0x40b4be
lea eax, [esi + 0x4270]
call fcn.0040ada4
test al, al
je 0x40b4be
lea eax, [ebp - 0x29]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x40b4a3
sub eax, edx
inc eax
push eax
lea eax, [ebp - 0x29]
push eax
lea eax, [ebp - 0x30]
push eax
call fcn.00411d00
add esp, 0xc
lea eax, [ebp - 0x30]
push eax
push str.Warning_:_Unaccepted_request_received_from__s
push 1
call fcn.00407001
add esp, 0xc
cmp dword [esi + 4], ebx
jne 0x40b5dd
mov eax, dword [0x443aac]
jmp 0x40b4e3
mov eax, ecx
mov ecx, dword [eax + 0x4584]
cmp ecx, esi
jne 0x40b4e1
mov ecx, dword [esi + 0x4584]
push esi
mov dword [eax + 0x4584], ecx
call fcn.0041029c
pop ecx
jmp 0x40b5dd
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 0x40b553
lea eax, [esi + 0x4270]
call fcn.0040ada4
test al, al
je 0x40b553
lea eax, [ebp - 0x51]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40b538
sub eax, edx
inc eax
push eax
lea eax, [ebp - 0x51]
push eax
lea eax, [ebp - 0x58]
push eax
call fcn.00411d00
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.00407001
xor ebx, ebx
add esp, 0x10
mov dword [esi], edi
cmp dword [ebp - 0x2ec], ebx
je 0x40b5bc
lea edi, [esi + 0xc]
push edi
push ebx
push esi
push 0x40ce0c
push 0x2000
push ebx
call dword [sym.imp.KERNEL32.dll_CreateThread]
push esi
push dword [0x443aac]
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.0040e70d
push dword [esi + 8]
push str.thread__d_started
push 9
call fcn.00407001
add esp, 0x20
jmp 0x40b5dd
push dword [esi + 0x18]
push dword [esi + 0xc]
push str.waking_up_thread__d_for_transfer__d_n
call fcn.0040e70d
mov esi, dword [esi + 0x10]
add esp, 0xc
cmp esi, ebx
je 0x40b5dd
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.0040ffa3
leave
ret