Function at 0x4e2ea0
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, 0x26c
mov edi, dword [ebp + 8]
test edi, edi
jne 0x4e2ec0
or esi, 0xffffffff
lea esp, [ebp - 0xc]
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
mov esi, dword [edi + 4]
test esi, esi
je 0x4e2eb3
mov ebx, dword [0x61f350]
test ebx, ebx
je 0x4e345e
mov esi, dword [0x61f360]
test esi, esi
jne 0x4e2ee3
mov si, 0x15
lea ebx, [edi + 0x18]
mov eax, dword [0x61f350]
mov dword [edi + 0x18], 0
test eax, eax
mov dword [ebx + 4], 0
mov dword [ebx + 8], 0
mov dword [ebx + 0xc], 0
je 0x4e3448
sub esp, 0xc
push eax
call sub.WSOCK32.DLL_gethostbyname
mov edx, eax
add esp, 0xc
test edx, edx
je 0x4e3520
cmp word [edx + 0xa], 4
ja 0x4e34a1
mov word [edi + 0x18], 2
sub esp, 4
movsx eax, word [edx + 0xa]
mov edx, dword [edx + 0xc]
push eax
lea ecx, [edi + 0x1c]
mov eax, dword [edx]
push eax
push ecx
call sub.msvcrt.dll_memcpy
mov eax, esi
and eax, 0xffff
mov dword [esp], eax
call sub.WSOCK32.DLL_htons
mov word [edi + 0x1a], ax
push esi
push esi
push 0
push 1
push 2
call sub.WSOCK32.DLL_socket
add esp, 0x14
mov dword [edi + 0x2c], eax
cmp eax, 0xffffffff
je 0x4e34d1
push ecx
push 0x10
push ebx
push eax
call sub.WSOCK32.DLL_connect
pop edx
test eax, eax
js 0x4e34f2
sub esp, 0xc
push edi
call fcn.004e1e90
add esp, 0x10
cmp eax, 2
jne 0x4e3046
mov eax, dword [0x61f350]
test eax, eax
je 0x4e3322
mov eax, dword [0x61f370]
test eax, eax
je 0x4e30e7
lea ebx, [ebp - 0x264]
push eax
push str.USER__s_r_n
push 0x190
push ebx
call sub.msvcrt.dll__snprintf_1
mov byte [ebp - 0xd5], 0
push 0
mov ecx, ebx
mov eax, dword [ecx]
add ecx, 4
lea edx, [eax - 0x1010101]
xor eax, 0xffffffff
and edx, eax
and edx, 0x80808080
je 0x4e2fe0
test edx, 0x8080
jne 0x4e3006
shr edx, 0x10
add ecx, 2
add dl, dl
sbb ecx, 3
sub ecx, ebx
push ecx
push ebx
mov eax, dword [edi + 0x2c]
push eax
call sub.WSOCK32.DLL_send
add esp, 0x10
mov esi, eax
test eax, eax
js 0x4e32f0
sub esp, 0xc
push edi
call fcn.004e1e90
add esp, 0x10
cmp eax, 2
je 0x4e3466
cmp eax, 3
je 0x4e3064
dec eax
je 0x4e30e7
sub esp, 0xc
mov eax, dword [edi + 0x2c]
or esi, 0xffffffff
push eax
call sub.WSOCK32.DLL_closesocket
add esp, 0xc
mov dword [edi + 0x2c], 0xffffffff
jmp 0x4e2eb6
mov eax, dword [0x61f380]
test eax, eax
je 0x4e3507
push eax
push str.PASS__s_r_n
push 0x190
push ebx
call sub.msvcrt.dll__snprintf_1
add esp, 0x10
mov byte [ebp - 0xd5], 0
push 0
mov ecx, ebx
mov eax, dword [ecx]
add ecx, 4
lea edx, [eax - 0x1010101]
xor eax, 0xffffffff
and edx, eax
and edx, 0x80808080
je 0x4e3090
test edx, 0x8080
jne 0x4e30b6
shr edx, 0x10
add ecx, 2
add dl, dl
sbb ecx, 3
sub ecx, ebx
push ecx
push ebx
mov eax, dword [edi + 0x2c]
push eax
call sub.WSOCK32.DLL_send
mov esi, eax
test eax, eax
js 0x4e32f0
sub esp, 0xc
push edi
call fcn.004e1e90
add esp, 0x10
cmp eax, 3
jg 0x4e3046
mov eax, dword [0x61f390]
test eax, eax
js 0x4e3046
cmp eax, 1
jle 0x4e325a
cmp eax, 2
jne 0x4e3046
lea eax, [ebp - 0x264]
mov dword [ebp - 0x270], eax
mov eax, dword [edi + 0x10]
test eax, eax
je 0x4e347f
sub esp, 0xc
mov edx, dword [edi + 4]
push edx
push eax
lea eax, [ebp - 0x264]
push str.USER__s__s_r_n
push 0x190
push eax
call sub.msvcrt.dll__snprintf_1
add esp, 0x20
mov byte [ebp - 0xd5], 0
push 0
lea ecx, [ebp - 0x264]
mov eax, dword [ecx]
add ecx, 4
lea edx, [eax - 0x1010101]
xor eax, 0xffffffff
and edx, eax
and edx, 0x80808080
je 0x4e314d
test edx, 0x8080
jne 0x4e3173
shr edx, 0x10
add ecx, 2
add dl, dl
mov esi, dword [ebp - 0x270]
sbb ecx, 3
lea eax, [ebp - 0x264]
sub ecx, esi
push ecx
push eax
mov ebx, dword [edi + 0x2c]
push ebx
call sub.WSOCK32.DLL_send
mov esi, eax
test eax, eax
js 0x4e32f0
sub esp, 0xc
push edi
call fcn.004e1e90
dec eax
add esp, 0x10
cmp eax, 1
jbe 0x4e3249
mov eax, dword [edi + 0x14]
test eax, eax
je 0x4e34c6
push eax
push str.PASS__s_r_n
lea eax, [ebp - 0x264]
push 0x190
push eax
call sub.msvcrt.dll__snprintf_1
add esp, 0x10
mov byte [ebp - 0xd5], 0
lea ecx, [ebp - 0x264]
push 0
mov eax, dword [ecx]
add ecx, 4
lea edx, [eax - 0x1010101]
xor eax, 0xffffffff
and edx, eax
and edx, 0x80808080
je 0x4e31e5
test edx, 0x8080
jne 0x4e320b
shr edx, 0x10
add ecx, 2
add dl, dl
mov edx, dword [ebp - 0x270]
sbb ecx, 3
lea eax, [ebp - 0x264]
sub ecx, edx
push ecx
push eax
mov eax, dword [edi + 0x2c]
push eax
call sub.WSOCK32.DLL_send
mov esi, eax
test eax, eax
js 0x4e32f0
sub esp, 0xc
push edi
call fcn.004e1e90
dec eax
add esp, 0x10
cmp eax, 1
ja 0x4e3046
xor esi, esi
mov dword [0x61f390], 2
jmp 0x4e2eb6
mov esi, dword [edi + 4]
lea ebx, [ebp - 0x264]
push esi
push str.SITE__s_r_n
push 0x190
push ebx
call sub.msvcrt.dll__snprintf_1
mov byte [ebp - 0xd5], 0
push 0
mov ecx, ebx
mov dword [ebp - 0x270], ebx
mov eax, dword [ecx]
add ecx, 4
lea edx, [eax - 0x1010101]
xor eax, 0xffffffff
and edx, eax
and edx, 0x80808080
je 0x4e3285
test edx, 0x8080
jne 0x4e32ab
shr edx, 0x10
add ecx, 2
add dl, dl
sbb ecx, 3
sub ecx, ebx
push ecx
push ebx
mov ebx, dword [edi + 0x2c]
push ebx
call sub.WSOCK32.DLL_send
add esp, 0x10
mov esi, eax
test eax, eax
js 0x4e32f0
sub esp, 0xc
push edi
call fcn.004e1e90
add esp, 0x10
cmp eax, 2
je 0x4e3318
cmp dword [0x61f390], 1
jne 0x4e3112
jmp 0x4e3046
push eax
push str.send_failed
push 0
push 9
call fcn.0048db10
pop eax
mov eax, dword [edi + 0x2c]
push eax
call sub.WSOCK32.DLL_closesocket
add esp, 0xc
mov dword [edi + 0x2c], 0xffffffff
jmp 0x4e2eb6
mov dword [0x61f390], 1
mov eax, dword [edi + 0x10]
test eax, eax
je 0x4e34bb
push eax
push str.USER__s_r_n
lea ebx, [ebp - 0xd4]
push 0xc8
push ebx
call sub.msvcrt.dll__snprintf_1
add esp, 0x10
mov byte [ebp - 0xd], 0
mov ecx, ebx
push 0
mov eax, dword [ecx]
add ecx, 4
lea edx, [eax - 0x1010101]
xor eax, 0xffffffff
and edx, eax
and edx, 0x80808080
je 0x4e334f
test edx, 0x8080
jne 0x4e3375
shr edx, 0x10
add ecx, 2
add dl, dl
sbb ecx, 3
sub ecx, ebx
push ecx
push ebx
mov eax, dword [edi + 0x2c]
push eax
call sub.WSOCK32.DLL_send
test eax, eax
js 0x4e352b
sub esp, 0xc
push edi
call fcn.004e1e90
add esp, 0x10
cmp eax, 2
je 0x4e3478
cmp eax, 3
jne 0x4e3046
mov eax, dword [edi + 0x14]
test eax, eax
je 0x4e34d9
push eax
push str.PASS__s_r_n
push 0xc8
push ebx
call sub.msvcrt.dll__snprintf_1
add esp, 0x10
mov byte [ebp - 0xd], 0
push 0
mov ecx, ebx
mov eax, dword [ecx]
add ecx, 4
lea edx, [eax - 0x1010101]
xor eax, 0xffffffff
and edx, eax
and edx, 0x80808080
je 0x4e33d4
test edx, 0x8080
jne 0x4e33fa
shr edx, 0x10
add ecx, 2
add dl, dl
sbb ecx, 3
sub ecx, ebx
push ecx
push ebx
mov ecx, dword [edi + 0x2c]
push ecx
call sub.WSOCK32.DLL_send
test eax, eax
js 0x4e352b
sub esp, 0xc
push edi
call fcn.004e1e90
add esp, 0x10
cmp eax, 2
je 0x4e3478
cmp eax, 3
jne 0x4e3046
push eax
push str.FTP_server_asking_for_ACCNT_on_anonymous_n
push 0x7d2
push 9
call fcn.0048db10
add esp, 0x10
jmp 0x4e3046
sub esp, 0xc
mov ecx, dword [edi + 4]
push ecx
call sub.WSOCK32.DLL_gethostbyname
mov edx, eax
add esp, 0xc
jmp 0x4e2f1d
mov esi, dword [edi + 8]
jmp 0x4e2edb
mov eax, dword [0x61f380]
test eax, eax
jne 0x4e3071
jmp 0x4e30e7
xor esi, esi
jmp 0x4e2eb6
mov ecx, dword [edi + 4]
lea eax, [ebp - 0x264]
push ecx
push str.USER_anonymous__s_r_n
push 0x190
push eax
call sub.msvcrt.dll__snprintf_1
add esp, 0x10
jmp 0x4e313e
push eax
push str.gethostbyname_address_mismatch
push 0
push 9
call fcn.0048db10
or esi, 0xffffffff
add esp, 0x10
jmp 0x4e2eb6
push eax
push str.USER_anonymous_r_n
jmp 0x4e3333
push ecx
push str.PASS_anonymous__r_n
jmp 0x4e31c2
push ebx
push str.socket_failed
jmp 0x4e34a7
push esi
push str.PASS_anonymous__r_n
push 0xc8
push ebx
call sub.msvcrt.dll__snprintf_1
add esp, 0x10
jmp 0x4e33cc
push eax
push str.Failed_to_create_a_connection
push 0
push 9
call fcn.0048db10
pop eax
jmp 0x4e3049
push eax
push str.PASS_anonymous__r_n
push 0x190
push ebx
call sub.msvcrt.dll__snprintf_1
add esp, 0x10
jmp 0x4e3085
push edx
push str.gethostbyname_failed
jmp 0x4e34a7
push edx
push str.send_failed
push 0
push 9
call fcn.0048db10
pop eax
jmp 0x4e3049