Function at 0x40c680
Capabilities:
Create udp socket

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4228c6
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 0x40c6c9
mov ecx, eax
call fcn.0041d200
mov esi, eax
jmp 0x40c6cb
xor esi, esi
mov eax, dword [ebx + 0x304]
lea ecx, [ebp - 0x28]
push ecx
mov dword [ebp - 0x18], esi
mov dword [ebp - 4], 0xffffffff
mov dword [esi + 0x24], eax
call fcn.0041c7c0
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 0x40c727
lea ecx, [eax - 1]
mov al, byte [eax - 1]
test al, al
je 0x40c71e
cmp al, 0xff
je 0x40c71e
dec al
mov byte [ecx], al
jmp 0x40c727
push ecx
call fcn.004218a8
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 0x40c7bc
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.00421430
lea eax, [ebp - 0x58]
push 0x425a10
push eax
call sub.MSVCRT.dll__CxxThrowException
mov dx, word [ebx + 0x200]
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 + 0x204]
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 0x40c854
lea eax, [ebp - 0x38]
mov ecx, ebx
push eax
push edi
call fcn.0040cc90
xor ecx, ecx
cmp eax, ecx
je 0x40c854
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.00421630
lea ecx, [ebp - 0x78]
push 0x425a10
push ecx
call sub.MSVCRT.dll__CxxThrowException
mov eax, dword [ebx + 0x308]
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.0041f390
mov bl, al
jmp 0x40c8ad
test esi, esi
mov dword [ebp - 4], 0xffffffff
je 0x40c8c0
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