Function at 0x4d2c60
Capabilities:
Create tcp socket
Create udp socket
Get local ipv4 addresses
Get socket information
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x54
mov eax, dword [0x51300c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov ebx, edx
mov byte [ebp - 0x41], 0
mov esi, ecx
mov ecx, ebx
push edi
mov dword [ebp - 0x50], esi
call fcn.004d4070
movzx ecx, al
lea edi, [esi + 8]
shl cx, 8
shr ax, 8
or cx, ax
lea eax, [ebp - 0x40]
mov word [edi], cx
mov ecx, ebx
push eax
call fcn.004d3fb0
add esp, 4
movups xmm0, xmmword [eax]
movups xmmword [ebp - 0x20], xmm0
mov esi, dword [ebp - 0x14]
movq xmm0, qword [eax + 0x10]
mov eax, dword [eax + 0x18]
movq qword [ebp - 0x10], xmm0
mov edx, dword [ebp - 0x10]
mov dword [ebp - 0x48], eax
test edx, edx
je 0x4d2ccd
sub edx, esi
dec edx
jmp 0x4d2cde
mov eax, dword [ebp - 0xc]
mov ecx, eax
mov edx, dword [ebp - 0x48]
sub ecx, esi
sub edx, esi
test eax, eax
cmovne edx, ecx
lea eax, [ebx + esi]
mov ecx, edi
push edx
push eax
call fcn.004d1230
add esp, 8
test al, al
jne 0x4d2d2e
push str.mg_open_listener
push 0x11bd
mov ecx, 1
call fcn.004d0c50
add esp, 8
test al, al
je 0x4d2d1a
push ebx
push str.invalid_listening_URL:__s
call fcn.004d0d30
add esp, 8
mov al, byte [ebp - 0x41]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004f1f57
mov esp, ebp
pop ebp
ret
mov ax, word [edi]
mov esi, 2
mov word [ebp - 0x32], ax
xorps xmm0, xmm0
mov eax, dword [edi + 4]
mov ecx, 0x17
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x50]
push 4
push str.udp:
mov word [ebp - 0x34], si
cmp byte [eax + 0x20], 0
push ebx
movlpd qword [ebp - 0x2c], xmm0
cmovne esi, ecx
mov dword [ebp - 0x4c], 1
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncmp]
add esp, 0xc
mov edx, eax
neg edx
mov ecx, 6
mov ebx, 0x11
sbb edx, edx
add edx, 2
test eax, eax
mov dword [ebp - 0x48], edx
cmove ecx, ebx
push ecx
push edx
push esi
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
cmp esi, 0xffffffff
jne 0x4d2de3
push str.mg_open_listener
push 0x11c7
lea ecx, [ebx - 0x10]
call fcn.004d0c50
add esp, 8
test al, al
je 0x4d2d1a
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.socket:__d
call fcn.004d0d30
mov al, byte [ebp - 0x41]
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004f1f57
mov esp, ebp
pop ebp
ret
push 4
lea eax, [ebp - 0x4c]
push eax
push 0xfffffffffffffffb
push 0xffff
push esi
call dword [sym.imp.WS2_32.dll_setsockopt]
mov ebx, eax
test ebx, ebx
je 0x4d2e56
push str.mg_open_listener
push 0x11cc
mov ecx, 1
call fcn.004d0c50
add esp, 8
test al, al
je 0x4d2f4d
test ebx, ebx
jns 0x4d2e28
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
jmp 0x4d2e2a
xor eax, eax
push eax
push dword [ebp - 0x4c]
push str.setsockopt_SO_EXCLUSIVEADDRUSE_:__d__d
call fcn.004d0d30
add esp, 0xc
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
mov al, byte [ebp - 0x41]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004f1f57
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x50]
cmp byte [eax + 0x20], 0
je 0x4d2eb7
push 4
lea eax, [ebp - 0x4c]
push eax
push 0x1b
push 0x29
push esi
call dword [sym.imp.WS2_32.dll_setsockopt]
mov ebx, eax
test ebx, ebx
je 0x4d2eb7
push str.mg_open_listener
push 0x11e0
mov ecx, 1
call fcn.004d0c50
add esp, 8
test al, al
je 0x4d2f4d
test ebx, ebx
jns 0x4d2eaa
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.setsockopt_IPV6_V6ONLY_:__d
jmp 0x4d2f45
xor eax, eax
push eax
push str.setsockopt_IPV6_V6ONLY_:__d
jmp 0x4d2f45
push 0x10
lea eax, [ebp - 0x34]
push eax
push esi
call dword [sym.imp.WS2_32.dll_bind]
mov ebx, eax
test ebx, ebx
je 0x4d2f01
push str.mg_open_listener
push 0x11e3
mov ecx, 1
call fcn.004d0c50
add esp, 8
test al, al
je 0x4d2f4d
test ebx, ebx
jns 0x4d2ef7
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.bind:__d
jmp 0x4d2f45
xor eax, eax
push eax
push str.bind:__d
jmp 0x4d2f45
cmp dword [ebp - 0x48], 1
jne 0x4d2f68
push 3
push esi
call dword [sym.imp.WS2_32.dll_listen]
mov ebx, eax
test ebx, ebx
je 0x4d2f68
push str.mg_open_listener
push 0x11e8
mov ecx, 1
call fcn.004d0c50
add esp, 8
test al, al
je 0x4d2f4d
test ebx, ebx
jns 0x4d2f3d
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
jmp 0x4d2f3f
xor eax, eax
push eax
push str.listen:__d
call fcn.004d0d30
add esp, 8
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
mov al, byte [ebp - 0x41]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004f1f57
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x48]
mov dword [ebp - 0x48], 0x10
push eax
lea eax, [ebp - 0x14]
push eax
push esi
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x4d2f99
cmp dword [ebp - 0x48], 0x10
setne al
mov byte [edi + 0x18], al
mov ax, word [ebp - 0x12]
mov word [edi], ax
mov eax, dword [ebp - 0x10]
mov dword [edi + 4], eax
lea eax, [ebp - 0x48]
mov dword [ebp - 0x48], 1
push eax
push 0x8004667e
push esi
call dword [sym.imp.WS2_32.dll_ioctlsocket]
mov eax, dword [ebp - 0x50]
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
mov dword [eax + 0x40], esi
mov al, 1
pop esi
pop ebx
call fcn.004f1f57
mov esp, ebp
pop ebp
ret