Function at 0x476f80
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov ecx, dword [esi + 0x11434]
test ecx, ecx
jne 0x477043
mov eax, dword [ebp + 0xc]
cmp eax, 0xffffffff
jne 0x476fb7
push str.Bad_socket_provided
push 0xffffffffffffffd3
push esi
call fcn.0049aeb0
add esp, 0xc
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea ecx, [ebp + 8]
mov dword [esi + 0x15c], eax
push ecx
lea ecx, [ebp - 4]
mov dword [ebp + 8], 4
push ecx
push 0x1007
push 0xffff
lea ebx, [esi + 0x15c]
push eax
call dword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
je 0x476ffd
mov dword [esi + 0x168], 0
mov dword [esi + 0x11434], 2
jmp 0x477052
mov ecx, dword [ebp - 4]
xor eax, eax
test ecx, ecx
sete al
mov dword [esi + 0x168], eax
test ecx, ecx
jne 0x476ff1
lea eax, [ebp + 8]
mov dword [ebp + 8], 1
push eax
push 0x8004667e
push dword [ebx]
call dword [sym.imp.WS2_32.dll_ioctlsocket]
test eax, eax
je 0x476ff1
push str.Failed_changing_sockets_blocking_state_to_non_blocking
push eax
push esi
call fcn.0049aeb0
add esp, 0xc
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea ebx, [esi + 0x15c]
cmp ecx, 2
jne 0x477132
cmp dword [esi + 0x11320], 0
mov edx, str.SSH_2.0_libssh2_1.11.0_r_n
mov edi, 0x18
jne 0x477089
mov ecx, dword [esi + 0x108]
test ecx, ecx
je 0x47707f
mov edi, ecx
lea edx, [edi + 1]
mov al, byte [edi]
inc edi
test al, al
jne 0x477074
sub edi, edx
mov edx, ecx
mov dword [esi + 0x11320], 2
mov ecx, dword [esi + 0x11424]
mov eax, edi
and dword [esi + 0x164], 0xfffffffd
sub eax, ecx
push esi
push 0
push eax
lea eax, [ecx + edx]
push eax
push dword [ebx]
mov eax, dword [esi + 0x30]
call eax
mov ecx, dword [esi + 0x11424]
add esp, 0x14
sub edi, ecx
cmp eax, edi
je 0x477112
test eax, eax
jns 0x4770ec
cmp eax, 0xfffffff5
je 0x4770ec
push str.Failed_sending_banner
push 0xffffffffffffffd5
push esi
mov dword [esi + 0x11320], 0
mov dword [esi + 0x11424], 0
call fcn.0049aeb0
add esp, 0xc
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [esi + 0x164], 2
test eax, eax
jle 0x477234
add eax, ecx
pop edi
mov dword [esi + 0x11424], eax
mov eax, 0xffffffdb
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [esi + 0x11424], 0
mov dword [esi + 0x11434], 3
mov dword [esi + 0x11320], 0
jmp 0x477137
cmp ecx, 3
jne 0x477188
push esi
call fcn.00476dd0
add esp, 4
cmp eax, 0xffffffdb
je 0x477234
test eax, eax
jne 0x477172
push 4
push dword [esi + 0xd0]
push str.SSH_
call fcn.00474150
add esp, 0xc
test eax, eax
jne 0x477137
mov dword [esi + 0x11434], 4
jmp 0x47718d
push str.Failed_getting_banner
push eax
push esi
call fcn.0049aeb0
add esp, 0xc
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp ecx, 4
jne 0x4771d4
lea eax, [esi + 0x11468]
push eax
push 0
push esi
call fcn.0049c1b0
add esp, 0xc
cmp eax, 0xffffffdb
je 0x477234
test eax, eax
je 0x4771c2
push str.Unable_to_exchange_encryption_keys
push eax
push esi
call fcn.0049aeb0
add esp, 0xc
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [esi + 0x11434], 5
lea edi, [esi + 0x11440]
jmp 0x4771df
lea edi, [esi + 0x11440]
cmp ecx, 5
jne 0x47721a
lea eax, [esi + 0x11441]
mov byte [edi], 5
push 0xc
push eax
call fcn.0049b340
movq xmm0, qword [str.ssh_userauth]
add esp, 8
movq qword [esi + 0x11445], xmm0
mov eax, dword [0x4c142c]
mov dword [esi + 0x1144d], eax
mov dword [esi + 0x11434], 6
jmp 0x47721f
cmp ecx, 6
jne 0x477266
push 0
push 0
push 0x11
push edi
push esi
call fcn.004a0090
add esp, 0x14
cmp eax, 0xffffffdb
jne 0x477240
pop edi
pop esi
mov eax, 0xffffffdb
pop ebx
mov esp, ebp
pop ebp
ret
test eax, eax
je 0x47725a
push str.Unable_to_ask_for_ssh_userauth_service
push eax
push esi
call fcn.0049aeb0
add esp, 0xc
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [esi + 0x11434], 7
jmp 0x47726f
cmp ecx, 7
jne 0x477343
lea eax, [esi + 0x11458]
push eax
push 0
push 0
push 0
lea ebx, [esi + 0x1143c]
push ebx
lea edi, [esi + 0x11438]
push edi
push 6
push esi
call fcn.0049e830
add esp, 0x20
test eax, eax
je 0x4772af
push str.Failed_to_get_response_to_ssh_userauth_request
push eax
push esi
call fcn.0049aeb0
add esp, 0xc
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [ebx], 5
jae 0x4772cb
push str.Unexpected_packet_length
push 0xfffffffffffffff2
push esi
call fcn.0049aeb0
add esp, 0xc
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [edi]
inc eax
push eax
call fcn.0049b280
add esp, 4
mov dword [esi + 0x11454], eax
cmp eax, 0xc
jne 0x47731e
push eax
mov eax, dword [edi]
add eax, 5
push eax
push str.ssh_userauth
call fcn.00474150
add esp, 0xc
test eax, eax
jne 0x47731e
mov eax, dword [esi + 0xc]
push esi
push dword [edi]
call eax
add esp, 8
mov dword [edi], 0
mov dword [esi + 0x11434], 0
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 0xc]
push esi
push dword [edi]
call eax
push str.Invalid_response_received_from_server
push 0xfffffffffffffff2
push esi
mov dword [edi], 0
call fcn.0049aeb0
add esp, 0x14
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
mov eax, 0xffffffde
pop ebx
mov esp, ebp
pop ebp
ret