Function at 0x4ad640
Capabilities:
Connect socket
Connect udp socket
Create udp socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x68
mov eax, dword [ebp + 8]
mov word [ebp - 0x4c], ax
mov dword [ebp - 0x10], 0x10200
cmp dword [ebp + 0xc], 6
jne 0x4ad69c
cmp dword [ebp + 0x14], 1
jne 0x4ad667
mov eax, 0x17
jmp 0x4ad66c
mov eax, 2
mov dword [esp + 8], 6
mov dword [esp + 4], 1
mov dword [esp], eax
mov eax, dword [sym.imp.WSOCK32.DLL_socket]
call eax
sub esp, 0xc
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jns 0x4ad6ee
mov eax, 0xfffffffa
jmp 0x4ad8f2
cmp dword [ebp + 0xc], 0x11
jne 0x4ad6e4
cmp dword [ebp + 0x14], 1
jne 0x4ad6af
mov eax, 0x17
jmp 0x4ad6b4
mov eax, 2
mov dword [esp + 8], 0x11
mov dword [esp + 4], 2
mov dword [esp], eax
mov eax, dword [sym.imp.WSOCK32.DLL_socket]
call eax
sub esp, 0xc
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jns 0x4ad6ee
mov eax, 0xfffffffa
jmp 0x4ad8f2
mov eax, 0xffffffff
jmp 0x4ad8f2
cmp dword [ebp + 0x10], 0
je 0x4ad6fe
mov eax, dword [ebp + 0x10]
movzx eax, byte [eax]
test al, al
jne 0x4ad713
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call dbg.OS_CloseSocket
mov eax, 0xffffffff
jmp 0x4ad8f2
cmp dword [ebp + 0x14], 1
jne 0x4ad7f5
mov dword [esp + 8], 0x1c
mov dword [esp + 4], 0
lea eax, [ebp - 0x40]
mov dword [esp], eax
call sym._memset
mov word [ebp - 0x40], 0x17
movzx eax, word [ebp - 0x4c]
mov dword [esp], eax
mov eax, dword [sym.imp.WSOCK32.DLL_htons]
call eax
sub esp, 4
mov word [ebp - 0x3e], ax
mov dword [esp + 8], 0x14
mov dword [esp + 4], str.FE80:0000:0000:0000:
mov eax, dword [ebp + 0x10]
mov dword [esp], eax
call sym._strncmp
test eax, eax
jne 0x4ad7a4
cmp dword [ebp + 0x18], 0
jne 0x4ad79e
mov dword [esp + 0xc], str.No_network_interface_provided_to_use_with_link_local_IPv6_address.
mov dword [esp + 8], str.OS_Connect
mov dword [esp + 4], 0x11a
mov dword [esp], str.os_net_os_net.c
call dbg._minfo
jmp 0x4ad7a4
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x28], eax
lea eax, [ebp - 0x40]
add eax, 8
mov dword [esp + 4], eax
mov eax, dword [ebp + 0x10]
mov dword [esp], eax
call dbg.get_ipv6_numeric
mov eax, dword [ebp - 0xc]
mov dword [esp + 8], 0x1c
lea edx, [ebp - 0x40]
mov dword [esp + 4], edx
mov dword [esp], eax
mov eax, dword [sym.imp.WSOCK32.DLL_connect]
call eax
sub esp, 0xc
test eax, eax
jns 0x4ad88f
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call dbg.OS_CloseSocket
mov eax, 0xfffffffa
jmp 0x4ad8f2
mov dword [esp + 8], 0x10
mov dword [esp + 4], 0
lea eax, [ebp - 0x24]
mov dword [esp], eax
call sym._memset
mov word [ebp - 0x24], 2
movzx eax, word [ebp - 0x4c]
mov dword [esp], eax
mov eax, dword [sym.imp.WSOCK32.DLL_htons]
call eax
sub esp, 4
mov word [ebp - 0x22], ax
lea eax, [ebp - 0x24]
add eax, 4
mov dword [esp + 4], eax
mov eax, dword [ebp + 0x10]
mov dword [esp], eax
call dbg.get_ipv4_numeric
mov eax, dword [ebp - 0xc]
mov dword [esp + 8], 0x10
lea edx, [ebp - 0x24]
mov dword [esp + 4], edx
mov dword [esp], eax
mov eax, dword [sym.imp.WSOCK32.DLL_connect]
call eax
sub esp, 0xc
test eax, eax
jns 0x4ad88f
mov eax, dword [sym.imp.WSOCK32.DLL_WSAGetLastError]
call eax
mov dword [server.sin_zero], eax
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call dbg.OS_CloseSocket
mov eax, dword [server.sin_zero]
mov dword [esp], eax
mov eax, dword [sym.imp.WSOCK32.DLL_WSASetLastError]
call eax
sub esp, 4
mov eax, 0xfffffffa
jmp 0x4ad8f2
mov eax, dword [ebp - 0x10]
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call dbg.OS_SetSocketSize
test eax, eax
jns 0x4ad8bf
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call dbg.OS_CloseSocket
mov eax, 0xfffffffa
jmp 0x4ad8f2
mov eax, dword [ebp - 0x10]
mov dword [esp + 8], eax
mov dword [esp + 4], 1
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call dbg.OS_SetSocketSize
test eax, eax
jns 0x4ad8ef
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call dbg.OS_CloseSocket
mov eax, 0xfffffffa
jmp 0x4ad8f2
mov eax, dword [ebp - 0xc]
leave
ret