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

Disassembly:
sub esp, 0x194
push ebp
mov ebp, dword [esp + 0x19c]
test ebp, ebp
je 0x100465d9
mov eax, dword [ebp + 4]
test eax, eax
jne 0x100465e4
or eax, 0xffffffff
pop ebp
add esp, 0x194
ret
mov ecx, dword [0x1014616c]
test ecx, ecx
mov eax, dword [0x10146170]
jne 0x100465f6
mov eax, dword [ebp + 8]
test eax, eax
mov dword [esp + 4], eax
jne 0x10046606
mov dword [esp + 4], 0x15
push ebx
xor eax, eax
test ecx, ecx
lea ebx, [ebp + 0x18]
mov edx, ebx
mov dword [edx], eax
mov dword [edx + 4], eax
mov dword [edx + 8], eax
mov dword [edx + 0xc], eax
je 0x10046620
push ecx
jmp 0x10046624
mov eax, dword [ebp + 4]
push eax
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
jne 0x1004664a
push str.gethostbyname_failed
push eax
push 9
call fcn.1003c490
add esp, 0xc
pop ebx
or eax, 0xffffffff
pop ebp
add esp, 0x194
ret
cmp word [eax + 0xa], 4
jbe 0x1004666e
push str.gethostbyname_address_mismatch
push 0
push 9
call fcn.1003c490
add esp, 0xc
pop ebx
or eax, 0xffffffff
pop ebp
add esp, 0x194
ret
mov word [ebx], 2
movsx ecx, word [eax + 0xa]
mov edx, dword [eax + 0xc]
push esi
mov esi, dword [edx]
mov eax, ecx
push edi
shr ecx, 2
lea edi, [ebp + 0x1c]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.WS2_32.dll_htons]
push 0
push 1
push 2
mov word [ebp + 0x1a], ax
call dword [sym.imp.WS2_32.dll_socket]
push 0x10
push ebx
push eax
mov dword [ebp + 0x2c], eax
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
jge 0x100466c7
push str.Failed_to_create_a_connection
push 0
jmp 0x10046a9b
mov eax, ebp
call fcn.100462b0
cmp eax, 2
je 0x100466ee
mov eax, dword [ebp + 0x2c]
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov dword [ebp + 0x2c], eax
pop ebp
add esp, 0x194
ret
mov eax, dword [0x1014616c]
test eax, eax
je 0x10046896
mov eax, dword [0x10146174]
test eax, eax
mov ebx, dword [sym.imp.MSVCR80.dll__snprintf]
mov edi, dword [sym.imp.WS2_32.dll_send]
je 0x100467ed
push eax
push str.USER__s_r_n
lea ecx, [esp + 0x1c]
push 0x190
push ecx
call ebx
lea eax, [esp + 0x24]
add esp, 0x10
mov byte [esp + 0x1a3], 0
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10046738
sub eax, edx
push 0
push eax
mov eax, dword [ebp + 0x2c]
lea edx, [esp + 0x1c]
push edx
push eax
call edi
mov esi, eax
test esi, esi
jl 0x10046851
mov eax, ebp
call fcn.100462b0
dec eax
je 0x100467ed
dec eax
je 0x10046791
dec eax
jne 0x10046aa5
mov eax, dword [0x10146178]
test eax, eax
je 0x1004679c
push eax
push str.PASS__s_r_n
lea eax, [esp + 0x1c]
push 0x190
push eax
call ebx
add esp, 0x10
jmp 0x100467b0
mov eax, dword [0x10146178]
test eax, eax
je 0x100467ed
jmp 0x1004677a
push str.PASS_anonymous__r_n
lea ecx, [esp + 0x18]
push 0x190
push ecx
call ebx
add esp, 0xc
lea eax, [esp + 0x14]
mov byte [esp + 0x1a3], 0
lea edx, [eax + 1]
nop
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x100467c0
sub eax, edx
push 0
push eax
mov eax, dword [ebp + 0x2c]
lea edx, [esp + 0x1c]
push edx
push eax
call edi
mov esi, eax
test esi, esi
jl 0x10046851
mov eax, ebp
call fcn.100462b0
cmp eax, 3
jg 0x10046aa5
mov eax, dword [0x1014617c]
test eax, eax
jl 0x100468cb
cmp eax, 1
jle 0x1004680d
cmp eax, 2
je 0x100468f3
jmp 0x100468cb
mov eax, dword [ebp + 4]
push eax
push str.SITE__s_r_n
lea ecx, [esp + 0x1c]
push 0x190
push ecx
call ebx
lea eax, [esp + 0x24]
add esp, 0x10
mov byte [esp + 0x1a3], 0
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10046834
sub eax, edx
push 0
push eax
mov eax, dword [ebp + 0x2c]
lea edx, [esp + 0x1c]
push edx
push eax
call edi
mov esi, eax
test esi, esi
jge 0x10046880
push str.send_failed
push 0
push 9
call fcn.1003c490
mov ecx, dword [ebp + 0x2c]
add esp, 0xc
push ecx
call dword [sym.imp.WS2_32.dll_closesocket]
pop edi
mov eax, esi
pop esi
pop ebx
mov dword [ebp + 0x2c], 0xffffffff
pop ebp
add esp, 0x194
ret
mov eax, ebp
call fcn.100462b0
cmp eax, 2
jne 0x100468e6
mov dword [0x1014617c], 1
mov eax, ebp
call fcn.100463f0
test eax, eax
jl 0x10046aa5
mov eax, ebp
call fcn.100462b0
sub eax, 2
je 0x10046a75
dec eax
jne 0x10046a50
mov eax, ebp
call fcn.10046490
test eax, eax
jge 0x10046a82
mov ecx, dword [ebp + 0x2c]
push ecx
call dword [sym.imp.WS2_32.dll_closesocket]
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov dword [ebp + 0x2c], eax
pop ebp
add esp, 0x194
ret
cmp dword [0x1014617c], 1
je 0x10046aa5
mov eax, dword [ebp + 0x10]
test eax, eax
jne 0x10046914
mov eax, dword [ebp + 4]
push eax
push str.USER_anonymous__s_r_n
lea ecx, [esp + 0x1c]
push 0x190
push ecx
call ebx
add esp, 0x10
jmp 0x1004692d
mov edx, dword [ebp + 4]
push edx
push eax
push str.USER__s__s_r_n
lea eax, [esp + 0x20]
push 0x190
push eax
call ebx
add esp, 0x14
lea eax, [esp + 0x14]
mov byte [esp + 0x1a3], 0
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10046940
push 0
sub eax, edx
mov edx, dword [ebp + 0x2c]
push eax
lea ecx, [esp + 0x1c]
push ecx
push edx
call edi
mov esi, eax
test esi, esi
jge 0x1004698c
push str.send_failed
push 0
push 9
call fcn.1003c490
mov eax, dword [ebp + 0x2c]
add esp, 0xc
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
pop edi
mov eax, esi
pop esi
pop ebx
mov dword [ebp + 0x2c], 0xffffffff
pop ebp
add esp, 0x194
ret
mov eax, ebp
call fcn.100462b0
cmp eax, 1
je 0x10046a6b
cmp eax, 2
je 0x10046a6b
mov eax, dword [ebp + 0x14]
test eax, eax
jne 0x100469c2
push str.PASS_anonymous__r_n
lea ecx, [esp + 0x18]
push 0x190
push ecx
call ebx
add esp, 0xc
jmp 0x100469d7
push eax
push str.PASS__s_r_n
lea edx, [esp + 0x1c]
push 0x190
push edx
call ebx
add esp, 0x10
lea eax, [esp + 0x14]
mov byte [esp + 0x1a3], 0
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x100469e6
mov ecx, dword [ebp + 0x2c]
push 0
sub eax, edx
push eax
lea eax, [esp + 0x1c]
push eax
push ecx
call edi
mov esi, eax
test esi, esi
jge 0x10046a32
push str.send_failed
push 0
push 9
call fcn.1003c490
mov edx, dword [ebp + 0x2c]
add esp, 0xc
push edx
call dword [sym.imp.WS2_32.dll_closesocket]
pop edi
mov eax, esi
pop esi
pop ebx
mov dword [ebp + 0x2c], 0xffffffff
pop ebp
add esp, 0x194
ret
mov eax, ebp
call fcn.100462b0
cmp eax, 1
je 0x10046a6b
cmp eax, 2
je 0x10046a6b
cmp dword [0x1014617c], 2
jne 0x100468cb
mov eax, dword [ebp + 0x2c]
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov dword [ebp + 0x2c], eax
pop ebp
add esp, 0x194
ret
mov dword [0x1014617c], 2
pop edi
pop esi
pop ebx
xor eax, eax
pop ebp
add esp, 0x194
ret
mov eax, ebp
call fcn.100462b0
sub eax, 2
je 0x10046a75
dec eax
jne 0x10046aa5
push str.FTP_server_asking_for_ACCNT_on_anonymous_n
push 0x7d2
push 9
call fcn.1003c490
add esp, 0xc
mov edx, dword [ebp + 0x2c]
push edx
call dword [sym.imp.WS2_32.dll_closesocket]
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov dword [ebp + 0x2c], eax
pop ebp
add esp, 0x194
ret