Function at 0x464e80
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Resolve dns
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [0x676300]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
push ebx
push esi
mov dword [ebp - 0x18], eax
xor eax, eax
push edi
mov edx, 2
mov dword [ebp - 0x14], eax
push ecx
mov dword [ebp - 0x1c], 1
xor ebx, ebx
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], eax
mov word [ebp - 0x14], dx
call fcn.0053c769
mov edi, eax
push 0x3a
push edi
call fcn.00537590
mov esi, eax
add esp, 0xc
cmp esi, ebx
jne 0x464edc
mov esi, 0x57d794
jmp 0x464edf
mov byte [esi], bl
inc esi
movsx eax, byte [esi]
push eax
call fcn.005371bd
add esp, 4
test eax, eax
je 0x464f04
push esi
call fcn.00536c12
add esp, 4
push eax
call sub.WS2_32.dll_htons
mov word [ebp - 0x12], ax
jmp 0x464f4c
push 0x57d4f8
push esi
call sub.WS2_32.dll_getservbyname
cmp eax, ebx
jne 0x464f44
cmp dword [sym.RzxClient.exe_int_ftplib_debug], ebx
je 0x464f28
push str.getservbyname
call fcn.0053b900
add esp, 4
push edi
call fcn.00535ec2
add esp, 4
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00534bba
mov esp, ebp
pop ebp
ret
mov cx, word [eax + 8]
mov word [ebp - 0x12], cx
push edi
call sub.WS2_32.dll_inet_addr
mov dword [ebp - 0x10], eax
cmp eax, 0xffffffff
jne 0x464f9f
push edi
call sub.WS2_32.dll_gethostbyname
cmp eax, ebx
jne 0x464f88
cmp dword [sym.RzxClient.exe_int_ftplib_debug], ebx
je 0x464f75
push edi
call fcn.00535ec2
add esp, 4
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00534bba
mov esp, ebp
pop ebp
ret
movsx edx, word [eax + 0xa]
mov eax, dword [eax + 0xc]
mov ecx, dword [eax]
push edx
push ecx
lea edx, [ebp - 0x10]
push edx
call fcn.00534c80
add esp, 0xc
push edi
call fcn.00535ec2
add esp, 4
push 6
push 1
push 2
call sub.WS2_32.dll_socket
mov edi, eax
cmp edi, 0xffffffff
jne 0x464fe2
cmp dword [sym.RzxClient.exe_int_ftplib_debug], ebx
je 0x464f75
push str.socket
call fcn.0053b900
add esp, 4
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00534bba
mov esp, ebp
pop ebp
ret
push 4
lea eax, [ebp - 0x1c]
push eax
push 4
push 0xffff
push edi
call sub.WS2_32.dll_setsockopt
cmp eax, 0xffffffff
jne 0x465028
cmp dword [sym.RzxClient.exe_int_ftplib_debug], ebx
je 0x46500f
push str.setsockopt
call fcn.0053b900
add esp, 4
push edi
call sub.WS2_32.dll_closesocket
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00534bba
mov esp, ebp
pop ebp
ret
push 0x10
lea ecx, [ebp - 0x14]
push ecx
push edi
call sub.WS2_32.dll_connect
cmp eax, 0xffffffff
jne 0x465048
cmp dword [sym.RzxClient.exe_int_ftplib_debug], ebx
je 0x46500f
push str.connect
jmp 0x465007
push 0x444
push 1
call fcn.0053b622
mov esi, eax
add esp, 8
cmp esi, ebx
jne 0x46506c
cmp dword [sym.RzxClient.exe_int_ftplib_debug], ebx
je 0x46500f
push str.calloc
jmp 0x465007
push 0x2000
call fcn.00535e2e
add esp, 4
mov dword [esi + 0x14], eax
cmp eax, ebx
jne 0x4650b7
cmp dword [sym.RzxClient.exe_int_ftplib_debug], ebx
je 0x465095
push str.calloc
call fcn.0053b900
add esp, 4
push edi
call sub.WS2_32.dll_closesocket
push esi
call fcn.00535ec2
add esp, 4
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00534bba
mov esp, ebp
pop ebp
ret
push 0x32
mov ecx, esi
mov dword [esi + 8], edi
mov dword [esi + 0x18], ebx
mov dword [esi + 0x1c], ebx
mov dword [esi + 0x20], ebx
mov dword [esi + 0x24], 1
mov dword [esi + 0x30], ebx
mov dword [esi + 0x2c], ebx
mov dword [esi + 0x28], ebx
mov dword [esi + 0x34], ebx
mov dword [esi + 0x38], ebx
mov dword [esi + 0x40], ebx
mov dword [esi + 0x3c], ebx
call fcn.00464bb0
add esp, 4
test eax, eax
jne 0x46511a
push edi
call sub.WS2_32.dll_closesocket
mov edx, dword [esi + 0x14]
push edx
call fcn.00535ec2
push esi
call fcn.00535ec2
add esp, 8
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00534bba
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 4]
pop edi
mov dword [eax], esi
pop esi
xor ecx, ebp
mov eax, 1
pop ebx
call fcn.00534bba
mov esp, ebp
pop ebp
ret