Function at 0x5609b0
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2cc
mov eax, dword [0x65e374]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
push ebx
push esi
push edi
mov edi, dword [ebp + 0x14]
mov dword [ebp - 0x2c8], edx
mov edx, dword [ebp + 8]
mov ebx, edx
mov dword [ebp - 0x2a4], ecx
mov eax, dword [edi + eax*4 + 0x1a8]
mov esi, dword [edi]
mov dword [ebp - 0x2b4], eax
lea ecx, [ebx + 1]
mov eax, dword [edi + 0xd0]
cmp eax, 5
mov dword [ebp - 0x2c4], edx
mov dword [ebp - 0x2c0], eax
sete byte [ebp - 0x2ad]
nop dword [eax + eax]
mov al, byte [ebx]
inc ebx
test al, al
jne 0x560a10
mov eax, dword [esi + 0x184]
sub ebx, ecx
cmp byte [edi + 0x26a], 0
mov dword [ebp - 0x2ac], ebx
mov dword [ebp - 0x2b8], eax
je 0x560a46
push dword [ebp + 0xc]
push edx
push str.SOCKS5:_connecting_to_HTTP_proxy__s_port__d_n
push esi
call fcn.00543710
add esp, 0x10
cmp dword [ebp - 0x2c0], 5
je 0x560a6e
cmp ebx, 0xff
jbe 0x560a6e
push ebx
push str.SOCKS5:_server_resolving_disabled_for_hostnames_of_length___255__actual_len_zu__n
push dword [edi]
call fcn.00543710
add esp, 0xc
mov byte [ebp - 0x2ad], 1
push 1
xor edx, edx
mov ecx, esi
call fcn.00544390
mov ecx, edx
mov dword [ebp - 0x2c0], eax
add esp, 4
mov dword [ebp - 0x2bc], ecx
test ecx, ecx
jg 0x560ab8
jl 0x560a94
test eax, eax
jae 0x560ab8
push str.Connection_time_out
push esi
call fcn.00543790
mov eax, 0x1c
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005b8427
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x2a8]
mov dword [ebp - 0x2a8], 1
push eax
push 0x8004667e
push dword [ebp - 0x2b4]
call dword [sym.imp.WS2_32.dll_ioctlsocket]
push dword [ebp - 0x2bc]
or edx, 0xffffffff
or ecx, 0xffffffff
push dword [ebp - 0x2c0]
push dword [ebp - 0x2b4]
call fcn.00545cb0
add esp, 0xc
cmp eax, 0xffffffff
jne 0x560b0b
push str.SOCKS5:_no_connection_here
push dword [edi]
jmp 0x561340
test eax, eax
jne 0x560b34
push str.SOCKS5:_connection_timeout
push dword [edi]
call fcn.00543790
mov eax, 0x1c
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005b8427
mov esp, ebp
pop ebp
ret
test al, 4
je 0x560b44
push str.SOCKS5:_error_occurred_during_connection
push dword [edi]
jmp 0x561340
mov eax, dword [ebp - 0x2b8]
test eax, 0xfffffffa
je 0x560b67
push eax
push str.warning:_unsupported_value_passed_to_CURLOPT_SOCKS5_AUTH:__lu_n
push dword [edi]
call fcn.00543710
mov eax, dword [ebp - 0x2b8]
add esp, 0xc
test al, 1
mov byte [ebp - 0x260], 5
movzx eax, byte [ebp - 0x25d]
mov ecx, 0
cmovne ecx, dword [ebp - 0x2a4]
mov edx, 2
test ecx, ecx
mov dword [ebp - 0x2b8], ecx
mov byte [ebp - 0x25e], 0
cmovne eax, edx
mov dword [ebp - 0x2a4], 0
mov byte [ebp - 0x25d], al
setne al
inc al
mov byte [ebp - 0x25f], al
lea eax, [ebp - 0x2a4]
push eax
push 0x8004667e
push dword [ebp - 0x2b4]
call dword [sym.imp.WS2_32.dll_ioctlsocket]
push dword [ebp + 0xc]
push dword [ebp - 0x2c4]
push str.SOCKS5_communication_to__s:_d_n
push esi
call fcn.00543710
mov edx, dword [ebp - 0x2b4]
lea eax, [ebp - 0x2a8]
push eax
movzx eax, byte [ebp - 0x25f]
mov ecx, edi
add eax, 2
push eax
lea eax, [ebp - 0x260]
push eax
call fcn.00543bf0
add esp, 0x1c
test eax, eax
jne 0x56133a
movzx eax, byte [ebp - 0x25f]
add eax, 2
cmp dword [ebp - 0x2a8], eax
jne 0x56133a
lea eax, [ebp - 0x2a4]
mov dword [ebp - 0x2a4], 1
push eax
push 0x8004667e
push dword [ebp - 0x2b4]
call dword [sym.imp.WS2_32.dll_ioctlsocket]
push dword [ebp - 0x2bc]
mov ecx, dword [ebp - 0x2b4]
or edx, 0xffffffff
push dword [ebp - 0x2c0]
push 0xffffffffffffffff
call fcn.00545cb0
add esp, 0xc
cmp eax, 0xffffffff
jne 0x560c7a
push str.SOCKS5_nothing_to_read
push dword [edi]
jmp 0x561340
test eax, eax
jne 0x560ca3
push str.SOCKS5_read_timeout
push dword [edi]
call fcn.00543790
mov eax, 0x1c
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005b8427
mov esp, ebp
pop ebp
ret
test al, 4
je 0x560ccc
push str.SOCKS5_read_error_occurred
push dword [edi]
call fcn.00543790
mov eax, 0x38
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005b8427
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x2a4]
mov dword [ebp - 0x2a4], 0
push eax
push 0x8004667e
push dword [ebp - 0x2b4]
call dword [sym.imp.WS2_32.dll_ioctlsocket]
mov edx, dword [ebp - 0x2b4]
lea eax, [ebp - 0x2bc]
push eax
lea eax, [ebp - 0x260]
mov ecx, edi
push 2
push eax
call fcn.00560200
add esp, 0xc
test eax, eax
jne 0x561333
cmp dword [ebp - 0x2bc], 2
jne 0x561333
cmp byte [ebp - 0x260], 5
je 0x560d36
push str.Received_invalid_version_in_initial_SOCKS5_response.
jmp 0x56133f
mov al, byte [ebp - 0x25f]
test al, al
je 0x560eec
cmp al, 2
jne 0x560eab
mov edx, dword [ebp - 0x2b8]
test edx, edx
je 0x560d95
cmp dword [ebp - 0x2c8], 0
je 0x560d95
mov ebx, edx
lea ecx, [ebx + 1]
mov al, byte [ebx]
inc ebx
test al, al
jne 0x560d64
sub ebx, ecx
mov ecx, dword [ebp - 0x2c8]
lea eax, [ecx + 1]
mov dword [ebp - 0x2a4], eax
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x560d80
sub ecx, dword [ebp - 0x2a4]
mov dword [ebp - 0x2b8], ecx
jmp 0x560d9d
xor ebx, ebx
mov dword [ebp - 0x2b8], ebx
mov byte [ebp - 0x260], 1
mov byte [ebp - 0x25f], bl
test edx, edx
je 0x560dc3
test ebx, ebx
je 0x560dc3
push ebx
push edx
lea eax, [ebp - 0x25e]
push eax
call fcn.005cfab0
add esp, 0xc
mov ecx, dword [ebp - 0x2c8]
mov eax, dword [ebp - 0x2b8]
mov byte [ebp + ebx - 0x25e], al
test ecx, ecx
je 0x560df6
test eax, eax
je 0x560df6
push eax
push ecx
lea eax, [ebp + ebx - 0x25d]
push eax
call fcn.005cfab0
mov eax, dword [ebp - 0x2b8]
add esp, 0xc
add ebx, 3
lea ecx, [ebp - 0x2a8]
add eax, ebx
mov ebx, dword [ebp - 0x2b4]
push ecx
push eax
mov dword [ebp - 0x2a4], eax
mov edx, ebx
lea eax, [ebp - 0x260]
mov ecx, edi
push eax
call fcn.00543bf0
add esp, 0xc
test eax, eax
jne 0x560ea1
mov eax, dword [ebp - 0x2a4]
cmp eax, dword [ebp - 0x2a8]
jne 0x560ea1
lea eax, [ebp - 0x2bc]
mov edx, ebx
push eax
lea eax, [ebp - 0x260]
mov ecx, edi
push 2
push eax
call fcn.00560200
add esp, 0xc
test eax, eax
jne 0x560e97
cmp dword [ebp - 0x2bc], 2
jne 0x560e97
mov al, byte [ebp - 0x25f]
test al, al
je 0x560ee6
movzx eax, al
push eax
movzx eax, byte [ebp - 0x260]
push eax
push str.User_was_rejected_by_the_SOCKS5_server___d__d_.
push esi
call fcn.00543790
add esp, 0x10
mov eax, 7
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005b8427
mov esp, ebp
pop ebp
ret
push str.Unable_to_receive_SOCKS5_sub_negotiation_response.
jmp 0x56133f
push str.Failed_to_send_SOCKS5_sub_negotiation_request.
jmp 0x56133f
cmp al, 1
jne 0x560eb9
push str.SOCKS5_GSSAPI_per_message_authentication_is_not_supported.
jmp 0x56133f
cmp al, 0xff
jne 0x560edc
mov edx, dword [ebp - 0x2b8]
test edx, edx
je 0x560ed1
cmp byte [edx], 0
mov eax, str.No_authentication_method_was_acceptable.
jne 0x560ed6
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
jmp 0x56133f
push str.Undocumented_SOCKS5_mode_attempted_to_be_used_by_server.
jmp 0x56133f
mov ebx, dword [ebp - 0x2ac]
cmp byte [ebp - 0x2ad], 0
mov word [ebp - 0x260], 0x105
mov dword [ebp - 0x2c0], 3
mov byte [ebp - 0x25e], 0
jne 0x560f3a
push ebx
push dword [ebp - 0x2c4]
lea eax, [ebp - 0x25b]
mov byte [ebp - 0x25d], 3
push eax
mov byte [ebp - 0x25c], bl
call fcn.005cfab0
add esp, 0xc
lea ecx, [ebx + 5]
jmp 0x561029
mov edx, dword [ebp - 0x2c4]
lea eax, [ebp - 0x2b8]
push eax
push dword [ebp + 0xc]
mov ecx, edi
call fcn.005467c0
add esp, 8
cmp eax, 0xffffffff
je 0x56131d
cmp eax, 1
jne 0x560f77
lea edx, [ebp - 0x2b8]
mov ecx, edi
call fcn.005514c0
test eax, eax
jne 0x56134d
mov eax, dword [ebp - 0x2b8]
test eax, eax
je 0x561309
mov ebx, dword [eax]
test ebx, ebx
je 0x561309
push 0x40
lea edx, [ebp - 0x2a0]
mov ecx, ebx
call fcn.00546580
add esp, 4
cmp dword [ebx + 4], 2
jne 0x560ff7
mov byte [ebp - 0x25d], 1
mov ecx, dword [ebx + 0x18]
mov dword [ebp - 0x2c0], 8
movzx eax, byte [ecx + 4]
mov byte [ebp - 0x25c], al
movzx eax, byte [ecx + 5]
mov byte [ebp - 0x25b], al
movzx eax, byte [ecx + 6]
mov byte [ebp - 0x25a], al
movzx eax, byte [ecx + 7]
mov byte [ebp - 0x259], al
lea eax, [ebp - 0x2a0]
push eax
push str.SOCKS5_connect_to_IPv4__s__locally_resolved__n
push esi
call fcn.00543710
jmp 0x56100b
lea eax, [ebp - 0x2a0]
xor ebx, ebx
push eax
push str.SOCKS5_connection_to__s_not_supported_n
push esi
call fcn.00543790
mov edx, dword [ebp - 0x2b8]
add esp, 0xc
mov ecx, esi
call fcn.00546940
test ebx, ebx
je 0x561309
mov ecx, dword [ebp - 0x2c0]
mov edx, dword [ebp + 0xc]
lea ebx, [ecx + 2]
mov eax, edx
sar eax, 8
mov byte [ebp + ecx - 0x260], al
lea eax, [ebp - 0x2a8]
push eax
mov byte [ebp + ecx - 0x25f], dl
lea eax, [ebp - 0x260]
mov edx, dword [ebp - 0x2b4]
mov ecx, edi
push ebx
push eax
call fcn.00543bf0
add esp, 0xc
test eax, eax
jne 0x561302
cmp ebx, dword [ebp - 0x2a8]
jne 0x561302
mov edx, dword [ebp - 0x2b4]
lea ebx, [eax + 0xa]
lea eax, [ebp - 0x2bc]
mov ecx, edi
push eax
lea eax, [ebp - 0x260]
push ebx
push eax
call fcn.00560200
add esp, 0xc
test eax, eax
jne 0x5612fb
cmp dword [ebp - 0x2bc], ebx
jne 0x5612fb
cmp byte [ebp - 0x260], 5
je 0x5610be
push str.SOCKS5_reply_has_wrong_version__version_should_be_5.
jmp 0x56133f
mov al, byte [ebp - 0x25d]
cmp al, 3
jne 0x5610db
mov dl, byte [ebp - 0x25c]
movzx ebx, dl
add ebx, 7
cmp ebx, 0xa
jbe 0x561129
jmp 0x5610e4
cmp al, 4
jne 0x561123
mov ebx, 0x16
mov edx, dword [ebp - 0x2b4]
lea ecx, [ebp - 0x2bc]
push ecx
lea eax, [ebx - 0xa]
mov ecx, edi
push eax
lea eax, [ebp - 0x256]
push eax
call fcn.00560200
add esp, 0xc
test eax, eax
jne 0x5612fb
lea eax, [ebx - 0xa]
cmp eax, dword [ebp - 0x2bc]
jne 0x5612fb
mov al, byte [ebp - 0x25d]
mov dl, byte [ebp - 0x25c]
mov cl, byte [ebp - 0x25f]
test cl, cl
je 0x5612b8
cmp al, 1
jne 0x561193
movzx eax, cl
movzx ecx, byte [ebp - 0x258]
push eax
movzx eax, byte [ebp - 0x257]
shl ecx, 8
or ecx, eax
movzx eax, byte [ebp - 0x259]
push ecx
push eax
movzx eax, byte [ebp - 0x25a]
push eax
movzx eax, byte [ebp - 0x25b]
push eax
movzx eax, dl
push eax
push str.Cant_complete_SOCKS5_connection_to__d._d._d._d:_d.___d_
push esi
call fcn.00543790
add esp, 0x20
mov eax, 7
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005b8427
mov esp, ebp
pop ebp
ret
cmp al, 3
jne 0x5611f8
mov cl, byte [ebp + ebx - 0x262]
lea eax, [ebx - 2]
cmp eax, 0x258
jae 0x56135e
mov byte [ebp + eax - 0x260], 0
movzx eax, byte [ebp - 0x25f]
push eax
movzx eax, byte [ebp + ebx - 0x261]
movzx ecx, cl
shl ecx, 8
or ecx, eax
lea eax, [ebp - 0x25b]
push ecx
push eax
push str.Cant_complete_SOCKS5_connection_to__s:_d.___d_
push esi
call fcn.00543790
add esp, 0x14
mov eax, 7
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005b8427
mov esp, ebp
pop ebp
ret
cmp al, 4
jne 0x5612a2
movzx eax, cl
push eax
movzx ecx, byte [ebp - 0x24c]
movzx eax, byte [ebp - 0x24b]
shl ecx, 8
or ecx, eax
movzx eax, byte [ebp - 0x24d]
push ecx
push eax
movzx eax, byte [ebp - 0x24e]
push eax
movzx eax, byte [ebp - 0x24f]
push eax
movzx eax, byte [ebp - 0x250]
push eax
movzx eax, byte [ebp - 0x251]
push eax
movzx eax, byte [ebp - 0x252]
push eax
movzx eax, byte [ebp - 0x253]
push eax
movzx eax, byte [ebp - 0x254]
push eax
movzx eax, byte [ebp - 0x255]
push eax
movzx eax, byte [ebp - 0x256]
push eax
movzx eax, byte [ebp - 0x257]
push eax
movzx eax, byte [ebp - 0x258]
push eax
movzx eax, byte [ebp - 0x259]
push eax
movzx eax, byte [ebp - 0x25a]
push eax
movzx eax, byte [ebp - 0x25b]
push eax
movzx eax, dl
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.00543790
add esp, 0x50
mov eax, 7
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005b8427
mov esp, ebp
pop ebp
ret
push str.SOCKS5_request_granted._n
push esi
call fcn.00543710
add esp, 8
mov dword [ebp - 0x2ac], 1
lea eax, [ebp - 0x2ac]
push eax
push 0x8004667e
push dword [ebp - 0x2b4]
call dword [sym.imp.WS2_32.dll_ioctlsocket]
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005b8427
mov esp, ebp
pop ebp
ret
push str.Failed_to_receive_SOCKS5_connect_request_ack.
jmp 0x56133f
push str.Failed_to_send_SOCKS5_connect_request.
jmp 0x56133f
push dword [ebp - 0x2c4]
push str.Failed_to_resolve___s__for_SOCKS5_connect.
push esi
call fcn.00543790
add esp, 0xc
mov eax, 6
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005b8427
mov esp, ebp
pop ebp
ret
push str.Unable_to_receive_initial_SOCKS5_response.
jmp 0x56133f
push str.Unable_to_send_initial_SOCKS5_request.
push esi
call fcn.00543790
mov eax, 7
add esp, 8
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.005b8427
mov esp, ebp
pop ebp
ret
call fcn.005b910a
int3