Function at 0x5121c0
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
mov esi, dword [ebp + 8]
cmp dword [esi + 0xcb64], 0
jne 0x512270
mov eax, dword [ebp + 0xc]
cmp eax, 0xffffffff
jne 0x5121f2
push str.Bad_socket_provided
push 0xffffffffffffffd3
push esi
call fcn.005222b0
add esp, 0xc
pop esi
mov esp, ebp
pop ebp
ret
lea ecx, [ebp + 8]
mov dword [esi + 0x144], eax
push ecx
lea ecx, [ebp - 4]
mov dword [ebp + 8], 4
push ecx
push 0x1007
push 0xffff
push eax
call dword [sym.imp.WS2_32.dll_getsockopt]
mov ecx, dword [ebp - 4]
test eax, eax
mov edx, 1
cmovne ecx, edx
xor eax, eax
test ecx, ecx
sete al
mov dword [esi + 0x150], eax
test ecx, ecx
jne 0x512266
lea eax, [ebp + 8]
mov dword [ebp + 8], edx
push eax
push 0x8004667e
push dword [esi + 0x144]
call dword [sym.imp.WS2_32.dll_ioctlsocket]
test eax, eax
je 0x512266
push str.Failed_changing_sockets_blocking_state_to_non_blocking
push eax
push esi
call fcn.005222b0
add esp, 0xc
pop esi
mov esp, ebp
pop ebp
ret
mov dword [esi + 0xcb64], 2
cmp dword [esi + 0xcb64], 2
jne 0x5122bd
push esi
call fcn.00511780
add esp, 4
cmp eax, 0xffffffdb
jne 0x512291
mov eax, 0xffffffdb
pop esi
mov esp, ebp
pop ebp
ret
test eax, eax
je 0x5122a9
push str.Failed_sending_banner
push eax
push esi
call fcn.005222b0
add esp, 0xc
pop esi
mov esp, ebp
pop ebp
ret
mov dword [esi + 0xcb64], 3
mov dword [esi + 0xca50], 0
cmp dword [esi + 0xcb64], 3
jne 0x5122fb
push esi
call fcn.005115e0
add esp, 4
cmp eax, 0xffffffdb
je 0x512287
test eax, eax
jne 0x512337
push 4
push dword [esi + 0xb8]
push str.SSH_
call fcn.0053da10
add esp, 0xc
test eax, eax
jne 0x5122c6
mov dword [esi + 0xcb64], 4
cmp dword [esi + 0xcb64], 4
jne 0x512355
lea eax, [esi + 0xcb98]
push eax
push 0
push esi
call fcn.005232f0
add esp, 0xc
cmp eax, 0xffffffdb
je 0x512287
test eax, eax
je 0x51234b
push str.Unable_to_exchange_encryption_keys
push eax
push esi
call fcn.005222b0
add esp, 0xc
pop esi
mov esp, ebp
pop ebp
ret
push str.Failed_getting_banner
push eax
push esi
call fcn.005222b0
add esp, 0xc
pop esi
mov esp, ebp
pop ebp
ret
mov dword [esi + 0xcb64], 5
cmp dword [esi + 0xcb64], 5
jne 0x51239b
lea eax, [esi + 0xcb71]
mov byte [esi + 0xcb70], 5
push 0xc
push eax
call fcn.00522530
movq xmm0, qword [str.ssh_userauth]
add esp, 8
movq qword [esi + 0xcb75], xmm0
mov eax, dword [0x59f310]
mov dword [esi + 0xcb7d], eax
mov dword [esi + 0xcb64], 6
cmp dword [esi + 0xcb64], 6
jne 0x5123e5
push 0
push 0
push 0x11
lea eax, [esi + 0xcb70]
push eax
push esi
call fcn.00529ac0
add esp, 0x14
cmp eax, 0xffffffdb
je 0x512287
test eax, eax
je 0x5123db
push str.Unable_to_ask_for_ssh_userauth_service
push eax
push esi
call fcn.005222b0
add esp, 0xc
pop esi
mov esp, ebp
pop ebp
ret
mov dword [esi + 0xcb64], 7
cmp dword [esi + 0xcb64], 7
jne 0x5124b2
push ebx
push edi
lea eax, [esi + 0xcb88]
push eax
push 0
push 0
push 0
lea ebx, [esi + 0xcb6c]
push ebx
lea edi, [esi + 0xcb68]
push edi
push 6
push esi
call fcn.00528de0
add esp, 0x20
test eax, eax
jne 0x512433
cmp dword [ebx], 5
jae 0x51243a
push str.Unexpected_packet_length
push 0xfffffffffffffff2
push esi
call fcn.005222b0
add esp, 0xc
pop edi
pop ebx
pop esi
mov esp, ebp
pop ebp
ret
mov eax, dword [edi]
inc eax
push eax
call fcn.00522670
add esp, 4
mov dword [esi + 0xcb84], eax
cmp eax, 0xc
jne 0x51248d
push eax
mov eax, dword [edi]
add eax, 5
push eax
push str.ssh_userauth
call fcn.0053da10
add esp, 0xc
test eax, eax
jne 0x51248d
mov eax, dword [esi + 0xc]
push esi
push dword [edi]
call eax
add esp, 8
mov dword [edi], 0
mov dword [esi + 0xcb64], 0
xor eax, eax
pop edi
pop ebx
pop esi
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.005222b0
add esp, 0x14
pop edi
pop ebx
pop esi
mov esp, ebp
pop ebp
ret
mov eax, 0xffffffde
pop esi
mov esp, ebp
pop ebp
ret