Function at 0x4030e0
Capabilities:
Create thread
Get hostname
Initialize winsock library
Resolve dns
Set socket configuration

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x407371
push eax
mov dword fs:[0], esp
sub esp, 0x5d4
lea eax, [esp + 0x14c]
push ebx
push ebp
push esi
push edi
push eax
mov ebp, ecx
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
xor ebx, ebx
cmp eax, ebx
push ebx
je 0x40312d
push ebx
push str.Error_at_WSAStartup___
mov ecx, ebp
call sub.MFC42.DLL_CWnd::MessageBoxA
jmp 0x403487
push 2
push 2
call dword [sym.imp.WS2_32.dll_socket]
or edi, 0xffffffff
mov dword [ebp + 0x94], eax
cmp eax, edi
push ebx
jne 0x40315d
push ebx
push str.Error_at_socket___
mov ecx, ebp
call sub.MFC42.DLL_CWnd::MessageBoxA
call dword [sym.imp.WS2_32.dll_WSACleanup]
jmp 0x403487
call dword [sym.imp.WS2_32.dll_htonl]
push 0xcdb4
mov dword [esp + 0x54], eax
mov word [esp + 0x50], 2
call dword [sym.imp.WS2_32.dll_htons]
mov edx, dword [ebp + 0x94]
lea ecx, [esp + 0x28]
push 4
push ecx
push 0x20
push 0xffff
push edx
mov word [esp + 0x62], ax
mov dword [esp + 0x3c], 1
call dword [sym.imp.WS2_32.dll_setsockopt]
mov ecx, dword [ebp + 0x94]
lea eax, [esp + 0x4c]
push 0x10
push eax
push ecx
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x4031d2
push ebx
push ebx
push str.Error_at_bind___
mov ecx, ebp
call sub.MFC42.DLL_CWnd::MessageBoxA
call dword [sym.imp.WS2_32.dll_WSACleanup]
jmp 0x403487
lea ecx, [ebp + 0xa0]
push str.255.255.255.255
call sub.MFC42.DLL_CString::operator_1
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::CString_1
lea edx, [esp + 0x5c]
push 0xff
push edx
mov dword [esp + 0x5f4], ebx
call dword [sym.imp.WS2_32.dll_gethostname]
test eax, eax
jne 0x403463
lea eax, [esp + 0x5c]
push eax
call dword [sym.imp.WS2_32.dll_gethostbyname]
cmp eax, ebx
je 0x40345a
mov ecx, dword [eax + 0xc]
lea esi, [ebp + 0x98]
mov edx, dword [ecx]
mov eax, dword [edx]
push eax
call dword [sym.imp.WS2_32.dll_inet_ntoa]
push eax
mov ecx, esi
call sub.MFC42.DLL_CString::operator_1
mov eax, dword [ebp + 0x94]
push ebx
lea ecx, [esp + 0x20]
push ebx
push ecx
lea edx, [esp + 0x2f8]
push 0x400
push edx
push ebx
push ebx
push 0x4004747f
push eax
mov dword [esp + 0x40], ebx
call dword [sym.imp.WS2_32.dll_WSAIoctl]
cmp eax, edi
jne 0x403275
push ebx
push ebx
push str.Error_at_WSAIoctl___
jmp 0x40346a
mov ecx, dword [esp + 0x1c]
mov eax, 0xaf286bcb
mul ecx
sub ecx, edx
mov dword [esp + 0x20], ebx
shr ecx, 1
add ecx, edx
shr ecx, 6
cmp ecx, ebx
mov dword [esp + 0x24], ecx
jle 0x403432
lea ebx, [esp + 0x320]
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::CString_1
lea ecx, [esp + 0x14]
mov byte [esp + 0x5ec], 1
call sub.MFC42.DLL_CString::CString_1
lea ecx, [ebx - 0x30]
mov byte [esp + 0x5ec], 2
mov edx, dword [ecx]
mov dword [esp + 0x2c], edx
mov esi, dword [ecx + 4]
push esi
mov dword [esp + 0x34], esi
mov eax, dword [ecx + 8]
mov dword [esp + 0x38], eax
mov ecx, dword [ecx + 0xc]
mov dword [esp + 0x3c], ecx
call dword [sym.imp.WS2_32.dll_inet_ntoa]
push eax
lea ecx, [esp + 0x1c]
call sub.MFC42.DLL_CString::operator_1
mov edx, ebx
mov eax, dword [edx]
mov dword [esp + 0x3c], eax
mov edi, dword [edx + 4]
push edi
mov dword [esp + 0x44], edi
mov ecx, dword [edx + 8]
mov dword [esp + 0x48], ecx
mov edx, dword [edx + 0xc]
mov dword [esp + 0x4c], edx
call dword [sym.imp.WS2_32.dll_inet_ntoa]
push eax
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::operator_1
mov ecx, dword [esp + 0x18]
mov eax, dword [ebp + 0x98]
push ecx
push eax
call dword [sym.imp.MSVCRT.dll__mbscmp]
add esp, 8
test eax, eax
je 0x403377
lea ecx, [esp + 0x14]
mov byte [esp + 0x5ec], 1
call fcn.0040694c
lea ecx, [esp + 0x18]
mov byte [esp + 0x5ec], 0
call fcn.0040694c
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x24]
inc eax
add ebx, 0x4c
cmp eax, ecx
mov dword [esp + 0x20], eax
jl 0x4032a0
jmp 0x40342f
lea edx, [esp + 0x14]
lea ecx, [ebp + 0x9c]
push edx
call fcn.00406958
mov eax, dword [esp + 0x31]
mov ecx, dword [esp + 0x32]
and esi, 0xff
mov edx, dword [esp + 0x33]
shl esi, 8
and eax, 0xff
and edi, 0xff
or esi, eax
mov eax, dword [esp + 0x41]
shl esi, 8
and ecx, 0xff
and eax, 0xff
shl edi, 8
or esi, ecx
mov ecx, dword [esp + 0x42]
or edi, eax
and edx, 0xff
shl esi, 8
shl edi, 8
and ecx, 0xff
or esi, edx
mov edx, dword [esp + 0x43]
or edi, ecx
shl edi, 8
and edx, 0xff
or edi, edx
mov eax, edi
and eax, esi
not edi
or eax, edi
push eax
call dword [sym.imp.WS2_32.dll_htonl]
push eax
call dword [sym.imp.WS2_32.dll_inet_ntoa]
push eax
lea ecx, [ebp + 0xa0]
call sub.MFC42.DLL_CString::operator_1
lea ecx, [esp + 0x14]
mov byte [esp + 0x5ec], 1
call fcn.0040694c
lea ecx, [esp + 0x18]
mov byte [esp + 0x5ec], 0
call fcn.0040694c
or edi, 0xffffffff
mov esi, dword [sym.imp.KERNEL32.dll_CreateThread]
push 0
push 0
push ebp
push 0x403570
push 0
push 0
call esi
push 0
push 0
push ebp
push 0x403690
push 0
push 0
call esi
jmp 0x403477
push ebx
push ebx
push str.Error_at_gethostbyname___
jmp 0x40346a
push ebx
push ebx
push str.Error_at_gethostname___
mov ecx, ebp
call sub.MFC42.DLL_CWnd::MessageBoxA
call dword [sym.imp.WS2_32.dll_WSACleanup]
lea ecx, [esp + 0x10]
mov dword [esp + 0x5ec], edi
call fcn.0040694c
mov ecx, dword [esp + 0x5e4]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x5e0
ret