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

Disassembly:
sub esp, 0x30
mov eax, dword [0x61df80]
xor eax, esp
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x40]
push edi
or edi, 0xffffffff
mov dword [esp + 0xc], ecx
mov dword [esp + 8], edi
cmp eax, 2
je 0x58ec21
cmp eax, 1
je 0x58ec21
lea eax, [edi + 2]
jmp 0x58ec23
xor eax, eax
cmp dword [esp + 0x40], 0
jne 0x58ee15
test eax, eax
jne 0x58ee15
test ecx, ecx
jne 0x58ec57
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.004c7d13
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 0x58edff
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 0x58edc8
push 1
push esi
call dword [sym.imp.WS2_32.dll_listen]
cmp eax, 0xffffffff
je 0x58edc8
push 0
push ebx
push 2
call ebp
mov edi, eax
test edi, edi
jl 0x58edc8
xor eax, eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
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 0x58edc8
cmp dword [esp + 0x10], ebp
jne 0x58edba
push ebp
lea edx, [esp + 0x30]
push edx
push edi
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x58edc8
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 0x58edcc
cmp dword [esp + 0x10], ebp
jne 0x58edbe
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 0x58edcc
cmp dword [esp + 0x10], ebp
jne 0x58edbe
mov cx, word [esp + 0x1c]
cmp cx, word [esp + 0x2c]
jne 0x58edbe
mov edx, dword [esp + 0x20]
cmp edx, dword [esp + 0x30]
jne 0x58edbe
mov ax, word [esp + 0x1e]
cmp ax, word [esp + 0x2e]
jne 0x58edbe
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.004c7d13
add esp, 0x30
ret
mov ebx, dword [esp + 0x14]
mov dword [esp + 0x14], 0x2745
jmp 0x58edd6
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 0x58ede4
push esi
call ebp
cmp edi, 0xffffffff
je 0x58edec
push edi
call ebp
cmp ebx, 0xffffffff
je 0x58edf4
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.004c7d13
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.004c7d13
add esp, 0x30
ret