Function at 0x490f70
Capabilities:
Set socket configuration

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x4c
mov ebp, dword [esp + 0x60]
mov dword [esp], 0
call sub.msvcrt.dll_time
mov dword [esp + 0x28], eax
lea eax, [ebp + 0xca28]
mov dword [esp + 0x2c], eax
jmp 0x49111a
cmp dword [esp + 0x64], 0xffffffff
je 0x4914c7
mov edx, dword [esp + 0x64]
mov dword [ebp + 0x11c], edx
mov dword [esp + 0x3c], 4
lea eax, [esp + 0x3c]
mov dword [esp + 0x10], eax
lea eax, [esp + 0x38]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x1007
mov dword [esp + 4], 0xffff
mov dword [esp], edx
call sub.WS2_32.dll_getsockopt
sub esp, 0x14
test eax, eax
jne 0x4914b8
xor eax, eax
mov edx, dword [esp + 0x38]
test edx, edx
sete al
mov dword [ebp + 0x128], eax
test eax, eax
je 0x49102a
mov eax, dword [ebp + 0x11c]
mov dword [esp + 0x3c], 1
lea edx, [esp + 0x3c]
mov dword [esp + 8], edx
mov dword [esp + 4], 0x8004667e
mov dword [esp], eax
call sub.WS2_32.dll_ioctlsocket
sub esp, 0xc
mov dword [ebp + 0xcb38], 2
mov eax, dword [ebp + 0xca24]
test eax, eax
jne 0x4914fd
mov edx, dword [ebp + 0xc8]
test edx, edx
je 0x491583
xor eax, eax
mov ecx, 0xffffffff
mov edi, edx
repne scasb al, byte es:[edi]
not ecx
lea ebx, [ecx - 1]
mov dword [ebp + 0xca24], 2
and dword [ebp + 0x124], 0xfffffffd
mov eax, dword [ebp + 0xcb28]
mov dword [esp + 0x10], ebp
mov dword [esp + 0xc], 0
mov ecx, ebx
sub ecx, eax
mov dword [esp + 8], ecx
add eax, edx
mov dword [esp + 4], eax
mov eax, dword [ebp + 0x11c]
mov dword [esp], eax
call dword [ebp + 0x24]
mov edx, dword [ebp + 0xcb28]
sub ebx, edx
cmp eax, ebx
je 0x491216
cmp eax, 0
jl 0x491534
mov dword [ebp + 0x124], 2
je 0x4915b0
add eax, edx
mov dword [ebp + 0xcb28], eax
mov eax, 0xffffffdb
mov dword [esp + 8], str.Failed_sending_banner
mov dword [esp + 4], eax
mov dword [esp], ebp
call fcn.0049ffcc
mov ebx, eax
lea esi, [esi]
cmp ebx, 0xffffffdb
jne 0x49149b
mov edi, dword [ebp + 0x50]
test edi, edi
je 0x49149b
mov eax, dword [esp + 0x28]
mov dword [esp + 4], eax
mov dword [esp], ebp
call fcn.004906d8
mov ebx, eax
test eax, eax
jne 0x49149b
mov eax, dword [ebp + 0xcb38]
test eax, eax
je 0x490f9c
cmp eax, 2
je 0x491034
cmp eax, 3
je 0x491234
cmp eax, 4
je 0x4913d5
cmp eax, 5
je 0x491401
cmp eax, 6
je 0x49143c
cmp eax, 7
jne 0x4914a8
lea eax, [ebp + 0xcb5c]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
lea eax, [ebp + 0xcb40]
mov dword [esp + 0xc], eax
lea eax, [ebp + 0xcb3c]
mov dword [esp + 8], eax
mov dword [esp + 4], 6
mov dword [esp], ebp
call fcn.004a2464
mov ebx, eax
test eax, eax
jne 0x4910ec
mov eax, dword [ebp + 0xcb3c]
inc eax
mov dword [esp], eax
call fcn.004a0068
mov dword [ebp + 0xcb58], eax
cmp eax, 0xc
mov eax, dword [ebp + 0xcb3c]
jne 0x4911e3
lea edi, [eax + 5]
mov esi, str.ssh_userauth
mov ecx, 0xc
repe cmpsb byte [esi], byte es:[edi]
je 0x49147d
mov dword [esp + 4], ebp
mov dword [esp], eax
call dword [ebp + 0xc]
mov dword [ebp + 0xcb3c], 0
mov dword [esp + 8], str.Invalid_response_received_from_server
mov dword [esp + 4], 0xfffffff2
mov dword [esp], ebp
call fcn.0049ffcc
mov ebx, eax
jmp 0x4910ec
mov dword [ebp + 0xcb28], 0
mov dword [ebp + 0xcb38], 3
mov dword [ebp + 0xca24], 0
mov eax, dword [ebp + 0xca24]
test eax, eax
jne 0x491300
mov dword [ebp + 0xca24], 2
xor ebx, ebx
lea esi, [ebp + ebx + 0xca28]
jmp 0x49127a
je 0x491358
mov al, byte [esp + 0x3c]
test al, al
je 0x49133a
mov byte [esi], al
inc ebx
inc esi
cmp ebx, 0xff
jg 0x491314
test ebx, ebx
je 0x491288
cmp byte [esi - 1], 0xa
je 0x49136c
mov byte [esp + 0x3c], 0
and dword [ebp + 0x124], 0xfffffffe
mov dword [esp + 0x10], ebp
mov dword [esp + 0xc], 0
mov dword [esp + 8], 1
lea eax, [esp + 0x3c]
mov dword [esp + 4], eax
mov eax, dword [ebp + 0x11c]
mov dword [esp], eax
call dword [ebp + 0x28]
cmp eax, 0
jge 0x491258
cmp eax, 0xfffffff5
je 0x4914e6
mov dword [ebp + 0xca24], 0
mov dword [ebp + 0xcb28], 0
mov eax, 0xffffffd5
nop
mov dword [esp + 8], str.Failed_getting_banner
mov dword [esp + 4], eax
mov dword [esp], ebp
call fcn.0049ffcc
mov ebx, eax
jmp 0x4910ec
mov ebx, dword [ebp + 0xcb28]
cmp ebx, 0xff
jle 0x49124e
nop
mov dl, byte [ebp + ebx + 0xca27]
jmp 0x491329
mov dl, byte [ebp + eax + 0xca27]
mov ebx, eax
lea eax, [ebx - 1]
cmp dl, 0xa
je 0x491336
cmp dl, 0xd
jne 0x491370
test eax, eax
jne 0x491320
mov dword [ebp + 0xca24], 0
mov dword [ebp + 0xcb28], 0
mov eax, 0xfffffffe
jmp 0x4912e4
mov dword [ebp + 0x120], 0xffffffff
mov eax, 0xfffffff3
jmp 0x4912e4
mov dl, 0xa
jmp 0x491329
mov dword [ebp + 0xca24], 0
mov dword [ebp + 0xcb28], 0
mov dword [esp + 4], ebp
lea eax, [ebx + 1]
mov dword [esp], eax
call dword [ebp + 4]
mov dword [ebp + 0x90], eax
test eax, eax
je 0x49150c
mov edi, eax
mov esi, dword [esp + 0x2c]
mov ecx, ebx
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebp + 0x90]
mov byte [eax + ebx], 0
mov edi, dword [ebp + 0x90]
mov esi, str.SSH_
mov ecx, 4
repe cmpsb byte [esi], byte es:[edi]
jne 0x491234
mov dword [ebp + 0xcb38], 4
lea eax, [ebp + 0xcb64]
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov dword [esp], ebp
call fcn.004a4838
test eax, eax
jne 0x491568
mov dword [ebp + 0xcb38], 5
mov byte [ebp + 0xcb44], 5
mov dword [esp + 4], 0xc
lea eax, [ebp + 0xcb45]
mov dword [esp], eax
call fcn.004a00d0
lea eax, [ebp + 0xcb49]
mov esi, str.ssh_userauth
mov ecx, 3
mov edi, eax
rep movsd dword es:[edi], dword [esi]
mov dword [ebp + 0xcb38], 6
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x11
lea eax, [ebp + 0xcb44]
mov dword [esp + 4], eax
mov dword [esp], ebp
call fcn.004a0c2c
test eax, eax
jne 0x49154d
mov dword [ebp + 0xcb38], 7
jmp 0x49115e
mov dword [esp + 4], ebp
mov dword [esp], eax
call dword [ebp + 0xc]
mov dword [ebp + 0xcb3c], 0
mov dword [ebp + 0xcb38], 0
mov eax, ebx
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret
mov ebx, 0xffffffde
mov eax, ebx
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [ebp + 0x128], 0
jmp 0x49102a
mov dword [esp + 8], str.Bad_socket_provided
mov dword [esp + 4], 0xffffffd3
mov dword [esp], ebp
call fcn.0049ffcc
mov ebx, eax
jmp 0x4910ec
mov dword [ebp + 0x124], 1
mov dword [ebp + 0xcb28], ebx
mov al, 0xdb
jmp 0x4912e4
mov ebx, 0x17
mov edx, str.SSH_2.0_libssh2_1.4.3_r_n
jmp 0x49106a
mov dword [esp + 8], str.Error_allocating_space_for_remote_banner
mov dword [esp + 4], 0xfffffffa
mov dword [esp], ebp
call fcn.0049ffcc
test eax, eax
je 0x4913b3
jmp 0x4912e4
cmp eax, 0xfffffff5
jne 0x491592
mov dword [ebp + 0x124], 2
mov eax, 0xffffffdb
jmp 0x4910d3
mov dword [esp + 8], str.Unable_to_ask_for_ssh_userauth_service
mov dword [esp + 4], eax
mov dword [esp], ebp
call fcn.0049ffcc
mov ebx, eax
jmp 0x4910ec
mov dword [esp + 8], str.Unable_to_exchange_encryption_keys
mov dword [esp + 4], eax
mov dword [esp], ebp
call fcn.0049ffcc
mov ebx, eax
jmp 0x4910ec
mov ebx, 0x17
mov edx, str.SSH_2.0_libssh2_1.4.3_r_n
jmp 0x491060
mov dword [ebp + 0xca24], 0
mov dword [ebp + 0xcb28], 0
mov eax, 0xffffffd5
jmp 0x4910d3
mov eax, 0xffffffdb
jmp 0x4910d3