Function at 0x4d5270
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov dword [ebp - 0x28], ecx
mov eax, dword [ebp - 0x28]
add eax, 0x18
push eax
lea ecx, [ebp - 4]
call fcn.004d3c10
mov ecx, dword [ebp - 0x28]
cmp dword [ecx + 0x20], 0
je 0x4d52a5
mov byte [ebp - 0x1d], 0
lea ecx, [ebp - 4]
call fcn.004d3ca0
mov al, byte [ebp - 0x1d]
jmp 0x4d5482
push 0
push 0
push 0
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_WSASocketW]
mov edx, dword [ebp - 0x28]
mov dword [edx + 4], eax
mov eax, dword [ebp - 0x28]
cmp dword [eax + 4], 0xffffffff
jne 0x4d52cb
jmp 0x4d5440
movzx ecx, byte [ebp + 0xc]
test ecx, ecx
jne 0x4d52fb
mov ecx, dword [ebp - 0x28]
call fcn.004d6960
push 0x30
mov edx, dword [ebp - 0x28]
mov eax, dword [edx + 8]
push eax
mov ecx, dword [ebp - 0x28]
mov edx, dword [ecx + 4]
push edx
call dword [sym.imp.WS2_32.dll_WSAEventSelect]
cmp eax, 0xffffffff
jne 0x4d52fb
jmp 0x4d5440
mov eax, dword [ebp - 0x28]
mov dword [eax + 0x20], 1
lea ecx, [ebp - 0x18]
push ecx
mov ecx, dword [ebp + 8]
call fcn.004d2930
push 0x10
lea edx, [ebp - 0x18]
push edx
mov eax, dword [ebp - 0x28]
mov ecx, dword [eax + 4]
push ecx
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x4d53bd
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0x2733
jne 0x4d5353
mov byte [ebp - 0x1e], 1
lea ecx, [ebp - 4]
call fcn.004d3ca0
mov al, byte [ebp - 0x1e]
jmp 0x4d5482
mov edx, dword [ebp - 0x28]
mov eax, dword [edx + 4]
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov ecx, dword [ebp - 0x28]
mov dword [ecx + 4], 0xffffffff
mov edx, dword [ebp - 0x28]
mov dword [edx + 0x20], 0
movzx eax, byte [ebp + 0xc]
test eax, eax
jne 0x4d53a9
mov ecx, dword [ebp - 0x28]
call fcn.004d69a0
mov ecx, dword [ebp - 0x1c]
push ecx
push 0x501
mov ecx, dword [ebp - 0x28]
call fcn.004d5d50
mov byte [ebp - 0x1f], 1
lea ecx, [ebp - 4]
call fcn.004d3ca0
mov al, byte [ebp - 0x1f]
jmp 0x4d5482
mov byte [ebp - 0x20], 0
lea ecx, [ebp - 4]
call fcn.004d3ca0
mov al, byte [ebp - 0x20]
jmp 0x4d5482
mov ecx, dword [ebp - 0x28]
call fcn.004d5c60
mov ecx, dword [ebp - 0x28]
call fcn.004d5cd0
mov edx, dword [ebp - 0x28]
mov dword [edx + 0x20], 2
movzx eax, byte [ebp + 0xc]
test eax, eax
jne 0x4d5402
push 0
push 0x500
mov ecx, dword [ebp - 0x28]
call fcn.004d5d50
mov byte [ebp - 0x21], 1
lea ecx, [ebp - 4]
call fcn.004d3ca0
mov al, byte [ebp - 0x21]
jmp 0x4d5482
movzx ecx, byte [ebp + 0xc]
test ecx, ecx
je 0x4d5412
mov ecx, dword [ebp - 0x28]
call fcn.004d6960
push 0x23
mov edx, dword [ebp - 0x28]
mov eax, dword [edx + 8]
push eax
mov ecx, dword [ebp - 0x28]
mov edx, dword [ecx + 4]
push edx
call dword [sym.imp.WS2_32.dll_WSAEventSelect]
cmp eax, 0xffffffff
jne 0x4d542f
jmp 0x4d5440
mov byte [ebp - 0x22], 1
lea ecx, [ebp - 4]
call fcn.004d3ca0
mov al, byte [ebp - 0x22]
jmp 0x4d5482
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0x28]
mov dword [eax + 0x20], 0
mov ecx, dword [ebp - 0x28]
cmp dword [ecx + 4], 0xffffffff
je 0x4d5473
mov edx, dword [ebp - 0x28]
mov eax, dword [edx + 4]
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov ecx, dword [ebp - 0x28]
mov dword [ecx + 4], 0xffffffff
mov byte [ebp - 0x23], 0
lea ecx, [ebp - 4]
call fcn.004d3ca0
mov al, byte [ebp - 0x23]
mov esp, ebp
pop ebp
ret 8