Function at 0x4bee60
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2cc
mov eax, dword [0x7c0ab4]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 0x14]
push edi
mov edi, dword [ebp + 8]
push edi
mov eax, dword [esi + 0x19c]
mov ebx, dword [esi]
mov dword [ebp - 0x2c4], eax
mov eax, dword [esi + 0xd0]
cmp eax, 5
mov dword [ebp - 0x2cc], edx
mov dword [ebp - 0x2c0], ecx
sete byte [ebp - 0x2a1]
mov dword [ebp - 0x2c8], edi
mov dword [ebp - 0x2b4], esi
mov dword [ebp - 0x2a8], eax
call fcn.006e5360
add esp, 4
mov dword [ebp - 0x2bc], eax
cmp byte [esi + 0x292], 0
je 0x4beee9
push dword [ebp + 0xc]
push edi
push str.SOCKS5:_connecting_to_HTTP_proxy__s_port__d_n
push dword [esi]
call fcn.004aee40
mov eax, dword [ebp - 0x2bc]
add esp, 0x10
cmp dword [ebp - 0x2a8], 5
je 0x4bef10
cmp eax, 0xff
jbe 0x4bef10
push eax
push str.SOCKS5:_server_resolving_disabled_for_hostnames_of_length___255__actual_len_zu__n
push dword [esi]
call fcn.004aee40
add esp, 0xc
mov byte [ebp - 0x2a1], 1
mov eax, dword [ebx + 0x1e8]
xor ecx, ecx
mov edx, dword [ebx + 0x1ec]
test eax, eax
mov dword [ebp - 0x2b0], 0x493e0
setg cl
mov dword [ebp - 0x2ac], 0
test edx, edx
jle 0x4bef3e
or ecx, 2
sub ecx, 1
je 0x4bef56
sub ecx, 1
je 0x4bef54
sub ecx, 1
jne 0x4bef63
cmp eax, edx
cmovge eax, edx
jmp 0x4bef56
mov eax, edx
cdq
mov dword [ebp - 0x2b0], eax
mov dword [ebp - 0x2ac], edx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, eax
mov eax, 0x10624dd3
mul ecx
push 0
mov edi, edx
shr edi, 6
imul eax, edi, 0x3e8
push 0x3e8
sub ecx, eax
imul eax, ecx, 0x3e8
sub eax, dword [ebx + 0x5a4]
cdq
push edx
push eax
call fcn.00702460
sub edi, dword [ebx + 0x5a0]
mov ecx, eax
imul eax, edi, 0x3e8
mov esi, edx
cdq
mov edi, eax
neg edi
adc edx, 0
neg edx
sub edi, ecx
sbb edx, esi
add edi, dword [ebp - 0x2b0]
mov eax, edi
mov dword [ebp - 0x2a8], edi
adc edx, dword [ebp - 0x2ac]
or eax, edx
mov dword [ebp - 0x2b8], edx
je 0x4bfa15
test edx, edx
jl 0x4bfa15
jg 0x4befec
test edi, edi
jb 0x4bfa15
mov edi, dword [ebp - 0x2c4]
lea eax, [ebp - 0x2b0]
push eax
push 0x8004667e
push edi
mov dword [ebp - 0x2b0], 1
call dword [sym.imp.WS2_32.dll_ioctlsocket]
push dword [ebp - 0x2b8]
or edx, 0xffffffff
or ecx, 0xffffffff
push dword [ebp - 0x2a8]
push edi
call fcn.004b1160
add esp, 0xc
cmp eax, 0xffffffff
jne 0x4bf05a
mov eax, dword [ebp - 0x2b4]
push str.SOCKS5:_no_connection_here
push dword [eax]
call fcn.004aef10
mov eax, 7
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.006d0856
mov esp, ebp
pop ebp
ret
test eax, eax
jne 0x4bf070
mov eax, dword [ebp - 0x2b4]
push str.SOCKS5:_connection_timeout
push dword [eax]
jmp 0x4bfa1b
test al, 4
je 0x4bf09f
mov eax, dword [ebp - 0x2b4]
push str.SOCKS5:_error_occurred_during_connection
push dword [eax]
call fcn.004aef10
mov eax, 7
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.006d0856
mov esp, ebp
pop ebp
ret
cmp dword [ebp - 0x2c0], 0
mov byte [ebp - 0x260], 5
setne al
mov word [ebp - 0x25e], 0x100
add al, 2
mov byte [ebp - 0x25c], 2
mov byte [ebp - 0x25f], al
lea eax, [ebp - 0x2b0]
push eax
push 0x8004667e
push edi
mov dword [ebp - 0x2b0], 0
call dword [sym.imp.WS2_32.dll_ioctlsocket]
push dword [ebp + 0xc]
push dword [ebp - 0x2c8]
push str.SOCKS5_communication_to__s:_d_n
push ebx
call fcn.004aee40
mov esi, dword [ebp - 0x2b4]
lea eax, [ebp - 0x2b0]
push eax
movzx eax, byte [ebp - 0x25f]
mov edx, edi
add eax, 2
mov ecx, esi
push eax
lea eax, [ebp - 0x260]
push eax
call fcn.004af3c0
add esp, 0x1c
mov dword [ebp - 0x2b4], eax
test eax, eax
jne 0x4bf9f1
movzx ecx, byte [ebp - 0x25f]
add ecx, 2
cmp dword [ebp - 0x2b0], ecx
jne 0x4bf9f1
lea eax, [ebp - 0x2ac]
mov dword [ebp - 0x2ac], 1
push eax
push 0x8004667e
push edi
call dword [sym.imp.WS2_32.dll_ioctlsocket]
push dword [ebp - 0x2b8]
or edx, 0xffffffff
mov ecx, edi
push dword [ebp - 0x2a8]
push 0xffffffffffffffff
call fcn.004b1160
add esp, 0xc
cmp eax, 0xffffffff
jne 0x4bf1aa
push str.SOCKS5_nothing_to_read
push dword [esi]
call fcn.004aef10
mov eax, 7
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.006d0856
mov esp, ebp
pop ebp
ret
test eax, eax
jne 0x4bf1ba
push str.SOCKS5_read_timeout
push dword [esi]
jmp 0x4bfa1b
test al, 4
je 0x4bf1e3
push str.SOCKS5_read_error_occurred
push dword [esi]
call fcn.004aef10
mov eax, 0x38
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.006d0856
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x2a8]
mov dword [ebp - 0x2a8], 0
push eax
push 0x8004667e
push edi
call dword [sym.imp.WS2_32.dll_ioctlsocket]
lea eax, [ebp - 0x2ac]
mov edx, edi
push eax
lea eax, [ebp - 0x260]
mov ecx, esi
push 2
push eax
call fcn.004be5e0
add esp, 0xc
test eax, eax
jne 0x4bf9cd
cmp dword [ebp - 0x2ac], 2
jne 0x4bf9cd
cmp byte [ebp - 0x260], 5
je 0x4bf25e
push str.Received_invalid_version_in_initial_SOCKS5_response.
push ebx
call fcn.004aef10
mov eax, 7
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.006d0856
mov esp, ebp
pop ebp
ret
mov al, byte [ebp - 0x25f]
test al, al
je 0x4bf4c4
cmp al, 1
jne 0x4bf2a9
mov edx, esi
call fcn.004d5010
mov dword [ebp - 0x2b4], eax
test eax, eax
je 0x4bf4c4
push str.Unable_to_negotiate_SOCKS5_GSS_API_context.
push ebx
call fcn.004aef10
mov eax, 7
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.006d0856
mov esp, ebp
pop ebp
ret
cmp al, 2
jne 0x4bf463
mov ecx, dword [ebp - 0x2c0]
test ecx, ecx
je 0x4bf2f1
cmp dword [ebp - 0x2cc], 0
je 0x4bf2f1
push ecx
call fcn.006e5360
add esp, 4
mov dword [ebp - 0x2b4], eax
push dword [ebp - 0x2cc]
call fcn.006e5360
mov ecx, dword [ebp - 0x2c0]
mov edx, eax
mov eax, dword [ebp - 0x2b4]
add esp, 4
jmp 0x4bf2fb
xor eax, eax
xor edx, edx
mov dword [ebp - 0x2b4], eax
mov dword [ebp - 0x2b8], edx
mov byte [ebp - 0x260], 1
mov byte [ebp - 0x25f], al
test ecx, ecx
je 0x4bf32d
test eax, eax
je 0x4bf32d
push eax
push ecx
lea eax, [ebp - 0x25e]
push eax
call fcn.006d2cf0
mov eax, dword [ebp - 0x2b4]
add esp, 0xc
mov ecx, dword [ebp - 0x2b8]
lea edx, [eax + 3]
mov byte [ebp + eax - 0x25e], cl
mov eax, dword [ebp - 0x2cc]
mov dword [ebp - 0x2a8], edx
test eax, eax
je 0x4bf370
test ecx, ecx
je 0x4bf370
push ecx
push eax
lea eax, [ebp - 0x260]
add eax, edx
push eax
call fcn.006d2cf0
mov ecx, dword [ebp - 0x2b8]
add esp, 0xc
mov edx, dword [ebp - 0x2a8]
lea eax, [edx + ecx]
mov edx, edi
lea ecx, [ebp - 0x2b0]
mov dword [ebp - 0x2a8], eax
push ecx
push eax
lea eax, [ebp - 0x260]
mov ecx, esi
push eax
call fcn.004af3c0
add esp, 0xc
mov dword [ebp - 0x2b4], eax
test eax, eax
jne 0x4bf43f
mov eax, dword [ebp - 0x2a8]
cmp eax, dword [ebp - 0x2b0]
jne 0x4bf43f
lea eax, [ebp - 0x2ac]
mov edx, edi
push eax
lea eax, [ebp - 0x260]
mov ecx, esi
push 2
push eax
call fcn.004be5e0
add esp, 0xc
test eax, eax
jne 0x4bf41b
cmp dword [ebp - 0x2ac], 2
jne 0x4bf41b
mov al, byte [ebp - 0x25f]
test al, al
je 0x4bf4c4
movzx eax, al
push eax
movzx eax, byte [ebp - 0x260]
push eax
push str.User_was_rejected_by_the_SOCKS5_server___d__d_.
push ebx
call fcn.004aef10
add esp, 0x10
mov eax, 7
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.006d0856
mov esp, ebp
pop ebp
ret
push str.Unable_to_receive_SOCKS5_sub_negotiation_response.
push ebx
call fcn.004aef10
mov eax, 7
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.006d0856
mov esp, ebp
pop ebp
ret
push str.Failed_to_send_SOCKS5_sub_negotiation_request.
push ebx
call fcn.004aef10
mov eax, 7
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.006d0856
mov esp, ebp
pop ebp
ret
cmp al, 0xff
jne 0x4bf4a0
mov eax, dword [ebp - 0x2c0]
test eax, eax
je 0x4bf47b
cmp byte [eax], 0
mov eax, str.No_authentication_method_was_acceptable.
jne 0x4bf480
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 ebx
call fcn.004aef10
mov eax, 7
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.006d0856
mov esp, ebp
pop ebp
ret
push str.Undocumented_SOCKS5_mode_attempted_to_be_used_by_server.
push ebx
call fcn.004aef10
mov eax, 7
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.006d0856
mov esp, ebp
pop ebp
ret
cmp byte [ebp - 0x2a1], 0
mov word [ebp - 0x260], 0x105
mov dword [ebp - 0x2a8], 3
mov byte [ebp - 0x25e], 0
jne 0x4bf51e
mov eax, dword [ebp - 0x2bc]
push eax
push dword [ebp - 0x2c8]
mov byte [ebp - 0x25c], al
lea eax, [ebp - 0x25b]
push eax
mov byte [ebp - 0x25d], 3
call fcn.006d2cf0
mov ecx, dword [ebp - 0x2bc]
add esp, 0xc
add ecx, 5
jmp 0x4bf62c
mov edx, dword [ebp - 0x2c8]
lea eax, [ebp - 0x2bc]
push eax
push dword [ebp + 0xc]
mov ecx, esi
call fcn.004b1a00
add esp, 8
cmp eax, 0xffffffff
je 0x4bf9b7
cmp eax, 1
jne 0x4bf561
lea edx, [ebp - 0x2bc]
mov ecx, esi
call fcn.004b2620
mov dword [ebp - 0x2b4], eax
test eax, eax
jne 0x4bfa28
mov eax, dword [ebp - 0x2bc]
test eax, eax
je 0x4bf9a3
mov eax, dword [eax]
mov dword [ebp - 0x2b8], eax
test eax, eax
je 0x4bf9a3
push 0x40
lea edx, [ebp - 0x2a0]
mov ecx, eax
call fcn.004b17d0
mov eax, dword [ebp - 0x2b8]
add esp, 4
cmp dword [eax + 4], 2
jne 0x4bf5ed
mov byte [ebp - 0x25d], 1
mov ecx, dword [eax + 0x18]
mov dword [ebp - 0x2a8], 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 ebx
call fcn.004aee40
jmp 0x4bf609
lea eax, [ebp - 0x2a0]
mov dword [ebp - 0x2b8], 0
push eax
push str.SOCKS5_connection_to__s_not_supported_n
push ebx
call fcn.004aef10
mov edx, dword [ebp - 0x2bc]
add esp, 0xc
mov ecx, ebx
call fcn.004b1b90
cmp dword [ebp - 0x2b8], 0
je 0x4bf9a3
mov ecx, dword [ebp - 0x2a8]
mov edx, dword [ebp + 0xc]
mov eax, edx
sar eax, 8
cmp dword [esi + 0x5a8], 0
mov byte [ebp + ecx - 0x260], al
lea eax, [ecx + 2]
mov byte [ebp + ecx - 0x25f], dl
mov dword [ebp - 0x2a8], eax
je 0x4bf66a
push str.SOCKS5_GSS_API_protection_not_yet_implemented.
push ebx
call fcn.004aef10
mov eax, dword [ebp - 0x2b4]
add esp, 8
jmp 0x4bf685
lea ecx, [ebp - 0x2b0]
mov edx, edi
push ecx
push eax
lea eax, [ebp - 0x260]
mov ecx, esi
push eax
call fcn.004af3c0
add esp, 0xc
test eax, eax
jne 0x4bf97f
mov eax, dword [ebp - 0x2a8]
cmp eax, dword [ebp - 0x2b0]
jne 0x4bf97f
cmp dword [esi + 0x5a8], 0
mov edi, 0xa
je 0x4bf6df
push str.SOCKS5_GSS_API_protection_not_yet_implemented.
push ebx
call fcn.004aef10
add esp, 8
push str.Failed_to_receive_SOCKS5_connect_request_ack.
push ebx
call fcn.004aef10
mov eax, 7
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.006d0856
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp - 0x2c4]
lea eax, [ebp - 0x2ac]
push eax
lea eax, [ebp - 0x260]
mov ecx, esi
push 0xa
push eax
call fcn.004be5e0
add esp, 0xc
test eax, eax
jne 0x4bf6bb
cmp dword [ebp - 0x2ac], edi
jne 0x4bf6bb
cmp byte [ebp - 0x260], 5
je 0x4bf738
push str.SOCKS5_reply_has_wrong_version__version_should_be_5.
push ebx
call fcn.004aef10
mov eax, 7
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.006d0856
mov esp, ebp
pop ebp
ret
mov al, byte [ebp - 0x25d]
mov dl, byte [ebp - 0x25c]
cmp al, 3
jne 0x4bf750
movzx edi, dl
add edi, 7
jmp 0x4bf75a
cmp al, 4
mov ecx, 0x16
cmove edi, ecx
cmp dword [esi + 0x5a8], 0
jne 0x4bf7ad
cmp edi, 0xa
jbe 0x4bf7ad
mov edx, dword [ebp - 0x2c4]
lea ecx, [ebp - 0x2ac]
push ecx
lea eax, [edi - 0xa]
mov ecx, esi
push eax
lea eax, [ebp - 0x256]
push eax
call fcn.004be5e0
add esp, 0xc
test eax, eax
jne 0x4bf6bb
lea eax, [edi - 0xa]
cmp eax, dword [ebp - 0x2ac]
jne 0x4bf6bb
mov dl, byte [ebp - 0x25c]
mov al, byte [ebp - 0x25d]
mov cl, byte [ebp - 0x25f]
test cl, cl
je 0x4bf93c
cmp al, 1
jne 0x4bf817
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 ebx
call fcn.004aef10
add esp, 0x20
mov eax, 7
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.006d0856
mov esp, ebp
pop ebp
ret
cmp al, 3
jne 0x4bf87c
mov cl, byte [ebp + edi - 0x262]
lea eax, [edi - 2]
cmp eax, 0x258
jae 0x4bfa39
mov byte [ebp + eax - 0x260], 0
movzx eax, byte [ebp - 0x25f]
push eax
movzx eax, byte [ebp + edi - 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 ebx
call fcn.004aef10
add esp, 0x14
mov eax, 7
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.006d0856
mov esp, ebp
pop ebp
ret
cmp al, 4
jne 0x4bf926
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 ebx
call fcn.004aef10
add esp, 0x50
mov eax, 7
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.006d0856
mov esp, ebp
pop ebp
ret
push str.SOCKS5_request_granted._n
push ebx
call fcn.004aee40
add esp, 8
mov dword [ebp - 0x2a8], 1
lea eax, [ebp - 0x2a8]
push eax
push 0x8004667e
push dword [ebp - 0x2c4]
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.006d0856
mov esp, ebp
pop ebp
ret
push str.Failed_to_send_SOCKS5_connect_request.
push ebx
call fcn.004aef10
mov eax, 7
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.006d0856
mov esp, ebp
pop ebp
ret
push dword [ebp - 0x2c8]
push str.Failed_to_resolve___s__for_SOCKS5_connect.
push ebx
call fcn.004aef10
add esp, 0xc
mov eax, 6
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.006d0856
mov esp, ebp
pop ebp
ret
push str.Unable_to_receive_initial_SOCKS5_response.
push ebx
call fcn.004aef10
mov eax, 7
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.006d0856
mov esp, ebp
pop ebp
ret
push str.Unable_to_send_initial_SOCKS5_request.
push ebx
call fcn.004aef10
mov eax, 7
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.006d0856
mov esp, ebp
pop ebp
ret
push str.Connection_time_out
push ebx
call fcn.004aef10
mov eax, 0x1c
add esp, 8
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.006d0856
mov esp, ebp
pop ebp
ret
call fcn.006d0efb
int3