Function at 0x4d6573
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Resolve dns
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x1cc
mov ebx, dword [ebp + 8]
test ebx, ebx
je 0x4d6b51
cmp dword [ebx + 4], 0
je 0x4d6b51
cmp dword [0x697478], 0
je 0x4d65a5
mov edx, dword [0x697488]
jmp 0x4d65a8
mov edx, dword [ebx + 8]
test edx, edx
jne 0x4d65ae
mov dl, 0x15
lea eax, [ebx + 0x18]
mov ecx, 4
mov dword [ebp - 0x1ac], eax
xor eax, eax
mov edi, dword [ebp - 0x1ac]
rep stosd dword es:[edi], eax
mov eax, dword [0x697478]
test eax, eax
jne 0x4d65d2
mov eax, dword [ebx + 4]
mov dword [ebp - 0x1b4], edx
mov dword [esp], eax
call sub.WS2_32.DLL_gethostbyname
test eax, eax
push edx
mov edx, dword [ebp - 0x1b4]
jne 0x4d65f5
mov dword [esp + 8], str.gethostbyname_failed
jmp 0x4d6604
cmp word [eax + 0xa], 4
jbe 0x4d661d
mov dword [esp + 8], str.gethostbyname_address_mismatch
mov dword [esp + 4], 0
mov dword [esp], 9
call fcn.004772c8
jmp 0x4d6b51
mov word [ebx + 0x18], 2
lea ecx, [ebx + 0x1c]
mov dword [ebp - 0x1b0], ecx
movsx ecx, word [eax + 0xa]
mov eax, dword [eax + 0xc]
mov edi, dword [ebp - 0x1b0]
movzx edx, dx
mov esi, dword [eax]
rep movsb byte es:[edi], byte [esi]
mov dword [esp], edx
call sub.WS2_32.DLL_htons
push edi
mov word [ebx + 0x1a], ax
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov dword [esp], 2
call sub.WS2_32.DLL_socket
sub esp, 0xc
mov dword [ebx + 0x2c], eax
mov edx, dword [ebp - 0x1ac]
mov dword [esp + 8], 0x10
mov dword [esp + 4], edx
mov dword [esp], eax
call sub.WS2_32.DLL_connect
sub esp, 0xc
test eax, eax
jns 0x4d669d
mov dword [esp + 8], str.Failed_to_create_a_connection
jmp 0x4d6b07
mov eax, ebx
call fcn.004d539a
cmp eax, 2
jne 0x4d6b3e
cmp dword [0x697478], 0
je 0x4d69ec
mov eax, dword [0x697498]
test eax, eax
je 0x4d67df
lea esi, [ebp - 0x1a8]
mov dword [esp + 0xc], eax
mov dword [esp + 8], str.USER__s_r_n
mov dword [esp + 4], 0x190
mov dword [esp], esi
mov edi, esi
call sub.msvcrt.dll__snprintf
mov byte [ebp - 0x19], 0
xor eax, eax
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [esp + 0xc], 0
mov dword [esp + 8], ecx
mov dword [esp + 4], esi
mov eax, dword [ebx + 0x2c]
mov dword [esp], eax
call sub.WS2_32.DLL_send
sub esp, 0x10
mov edi, eax
test eax, eax
js 0x4d6998
mov eax, ebx
call fcn.004d539a
cmp eax, 2
je 0x4d673e
cmp eax, 3
je 0x4d674b
dec eax
jne 0x4d6b3e
jmp 0x4d67df
cmp dword [0x6974a8], 0
je 0x4d67df
mov edx, dword [0x6974a8]
lea eax, [ebp - 0x1a8]
test edx, edx
je 0x4d6779
mov dword [esp + 0xc], edx
mov dword [esp + 8], str.PASS__s_r_n
mov dword [esp + 4], 0x190
mov dword [esp], eax
call sub.msvcrt.dll__snprintf
jmp 0x4d6791
mov dword [esp + 8], str.PASS_anonymous__r_n
mov dword [esp + 4], 0x190
mov dword [esp], eax
call sub.msvcrt.dll__snprintf
lea edx, [ebp - 0x1a8]
mov byte [ebp - 0x19], 0
xor eax, eax
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [esp + 0xc], 0
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
mov eax, dword [ebx + 0x2c]
mov dword [esp], eax
call sub.WS2_32.DLL_send
sub esp, 0x10
mov edi, eax
test eax, eax
js 0x4d6998
mov eax, ebx
call fcn.004d539a
cmp eax, 3
jg 0x4d6b3e
mov eax, dword [0x6974b8]
test eax, eax
js 0x4d6b3e
cmp eax, 1
jle 0x4d67ff
cmp eax, 2
jne 0x4d6b3e
jmp 0x4d6884
mov eax, dword [ebx + 4]
lea esi, [ebp - 0x1a8]
mov dword [esp + 0xc], eax
mov dword [esp + 8], str.SITE__s_r_n
mov dword [esp + 4], 0x190
mov dword [esp], esi
mov edi, esi
call sub.msvcrt.dll__snprintf
mov byte [ebp - 0x19], 0
xor eax, eax
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [esp + 0xc], 0
mov dword [esp + 8], ecx
mov dword [esp + 4], esi
mov eax, dword [ebx + 0x2c]
mov dword [esp], eax
call sub.WS2_32.DLL_send
sub esp, 0x10
mov edi, eax
test eax, eax
js 0x4d6998
mov eax, ebx
call fcn.004d539a
cmp eax, 2
jne 0x4d6877
mov dword [0x6974b8], 1
jmp 0x4d69ec
cmp dword [0x6974b8], 1
je 0x4d6b3e
mov edx, dword [ebx + 0x10]
mov ecx, dword [ebx + 4]
test edx, edx
lea eax, [ebp - 0x1a8]
jne 0x4d68b2
mov dword [esp + 0xc], ecx
mov dword [esp + 8], str.USER_anonymous__s_r_n
mov dword [esp + 4], 0x190
mov dword [esp], eax
call sub.msvcrt.dll__snprintf
jmp 0x4d68d2
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], edx
mov dword [esp + 8], str.USER__s__s_r_n
mov dword [esp + 4], 0x190
mov dword [esp], eax
call sub.msvcrt.dll__snprintf
lea esi, [ebp - 0x1a8]
mov byte [ebp - 0x19], 0
xor eax, eax
or ecx, 0xffffffff
mov edi, esi
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [esp + 0xc], 0
mov dword [esp + 8], ecx
mov dword [esp + 4], esi
mov eax, dword [ebx + 0x2c]
mov dword [esp], eax
call sub.WS2_32.DLL_send
sub esp, 0x10
mov edi, eax
test eax, eax
js 0x4d6998
mov eax, ebx
call fcn.004d539a
dec eax
cmp eax, 1
jbe 0x4d69dd
mov eax, dword [ebx + 0x14]
test eax, eax
jne 0x4d6942
mov dword [esp + 8], str.PASS_anonymous__r_n
mov dword [esp + 4], 0x190
mov dword [esp], esi
call sub.msvcrt.dll__snprintf
jmp 0x4d695e
mov dword [esp + 0xc], eax
mov dword [esp + 8], str.PASS__s_r_n
mov dword [esp + 4], 0x190
mov dword [esp], esi
call sub.msvcrt.dll__snprintf
lea edx, [ebp - 0x1a8]
mov byte [ebp - 0x19], 0
xor eax, eax
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [esp + 0xc], 0
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
mov eax, dword [ebx + 0x2c]
mov dword [esp], eax
call sub.WS2_32.DLL_send
sub esp, 0x10
mov edi, eax
test eax, eax
jns 0x4d69cc
mov dword [esp + 8], str.send_failed
mov dword [esp + 4], 0
mov dword [esp], 9
call fcn.004772c8
mov eax, dword [ebx + 0x2c]
mov dword [esp], eax
call sub.WS2_32.DLL_closesocket
push esi
mov dword [ebx + 0x2c], 0xffffffff
jmp 0x4d6b58
mov eax, ebx
call fcn.004d539a
dec eax
cmp eax, 1
ja 0x4d6b3e
mov dword [0x6974b8], 2
jmp 0x4d6b56
mov edx, dword [ebx + 0x10]
lea eax, [ebp - 0x1a8]
test edx, edx
jne 0x4d6a13
mov dword [esp + 8], str.USER_anonymous_r_n
mov dword [esp + 4], 0xc8
mov dword [esp], eax
call sub.msvcrt.dll__snprintf
jmp 0x4d6a2f
mov dword [esp + 0xc], edx
mov dword [esp + 8], str.USER__s_r_n
mov dword [esp + 4], 0xc8
mov dword [esp], eax
call sub.msvcrt.dll__snprintf
lea esi, [ebp - 0x1a8]
mov byte [ebp - 0xe1], 0
xor eax, eax
or ecx, 0xffffffff
mov edi, esi
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [esp + 0xc], 0
mov dword [esp + 8], ecx
mov dword [esp + 4], esi
mov eax, dword [ebx + 0x2c]
mov dword [esp], eax
call sub.WS2_32.DLL_send
sub esp, 0x10
test eax, eax
js 0x4d6aff
mov eax, ebx
call fcn.004d539a
cmp eax, 2
je 0x4d6b56
cmp eax, 3
jne 0x4d6b3e
mov eax, dword [ebx + 0x14]
test eax, eax
jne 0x4d6aa8
mov dword [esp + 8], str.PASS_anonymous__r_n
mov dword [esp + 4], 0xc8
mov dword [esp], esi
call sub.msvcrt.dll__snprintf
jmp 0x4d6ac4
mov dword [esp + 0xc], eax
mov dword [esp + 8], str.PASS__s_r_n
mov dword [esp + 4], 0xc8
mov dword [esp], esi
call sub.msvcrt.dll__snprintf
lea edx, [ebp - 0x1a8]
mov byte [ebp - 0xe1], 0
xor eax, eax
or ecx, 0xffffffff
mov edi, edx
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [esp + 0xc], 0
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
mov eax, dword [ebx + 0x2c]
mov dword [esp], eax
call sub.WS2_32.DLL_send
sub esp, 0x10
test eax, eax
jns 0x4d6b11
mov dword [esp + 8], str.send_failed
mov dword [esp + 4], 0
jmp 0x4d6b32
mov eax, ebx
call fcn.004d539a
cmp eax, 2
je 0x4d6b56
cmp eax, 3
jne 0x4d6b3e
mov dword [esp + 8], str.FTP_server_asking_for_ACCNT_on_anonymous_n
mov dword [esp + 4], 0x7d2
mov dword [esp], 9
call fcn.004772c8
mov eax, dword [ebx + 0x2c]
mov dword [esp], eax
call sub.WS2_32.DLL_closesocket
push ecx
mov dword [ebx + 0x2c], 0xffffffff
or edi, 0xffffffff
jmp 0x4d6b58
xor edi, edi
lea esp, [ebp - 0xc]
mov eax, edi
pop ebx
pop esi
pop edi
pop ebp
ret