Function at 0x4d5927
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Get local ipv4 addresses
Get socket information
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x13c
mov ebx, dword [ebp + 8]
test ebx, ebx
je 0x4d5c59
lea esi, [ebp - 0x34]
xor eax, eax
mov ecx, 4
mov edi, esi
rep stosd dword es:[edi], eax
mov dword [esp + 8], 6
mov dword [esp + 4], 1
mov dword [esp], 2
call sub.WS2_32.DLL_socket
mov word [ebp - 0x34], 2
sub esp, 0xc
mov dword [ebx + 0x30], eax
mov dword [ebp - 0x1c], 0x10
cmp dword [ebx + 0x28], 0
je 0x4d5aed
lea esi, [ebp - 0x114]
mov dword [esp + 8], str.PASV_r_n
mov dword [esp], esi
mov dword [esp + 4], 0xc8
mov edi, esi
call sub.msvcrt.dll__snprintf
xor eax, eax
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [esp + 4], esi
mov dword [esp + 0xc], 0
mov dword [esp + 8], ecx
mov eax, dword [ebx + 0x2c]
mov dword [esp], eax
call sub.WS2_32.DLL_send
sub esp, 0x10
mov esi, eax
test eax, eax
js 0x4d5c02
mov eax, ebx
call fcn.004d539a
cmp eax, 2
je 0x4d5a06
cmp eax, 5
mov eax, dword [ebx + 0x30]
je 0x4d5c42
mov dword [esp], eax
call sub.WS2_32.DLL_closesocket
push ecx
mov dword [ebx + 0x30], 0xffffffff
mov dword [ebx + 0x28], 0
mov eax, dword [ebx + 0x448]
lea eax, [ebx + eax + 0x3c]
jmp 0x4d5a13
inc eax
mov dl, byte [eax]
lea ecx, [edx - 0x30]
cmp cl, 9
jbe 0x4d5a21
test dl, dl
jne 0x4d5a12
lea ecx, [ebp - 0x38]
lea edx, [ebp - 0x4c]
mov dword [esp + 0x1c], ecx
lea ecx, [ebp - 0x3c]
mov dword [esp + 0x18], ecx
lea ecx, [ebp - 0x40]
mov dword [esp + 0x14], ecx
lea ecx, [ebp - 0x44]
mov dword [esp + 0x10], ecx
lea ecx, [ebp - 0x48]
mov dword [esp + 0xc], ecx
mov dword [esp + 8], edx
mov dword [esp + 4], str._u__u__u__u__u__u
mov dword [esp], eax
call sub.msvcrt.dll_sscanf
cmp eax, 6
je 0x4d5a8d
mov dword [esp + 8], str.Invalid_answer_to_PASV_n
mov dword [esp + 4], 0x7d0
mov dword [esp], 9
call fcn.004772c8
mov eax, dword [ebx + 0x30]
cmp eax, 0xffffffff
je 0x4d5c59
jmp 0x4d5c42
mov eax, dword [ebp - 0x4c]
mov byte [ebp - 0x22], al
mov eax, dword [ebp - 0x48]
mov byte [ebp - 0x21], al
mov eax, dword [ebp - 0x44]
mov byte [ebp - 0x20], al
mov eax, dword [ebp - 0x40]
mov byte [ebp - 0x1f], al
mov eax, dword [ebp - 0x3c]
mov byte [ebp - 0x1e], al
mov eax, dword [ebp - 0x38]
mov byte [ebp - 0x1d], al
mov edx, dword [ebp - 0x22]
mov dword [ebp - 0x30], edx
mov dx, word [ebp - 0x1e]
lea eax, [ebp - 0x34]
mov word [ebp - 0x32], dx
mov edx, dword [ebp - 0x1c]
mov dword [esp + 4], eax
mov dword [esp + 8], edx
mov eax, dword [ebx + 0x30]
mov dword [esp], eax
call sub.WS2_32.DLL_connect
sub esp, 0xc
test eax, eax
jns 0x4d5c54
mov dword [esp + 8], str.Failed_to_create_a_data_connection
jmp 0x4d5b67
lea edi, [ebp - 0x1c]
mov dword [esp + 4], esi
mov dword [esp + 8], edi
mov dword [esp], eax
call sub.WS2_32.DLL_getsockname
mov eax, dword [ebp - 0x1c]
sub esp, 0xc
mov word [ebp - 0x32], 0
mov dword [esp + 8], eax
mov dword [esp + 4], esi
mov eax, dword [ebx + 0x30]
mov dword [esp], eax
call sub.WS2_32.DLL_bind
sub esp, 0xc
test eax, eax
jns 0x4d5b30
mov dword [esp + 8], str.bind_failed
jmp 0x4d5b67
mov dword [esp + 8], edi
mov dword [esp + 4], esi
mov eax, dword [ebx + 0x30]
mov dword [esp], eax
call sub.WS2_32.DLL_getsockname
sub esp, 0xc
mov dword [esp + 4], 1
mov eax, dword [ebx + 0x30]
mov dword [esp], eax
call sub.WS2_32.DLL_listen
test eax, eax
push edx
push edx
jns 0x4d5b80
mov dword [esp + 8], str.listen_failed
mov dword [esp + 4], 0
mov dword [esp], 9
call fcn.004772c8
jmp 0x4d5c3f
movzx eax, byte [ebp - 0x31]
mov dword [esp + 0x20], eax
lea esi, [ebp - 0x114]
movzx eax, byte [ebp - 0x32]
mov dword [esp + 0x1c], eax
mov dword [esp], esi
movzx eax, byte [ebp - 0x2d]
mov dword [esp + 0x18], eax
mov dword [esp + 8], str.PORT__d__d__d__d__d__d_r_n
movzx eax, byte [ebp - 0x2e]
mov dword [esp + 0x14], eax
mov dword [esp + 4], 0xc8
movzx eax, byte [ebp - 0x2f]
mov dword [esp + 0x10], eax
mov edi, esi
movzx eax, byte [ebp - 0x30]
mov dword [esp + 0xc], eax
call sub.msvcrt.dll__snprintf
mov byte [ebp - 0x4d], 0
xor eax, eax
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [esp + 4], esi
mov dword [esp + 0xc], 0
mov dword [esp + 8], ecx
mov eax, dword [ebx + 0x2c]
mov dword [esp], eax
call sub.WS2_32.DLL_send
sub esp, 0x10
mov esi, eax
test eax, eax
jns 0x4d5c33
mov dword [esp + 8], str.send_failed
mov dword [esp + 4], 0
mov dword [esp], 9
call fcn.004772c8
mov eax, dword [ebx + 0x30]
mov dword [esp], eax
call sub.WS2_32.DLL_closesocket
push edi
mov dword [ebx + 0x30], 0xffffffff
jmp 0x4d5c5c
mov eax, ebx
call fcn.004d539a
cmp eax, 2
je 0x4d5c54
mov eax, dword [ebx + 0x30]
mov dword [esp], eax
call sub.WS2_32.DLL_closesocket
push esi
mov dword [ebx + 0x30], 0xffffffff
jmp 0x4d5c59
mov esi, dword [ebx + 0x30]
jmp 0x4d5c5c
or esi, 0xffffffff
lea esp, [ebp - 0xc]
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret