Function at 0x4a357d
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
or eax, 0xffffffff
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x344
mov ebx, dword [ebp + 8]
test ebx, ebx
je 0x4a3a68
cmp dword [ebx + 4], 0
je 0x4a3a68
cmp dword [0x6683c8], 0
je 0x4a35b2
mov esi, dword [0x6683b8]
jmp 0x4a35b5
mov esi, dword [ebx + 8]
test esi, esi
jne 0x4a35bd
mov si, 0x15
cld
xor eax, eax
lea edi, [ebx + 0x18]
mov ecx, 4
rep stosd dword es:[edi], eax
mov eax, dword [0x6683c8]
test eax, eax
je 0x4a35d6
push eax
jmp 0x4a35d9
push dword [ebx + 4]
call sub.WSOCK32.DLL_gethostbyname
mov edx, eax
test eax, eax
jne 0x4a35eb
push str.gethostbyname_failed
jmp 0x4a35f7
cmp word [eax + 0xa], 4
jbe 0x4a3605
push str.gethostbyname_address_mismatch
push 0
push 9
call fcn.004472ec
jmp 0x4a3a65
mov word [ebx + 0x18], 2
mov edx, dword [edx + 0xc]
movsx eax, word [eax + 0xa]
push eax
lea ecx, [ebx + 0x1c]
push dword [edx]
push ecx
call fcn.004bdd50
movzx eax, si
push eax
call sub.WSOCK32.DLL_htons
mov word [ebx + 0x1a], ax
push 0
push 1
push 2
call sub.WSOCK32.DLL_socket
lea edx, [ebx + 0x18]
add esp, 0xc
mov dword [ebx + 0x2c], eax
push 0x10
push edx
push eax
call sub.WSOCK32.DLL_connect
test eax, eax
jns 0x4a365f
push str.Failed_to_create_a_connection
push 0
push 9
call fcn.004472ec
jmp 0x4a3a56
push ebx
call fcn.004a3485
mov edi, eax
pop eax
cmp edi, 2
jne 0x4a3a56
cmp dword [0x6683c8], 0
je 0x4a3916
mov eax, dword [0x6683a8]
test eax, eax
je 0x4a3776
lea esi, [ebp - 0x19c]
push eax
push str.USER__s_r_n
push 0x190
push esi
call sub.msvcrt.dll__snprintf
cld
mov byte [ebp - 0xd], 0
xor eax, eax
or ecx, 0xffffffff
mov edi, esi
repne scasb al, byte es:[edi]
not ecx
push 0
lea eax, [ecx - 1]
push eax
push esi
push dword [ebx + 0x2c]
call sub.WSOCK32.DLL_send
add esp, 0x10
mov edi, eax
test eax, eax
js 0x4a38ce
push ebx
call fcn.004a3485
mov edi, eax
pop eax
cmp edi, 2
je 0x4a36f4
jg 0x4a36ea
dec edi
je 0x4a3776
jmp 0x4a3a56
cmp edi, 3
je 0x4a36fd
jmp 0x4a3a56
cmp dword [0x668398], 0
je 0x4a3776
mov eax, dword [0x668398]
lea edx, [ebp - 0x19c]
test eax, eax
je 0x4a3722
push eax
push str.PASS__s_r_n
push 0x190
push edx
call sub.msvcrt.dll__snprintf
add esp, 0x10
jmp 0x4a3735
push str.PASS_anonymous__r_n
push 0x190
push edx
call sub.msvcrt.dll__snprintf
add esp, 0xc
lea edx, [ebp - 0x19c]
mov byte [ebp - 0xd], 0
cld
xor eax, eax
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
push 0
lea eax, [ecx - 1]
push eax
push edx
push dword [ebx + 0x2c]
call sub.WSOCK32.DLL_send
mov edi, eax
test eax, eax
js 0x4a38ce
push ebx
call fcn.004a3485
mov edi, eax
pop eax
cmp edi, 3
jg 0x4a3a56
mov eax, dword [0x668388]
test eax, eax
js 0x4a3a56
cmp eax, 1
jle 0x4a3792
cmp eax, 2
je 0x4a37ff
jmp 0x4a3a56
push dword [ebx + 4]
lea esi, [ebp - 0x19c]
push str.SITE__s_r_n
push 0x190
push esi
call sub.msvcrt.dll__snprintf
mov edi, esi
cld
mov byte [ebp - 0xd], 0
xor eax, eax
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
push 0
lea eax, [ecx - 1]
push eax
push esi
push dword [ebx + 0x2c]
call sub.WSOCK32.DLL_send
add esp, 0x10
mov edi, eax
test eax, eax
js 0x4a38ce
push ebx
call fcn.004a3485
pop esi
cmp eax, 2
jne 0x4a37f2
mov dword [0x668388], 1
jmp 0x4a3916
cmp dword [0x668388], 1
je 0x4a3a56
mov eax, dword [ebx + 0x10]
lea edx, [ebp - 0x19c]
test eax, eax
jne 0x4a3824
push dword [ebx + 4]
push str.USER_anonymous__s_r_n
push 0x190
push edx
call sub.msvcrt.dll__snprintf
add esp, 0x10
jmp 0x4a383b
push dword [ebx + 4]
push eax
push str.USER__s__s_r_n
push 0x190
push edx
call sub.msvcrt.dll__snprintf
add esp, 0x14
lea esi, [ebp - 0x19c]
mov byte [ebp - 0xd], 0
cld
xor eax, eax
or ecx, 0xffffffff
mov edi, esi
repne scasb al, byte es:[edi]
not ecx
push 0
lea eax, [ecx - 1]
push eax
push esi
push dword [ebx + 0x2c]
call sub.WSOCK32.DLL_send
mov edi, eax
test eax, eax
js 0x4a38ce
push ebx
call fcn.004a3485
pop ecx
lea eax, [eax - 1]
cmp eax, 1
jbe 0x4a3905
mov eax, dword [ebx + 0x14]
test eax, eax
jne 0x4a3895
push str.PASS_anonymous__r_n
push 0x190
push esi
call sub.msvcrt.dll__snprintf
add esp, 0xc
jmp 0x4a38a9
push eax
push str.PASS__s_r_n
push 0x190
push esi
call sub.msvcrt.dll__snprintf
add esp, 0x10
cld
mov byte [ebp - 0xd], 0
xor eax, eax
or ecx, 0xffffffff
mov edi, esi
repne scasb al, byte es:[edi]
not ecx
push 0
lea eax, [ecx - 1]
push eax
push esi
push dword [ebx + 0x2c]
call sub.WSOCK32.DLL_send
mov edi, eax
test eax, eax
jns 0x4a38f2
push str.send_failed
push 0
push 9
call fcn.004472ec
push dword [ebx + 0x2c]
call sub.WSOCK32.DLL_closesocket
mov eax, edi
mov dword [ebx + 0x2c], 0xffffffff
jmp 0x4a3a68
push ebx
call fcn.004a3485
pop edx
lea eax, [eax - 1]
cmp eax, 1
ja 0x4a3a56
xor eax, eax
mov dword [0x668388], 2
jmp 0x4a3a68
mov eax, dword [ebx + 0x10]
lea edx, [ebp - 0x26c]
test eax, eax
jne 0x4a3938
push str.USER_anonymous_r_n
push 0xc8
push edx
call sub.msvcrt.dll__snprintf
add esp, 0xc
jmp 0x4a394c
push eax
push str.USER__s_r_n
push 0xc8
push edx
call sub.msvcrt.dll__snprintf
add esp, 0x10
lea edx, [ebp - 0x26c]
mov byte [ebp - 0x1a5], 0
cld
xor eax, eax
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
push 0
push ecx
push edx
push dword [ebx + 0x2c]
call sub.WSOCK32.DLL_send
mov edi, eax
xor eax, eax
test edi, edi
jns 0x4a398d
push str.send_failed
push 0
push 9
call fcn.004472ec
add esp, 0xc
mov eax, edi
test eax, eax
js 0x4a3a56
push ebx
call fcn.004a3485
mov edi, eax
pop eax
xor eax, eax
cmp edi, 2
je 0x4a3a68
cmp edi, 3
jne 0x4a3a56
mov eax, dword [ebx + 0x14]
lea edx, [ebp - 0x33c]
test eax, eax
jne 0x4a39d4
push str.PASS_anonymous__r_n
push 0xc8
push edx
call sub.msvcrt.dll__snprintf
add esp, 0xc
jmp 0x4a39e8
push eax
push str.PASS__s_r_n
push 0xc8
push edx
call sub.msvcrt.dll__snprintf
add esp, 0x10
lea edx, [ebp - 0x33c]
mov byte [ebp - 0x275], 0
cld
xor eax, eax
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
push 0
push ecx
push edx
push dword [ebx + 0x2c]
call sub.WSOCK32.DLL_send
mov edi, eax
xor eax, eax
test edi, edi
jns 0x4a3a29
push str.send_failed
push 0
push 9
call fcn.004472ec
add esp, 0xc
mov eax, edi
test eax, eax
js 0x4a3a56
push ebx
call fcn.004a3485
mov edi, eax
pop eax
xor eax, eax
cmp edi, 2
je 0x4a3a68
cmp edi, 3
jne 0x4a3a56
push str.FTP_server_asking_for_ACCNT_on_anonymous_n
push 0x7d2
push 9
call fcn.004472ec
add esp, 0xc
push dword [ebx + 0x2c]
call sub.WSOCK32.DLL_closesocket
mov dword [ebx + 0x2c], 0xffffffff
or eax, 0xffffffff
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret