Function at 0x4a76a0
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 0x4a7763
mov eax, dword [ebp + 0xc]
cmp eax, 0xffffffff
jne 0x4a76d7
push str.Bad_socket_provided
push 0xffffffffffffffd3
push esi
call fcn.004b7010
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 0x4a771d
mov dword [esi + 0x168], 0
mov dword [esi + 0x11434], 2
jmp 0x4a7772
mov ecx, dword [ebp - 4]
xor eax, eax
test ecx, ecx
sete al
mov dword [esi + 0x168], eax
test ecx, ecx
jne 0x4a7711
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 0x4a7711
push str.Failed_changing_sockets_blocking_state_to_non_blocking
push eax
push esi
call fcn.004b7010
add esp, 0xc
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea ebx, [esi + 0x15c]
cmp ecx, 2
jne 0x4a7852
cmp dword [esi + 0x11320], 0
mov edx, str.SSH_2.0_libssh2_1.11.0_r_n
mov edi, 0x18
jne 0x4a77a9
mov ecx, dword [esi + 0x108]
test ecx, ecx
je 0x4a779f
mov edi, ecx
lea edx, [edi + 1]
mov al, byte [edi]
inc edi
test al, al
jne 0x4a7794
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 0x4a7832
test eax, eax
jns 0x4a780c
cmp eax, 0xfffffff5
je 0x4a780c
push str.Failed_sending_banner
push 0xffffffffffffffd5
push esi
mov dword [esi + 0x11320], 0
mov dword [esi + 0x11424], 0
call fcn.004b7010
add esp, 0xc
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [esi + 0x164], 2
test eax, eax
jle 0x4a7954
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 0x4a7857
cmp ecx, 3
jne 0x4a78a8
push esi
call fcn.004a6bb0
add esp, 4
cmp eax, 0xffffffdb
je 0x4a7954
test eax, eax
jne 0x4a7892
push 4
push dword [esi + 0xd0]
push str.SSH_
call fcn.004c40f0
add esp, 0xc
test eax, eax
jne 0x4a7857
mov dword [esi + 0x11434], 4
jmp 0x4a78ad
push str.Failed_getting_banner
push eax
push esi
call fcn.004b7010
add esp, 0xc
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp ecx, 4
jne 0x4a78f4
lea eax, [esi + 0x11468]
push eax
push 0
push esi
call fcn.004b7f20
add esp, 0xc
cmp eax, 0xffffffdb
je 0x4a7954
test eax, eax
je 0x4a78e2
push str.Unable_to_exchange_encryption_keys
push eax
push esi
call fcn.004b7010
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 0x4a78ff
lea edi, [esi + 0x11440]
cmp ecx, 5
jne 0x4a793a
lea eax, [esi + 0x11441]
mov byte [edi], 5
push 0xc
push eax
call fcn.004b7320
movq xmm0, qword [str.ssh_userauth]
add esp, 8
movq qword [esi + 0x11445], xmm0
mov eax, dword [0x4f7f98]
mov dword [esi + 0x1144d], eax
mov dword [esi + 0x11434], 6
jmp 0x4a793f
cmp ecx, 6
jne 0x4a7986
push 0
push 0
push 0x11
push edi
push esi
call fcn.004bc3b0
add esp, 0x14
cmp eax, 0xffffffdb
jne 0x4a7960
pop edi
pop esi
mov eax, 0xffffffdb
pop ebx
mov esp, ebp
pop ebp
ret
test eax, eax
je 0x4a797a
push str.Unable_to_ask_for_ssh_userauth_service
push eax
push esi
call fcn.004b7010
add esp, 0xc
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [esi + 0x11434], 7
jmp 0x4a798f
cmp ecx, 7
jne 0x4a7a63
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.004bb140
add esp, 0x20
test eax, eax
je 0x4a79cf
push str.Failed_to_get_response_to_ssh_userauth_request
push eax
push esi
call fcn.004b7010
add esp, 0xc
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [ebx], 5
jae 0x4a79eb
push str.Unexpected_packet_length
push 0xfffffffffffffff2
push esi
call fcn.004b7010
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.004b7490
add esp, 4
mov dword [esi + 0x11454], eax
cmp eax, 0xc
jne 0x4a7a3e
push eax
mov eax, dword [edi]
add eax, 5
push eax
push str.ssh_userauth
call fcn.004c40f0
add esp, 0xc
test eax, eax
jne 0x4a7a3e
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.004b7010
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