Function at 0x48caa0
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2cc
mov eax, dword [0x70e00c]
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 0x48cb00
mov eax, dword [esi + 0x184]
sub ebx, ecx
cmp byte [edi + 0x2a2], 0
mov dword [ebp - 0x2ac], ebx
mov dword [ebp - 0x2b8], eax
je 0x48cb36
push dword [ebp + 0xc]
push edx
push str.SOCKS5:_connecting_to_HTTP_proxy__s_port__d_n
push esi
call fcn.0046c560
add esp, 0x10
cmp dword [ebp - 0x2c0], 5
je 0x48cb5e
cmp ebx, 0xff
jbe 0x48cb5e
push ebx
push str.SOCKS5:_server_resolving_disabled_for_hostnames_of_length___255__actual_len_zu__n
push dword [edi]
call fcn.0046c560
add esp, 0xc
mov byte [ebp - 0x2ad], 1
push 1
xor edx, edx
mov ecx, esi
call fcn.0046d1c0
mov ecx, edx
mov dword [ebp - 0x2c0], eax
add esp, 4
mov dword [ebp - 0x2bc], ecx
test ecx, ecx
jg 0x48cba8
jl 0x48cb84
test eax, eax
jae 0x48cba8
push str.Connection_time_out
push esi
call fcn.0046c5e0
mov eax, 0x1c
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004aa758
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.0046ebd0
add esp, 0xc
cmp eax, 0xffffffff
jne 0x48cbfb
push str.SOCKS5:_no_connection_here
push dword [edi]
jmp 0x48d479
test eax, eax
jne 0x48cc24
push str.SOCKS5:_connection_timeout
push dword [edi]
call fcn.0046c5e0
mov eax, 0x1c
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004aa758
mov esp, ebp
pop ebp
ret
test al, 4
je 0x48cc34
push str.SOCKS5:_error_occurred_during_connection
push dword [edi]
jmp 0x48d479
mov eax, dword [ebp - 0x2b8]
test eax, 0xfffffffa
je 0x48cc57
push eax
push str.warning:_unsupported_value_passed_to_CURLOPT_SOCKS5_AUTH:__lu_n
push dword [edi]
call fcn.0046c560
mov eax, dword [ebp - 0x2b8]
add esp, 0xc
test al, 1
mov byte [ebp - 0x260], 5
mov eax, 0
mov byte [ebp - 0x25e], 0
cmovne eax, dword [ebp - 0x2a4]
mov ecx, 3
mov dword [ebp - 0x2b8], eax
test eax, eax
je 0x48cc8e
mov byte [ebp - 0x25d], 2
mov ecx, 4
lea eax, [ebp - 0x2a4]
mov dword [ebp - 0x2a4], 0
push eax
push 0x8004667e
push dword [ebp - 0x2b4]
sub cl, 2
mov byte [ebp - 0x25f], cl
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.0046c560
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.0046c9b0
add esp, 0x1c
test eax, eax
jne 0x48d473
movzx eax, byte [ebp - 0x25f]
add eax, 2
cmp dword [ebp - 0x2a8], eax
jne 0x48d473
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.0046ebd0
add esp, 0xc
cmp eax, 0xffffffff
jne 0x48cd66
push str.SOCKS5_nothing_to_read
push dword [edi]
jmp 0x48d479
test eax, eax
jne 0x48cd8f
push str.SOCKS5_read_timeout
push dword [edi]
call fcn.0046c5e0
mov eax, 0x1c
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004aa758
mov esp, ebp
pop ebp
ret
test al, 4
je 0x48cdb8
push str.SOCKS5_read_error_occurred
push dword [edi]
call fcn.0046c5e0
mov eax, 0x38
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004aa758
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.0048c320
add esp, 0xc
test eax, eax
jne 0x48d46c
cmp dword [ebp - 0x2bc], 2
jne 0x48d46c
cmp byte [ebp - 0x260], 5
je 0x48ce22
push str.Received_invalid_version_in_initial_SOCKS5_response.
jmp 0x48d478
mov al, byte [ebp - 0x25f]
test al, al
je 0x48cfe4
cmp al, 2
jne 0x48cf9f
mov edx, dword [ebp - 0x2b8]
test edx, edx
je 0x48ce7d
cmp dword [ebp - 0x2c8], 0
je 0x48ce7d
mov ebx, edx
lea ecx, [ebx + 1]
mov al, byte [ebx]
inc ebx
test al, al
jne 0x48ce50
sub ebx, ecx
mov ecx, dword [ebp - 0x2c8]
lea eax, [ecx + 1]
mov dword [ebp - 0x2a4], eax
mov al, byte [ecx]
inc ecx
test al, al
jne 0x48ce68
sub ecx, dword [ebp - 0x2a4]
mov dword [ebp - 0x2c0], ecx
jmp 0x48ce85
xor ebx, ebx
mov dword [ebp - 0x2c0], ebx
mov byte [ebp - 0x260], 1
mov byte [ebp - 0x25f], bl
test edx, edx
je 0x48ceab
test ebx, ebx
je 0x48ceab
push ebx
push edx
lea eax, [ebp - 0x25e]
push eax
call fcn.005f40c0
add esp, 0xc
mov ecx, dword [ebp - 0x2c8]
lea eax, [ebx + 2]
mov ebx, dword [ebp - 0x2c0]
mov byte [ebp + eax - 0x260], bl
inc eax
mov dword [ebp - 0x2b8], eax
test ecx, ecx
je 0x48cee9
test ebx, ebx
je 0x48cee9
push ebx
push ecx
lea ecx, [ebp - 0x260]
add eax, ecx
push eax
call fcn.005f40c0
mov eax, dword [ebp - 0x2b8]
add esp, 0xc
add eax, ebx
lea ecx, [ebp - 0x2a8]
mov ebx, dword [ebp - 0x2b4]
mov edx, ebx
push ecx
push eax
mov dword [ebp - 0x2b8], eax
mov ecx, edi
lea eax, [ebp - 0x260]
push eax
call fcn.0046c9b0
add esp, 0xc
test eax, eax
jne 0x48cf95
mov eax, dword [ebp - 0x2b8]
cmp eax, dword [ebp - 0x2a8]
jne 0x48cf95
lea eax, [ebp - 0x2bc]
mov edx, ebx
push eax
lea eax, [ebp - 0x260]
mov ecx, edi
push 2
push eax
call fcn.0048c320
add esp, 0xc
test eax, eax
jne 0x48cf8b
cmp dword [ebp - 0x2bc], 2
jne 0x48cf8b
mov al, byte [ebp - 0x25f]
test al, al
je 0x48cfde
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.0046c5e0
add esp, 0x10
mov eax, 7
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004aa758
mov esp, ebp
pop ebp
ret
push str.Unable_to_receive_SOCKS5_sub_negotiation_response.
jmp 0x48d478
push str.Failed_to_send_SOCKS5_sub_negotiation_request.
jmp 0x48d478
cmp al, 1
jne 0x48cfad
push str.SOCKS5_GSSAPI_per_message_authentication_is_not_supported.
jmp 0x48d478
cmp al, 0xff
jne 0x48cfd4
mov edx, dword [ebp - 0x2b8]
test edx, edx
je 0x48cfca
cmp byte [edx], 0
je 0x48cfca
push str.No_authentication_method_was_acceptable.
jmp 0x48d478
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._
jmp 0x48d478
push str.Undocumented_SOCKS5_mode_attempted_to_be_used_by_server.
jmp 0x48d478
mov ebx, dword [ebp - 0x2ac]
cmp byte [ebp - 0x2ad], 0
mov word [ebp - 0x260], 0x105
mov byte [ebp - 0x25e], 0
jne 0x48d028
push ebx
push dword [ebp - 0x2c4]
lea eax, [ebp - 0x25b]
mov byte [ebp - 0x25d], 3
push eax
mov byte [ebp - 0x25c], bl
call fcn.005f40c0
add esp, 0xc
add ebx, 5
jmp 0x48d163
mov edx, dword [ebp - 0x2c4]
lea eax, [ebp - 0x2b8]
push eax
push dword [ebp + 0xc]
mov ecx, edi
call fcn.0046fa30
add esp, 8
cmp eax, 0xffffffff
je 0x48d456
cmp eax, 1
jne 0x48d065
lea edx, [ebp - 0x2b8]
mov ecx, edi
call fcn.0047a480
test eax, eax
jne 0x48d486
mov eax, dword [ebp - 0x2b8]
test eax, eax
je 0x48d442
mov ebx, dword [eax]
mov dword [ebp - 0x2c0], ebx
test ebx, ebx
je 0x48d442
push 0x40
lea edx, [ebp - 0x2a0]
mov ecx, ebx
call fcn.0046f610
mov eax, dword [ebx + 4]
add esp, 4
cmp eax, 2
jne 0x48d0e8
mov byte [ebp - 0x25d], 1
mov ecx, dword [ebx + 0x18]
mov ebx, 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.0046c560
jmp 0x48d146
cmp eax, 0x17
jne 0x48d125
mov byte [ebp - 0x25d], 4
xor ecx, ecx
mov edx, dword [ebx + 0x18]
lea ebx, [eax - 3]
nop dword [eax]
mov al, byte [ecx + edx + 8]
mov byte [ebp + ecx - 0x25c], al
inc ecx
cmp ecx, 0x10
jl 0x48d100
lea eax, [ebp - 0x2a0]
push eax
push str.SOCKS5_connect_to_IPv6__s__locally_resolved__n
push esi
call fcn.0046c560
jmp 0x48d146
lea eax, [ebp - 0x2a0]
mov dword [ebp - 0x2c0], 0
push eax
push str.SOCKS5_connection_to__s_not_supported_n
push esi
call fcn.0046c5e0
mov ebx, 3
mov edx, dword [ebp - 0x2b8]
add esp, 0xc
mov ecx, esi
call fcn.0046fc00
cmp dword [ebp - 0x2c0], 0
je 0x48d442
mov ecx, dword [ebp + 0xc]
mov eax, ecx
mov edx, dword [ebp - 0x2b4]
sar eax, 8
mov byte [ebp + ebx - 0x260], al
lea eax, [ebp - 0x2a8]
mov byte [ebp + ebx - 0x25f], cl
add ebx, 2
push eax
lea eax, [ebp - 0x260]
mov ecx, edi
push ebx
push eax
call fcn.0046c9b0
add esp, 0xc
test eax, eax
jne 0x48d43b
cmp ebx, dword [ebp - 0x2a8]
jne 0x48d43b
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.0048c320
add esp, 0xc
test eax, eax
jne 0x48d2c9
cmp dword [ebp - 0x2bc], ebx
jne 0x48d2c9
cmp byte [ebp - 0x260], 5
je 0x48d1f8
push str.SOCKS5_reply_has_wrong_version__version_should_be_5.
jmp 0x48d478
mov al, byte [ebp - 0x25d]
cmp al, 3
jne 0x48d215
mov dl, byte [ebp - 0x25c]
movzx ebx, dl
add ebx, 7
cmp ebx, 0xa
jbe 0x48d25f
jmp 0x48d21e
cmp al, 4
jne 0x48d259
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.0048c320
add esp, 0xc
test eax, eax
jne 0x48d2c9
lea eax, [ebx - 0xa]
cmp eax, dword [ebp - 0x2bc]
jne 0x48d2c9
mov al, byte [ebp - 0x25d]
mov dl, byte [ebp - 0x25c]
mov cl, byte [ebp - 0x25f]
test cl, cl
je 0x48d3f8
cmp al, 1
jne 0x48d2d3
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.0046c5e0
add esp, 0x20
mov eax, 7
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004aa758
mov esp, ebp
pop ebp
ret
push str.Failed_to_receive_SOCKS5_connect_request_ack.
jmp 0x48d478
cmp al, 3
jne 0x48d338
mov dl, byte [ebp + ebx - 0x262]
lea eax, [ebx - 2]
cmp eax, 0x258
jae 0x48d497
mov byte [ebp + eax - 0x260], 0
movzx eax, byte [ebp - 0x25f]
movzx ecx, byte [ebp + ebx - 0x261]
push eax
movzx eax, dl
shl eax, 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.0046c5e0
add esp, 0x14
mov eax, 7
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004aa758
mov esp, ebp
pop ebp
ret
cmp al, 4
jne 0x48d3e2
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.0046c5e0
add esp, 0x50
mov eax, 7
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004aa758
mov esp, ebp
pop ebp
ret
push str.SOCKS5_request_granted._n
push esi
call fcn.0046c560
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.004aa758
mov esp, ebp
pop ebp
ret
push str.Failed_to_send_SOCKS5_connect_request.
jmp 0x48d478
push dword [ebp - 0x2c4]
push str.Failed_to_resolve___s__for_SOCKS5_connect.
push esi
call fcn.0046c5e0
add esp, 0xc
mov eax, 6
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004aa758
mov esp, ebp
pop ebp
ret
push str.Unable_to_receive_initial_SOCKS5_response.
jmp 0x48d478
push str.Unable_to_send_initial_SOCKS5_request.
push esi
call fcn.0046c5e0
mov eax, 7
add esp, 8
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004aa758
mov esp, ebp
pop ebp
ret
call fcn.004aaf06
int3