Function at 0x569990
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c0
mov eax, dword [ebp + 0x18]
mov edx, dword [ebp + 0x10]
push ebx
push esi
push edi
mov edi, dword [ebp + 0x1c]
mov ebx, edx
mov eax, dword [edi + eax*4 + 0x1a8]
lea ecx, [ebx + 1]
mov esi, dword [edi]
mov dword [ebp + 0x18], eax
mov eax, dword [edi + 0xd0]
cmp eax, 5
mov dword [ebp - 0x14], eax
sete byte [ebp + 0x1f]
mov al, byte [ebx]
inc ebx
test al, al
jne 0x5699c6
mov eax, dword [esi + 0x5c4]
sub ebx, ecx
test byte [edi + 0x284], 0x20
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0xc], eax
je 0x5699f6
push dword [ebp + 0x14]
push edx
push str.SOCKS5:_connecting_to_HTTP_proxy__s_port__d_n
push esi
call fcn.005738f0
add esp, 0x10
cmp dword [ebp - 0x14], 5
je 0x569a18
cmp ebx, 0xff
jbe 0x569a18
push ebx
push str.SOCKS5:_server_resolving_disabled_for_hostnames_of_length___255__actual_len_zu__n
push dword [edi]
call fcn.005738f0
add esp, 0xc
mov byte [ebp + 0x1f], 1
mov edx, dword [esi + 0x640]
xor eax, eax
mov ecx, dword [esi + 0x644]
test edx, edx
mov dword [ebp - 4], 0x493e0
setg al
mov dword [ebp - 8], 0
test ecx, ecx
jle 0x569a40
or eax, 2
sub eax, 1
je 0x569a58
sub eax, 1
je 0x569a54
sub eax, 1
jne 0x569a61
cmp edx, ecx
cmovl ecx, edx
mov eax, ecx
jmp 0x569a5a
mov eax, edx
cdq
mov dword [ebp - 4], eax
mov dword [ebp - 8], edx
lea eax, [ebp - 0x280]
push eax
call fcn.00575cf0
movups xmm0, xmmword [esi + 0xb40]
sub esp, 0xc
mov ecx, esp
sub esp, 0x10
movups xmmword [ecx], xmm0
mov ecx, esp
movups xmm0, xmmword [eax]
movups xmmword [ecx], xmm0
call fcn.0057b020
mov ecx, dword [ebp - 4]
add esp, 0x20
sub ecx, eax
mov eax, ecx
mov dword [ebp - 4], ecx
sbb dword [ebp - 8], edx
mov edx, dword [ebp - 8]
or eax, edx
je 0x56a350
test edx, edx
jl 0x56a350
jg 0x569ab9
test ecx, ecx
jb 0x56a350
lea eax, [ebp - 0x14]
mov dword [ebp - 0x14], 1
push eax
push 0x8004667e
push dword [ebp + 0x18]
call dword [sym.imp.WS2_32.dll_ioctlsocket]
push dword [ebp - 8]
push dword [ebp - 4]
push dword [ebp + 0x18]
push 0xffffffffffffffff
push 0xffffffffffffffff
call fcn.00579bc0
add esp, 0x14
cmp eax, 0xffffffff
jne 0x569b07
push str.SOCKS5:_no_connection_here
push dword [edi]
call fcn.0056f390
mov eax, 7
add esp, 8
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test eax, eax
jne 0x569b26
push str.SOCKS5:_connection_timeout
push dword [edi]
call fcn.0056f390
mov eax, 0x1c
add esp, 8
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test al, 4
je 0x569b45
push str.SOCKS5:_error_occurred_during_connection
push dword [edi]
call fcn.0056f390
mov eax, 7
add esp, 8
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0xc]
test eax, 0xfffffffa
je 0x569b62
push eax
push str.warning:_unsupported_value_passed_to_CURLOPT_SOCKS5_AUTH:__lu_n
push dword [edi]
call fcn.005738f0
mov eax, dword [ebp - 0xc]
add esp, 0xc
test al, 1
mov byte [ebp - 0x270], 5
movzx eax, byte [ebp - 0x26d]
mov ecx, 0
cmovne ecx, dword [ebp + 8]
mov edx, 2
test ecx, ecx
mov dword [ebp - 0x14], ecx
mov byte [ebp - 0x26e], 0
cmovne eax, edx
mov dword [ebp - 0xc], 0
mov byte [ebp - 0x26d], al
setne al
inc al
mov byte [ebp - 0x26f], al
lea eax, [ebp - 0xc]
push eax
push 0x8004667e
push dword [ebp + 0x18]
call dword [sym.imp.WS2_32.dll_ioctlsocket]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push str.SOCKS5_communication_to__s:_d_n
push esi
call fcn.005738f0
lea eax, [ebp - 0xc]
push eax
movzx eax, byte [ebp - 0x26f]
add eax, 2
push eax
lea eax, [ebp - 0x270]
push eax
push dword [ebp + 0x18]
push edi
call fcn.0057b680
add esp, 0x24
test eax, eax
jne 0x56a336
movzx eax, byte [ebp - 0x26f]
add eax, 2
cmp dword [ebp - 0xc], eax
jne 0x56a336
lea eax, [ebp - 0x10]
mov dword [ebp - 0x10], 1
push eax
push 0x8004667e
push dword [ebp + 0x18]
call dword [sym.imp.WS2_32.dll_ioctlsocket]
push dword [ebp - 8]
push dword [ebp - 4]
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 0x18]
call fcn.00579bc0
add esp, 0x14
cmp eax, 0xffffffff
jne 0x569c55
push str.SOCKS5_nothing_to_read
push dword [edi]
call fcn.0056f390
mov eax, 7
add esp, 8
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test eax, eax
jne 0x569c74
push str.SOCKS5_read_timeout
push dword [edi]
call fcn.0056f390
mov eax, 0x1c
add esp, 8
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test al, 4
je 0x569c93
push str.SOCKS5_read_error_occurred
push dword [edi]
call fcn.0056f390
mov eax, 0x38
add esp, 8
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x10]
mov dword [ebp - 0x10], 0
push eax
push 0x8004667e
push dword [ebp + 0x18]
call dword [sym.imp.WS2_32.dll_ioctlsocket]
lea eax, [ebp - 4]
push eax
push 2
lea eax, [ebp - 0x270]
push eax
push dword [ebp + 0x18]
push edi
call fcn.0056af80
add esp, 0x14
test eax, eax
jne 0x56a31c
cmp dword [ebp - 4], 2
jne 0x56a31c
cmp byte [ebp - 0x270], 5
je 0x569cfa
push str.Received_invalid_version_in_initial_SOCKS5_response.
push esi
call fcn.0056f390
mov eax, 7
add esp, 8
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov al, byte [ebp - 0x26f]
test al, al
je 0x569ec8
cmp al, 2
jne 0x569e5d
mov edx, dword [ebp - 0x14]
mov ecx, dword [ebp + 0xc]
test edx, edx
je 0x569d52
test ecx, ecx
je 0x569d52
mov ebx, edx
lea eax, [ebx + 1]
mov dword [ebp - 0x10], eax
mov al, byte [ebx]
inc ebx
test al, al
jne 0x569d26
sub ebx, dword [ebp - 0x10]
lea eax, [ecx + 1]
mov dword [ebp - 0x10], eax
mov al, byte [ecx]
inc ecx
test al, al
jne 0x569d36
sub ecx, dword [ebp - 0x10]
mov dword [ebp - 8], ecx
mov byte [ebp - 0x270], 1
mov byte [ebp - 0x26f], bl
jmp 0x569d68
xor ebx, ebx
mov word [ebp - 0x270], 1
mov dword [ebp - 8], 0
test edx, edx
je 0x569d7d
test ebx, ebx
je 0x569d7d
push ebx
push edx
lea eax, [ebp - 0x26e]
push eax
call fcn.006c1de0
add esp, 0xc
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp - 8]
mov byte [ebp + ebx - 0x26e], al
test ecx, ecx
je 0x569da7
test eax, eax
je 0x569da7
push eax
push ecx
lea eax, [ebp + ebx - 0x26d]
push eax
call fcn.006c1de0
mov eax, dword [ebp - 8]
add esp, 0xc
add ebx, 3
lea ecx, [ebp - 0xc]
add eax, ebx
mov ebx, dword [ebp + 0x18]
push ecx
push eax
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x270]
push eax
push ebx
push edi
call fcn.0057b680
add esp, 0x14
test eax, eax
jne 0x569e43
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp - 0xc]
jne 0x569e43
lea eax, [ebp - 4]
push eax
push 2
lea eax, [ebp - 0x270]
push eax
push ebx
push edi
call fcn.0056af80
add esp, 0x14
test eax, eax
jne 0x569e29
cmp dword [ebp - 4], 2
jne 0x569e29
mov al, byte [ebp - 0x26f]
test al, al
je 0x569ec5
movzx eax, al
push eax
movzx eax, byte [ebp - 0x270]
push eax
push str.User_was_rejected_by_the_SOCKS5_server___d__d_.
push esi
call fcn.0056f390
add esp, 0x10
mov eax, 7
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push str.Unable_to_receive_SOCKS5_sub_negotiation_response.
push esi
call fcn.0056f390
mov eax, 7
add esp, 8
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push str.Failed_to_send_SOCKS5_sub_negotiation_request.
push esi
call fcn.0056f390
mov eax, 7
add esp, 8
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp al, 1
jne 0x569e7b
push str.SOCKS5_GSSAPI_per_message_authentication_is_not_supported.
push esi
call fcn.0056f390
mov eax, 7
add esp, 8
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp al, 0xff
jne 0x569eab
mov edx, dword [ebp - 0x14]
test edx, edx
je 0x569e90
cmp byte [edx], 0
mov eax, str.No_authentication_method_was_acceptable.
jne 0x569e95
mov eax, str.No_authentication_method_was_acceptable.__It_is_quite_likely_that_the_SOCKS5_server_wanted_a_username_password__since_none_was_supplied_to_the_server_on_this_connection._
push eax
push esi
call fcn.0056f390
mov eax, 7
add esp, 8
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push str.Undocumented_SOCKS5_mode_attempted_to_be_used_by_server.
push esi
call fcn.0056f390
mov eax, 7
add esp, 8
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ebx, dword [ebp - 0x18]
cmp byte [ebp + 0x1f], 0
mov word [ebp - 0x270], 0x105
mov byte [ebp - 0x26e], 0
jne 0x569f06
push ebx
push dword [ebp + 0x10]
lea eax, [ebp - 0x26b]
mov byte [ebp - 0x26d], 3
push eax
mov byte [ebp - 0x26c], bl
call fcn.006c1de0
add esp, 0xc
lea ecx, [ebx + 5]
jmp 0x56a012
lea eax, [ebp + 0x1c]
push eax
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push edi
call fcn.00578be0
add esp, 0x10
cmp eax, 0xffffffff
je 0x56a310
cmp eax, 1
jne 0x569f3c
lea eax, [ebp + 0x1c]
push eax
push edi
call fcn.00579270
add esp, 8
test eax, eax
jne 0x56a363
mov ebx, dword [ebp + 0x1c]
test ebx, ebx
je 0x56a2ff
mov eax, dword [ebx]
mov dword [ebp + 0x1c], eax
test eax, eax
je 0x56a2ff
push 0x40
lea ecx, [ebp - 0x2c0]
push ecx
push eax
call fcn.00578040
mov eax, dword [ebp + 0x1c]
add esp, 0xc
mov ecx, dword [eax + 4]
cmp ecx, 2
jne 0x569fc3
mov byte [ebp - 0x26d], 1
mov ecx, dword [eax + 0x18]
movzx eax, byte [ecx + 4]
mov byte [ebp - 0x26c], al
movzx eax, byte [ecx + 5]
mov byte [ebp - 0x26b], al
movzx eax, byte [ecx + 6]
mov byte [ebp - 0x26a], al
movzx eax, byte [ecx + 7]
mov byte [ebp - 0x269], al
lea eax, [ebp - 0x2c0]
push eax
push str.SOCKS5_connect_to_IPv4__s__locally_resolved__n
push esi
call fcn.005738f0
push ebx
push esi
call fcn.00579200
mov ecx, 8
jmp 0x56a00f
cmp ecx, 0x17
jne 0x56a2e3
mov byte [ebp - 0x26d], 4
xor ecx, ecx
mov edx, dword [eax + 0x18]
nop dword [eax + eax]
mov al, byte [edx + ecx + 8]
mov byte [ebp + ecx - 0x26c], al
inc ecx
cmp ecx, 0x10
jl 0x569fe0
lea eax, [ebp - 0x2c0]
push eax
push str.SOCKS5_connect_to_IPv6__s__locally_resolved__n
push esi
call fcn.005738f0
push ebx
push esi
call fcn.00579200
mov ecx, 0x14
add esp, 0x14
mov edx, dword [ebp + 0x14]
mov eax, edx
mov ebx, dword [ebp + 0x18]
sar eax, 8
mov byte [ebp + ecx - 0x270], al
lea eax, [ecx + 2]
mov byte [ebp + ecx - 0x26f], dl
lea ecx, [ebp - 0xc]
push ecx
push eax
mov dword [ebp + 0x1c], eax
lea eax, [ebp - 0x270]
push eax
push ebx
push edi
call fcn.0057b680
add esp, 0x14
test eax, eax
jne 0x56a2c9
mov eax, dword [ebp + 0x1c]
cmp eax, dword [ebp - 0xc]
jne 0x56a2c9
lea eax, [ebp - 4]
push eax
push 0xa
lea eax, [ebp - 0x270]
push eax
push ebx
push edi
call fcn.0056af80
add esp, 0x14
test eax, eax
jne 0x56a2af
cmp dword [ebp - 4], 0xa
jne 0x56a2af
cmp byte [ebp - 0x270], 5
je 0x56a0a7
push str.SOCKS5_reply_has_wrong_version__version_should_be_5.
push esi
call fcn.0056f390
mov eax, 7
add esp, 8
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov al, byte [ebp - 0x26d]
cmp al, 3
jne 0x56a0ca
mov bl, byte [ebp - 0x26c]
movzx edx, bl
add edx, 7
mov dword [ebp + 0x1c], edx
cmp edx, 0xa
jbe 0x56a11c
mov ebx, dword [ebp + 0x18]
jmp 0x56a0d6
cmp al, 4
jne 0x56a111
mov edx, 0x16
mov dword [ebp + 0x1c], edx
lea eax, [edx - 0xa]
lea ecx, [ebp - 4]
mov dword [ebp - 0x18], eax
push ecx
push eax
lea eax, [ebp - 0x266]
push eax
push ebx
push edi
call fcn.0056af80
add esp, 0x14
test eax, eax
jne 0x56a2af
mov eax, dword [ebp - 0x18]
cmp eax, dword [ebp - 4]
jne 0x56a2af
mov al, byte [ebp - 0x26d]
mov edx, dword [ebp + 0x1c]
jmp 0x56a116
mov edx, 0xa
mov bl, byte [ebp - 0x26c]
mov cl, byte [ebp - 0x26f]
test cl, cl
je 0x56a27f
cmp al, 1
jne 0x56a17c
movzx eax, cl
movzx ecx, byte [ebp - 0x268]
push eax
movzx eax, byte [ebp - 0x267]
shl ecx, 8
or ecx, eax
movzx eax, byte [ebp - 0x269]
push ecx
push eax
movzx eax, byte [ebp - 0x26a]
push eax
movzx eax, byte [ebp - 0x26b]
push eax
movzx eax, bl
push eax
push str.Cant_complete_SOCKS5_connection_to__d._d._d._d:_d.___d_
push esi
call fcn.0056f390
add esp, 0x20
mov eax, 7
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp al, 3
jne 0x56a1c9
mov bl, byte [ebp + edx - 0x272]
mov byte [ebp + edx - 0x272], 0
movzx eax, byte [ebp - 0x26f]
push eax
movzx eax, byte [ebp + edx - 0x271]
movzx ecx, bl
shl ecx, 8
or ecx, eax
lea eax, [ebp - 0x26b]
push ecx
push eax
push str.Cant_complete_SOCKS5_connection_to__s:_d.___d_
push esi
call fcn.0056f390
add esp, 0x14
mov eax, 7
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp al, 4
jne 0x56a273
movzx eax, cl
push eax
movzx ecx, byte [ebp - 0x25c]
movzx eax, byte [ebp - 0x25b]
shl ecx, 8
or ecx, eax
movzx eax, byte [ebp - 0x25d]
push ecx
push eax
movzx eax, byte [ebp - 0x25e]
push eax
movzx eax, byte [ebp - 0x25f]
push eax
movzx eax, byte [ebp - 0x260]
push eax
movzx eax, byte [ebp - 0x261]
push eax
movzx eax, byte [ebp - 0x262]
push eax
movzx eax, byte [ebp - 0x263]
push eax
movzx eax, byte [ebp - 0x264]
push eax
movzx eax, byte [ebp - 0x265]
push eax
movzx eax, byte [ebp - 0x266]
push eax
movzx eax, byte [ebp - 0x267]
push eax
movzx eax, byte [ebp - 0x268]
push eax
movzx eax, byte [ebp - 0x269]
push eax
movzx eax, byte [ebp - 0x26a]
push eax
movzx eax, byte [ebp - 0x26b]
push eax
movzx eax, bl
push eax
push str.Cant_complete_SOCKS5_connection_to__02x_02x:_02x_02x:_02x_02x:_02x_02x:_02x_02x:_02x_02x:_02x_02x:_02x_02x:_d.___d_
push esi
call fcn.0056f390
add esp, 0x50
mov eax, 7
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push str.SOCKS5_request_granted._n
push esi
call fcn.005738f0
add esp, 8
mov dword [ebp + 0x1c], 1
lea eax, [ebp + 0x1c]
push eax
push 0x8004667e
push dword [ebp + 0x18]
call dword [sym.imp.WS2_32.dll_ioctlsocket]
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push str.Failed_to_receive_SOCKS5_connect_request_ack.
push esi
call fcn.0056f390
mov eax, 7
add esp, 8
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push str.Failed_to_send_SOCKS5_connect_request.
push esi
call fcn.0056f390
mov eax, 7
add esp, 8
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x2c0]
push eax
push str.SOCKS5_connection_to__s_not_supported_n
push esi
call fcn.0056f390
push ebx
push esi
call fcn.00579200
add esp, 0x14
push dword [ebp + 0x10]
push str.Failed_to_resolve___s__for_SOCKS5_connect.
push esi
call fcn.0056f390
add esp, 0xc
mov eax, 6
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push str.Unable_to_receive_initial_SOCKS5_response.
push esi
call fcn.0056f390
mov eax, 7
add esp, 8
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push str.Unable_to_send_initial_SOCKS5_request.
push esi
call fcn.0056f390
mov eax, 7
add esp, 8
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push str.Connection_time_out
push esi
call fcn.0056f390
mov eax, 0x1c
add esp, 8
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret