Function at 0x408930
Capabilities:
Connect socket
Connect udp socket
Create udp socket
Get local ipv4 addresses
Get socket information

Disassembly:
sub esp, 0x30
mov eax, dword [0x64786c]
xor eax, esp
mov dword [esp + 0x2c], eax
push ebx
push ebp
mov ebp, dword [esp + 0x3c]
push esi
push edi
push 0
mov ebx, ecx
push ebx
or edi, 0xffffffff
push 2
mov dword [esp + 0x24], edi
call sub.WS2_32.dll_socket
mov esi, eax
test esi, esi
jge 0x408997
cmp dword [0x653730], 3
jg 0x408981
push str.Cant_create_listening_socket
push 0x283
push str....._base_srcwin32TSocket.c
push 3
call fcn.00401320
add esp, 0x10
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x2c]
xor ecx, esp
call fcn.0059709c
add esp, 0x30
ret
xor eax, eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
mov eax, 2
push 0x7f000001
mov word [esp + 0x20], ax
call sub.WS2_32.dll_htonl
push 0x10
lea edx, [esp + 0x20]
push edx
xor ecx, ecx
push esi
mov dword [esp + 0x2c], eax
mov word [esp + 0x2a], cx
call sub.WS2_32.dll_bind
cmp eax, 0xffffffff
jne 0x4089f6
cmp dword [0x653730], 3
jg 0x408b23
push str.Cant_bind_address_lookback
push 0x28e
jmp 0x408b14
push 1
push esi
call sub.WS2_32.dll_listen
cmp eax, 0xffffffff
jne 0x408a1f
cmp dword [0x653730], 3
jg 0x408b23
push str.Cant_listen_on_socket
push 0x294
jmp 0x408b14
push 0
push ebx
push 2
call sub.WS2_32.dll_socket
mov edi, eax
test edi, edi
jge 0x408a4b
cmp dword [0x653730], 3
jg 0x408b23
push str.Cant_create_connect_socket
push 0x29b
jmp 0x408b14
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x30]
push ecx
mov ebx, 0x10
push esi
mov dword [esp + 0x20], ebx
call sub.WS2_32.dll_getsockname
cmp eax, 0xffffffff
jne 0x408a85
cmp dword [0x653730], 3
jg 0x408b23
push str.Cant_get_socket_name
push 0x2a2
jmp 0x408b14
cmp dword [esp + 0x14], ebx
je 0x408aa4
cmp dword [0x653730], 3
jg 0x408b23
push str.socket_address_size_is_unexpect
push 0x2a7
jmp 0x408b14
push ebx
lea edx, [esp + 0x30]
push edx
push edi
call sub.WS2_32.dll_connect
cmp eax, 0xffffffff
jne 0x408aca
cmp dword [0x653730], 3
jg 0x408b23
push str.Cant_connect_to_listener_socket
push 0x2ad
jmp 0x408b14
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x20]
push ecx
push esi
mov dword [esp + 0x20], ebx
call sub.WS2_32.dll_accept
mov dword [esp + 0x18], eax
test eax, eax
jge 0x408afb
cmp dword [0x653730], 3
jg 0x408b23
push str.Cant_accept_socket
push 0x2b5
jmp 0x408b14
cmp dword [esp + 0x14], ebx
je 0x408b5e
cmp dword [0x653730], 3
jg 0x408b23
push str.socket_address_size_is_unexpected._2
push 0x2ba
push str....._base_srcwin32TSocket.c
push 3
call fcn.00401320
add esp, 0x10
cmp esi, 0xffffffff
je 0x408b2e
push esi
call sub.WS2_32.dll_closesocket
cmp edi, 0xffffffff
je 0x408b39
push edi
call sub.WS2_32.dll_closesocket
mov eax, dword [esp + 0x18]
cmp eax, 0xffffffff
je 0x408b48
push eax
call sub.WS2_32.dll_closesocket
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x2c]
xor ecx, esp
call fcn.0059709c
add esp, 0x30
ret
push esi
call sub.WS2_32.dll_closesocket
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x3c]
mov dword [ebp], edi
pop edi
pop esi
mov dword [ebp + 4], edx
pop ebp
pop ebx
xor ecx, esp
xor eax, eax
call fcn.0059709c
add esp, 0x30
ret