Function at 0x40ca70
Capabilities:
Create udp socket

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x422c56
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x474
push ebx
push esi
push edi
mov ebx, ecx
mov dword [ebp - 0x10], esp
push 0x4c
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
mov dword [ebp - 0x18], eax
test eax, eax
mov dword [ebp - 4], 0
je 0x40cab9
mov ecx, eax
call fcn.0041d590
mov esi, eax
jmp 0x40cabb
xor esi, esi
mov eax, dword [ebx + 0x324]
lea ecx, [ebp - 0x28]
push ecx
mov dword [ebp - 0x18], esi
mov dword [ebp - 4], 0xffffffff
mov dword [esi + 0x24], eax
call fcn.0041ca80
mov edx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
mov dword [ebp - 4], 1
mov ecx, dword [edx]
push ecx
push 0
push eax
lea ecx, [esi + 0x28]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::assign_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___unsigned_int__unsigned_int_]
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x40cb17
lea ecx, [eax - 1]
mov al, byte [eax - 1]
test al, al
je 0x40cb0e
cmp al, 0xff
je 0x40cb0e
dec al
mov byte [ecx], al
jmp 0x40cb17
push ecx
call fcn.00421c18
add esp, 4
mov eax, dword [ebp + 0xc]
mov dl, byte [ebp + 8]
mov dword [esi + 0x48], eax
mov byte [esi + 0x44], dl
mov ecx, 0xff
xor eax, eax
lea edi, [ebp - 0x477]
mov byte [ebp - 0x478], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
xor edi, edi
mov dword [ebp - 4], 2
push edi
push 2
push 2
mov dword [ebp - 0x14], edi
call dword [sym.imp.WS2_32.dll_socket]
cmp eax, 0xffffffff
mov dword [ebp - 0x14], eax
jne 0x40cbac
mov cl, byte [ebp + 0xb]
mov dword [ebp - 0x24], edi
mov byte [ebp - 0x28], cl
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x1c], edi
or ecx, eax
mov edi, str.socket___failed
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push str.socket___failed
lea ecx, [ebp - 0x28]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::assign_char_const___unsigned_int_]
mov byte [ebp - 4], 3
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
lea edx, [ebp - 0x28]
push eax
push edx
lea ecx, [ebp - 0x58]
call fcn.004217a0
lea eax, [ebp - 0x58]
push 0x425a40
push eax
call sub.MSVCRT.dll__CxxThrowException
mov dx, word [ebx + 0x220]
xor ecx, ecx
mov dword [ebp - 0x38], ecx
push edx
mov dword [ebp - 0x34], ecx
mov word [ebp - 0x38], 2
mov dword [ebp - 0x30], ecx
mov dword [ebp - 0x2c], ecx
call dword [sym.imp.WS2_32.dll_htons]
lea edi, [ebx + 0x224]
mov word [ebp - 0x36], ax
push edi
call dword [sym.imp.WS2_32.dll_inet_addr]
cmp eax, 0xffffffff
mov dword [ebp - 0x34], eax
jne 0x40cc44
lea eax, [ebp - 0x38]
mov ecx, ebx
push eax
push edi
call fcn.0040d080
xor ecx, ecx
cmp eax, ecx
je 0x40cc44
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0x1c], ecx
mov edi, str.Unknown_remote_UDP_host_name
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov dl, byte [ebp + 0xb]
not ecx
dec ecx
mov byte [ebp - 0x28], dl
push ecx
push str.Unknown_remote_UDP_host_name
lea ecx, [ebp - 0x28]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::assign_char_const___unsigned_int_]
lea eax, [ebp - 0x28]
lea ecx, [ebp - 0x78]
push eax
mov byte [ebp - 4], 4
call fcn.004219a0
lea ecx, [ebp - 0x78]
push 0x425a40
push ecx
call sub.MSVCRT.dll__CxxThrowException
mov eax, dword [ebx + 0x328]
push 5
lea edx, [ebp - 0x38]
push 0x10
push edx
push eax
push 0
lea ecx, [ebp - 0x478]
push 0x400
push ecx
lea edx, [ebp - 0x14]
push esi
push edx
call fcn.0041f720
mov bl, al
jmp 0x40cc9d
test esi, esi
mov dword [ebp - 4], 0xffffffff
je 0x40ccb0
mov eax, dword [esi]
push 1
mov ecx, esi
call dword [eax]
mov ecx, dword [ebp - 0x14]
push ecx
call dword [sym.imp.WS2_32.dll_closesocket]
mov ecx, dword [ebp - 0xc]
pop edi
mov al, bl
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 8