Function at 0x41ece0
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Get socket status
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc04
mov eax, dword [0x59a4d4]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, dword [ebp + 0xc]
push edi
push 0x6c8
xor ebx, ebx
lea ecx, [ebp - 0x8e4]
push ebx
push ecx
mov dword [ebp - 0xaf4], eax
call fcn.00514e20
push 0x103
lea edx, [ebp - 0x20b]
push ebx
push edx
mov dword [ebp - 0x8e4], 0x44435049
mov dword [ebp - 0x6c0], 1
mov byte [ebp - 0x20c], bl
call fcn.00514e20
push 0x103
lea eax, [ebp - 0x107]
push ebx
push eax
mov byte [ebp - 0x108], bl
call fcn.00514e20
push 0x103
lea ecx, [ebp - 0xc03]
push ebx
push ecx
mov byte [ebp - 0xc04], bl
call fcn.00514e20
or edi, 0xffffffff
add esp, 0x30
mov dword [ebp - 0xaf0], 1
mov dword [ebp - 0xafc], 3
mov dword [ebp - 0xaf8], ebx
mov dword [ebp - 0x220], edi
cmp esi, ebx
je 0x41edb1
push esi
lea edx, [ebp - 0x428]
push 0x104
push edx
call fcn.00514e9a
add esp, 0xc
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x41edb6
push ebx
push ebx
push 0x103
sub eax, edx
lea ecx, [ebp - 0x20c]
push ecx
sar eax, 1
push eax
push esi
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov edx, dword [0x595fcc]
cmp dword [ebp + 0x10], ebx
je 0x41edfc
cmp edx, 0xffffffff
je 0x41edfc
push edx
call sub.WS2_32.dll_closesocket
or edx, 0xffffffff
mov dword [0x595fcc], edx
mov eax, esi
lea esi, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x41ee01
sub eax, esi
sar eax, 1
je 0x41f163
or esi, 0xffffffff
cmp edx, esi
jne 0x41f163
mov eax, dword [ebp - 0xaf4]
cmp dword [eax + 0x6c4], esi
jne 0x41f163
lea ecx, [ebp - 0x20c]
push ecx
lea edx, [ebp - 0x108]
push 0x104
push edx
call fcn.0051607f
mov eax, dword [ebp - 0x108]
mov cx, word [ebp - 0x104]
mov dl, byte [ebp - 0x102]
mov dword [ebp - 0xc04], eax
mov word [ebp - 0xc00], cx
add esp, 0xc
mov byte [ebp - 0xbfe], dl
mov ecx, str.rtsp:__
lea eax, [ebp - 0xc04]
nop
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x41eea0
cmp dl, bl
je 0x41ee9c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x41eea0
add eax, 2
add ecx, 2
cmp dl, bl
jne 0x41ee80
xor eax, eax
jmp 0x41eea4
sbb eax, eax
sbb eax, esi
cmp eax, ebx
jne 0x41eee0
lea eax, [ebp - 0x101]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x41eeb1
sub eax, edx
dec eax
cmp eax, ebx
jl 0x41eed3
mov cl, 0x3a
cmp byte [ebp + eax - 0x101], cl
jne 0x41eecc
mov edi, eax
dec eax
jns 0x41eec1
cmp edi, ebx
jge 0x41eef6
push str.RTSP_address_is_wrong_
call fcn.005166ba
add esp, 4
pop edi
pop esi
mov eax, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00514760
mov esp, ebp
pop ebp
ret
mov byte [ebp + edi - 0x101], bl
push 6
mov edi, 1
push edi
push 2
call sub.WS2_32.dll_socket
mov dword [0x595fcc], eax
cmp eax, esi
je 0x41ef76
mov ecx, dword [ebp + 0x18]
mov eax, 2
push ecx
mov word [ebp - 0x21c], ax
call sub.WS2_32.dll_htons
lea edx, [ebp - 0x101]
push edx
mov word [ebp - 0x21a], ax
call sub.WS2_32.dll_inet_addr
mov ecx, dword [0x595fcc]
mov dword [ebp - 0x218], eax
lea eax, [ebp - 0xaf0]
push eax
push 0x8004667e
push ecx
call sub.WS2_32.dll_ioctlsocket
cmp eax, esi
jne 0x41ef89
call sub.WS2_32.dll_WSAGetLastError
mov edx, dword [0x595fcc]
push edx
call sub.WS2_32.dll_closesocket
mov dword [0x595fcc], esi
pop edi
mov eax, esi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00514760
mov esp, ebp
pop ebp
ret
mov ecx, dword [0x595fcc]
push 0x10
lea eax, [ebp - 0x21c]
push eax
push ecx
call sub.WS2_32.dll_connect
cmp eax, esi
jne 0x41efb0
call sub.WS2_32.dll_WSAGetLastError
cmp eax, 0x2733
jne 0x41ef64
mov edi, edi
mov eax, dword [0x595fcc]
lea ecx, [ebp - 0xafc]
push ecx
push ebx
lea edx, [ebp - 0x9e8]
push edx
lea ecx, [ebp - 0xaec]
push ecx
push eax
mov dword [ebp - 0x9e4], eax
mov dword [ebp - 0x9e8], edi
mov dword [ebp - 0xae8], eax
mov dword [ebp - 0xaec], edi
call sub.WS2_32.dll_select
mov esi, eax
cmp esi, 0xffffffff
je 0x41f02e
cmp esi, ebx
je 0x41f037
mov eax, dword [0x595fcc]
lea edx, [ebp - 0x9e8]
push edx
push eax
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
jne 0x41f043
mov edx, dword [0x595fcc]
lea ecx, [ebp - 0xaec]
push ecx
push edx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x41efb0
mov eax, dword [0x595fcc]
push eax
call sub.WS2_32.dll_closesocket
jmp 0x41efb0
mov ecx, dword [0x595fcc]
push ecx
jmp 0x41f03e
mov edx, dword [0x595fcc]
push edx
call sub.WS2_32.dll_closesocket
mov ecx, dword [ebp - 0x9e8]
mov edx, dword [0x595fcc]
xor eax, eax
cmp ecx, ebx
jbe 0x41f098
cmp dword [ebp + eax*4 - 0x9e4], edx
je 0x41f066
add eax, edi
cmp eax, ecx
jb 0x41f055
jmp 0x41f098
lea edi, [ecx - 1]
cmp eax, edi
jae 0x41f08c
lea ecx, [ecx]
mov ecx, dword [ebp + eax*4 - 0x9e0]
mov dword [ebp + eax*4 - 0x9e4], ecx
mov ecx, dword [ebp - 0x9e8]
inc eax
lea edi, [ecx - 1]
cmp eax, edi
jb 0x41f070
dec ecx
mov dword [ebp - 0x9e8], ecx
mov edi, 1
mov ecx, dword [ebp - 0xaec]
xor eax, eax
cmp ecx, ebx
jbe 0x41f0e3
cmp dword [ebp + eax*4 - 0xae8], edx
je 0x41f0b5
add eax, edi
cmp eax, ecx
jb 0x41f0a4
jmp 0x41f0e3
lea edi, [ecx - 1]
cmp eax, edi
jae 0x41f0dc
lea esp, [esp]
mov ecx, dword [ebp + eax*4 - 0xae4]
mov dword [ebp + eax*4 - 0xae8], ecx
mov ecx, dword [ebp - 0xaec]
inc eax
lea edi, [ecx - 1]
cmp eax, edi
jb 0x41f0c0
dec ecx
mov dword [ebp - 0xaec], ecx
cmp esi, ebx
jg 0x41f111
call sub.WS2_32.dll_WSAGetLastError
mov edx, dword [0x595fcc]
push edx
call sub.WS2_32.dll_closesocket
pop edi
or eax, 0xffffffff
pop esi
mov dword [0x595fcc], eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00514760
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0xaf0]
push eax
push 0x8004667e
push edx
mov dword [ebp - 0xaf0], ebx
call sub.WS2_32.dll_ioctlsocket
cmp eax, 0xffffffff
jne 0x41f15d
call sub.WS2_32.dll_WSAGetLastError
mov ecx, dword [0x595fcc]
push ecx
call sub.WS2_32.dll_closesocket
pop edi
pop esi
mov dword [0x595fcc], 0xffffffff
or eax, 0xffffffff
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00514760
mov esp, ebp
pop ebp
ret
mov edx, dword [0x595fcc]
mov edi, dword [ebp - 0xaf4]
mov ecx, 0x1b2
lea esi, [ebp - 0x8e4]
mov dword [ebp - 0x220], edx
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
xor eax, eax
pop ebx
call fcn.00514760
mov esp, ebp
pop ebp
ret