Function at 0x52cae0
Capabilities:
Set socket configuration

Disassembly:
sub esp, 0x2dc
mov eax, dword [0x592830]
xor eax, esp
mov dword [esp + 0x2d4], eax
push ebx
push ebp
mov ebp, dword [esp + 0x2f4]
mov dword [esp + 0x28], edx
mov eax, dword [ebp + 0x1b8]
mov edx, dword [esp + 0x2e8]
mov dword [esp + 0x10], eax
xor eax, eax
cmp dword [ebp + 0xd0], 5
push esi
sete al
mov ebx, edx
push edi
mov edi, dword [ebp]
mov dword [esp + 0x24], ecx
mov dword [esp + 0x28], edx
lea ecx, [ebx + 1]
mov dword [esp + 0x20], eax
mov al, byte [ebx]
inc ebx
test al, al
jne 0x52cb34
mov eax, dword [edi + 0x5bc]
sub ebx, ecx
test byte [ebp + 0x2a4], 0x20
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x1c], eax
je 0x52cb6a
push dword [esp + 0x2f4]
push edx
push str.SOCKS5:_connecting_to_HTTP_proxy__s_port__d_n
push edi
call fcn.0051a600
add esp, 0x10
cmp dword [esp + 0x20], 0
jne 0x52cb92
cmp ebx, 0xff
jbe 0x52cb92
push ebx
push str.SOCKS5:_server_resolving_disabled_for_hostnames_of_length___255__actual_len_zu__n
push dword [ebp]
call fcn.0051a600
add esp, 0xc
mov dword [esp + 0x20], 1
mov edx, dword [edi + 0x638]
xor eax, eax
mov dword [esp + 0x10], 0x493e0
mov dword [esp + 0x14], eax
test edx, edx
jle 0x52cbaf
mov eax, 1
mov ecx, dword [edi + 0x63c]
test ecx, ecx
jle 0x52cbbc
or eax, 2
dec eax
je 0x52cbcd
dec eax
je 0x52cbc9
dec eax
jne 0x52cbd8
cmp edx, ecx
jl 0x52cbcd
mov eax, ecx
jmp 0x52cbcf
mov eax, edx
cdq
mov dword [esp + 0x14], edx
mov dword [esp + 0x10], eax
lea eax, [esp + 0x38]
push eax
call fcn.0051f970
mov ecx, dword [edi + 0xb30]
sub esp, 0xc
mov edx, esp
mov esi, eax
mov eax, dword [edi + 0xb3c]
mov dword [edx], ecx
mov ecx, dword [edi + 0xb34]
mov dword [edx + 4], ecx
mov ecx, dword [edi + 0xb38]
mov dword [edx + 8], ecx
mov dword [edx + 0xc], eax
mov eax, dword [esi]
sub esp, 0x10
mov ecx, esp
mov dword [ecx], eax
mov eax, dword [esi + 4]
mov dword [ecx + 4], eax
mov eax, dword [esi + 8]
mov dword [ecx + 8], eax
mov eax, dword [esi + 0xc]
mov dword [ecx + 0xc], eax
call fcn.0051fa10
mov ecx, dword [esp + 0x30]
mov esi, dword [esp + 0x34]
add esp, 0x20
sub ecx, eax
sbb esi, edx
mov eax, ecx
or eax, esi
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], esi
je 0x52d415
test esi, esi
jg 0x52cc5f
jl 0x52d415
test ecx, ecx
jb 0x52d415
mov esi, dword [esp + 0x18]
lea eax, [esp + 0x34]
push eax
push 0x8004667e
push esi
mov dword [esp + 0x40], 1
call dword [sym.imp.WS2_32.dll_ioctlsocket]
push dword [esp + 0x14]
or ecx, 0xffffffff
push dword [esp + 0x14]
push esi
call fcn.005176f0
add esp, 0xc
cmp eax, 0xffffffff
jne 0x52ccac
push str.SOCKS5:_no_connection_here
push dword [ebp]
call fcn.0051a7e0
mov eax, 7
jmp 0x52d425
test eax, eax
jne 0x52ccbd
push str.SOCKS5:_connection_timeout
push dword [ebp]
jmp 0x52d41b
test al, 4
je 0x52ccd8
push str.SOCKS5:_error_occurred_during_connection
push dword [ebp]
call fcn.0051a7e0
mov eax, 7
jmp 0x52d425
mov eax, dword [esp + 0x1c]
test eax, 0xfffffffa
je 0x52ccf8
push eax
push str.warning:_unsupported_value_passed_to_CURLOPT_SOCKS5_AUTH:__lu_n
push dword [ebp]
call fcn.0051a600
mov eax, dword [esp + 0x28]
add esp, 0xc
and al, 1
movzx esi, al
neg esi
sbb esi, esi
mov byte [esp + 0x48], 5
mov eax, 3
mov byte [esp + 0x4a], 0
and esi, dword [esp + 0x24]
je 0x52cd20
mov byte [esp + 0x4b], 2
mov eax, 4
sub al, 2
mov byte [esp + 0x49], al
lea eax, [esp + 0x24]
push eax
push 0x8004667e
push dword [esp + 0x20]
mov dword [esp + 0x30], 0
call dword [sym.imp.WS2_32.dll_ioctlsocket]
push dword [esp + 0x2f4]
push dword [esp + 0x2c]
push str.SOCKS5_communication_to__s:_d_n
push edi
call fcn.0051a600
mov edx, dword [esp + 0x28]
lea eax, [esp + 0x2c]
push eax
movzx eax, byte [esp + 0x5d]
add eax, 2
push eax
lea eax, [esp + 0x60]
push eax
mov ecx, ebp
call fcn.0051a260
add esp, 0x1c
test eax, eax
jne 0x52d403
movzx eax, byte [esp + 0x49]
add eax, 2
cmp dword [esp + 0x1c], eax
jne 0x52d403
lea eax, [esp + 0x24]
push eax
push 0x8004667e
push dword [esp + 0x20]
mov dword [esp + 0x30], 1
call dword [sym.imp.WS2_32.dll_ioctlsocket]
push dword [esp + 0x14]
mov ecx, dword [esp + 0x1c]
push dword [esp + 0x14]
push 0xffffffffffffffff
call fcn.005176f0
add esp, 0xc
cmp eax, 0xffffffff
jne 0x52cde1
push str.SOCKS5_nothing_to_read
push dword [ebp]
call fcn.0051a7e0
mov eax, 7
jmp 0x52d425
test eax, eax
jne 0x52cdf2
push str.SOCKS5_read_timeout
push dword [ebp]
jmp 0x52d41b
test al, 4
je 0x52ce0d
push str.SOCKS5_read_error_occurred
push dword [ebp]
call fcn.0051a7e0
mov eax, 0x38
jmp 0x52d425
lea eax, [esp + 0x24]
push eax
push 0x8004667e
push dword [esp + 0x20]
mov dword [esp + 0x30], 0
call dword [sym.imp.WS2_32.dll_ioctlsocket]
mov edx, dword [esp + 0x18]
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x4c]
push 2
push eax
mov ecx, ebp
call fcn.0052c950
add esp, 0xc
test eax, eax
jne 0x52d3f1
cmp dword [esp + 0x10], 2
jne 0x52d3f1
cmp byte [esp + 0x48], 5
je 0x52ce72
push str.Received_invalid_version_in_initial_SOCKS5_response.
push edi
call fcn.0051a7e0
mov eax, 7
jmp 0x52d425
mov al, byte [esp + 0x49]
test al, al
je 0x52d048
cmp al, 2
jne 0x52cfdf
test esi, esi
je 0x52ceb4
mov edx, dword [esp + 0x30]
test edx, edx
je 0x52ceb4
mov ebx, esi
lea ecx, [ebx + 1]
mov al, byte [ebx]
inc ebx
test al, al
jne 0x52ce97
sub ebx, ecx
mov ecx, edx
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x52cea5
sub ecx, edx
mov dword [esp + 0x14], ecx
jmp 0x52ceba
xor ebx, ebx
mov dword [esp + 0x14], ebx
mov byte [esp + 0x48], 1
mov byte [esp + 0x49], bl
test esi, esi
je 0x52cef7
test ebx, ebx
je 0x52cef7
cmp ebx, 0xff
jb 0x52cee8
push str.Excessive_user_name_length_for_proxy_auth
push edi
call fcn.0051a7e0
mov eax, 0x2b
jmp 0x52d425
push ebx
lea eax, [esp + 0x4e]
push esi
push eax
call fcn.004f0080
add esp, 0xc
mov eax, dword [esp + 0x30]
lea esi, [ebx + 2]
mov ebx, dword [esp + 0x14]
mov byte [esp + esi + 0x48], bl
inc esi
test eax, eax
je 0x52cf3d
test ebx, ebx
je 0x52cf3d
cmp ebx, 0xff
jbe 0x52cf2c
push str.Excessive_password_length_for_proxy_auth
push edi
call fcn.0051a7e0
mov eax, 0x2b
jmp 0x52d425
push ebx
push eax
lea eax, [esp + 0x50]
add eax, esi
push eax
call fcn.004f0080
add esp, 0xc
lea eax, [esp + 0x1c]
push eax
add esi, ebx
mov ebx, dword [esp + 0x1c]
lea eax, [esp + 0x4c]
push esi
push eax
mov edx, ebx
mov ecx, ebp
call fcn.0051a260
add esp, 0xc
test eax, eax
jne 0x52cfca
cmp esi, dword [esp + 0x1c]
jne 0x52cfca
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x4c]
push 2
push eax
mov edx, ebx
mov ecx, ebp
call fcn.0052c950
add esp, 0xc
test eax, eax
jne 0x52cfb5
cmp dword [esp + 0x10], 2
jne 0x52cfb5
mov al, byte [esp + 0x49]
test al, al
je 0x52d044
movzx eax, al
push eax
movzx eax, byte [esp + 0x4c]
push eax
push str.User_was_rejected_by_the_SOCKS5_server___d__d_.
push edi
call fcn.0051a7e0
add esp, 0x10
mov eax, 7
jmp 0x52d428
push str.Unable_to_receive_SOCKS5_sub_negotiation_response.
push edi
call fcn.0051a7e0
mov eax, 7
jmp 0x52d425
push str.Failed_to_send_SOCKS5_sub_negotiation_request.
push edi
call fcn.0051a7e0
mov eax, 7
jmp 0x52d425
cmp al, 1
jne 0x52cff8
push str.SOCKS5_GSSAPI_per_message_authentication_is_not_supported.
push edi
call fcn.0051a7e0
mov eax, 7
jmp 0x52d425
cmp al, 0xff
jne 0x52d02f
test esi, esi
je 0x52d01a
cmp byte [esi], 0
je 0x52d01a
push str.No_authentication_method_was_acceptable.
push edi
call fcn.0051a7e0
mov eax, 7
jmp 0x52d425
push 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 edi
call fcn.0051a7e0
mov eax, 7
jmp 0x52d425
push str.Undocumented_SOCKS5_mode_attempted_to_be_used_by_server.
push edi
call fcn.0051a7e0
mov eax, 7
jmp 0x52d425
mov ebx, dword [esp + 0x2c]
cmp dword [esp + 0x20], 0
mov word [esp + 0x48], 0x105
mov esi, 3
mov byte [esp + 0x4a], 0
jne 0x52d083
push ebx
push dword [esp + 0x2c]
lea eax, [esp + 0x55]
push eax
mov byte [esp + 0x57], 3
mov byte [esp + 0x58], bl
call fcn.004f0080
add esp, 0xc
lea esi, [ebx + 5]
jmp 0x52d16c
mov edx, dword [esp + 0x28]
lea eax, [esp + 0x20]
push eax
push 0
push dword [esp + 0x2fc]
mov ecx, ebp
call fcn.00520400
add esp, 0xc
cmp eax, 0xffffffff
je 0x52d3ea
cmp eax, 1
jne 0x52d0c4
push eax
lea edx, [esp + 0x24]
mov ecx, ebp
call fcn.00517110
add esp, 4
test eax, eax
jne 0x52d428
mov eax, dword [esp + 0x20]
test eax, eax
je 0x52d3d8
mov ebx, dword [eax]
test ebx, ebx
je 0x52d3d8
mov eax, dword [ebx + 4]
sub eax, 2
jne 0x52d0f9
mov ecx, dword [ebx + 0x18]
add ecx, 4
push 0x40
lea edx, [esp + 0x2a4]
call fcn.0052e310
add esp, 4
cmp dword [ebx + 4], 2
jne 0x52d141
mov byte [esp + 0x4b], 1
mov ecx, dword [ebx + 0x18]
mov esi, 8
movzx eax, byte [ecx + 4]
mov byte [esp + 0x4c], al
movzx eax, byte [ecx + 5]
mov byte [esp + 0x4d], al
movzx eax, byte [ecx + 6]
mov byte [esp + 0x4e], al
movzx eax, byte [ecx + 7]
mov byte [esp + 0x4f], al
lea eax, [esp + 0x2a0]
push eax
push str.SOCKS5_connect_to_IPv4__s__locally_resolved__n
push edi
call fcn.0051a600
jmp 0x52d156
lea eax, [esp + 0x2a0]
push eax
push str.SOCKS5_connection_to__s_not_supported_n
push edi
xor ebx, ebx
call fcn.0051a7e0
mov edx, dword [esp + 0x2c]
add esp, 0xc
mov ecx, edi
call fcn.005209b0
test ebx, ebx
je 0x52d3d8
mov ecx, dword [esp + 0x2f4]
mov ebx, dword [esp + 0x18]
mov eax, ecx
sar eax, 8
mov byte [esp + esi + 0x48], al
mov byte [esp + esi + 0x49], cl
lea eax, [esp + 0x1c]
push eax
add esi, 2
lea eax, [esp + 0x4c]
push esi
push eax
mov edx, ebx
mov ecx, ebp
call fcn.0051a260
add esp, 0xc
test eax, eax
jne 0x52d3c6
cmp esi, dword [esp + 0x1c]
jne 0x52d3c6
lea esi, [eax + 0xa]
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x4c]
push esi
push eax
mov edx, ebx
mov ecx, ebp
call fcn.0052c950
add esp, 0xc
test eax, eax
jne 0x52d299
cmp dword [esp + 0x10], esi
jne 0x52d299
cmp byte [esp + 0x48], 5
je 0x52d1f6
push str.SOCKS5_reply_has_wrong_version__version_should_be_5.
push edi
call fcn.0051a7e0
lea eax, [esi - 3]
jmp 0x52d425
mov al, byte [esp + 0x4b]
cmp al, 3
jne 0x52d20f
mov dl, byte [esp + 0x4c]
movzx esi, dl
add esi, 7
cmp esi, 0xa
jle 0x52d247
jmp 0x52d218
cmp al, 4
jne 0x52d243
mov esi, 0x16
lea ecx, [esp + 0x10]
push ecx
lea eax, [esi - 0xa]
push eax
lea eax, [esp + 0x5a]
push eax
mov edx, ebx
mov ecx, ebp
call fcn.0052c950
add esp, 0xc
test eax, eax
jne 0x52d299
lea eax, [esi - 0xa]
cmp eax, dword [esp + 0x10]
jne 0x52d299
mov al, byte [esp + 0x4b]
mov dl, byte [esp + 0x4c]
mov cl, byte [esp + 0x49]
test cl, cl
je 0x52d39b
cmp al, 1
jne 0x52d2ae
movzx eax, cl
movzx ecx, byte [esp + 0x50]
push eax
movzx eax, byte [esp + 0x55]
shl ecx, 8
or ecx, eax
movzx eax, byte [esp + 0x53]
push ecx
push eax
movzx eax, byte [esp + 0x5a]
push eax
movzx eax, byte [esp + 0x5d]
push eax
movzx eax, dl
push eax
push str.Cant_complete_SOCKS5_connection_to__d._d._d._d:_d.___d_
push edi
call fcn.0051a7e0
add esp, 0x20
mov eax, 7
jmp 0x52d428
push str.Failed_to_receive_SOCKS5_connect_request_ack.
push edi
call fcn.0051a7e0
mov eax, 7
jmp 0x52d425
cmp al, 3
jne 0x52d2fa
mov bl, byte [esp + esi + 0x46]
lea eax, [esi - 2]
cmp eax, 0x258
jae 0x52d441
mov byte [esp + eax + 0x48], 0
movzx eax, byte [esp + 0x49]
movzx ecx, byte [esp + esi + 0x47]
push eax
movzx eax, bl
shl eax, 8
or ecx, eax
push ecx
lea eax, [esp + 0x55]
push eax
push str.Cant_complete_SOCKS5_connection_to__s:_d.___d_
push edi
call fcn.0051a7e0
add esp, 0x14
mov eax, 7
jmp 0x52d428
cmp al, 4
jne 0x52d391
movzx eax, cl
push eax
movzx ecx, byte [esp + 0x60]
movzx eax, byte [esp + 0x61]
shl ecx, 8
or ecx, eax
movzx eax, byte [esp + 0x5f]
push ecx
push eax
movzx eax, byte [esp + 0x66]
push eax
movzx eax, byte [esp + 0x69]
push eax
movzx eax, byte [esp + 0x6c]
push eax
movzx eax, byte [esp + 0x6f]
push eax
movzx eax, byte [esp + 0x72]
push eax
movzx eax, byte [esp + 0x75]
push eax
movzx eax, byte [esp + 0x78]
push eax
movzx eax, byte [esp + 0x7b]
push eax
movzx eax, byte [esp + 0x7e]
push eax
movzx eax, byte [esp + 0x81]
push eax
movzx eax, byte [esp + 0x84]
push eax
movzx eax, byte [esp + 0x87]
push eax
movzx eax, byte [esp + 0x8a]
push eax
movzx eax, byte [esp + 0x8d]
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 edi
call fcn.0051a7e0
add esp, 0x50
mov eax, 7
jmp 0x52d428
push str.SOCKS5_request_granted._n
push edi
call fcn.0051a600
add esp, 8
lea eax, [esp + 0x2c]
push eax
push 0x8004667e
push ebx
mov dword [esp + 0x38], 1
call dword [sym.imp.WS2_32.dll_ioctlsocket]
xor eax, eax
jmp 0x52d428
push str.Failed_to_send_SOCKS5_connect_request.
push edi
call fcn.0051a7e0
mov eax, 7
jmp 0x52d425
push dword [esp + 0x28]
push str.Failed_to_resolve___s__for_SOCKS5_connect.
push edi
call fcn.0051a7e0
add esp, 0xc
mov eax, 6
jmp 0x52d428
push str.Unable_to_receive_initial_SOCKS5_response.
push edi
call fcn.0051a7e0
mov eax, 7
jmp 0x52d425
push str.Unable_to_send_initial_SOCKS5_request.
push edi
call fcn.0051a7e0
mov eax, 7
jmp 0x52d425
push str.Connection_time_out
push edi
call fcn.0051a7e0
mov eax, 0x1c
add esp, 8
mov ecx, dword [esp + 0x2e4]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004ebb9e
add esp, 0x2dc
ret
call fcn.004ee2ff
int3