Function at 0x4020f0
Capabilities:
Create udp socket
Initialize winsock library
Receive data
Receive data on socket
Send data
Send data on socket
Set socket configuration

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x40278b
push eax
mov dword fs:[0], esp
sub esp, 0x1c4
lea eax, [esp + 0x34]
push ebx
push ebp
push edi
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x402130
mov ecx, dword [sym.imp.MSVCP60.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
push str.Initialization_failed
push ecx
jmp 0x402154
mov ebp, 2
push 0x11
push ebp
push ebp
call dword [sym.imp.WS2_32.dll_socket]
mov ebx, eax
or edi, 0xffffffff
cmp ebx, edi
jne 0x40217e
mov edx, dword [sym.imp.MSVCP60.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
push str.socket_fail
push edx
call dword [sym.imp.MSVCP60.dll_class_std::basic_ostream_char__struct_std::char_traits_char______cdecl_std::operator___class_std::basic_ostream_char__struct_std::char_traits_char_____char_const__]
push eax
call dword [sym.imp.MSVCP60.dll_class_std::basic_ostream_char__struct_std::char_traits_char______cdecl_std::endl_class_std::basic_ostream_char__struct_std::char_traits_char____]
add esp, 0xc
xor eax, eax
mov ecx, dword [esp + 0x1d0]
pop edi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x1d0
ret
push esi
mov esi, dword [sym.imp.WS2_32.dll_htons]
push 0x7b2
mov byte [esp + 0x17], 1
mov word [esp + 0x38], bp
call esi
push 0
mov word [esp + 0x3a], ax
call dword [sym.imp.WS2_32.dll_htonl]
mov dword [esp + 0x38], eax
lea eax, [esp + 0x13]
push 1
push eax
push 0x20
push 0xffff
push ebx
call dword [sym.imp.WS2_32.dll_setsockopt]
lea ecx, [esp + 0x34]
push 0x10
push ecx
push ebx
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, edi
jne 0x4021f2
mov edx, dword [sym.imp.MSVCP60.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
push str.bind_fail
push edx
call dword [sym.imp.MSVCP60.dll_class_std::basic_ostream_char__struct_std::char_traits_char______cdecl_std::operator___class_std::basic_ostream_char__struct_std::char_traits_char_____char_const__]
push eax
call dword [sym.imp.MSVCP60.dll_class_std::basic_ostream_char__struct_std::char_traits_char______cdecl_std::endl_class_std::basic_ostream_char__struct_std::char_traits_char____]
add esp, 0xc
xor eax, eax
pop esi
jmp 0x402166
push 0x7b2
mov word [esp + 0x28], bp
call esi
mov ebp, dword [sym.imp.WS2_32.dll_recvfrom]
mov word [esp + 0x26], ax
mov dword [esp + 0x28], edi
mov dword [esp + 0x1c], 0x10
mov eax, dword [sym.imp.MSVCP60.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
push 0x40409c
push eax
call dword [sym.imp.MSVCP60.dll_class_std::basic_ostream_char__struct_std::char_traits_char______cdecl_std::operator___class_std::basic_ostream_char__struct_std::char_traits_char_____char_const__]
push eax
call dword [sym.imp.MSVCP60.dll_class_std::basic_ostream_char__struct_std::char_traits_char______cdecl_std::endl_class_std::basic_ostream_char__struct_std::char_traits_char____]
add esp, 0xc
xor ecx, ecx
lea edx, [esp + 0x1c]
lea eax, [esp + 0x24]
mov dword [esp + 0x14], ecx
push edx
push eax
mov dword [esp + 0x20], ecx
push ecx
lea ecx, [esp + 0x20]
push 8
push ecx
push ebx
call ebp
cmp eax, edi
je 0x402215
mov eax, dword [esp + 0x14]
cmp eax, 0x314f2
jne 0x4022d7
mov edx, dword [esp + 0x18]
inc edx
push edx
call sub.MFC42.DLL_operatornew
mov esi, eax
add esp, 4
test esi, esi
je 0x4022bf
mov eax, dword [esp + 0x18]
mov edi, esi
lea ecx, [eax + 1]
xor eax, eax
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov edx, dword [esp + 0x18]
lea eax, [esp + 0x1c]
lea ecx, [esp + 0x24]
push eax
push ecx
push 0
push edx
push esi
push ebx
call ebp
cmp eax, 0xffffffff
je 0x4022b3
mov eax, dword [esp + 0x18]
push eax
push esi
call fcn.00401b50
add esp, 8
push esi
call sub.MFC42.DLL_operatordelete
add esp, 4
or edi, 0xffffffff
call fcn.00401fe0
xor eax, eax
mov dword [esp + 0x28], edi
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
jmp 0x402215
cmp eax, 0x3150e
jne 0x402356
mov ecx, dword [esp + 0x18]
inc ecx
push ecx
call sub.MFC42.DLL_operatornew
mov esi, eax
add esp, 4
test esi, esi
je 0x4024b1
mov edx, dword [esp + 0x18]
xor eax, eax
mov edi, esi
lea ecx, [edx + 1]
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov edx, dword [esp + 0x18]
lea eax, [esp + 0x1c]
lea ecx, [esp + 0x24]
push eax
push ecx
push 0
push edx
push esi
push ebx
call ebp
cmp eax, 0xffffffff
je 0x402337
mov eax, dword [esp + 0x18]
push eax
push esi
call fcn.00401ac0
add esp, 8
push esi
call sub.MFC42.DLL_operatordelete
add esp, 4
or edi, 0xffffffff
xor eax, eax
mov dword [esp + 0x28], edi
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
jmp 0x402215
cmp eax, 0x3150f
jne 0x40236b
push 0xa
call fcn.00401670
push 0xa
jmp 0x4024a9
cmp eax, 0x1ecf1c
jne 0x402380
push 1
call fcn.00401670
push 1
jmp 0x4024a9
cmp eax, 0x1ecf1d
jne 0x4023f7
lea ecx, [esp + 0x20]
push ecx
call fcn.00401d90
add esp, 4
mov edx, dword [esp + 0x20]
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x28], edi
push ecx
mov eax, dword [edx - 8]
lea edx, [esp + 0x28]
push edx
push 0
push eax
push 0
lea ecx, [esp + 0x34]
mov dword [esp + 0x1f0], 0
call sub.MFC42.DLL_CString::GetBuffer
push eax
push ebx
call dword [sym.imp.WS2_32.dll_sendto]
cmp eax, edi
jne 0x4023d4
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
lea ecx, [esp + 0x20]
mov dword [esp + 0x1dc], edi
call fcn.004024f4
xor eax, eax
mov dword [esp + 0x28], edi
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
jmp 0x402215
cmp eax, 0x1ecf1e
jne 0x40241b
push 0
call fcn.00401c70
add esp, 4
xor eax, eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x28], edi
mov dword [esp + 0x18], eax
jmp 0x402215
cmp eax, 0x1ecf1f
jne 0x40243f
push 0
call fcn.00401be0
add esp, 4
xor eax, eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x28], edi
mov dword [esp + 0x18], eax
jmp 0x402215
cmp eax, 0x1ecf20
jne 0x402463
push 0
call fcn.00401d00
add esp, 4
xor eax, eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x28], edi
mov dword [esp + 0x18], eax
jmp 0x402215
cmp eax, 0x1ecf21
jne 0x402475
push 0xc
call fcn.00401670
push 0xc
jmp 0x4024a9
cmp eax, 0x1ecf22
jne 0x402487
push 0x14
call fcn.00401670
push 0x14
jmp 0x4024a9
cmp eax, 0x1ecf23
jne 0x402499
push 2
call fcn.00401670
push 2
jmp 0x4024a9
cmp eax, 0x1ecf24
jne 0x4024b1
push 0x16
call fcn.00401670
push 0x16
call fcn.004018a0
add esp, 8
xor eax, eax
mov dword [esp + 0x28], edi
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
jmp 0x402215