Function at 0x492d80
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
xor edx, edx
xor ecx, ecx
push esi
mov esi, dword [ebp + 0x10]
test esi, esi
jne 0x492db8
mov esi, dword [ebp + 8]
push esi
call sym.wfreerdp.exe_freerdp_get_last_error
add esp, 4
test eax, eax
jne 0x492db0
push 0x20006
push esi
call sym.wfreerdp.exe_freerdp_set_last_error
add esp, 8
or eax, 0xffffffff
pop esi
mov esp, ebp
pop ebp
ret
cmp byte [esi], 0x2f
push edi
mov edi, 1
cmove edx, edi
cmp byte [esi], 0x7c
cmove ecx, edi
mov dword [ebp - 0x10], ecx
test edx, edx
je 0x492df8
mov esi, dword [ebp + 8]
push esi
call sym.wfreerdp.exe_freerdp_get_last_error
add esp, 4
test eax, eax
jne 0x492def
push 0x20006
push esi
call sym.wfreerdp.exe_freerdp_set_last_error
add esp, 8
pop edi
or eax, 0xffffffff
pop esi
mov esp, ebp
pop ebp
ret
mov edi, dword [ebp + 8]
push ebx
test ecx, ecx
je 0x492e08
mov ebx, dword [ebp + 0x14]
jmp 0x49301b
mov ebx, dword [ebp + 0xc]
cmp dword [ebx + 0x3e40], 0
jne 0x492e5e
push esi
push edi
call fcn.00493780
add esp, 8
test eax, eax
je 0x492e2b
cmp dword [ebx + 0x2000], 0
je 0x492e5e
mov eax, dword [ebx + 0x2660]
test eax, eax
je 0x492e5e
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push eax
push dword [ebx + 0x2670]
push dword [ebx + 0x2668]
push edi
call fcn.00493230
mov ebx, eax
add esp, 0x18
test ebx, ebx
jg 0x49301b
mov ebx, dword [ebp + 0xc]
push 0
push dword [ebp + 0x14]
push esi
call fcn.00493820
add esp, 0xc
mov dword [ebp - 8], eax
test eax, eax
jne 0x492e9c
push edi
call sym.wfreerdp.exe_freerdp_get_last_error
add esp, 4
test eax, eax
jne 0x493215
push 0x20005
push edi
call sym.wfreerdp.exe_freerdp_set_last_error
add esp, 8
or eax, 0xffffffff
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
cmp dword [eax + 4], 0x17
mov esi, eax
jne 0x492ec5
mov ecx, dword [eax + 0x1c]
test ecx, ecx
je 0x492ec5
cmp dword [ebx + 0x9210], 0
jne 0x492ec5
mov esi, ecx
cmp dword [esi + 4], 2
je 0x492ec5
mov esi, dword [esi + 0x1c]
test esi, esi
jne 0x492eb6
mov esi, eax
push dword [esi + 0xc]
push dword [esi + 8]
push dword [esi + 4]
call dword [sym.imp.WS2_32.dll_socket]
mov ebx, eax
test ebx, ebx
jns 0x492f08
push edi
call sym.wfreerdp.exe_freerdp_get_last_error
add esp, 4
test eax, eax
jne 0x492ef5
push 0x20006
push edi
call sym.wfreerdp.exe_freerdp_set_last_error
add esp, 8
push dword [ebp - 8]
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
pop ebx
pop edi
or eax, 0xffffffff
pop esi
mov esp, ebp
pop ebp
ret
push 0
push dword [esi + 0x18]
call fcn.00492cc0
add esp, 8
mov dword [ebp - 0xc], eax
test eax, eax
je 0x492f74
push 1
push str.com.freerdp.core
call fcn.0042f4e0
add esp, 4
push eax
call fcn.0042f7e0
add esp, 8
test eax, eax
je 0x492f69
push dword [ebp - 0xc]
push str.connecting_to_peer__s
push str.freerdp_tcp_connect
push str.C:BuildFreeRDP_stable_1.1BuildFreeRDPlibfreerdpcore_tcp.c
push 0x490
push 1
push 0
push str.com.freerdp.core
call fcn.0042f4e0
add esp, 4
push eax
call fcn.0042fce0
add esp, 0x20
push dword [ebp - 0xc]
call fcn.00580204
add esp, 4
push dword [ebp + 0x18]
push dword [esi + 0x10]
push dword [esi + 0x18]
push ebx
push edi
call fcn.00493490
add esp, 0x14
push dword [ebp - 8]
test eax, eax
jne 0x493015
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
push ebx
call dword [sym.imp.WS2_32.dll_closesocket]
push edi
call sym.wfreerdp.exe_freerdp_get_last_error
add esp, 4
test eax, eax
jne 0x492fba
push 0x20006
push edi
call sym.wfreerdp.exe_freerdp_set_last_error
add esp, 8
push 4
push str.com.freerdp.core
call fcn.0042f4e0
add esp, 4
push eax
call fcn.0042f7e0
add esp, 8
test eax, eax
je 0x4931d7
push dword [ebp + 0x10]
push str.failed_to_connect_to__s
push str.freerdp_tcp_connect
push str.C:BuildFreeRDP_stable_1.1BuildFreeRDPlibfreerdpcore_tcp.c
push 0x49d
push 4
push 0
push str.com.freerdp.core
call fcn.0042f4e0
add esp, 4
push eax
call fcn.0042fce0
add esp, 0x20
or eax, 0xffffffff
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
mov esi, dword [ebp + 0xc]
push dword [esi + 0x1808]
call fcn.00580204
lea eax, [esi + 0x1800]
push eax
push ebx
call fcn.00493660
add esp, 0xc
mov dword [esi + 0x1808], eax
test eax, eax
jne 0x4930a3
cmp dword [ebp - 0x10], eax
jne 0x49304f
push ebx
call dword [sym.imp.WS2_32.dll_closesocket]
push edi
call sym.wfreerdp.exe_freerdp_get_last_error
add esp, 4
test eax, eax
jne 0x49306a
push 0x20006
push edi
call sym.wfreerdp.exe_freerdp_set_last_error
add esp, 8
push 4
push str.com.freerdp.core
call fcn.0042f4e0
add esp, 4
push eax
call fcn.0042f7e0
add esp, 8
test eax, eax
je 0x4931d7
push str.Couldnt_get_socket_ip_address
push str.freerdp_tcp_connect
push str.C:BuildFreeRDP_stable_1.1BuildFreeRDPlibfreerdpcore_tcp.c
push 0x4b0
jmp 0x4931bd
cmp dword [ebp - 0x10], 0
mov esi, dword [sym.imp.WS2_32.dll_setsockopt]
mov dword [ebp - 4], 1
mov dword [ebp - 0x14], 4
jne 0x493118
push 4
lea eax, [ebp - 4]
push eax
push 1
push 6
push ebx
call esi
test eax, eax
jns 0x493118
push 4
push str.com.freerdp.core
call fcn.0042f4e0
add esp, 4
push eax
call fcn.0042f7e0
add esp, 8
test eax, eax
je 0x493118
push str.unable_to_set_TCP_NODELAY
push str.freerdp_tcp_connect
push str.C:BuildFreeRDP_stable_1.1BuildFreeRDPlibfreerdpcore_tcp.c
push 0x4ba
push 4
push 0
push str.com.freerdp.core
call fcn.0042f4e0
add esp, 4
push eax
call fcn.0042fce0
add esp, 0x1c
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 4]
push eax
push 0x1002
push 0xffff
push ebx
call dword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
jne 0x4931e1
cmp dword [ebp - 4], 0x8000
jae 0x4931e1
push 4
lea eax, [ebp - 4]
mov dword [ebp - 4], 0x8000
push eax
push 0x1002
push 0xffff
push ebx
mov dword [ebp - 0x14], 4
call esi
test eax, eax
jns 0x4931e1
push ebx
call dword [sym.imp.WS2_32.dll_closesocket]
push edi
call sym.wfreerdp.exe_freerdp_get_last_error
add esp, 4
test eax, eax
jne 0x49318d
push 0x20006
push edi
call sym.wfreerdp.exe_freerdp_set_last_error
add esp, 8
push 4
push str.com.freerdp.core
call fcn.0042f4e0
add esp, 4
push eax
call fcn.0042f7e0
add esp, 8
test eax, eax
je 0x4931d7
push str.unable_to_set_receive_buffer_len
push str.freerdp_tcp_connect
push str.C:BuildFreeRDP_stable_1.1BuildFreeRDPlibfreerdpcore_tcp.c
push 0x4cc
push 4
push 0
push str.com.freerdp.core
call fcn.0042f4e0
add esp, 4
push eax
call fcn.0042fce0
add esp, 0x1c
pop ebx
pop edi
or eax, 0xffffffff
pop esi
mov esp, ebp
pop ebp
ret
push 0
push dword [edi + 0x160]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x49321f
push ebx
call dword [sym.imp.WS2_32.dll_closesocket]
push edi
call sym.wfreerdp.exe_freerdp_get_last_error
add esp, 4
test eax, eax
jne 0x493215
push 0x2000b
push edi
call sym.wfreerdp.exe_freerdp_set_last_error
add esp, 8
pop ebx
pop edi
or eax, 0xffffffff
pop esi
mov esp, ebp
pop ebp
ret
mov eax, ebx
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret