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

Disassembly:
sub esp, 0x30
mov eax, dword [0x583f80]
xor eax, esp
mov dword [esp + 0x2c], eax
mov ecx, dword [esp + 0x40]
push edi
or edi, 0xffffffff
cmp dword [esp + 0x40], 0
mov dword [esp + 0xc], ecx
mov dword [esp + 8], edi
jne 0x4ef378
mov eax, dword [esp + 0x38]
cmp eax, 2
je 0x4ef1ab
cmp eax, 1
jne 0x4ef378
test ecx, ecx
jne 0x4ef1cc
push 0x2726
call dword [sym.imp.WS2_32.dll_WSASetLastError]
mov eax, edi
pop edi
mov ecx, dword [esp + 0x2c]
xor ecx, esp
call fcn.004fcf30
add esp, 0x30
ret
push ebx
mov ebx, dword [esp + 0x40]
push ebp
mov ebp, dword [sym.imp.WS2_32.dll_socket]
push esi
push 0
push ebx
push 2
call ebp
mov esi, eax
test esi, esi
jl 0x4ef362
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 dword [sym.imp.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 dword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
je 0x4ef32b
push 1
push esi
call dword [sym.imp.WS2_32.dll_listen]
cmp eax, 0xffffffff
je 0x4ef32b
push 0
push ebx
push 2
call ebp
mov edi, eax
test edi, edi
jl 0x4ef32b
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x30]
push ecx
mov ebp, 0x10
push esi
mov dword [esp + 0x1c], ebp
call dword [sym.imp.WS2_32.dll_getsockname]
cmp eax, 0xffffffff
je 0x4ef32b
cmp dword [esp + 0x10], ebp
jne 0x4ef31d
push ebp
lea edx, [esp + 0x30]
push edx
push edi
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x4ef32b
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x20]
push ecx
push esi
mov dword [esp + 0x1c], ebp
call dword [sym.imp.WS2_32.dll_accept]
mov ebx, eax
test ebx, ebx
jl 0x4ef32f
cmp dword [esp + 0x10], ebp
jne 0x4ef321
lea edx, [esp + 0x10]
push edx
lea eax, [esp + 0x30]
push eax
push edi
call dword [sym.imp.WS2_32.dll_getsockname]
cmp eax, 0xffffffff
je 0x4ef32f
cmp dword [esp + 0x10], ebp
jne 0x4ef321
mov cx, word [esp + 0x1c]
cmp cx, word [esp + 0x2c]
jne 0x4ef321
mov edx, dword [esp + 0x20]
cmp edx, dword [esp + 0x30]
jne 0x4ef321
mov ax, word [esp + 0x1e]
cmp ax, word [esp + 0x2e]
jne 0x4ef321
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, dword [esp + 0x18]
pop esi
pop ebp
mov dword [eax + 4], ebx
mov dword [eax], edi
pop ebx
xor eax, eax
pop edi
mov ecx, dword [esp + 0x2c]
xor ecx, esp
call fcn.004fcf30
add esp, 0x30
ret
mov ebx, dword [esp + 0x14]
mov dword [esp + 0x14], 0x2745
jmp 0x4ef339
mov ebx, dword [esp + 0x14]
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [esp + 0x14], eax
mov ebp, dword [sym.imp.WS2_32.dll_closesocket]
cmp esi, 0xffffffff
je 0x4ef347
push esi
call ebp
cmp edi, 0xffffffff
je 0x4ef34f
push edi
call ebp
cmp ebx, 0xffffffff
je 0x4ef357
push ebx
call ebp
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.WS2_32.dll_WSASetLastError]
pop esi
pop ebp
pop ebx
or eax, 0xffffffff
pop edi
mov ecx, dword [esp + 0x2c]
xor ecx, esp
call fcn.004fcf30
add esp, 0x30
ret
push 0x273f
call dword [sym.imp.WS2_32.dll_WSASetLastError]
mov ecx, dword [esp + 0x30]
mov eax, edi
pop edi
xor ecx, esp
call fcn.004fcf30
add esp, 0x30
ret
jmp 0x4ef170