Function at 0x465430
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Get local ipv4 addresses
Get socket information
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x43c
mov eax, dword [0x676300]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push edi
mov edi, ecx
xor ecx, ecx
mov dword [ebp - 0x438], eax
mov dword [ebp - 0x434], ecx
mov dword [ebp - 0x43c], 1
cmp dword [edi + 0x18], ecx
jne 0x465485
mov eax, dword [ebp + 0x10]
cmp eax, 1
je 0x465497
cmp eax, 2
je 0x465497
push eax
push str.Invalid_direction__d_n
add edi, 0x44
push edi
call fcn.00535bfb
add esp, 0xc
or eax, 0xffffffff
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00534bba
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 0xc]
cmp eax, 0x41
je 0x4654c8
cmp eax, 0x49
je 0x4654c8
push eax
push str.Invalid_mode__c_n
add edi, 0x44
push edi
call fcn.00535bfb
add esp, 0xc
or eax, 0xffffffff
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00534bba
mov esp, ebp
pop ebp
ret
mov eax, dword [edi + 0x24]
push esi
mov dword [ebp - 0x430], 0x10
cmp eax, 1
jne 0x4655fd
xor eax, eax
mov dword [ebp - 0x42c], eax
mov dword [ebp - 0x428], eax
mov dword [ebp - 0x424], eax
mov dword [ebp - 0x420], eax
mov eax, 2
push 0x32
mov esi, str.PASV
mov word [ebp - 0x42c], ax
call fcn.00465270
add esp, 4
test eax, eax
je 0x465705
lea ecx, [edi + 0x44]
push 0x28
push ecx
call fcn.00537590
add esp, 8
test eax, eax
je 0x465705
lea edx, [ebp - 0x418]
push edx
lea ecx, [ebp - 0x41c]
push ecx
lea edx, [ebp - 0x408]
push edx
lea ecx, [ebp - 0x40c]
push ecx
lea edx, [ebp - 0x410]
push edx
lea ecx, [ebp - 0x414]
push ecx
inc eax
push str._u__u__u__u__u__u
push eax
call fcn.00535d0b
movzx edx, byte [ebp - 0x414]
movzx eax, byte [ebp - 0x410]
movzx ecx, byte [ebp - 0x40c]
mov byte [ebp - 0x428], dl
movzx edx, byte [ebp - 0x408]
mov byte [ebp - 0x427], al
movzx eax, byte [ebp - 0x41c]
mov byte [ebp - 0x426], cl
movzx ecx, byte [ebp - 0x418]
add esp, 0x20
mov byte [ebp - 0x425], dl
mov byte [ebp - 0x42a], al
mov byte [ebp - 0x429], cl
push ebx
push 6
push 1
push 2
call sub.WS2_32.dll_socket
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x465718
cmp dword [sym.RzxClient.exe_int_ftplib_debug], 0
je 0x4658ed
push str.socket
call fcn.0053b900
add esp, 4
or eax, ebx
pop ebx
pop esi
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00534bba
mov esp, ebp
pop ebp
ret
cmp eax, 3
jne 0x4656d0
xor eax, eax
mov dword [ebp - 0x42c], eax
mov dword [ebp - 0x428], eax
mov dword [ebp - 0x424], eax
mov dword [ebp - 0x420], eax
lea eax, [ebp - 0x430]
mov edx, 2
push eax
lea ecx, [ebp - 0x42c]
mov word [ebp - 0x42c], dx
mov edx, dword [edi + 8]
push ecx
push edx
call sub.WS2_32.dll_getpeername
test eax, eax
je 0x465679
call fcn.0053b8b7
mov eax, dword [eax]
push eax
call fcn.0053b80b
push eax
push str.getpeername__s_n
add edi, 0x44
push edi
call fcn.00535bfb
add esp, 0x10
pop esi
or eax, 0xffffffff
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00534bba
mov esp, ebp
pop ebp
ret
push 0x32
mov esi, str.EPSV
call fcn.00465270
add esp, 4
test eax, eax
je 0x465705
lea ecx, [edi + 0x44]
push 0x28
push ecx
call fcn.00537590
add esp, 8
test eax, eax
je 0x465705
lea edx, [ebp - 0x42a]
push edx
push str.__hu_
push eax
call fcn.00535d0b
add esp, 0xc
cmp eax, 1
jne 0x465705
mov eax, dword [ebp - 0x42a]
push eax
call sub.WS2_32.dll_htons
mov word [ebp - 0x42a], ax
jmp 0x4655b9
mov eax, dword [edi + 8]
lea ecx, [ebp - 0x430]
push ecx
lea edx, [ebp - 0x42c]
push edx
push eax
call sub.WS2_32.dll_getsockname
test eax, eax
jns 0x4655b9
cmp dword [sym.RzxClient.exe_int_ftplib_debug], 0
je 0x465705
push str.getsockname
call fcn.0053b900
add esp, 4
pop esi
or eax, 0xffffffff
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00534bba
mov esp, ebp
pop ebp
ret
push 4
lea ecx, [ebp - 0x43c]
push ecx
push 4
push 0xffff
push ebx
call sub.WS2_32.dll_setsockopt
cmp eax, 0xffffffff
je 0x465751
push 4
lea edx, [ebp - 0x434]
push edx
push 0x80
push 0xffff
push ebx
call sub.WS2_32.dll_setsockopt
cmp eax, 0xffffffff
jne 0x465768
cmp dword [sym.RzxClient.exe_int_ftplib_debug], 0
je 0x465871
push str.setsockopt
jmp 0x465869
mov eax, dword [edi + 0x24]
cmp eax, 1
je 0x46588b
cmp eax, 3
je 0x46588b
push 0x10
lea ecx, [ebp - 0x42c]
push ecx
xor eax, eax
push ebx
mov word [ebp - 0x42a], ax
call sub.WS2_32.dll_bind
cmp eax, 0xffffffff
jne 0x4657b1
cmp dword [sym.RzxClient.exe_int_ftplib_debug], 0
je 0x465871
push str.bind
jmp 0x465869
push 1
push ebx
call sub.WS2_32.dll_listen
test eax, eax
jns 0x4657d4
cmp dword [sym.RzxClient.exe_int_ftplib_debug], 0
je 0x465871
push str.listen
jmp 0x465869
lea edx, [ebp - 0x430]
push edx
lea eax, [ebp - 0x42c]
push eax
push ebx
call sub.WS2_32.dll_getsockname
test eax, eax
js 0x4658ed
movzx ecx, byte [ebp - 0x429]
movzx edx, byte [ebp - 0x42a]
movzx eax, byte [ebp - 0x425]
push ecx
movzx ecx, byte [ebp - 0x426]
push edx
movzx edx, byte [ebp - 0x427]
push eax
movzx eax, byte [ebp - 0x428]
push ecx
push edx
push eax
lea ecx, [ebp - 0x404]
push str.PORT__d__d__d__d__d__d
push ecx
call fcn.00535bfb
push 0x32
lea esi, [ebp - 0x404]
call fcn.00465270
add esp, 0x24
test eax, eax
je 0x465871
push 0x444
push 1
call fcn.0053b622
mov esi, eax
xor eax, eax
add esp, 8
cmp esi, eax
jne 0x4658af
cmp dword [sym.RzxClient.exe_int_ftplib_debug], eax
je 0x465871
push str.calloc
call fcn.0053b900
add esp, 4
push ebx
call sub.WS2_32.dll_closesocket
pop ebx
pop esi
or eax, 0xffffffff
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00534bba
mov esp, ebp
pop ebp
ret
push 0x10
lea edx, [ebp - 0x42c]
push edx
push ebx
call sub.WS2_32.dll_connect
cmp eax, 0xffffffff
jne 0x465845
cmp dword [sym.RzxClient.exe_int_ftplib_debug], 0
je 0x465871
push str.connect
jmp 0x465869
cmp dword [ebp + 0xc], 0x41
jne 0x465903
push 0x2000
call fcn.00535e2e
add esp, 4
mov dword [esi + 0x14], eax
test eax, eax
jne 0x465901
cmp dword [sym.RzxClient.exe_int_ftplib_debug], eax
je 0x4658de
push str.calloc
call fcn.0053b900
add esp, 4
push ebx
call sub.WS2_32.dll_closesocket
push esi
call fcn.00535ec2
add esp, 4
pop ebx
pop esi
or eax, 0xffffffff
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00534bba
mov esp, ebp
pop ebp
ret
xor eax, eax
mov ecx, dword [ebp + 0x10]
mov dword [esi + 8], ebx
mov dword [esi + 0x18], ecx
mov edx, dword [edi + 0x28]
mov dword [esi + 0x28], edx
mov ecx, dword [edi + 0x2c]
mov dword [esi + 0x2c], ecx
mov edx, dword [edi + 0x34]
mov dword [esi + 0x34], edx
mov dword [esi + 0x38], eax
mov dword [esi + 0x40], eax
mov ecx, dword [edi + 0x3c]
mov dword [esi + 0x3c], ecx
mov dword [esi + 0x1c], edi
cmp dword [esi + 0x28], eax
jne 0x465940
cmp dword [esi + 0x2c], eax
jne 0x465940
cmp ecx, eax
jne 0x465940
mov dword [esi + 0x30], eax
jmp 0x465946
mov edx, dword [edi + 0x30]
mov dword [esi + 0x30], edx
mov eax, dword [ebp - 0x438]
mov ecx, dword [ebp - 4]
mov dword [edi + 0x20], esi
pop ebx
mov dword [eax], esi
pop esi
xor ecx, ebp
mov eax, 1
pop edi
call fcn.00534bba
mov esp, ebp
pop ebp
ret