Function at 0x42fe3a
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28c
mov eax, dword [0x4931e0]
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 ebx, ecx
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x278], edx
mov dword [ebp - 0x288], ebx
mov eax, dword [edi + eax*4 + 0x130]
mov esi, dword [edi]
lea edx, [ecx + 1]
mov dword [ebp - 0x264], eax
xor eax, eax
cmp dword [edi + 0x114], 5
mov dword [ebp - 0x27c], ecx
sete al
mov dword [ebp - 0x280], edi
mov dword [ebp - 0x274], eax
mov al, byte [ecx]
inc ecx
test al, al
jne 0x42fe97
sub ecx, edx
cmp dword [ebp - 0x274], 0
mov dword [ebp - 0x284], ecx
jne 0x42fed0
cmp ecx, 0xff
jbe 0x42fed0
push ecx
push str.SOCKS5:_server_resolving_disabled_for_hostnames_of_length___255__actual_len_zu__n
push esi
call fcn.00428725
add esp, 0xc
mov dword [ebp - 0x274], 1
push 1
xor edx, edx
mov ecx, esi
call fcn.00426cd7
mov dword [ebp - 0x268], eax
pop ecx
test eax, eax
jns 0x42fefa
push str.Connection_time_out
push esi
call fcn.00428799
pop ecx
pop ecx
push 0x1c
jmp 0x4305ed
lea eax, [ebp - 0x26c]
mov dword [ebp - 0x26c], 1
push eax
push 0x8004667e
push dword [ebp - 0x264]
call dword [sym.imp.WS2_32.dll_ioctlsocket]
push dword [ebp - 0x268]
or edx, 0xffffffff
or ecx, 0xffffffff
push dword [ebp - 0x264]
call fcn.0043f696
pop ecx
pop ecx
cmp eax, 0xffffffff
jne 0x42ff46
push str.SOCKS5:_no_connection_here
push dword [edi]
jmp 0x4305e4
test eax, eax
jne 0x42ff53
push str.SOCKS5:_connection_timeout
push dword [edi]
jmp 0x42feec
test al, 4
je 0x42ff5e
push str.SOCKS5:_error_occurred_during_connection
jmp 0x42ff3f
test ebx, ebx
mov byte [ebp - 0x260], 5
mov word [ebp - 0x25e], 0x200
setne al
and dword [ebp - 0x26c], 0
inc al
mov byte [ebp - 0x25f], al
lea eax, [ebp - 0x26c]
push eax
push 0x8004667e
push dword [ebp - 0x264]
call dword [sym.imp.WS2_32.dll_ioctlsocket]
mov edx, dword [ebp - 0x264]
lea eax, [ebp - 0x26c]
push eax
movzx eax, byte [ebp - 0x25f]
mov ecx, edi
add eax, 2
push eax
lea eax, [ebp - 0x260]
push eax
call fcn.004289b6
add esp, 0xc
test eax, eax
jne 0x4305de
movzx eax, byte [ebp - 0x25f]
add eax, 2
cmp dword [ebp - 0x26c], eax
jne 0x4305de
lea eax, [ebp - 0x270]
mov dword [ebp - 0x270], 1
push eax
push 0x8004667e
push dword [ebp - 0x264]
call dword [sym.imp.WS2_32.dll_ioctlsocket]
push dword [ebp - 0x268]
mov ecx, dword [ebp - 0x264]
or edx, 0xffffffff
push 0xffffffffffffffff
call fcn.0043f696
pop ecx
pop ecx
cmp eax, 0xffffffff
jne 0x43002a
push str.SOCKS5_nothing_to_read
jmp 0x42ff3f
test eax, eax
jne 0x430038
push str.SOCKS5_read_timeout
jmp 0x42ff4f
test al, 4
je 0x430051
push str.SOCKS5_read_error_occurred
push dword [edi]
call fcn.00428799
pop ecx
pop ecx
push 0x38
jmp 0x4305ed
and dword [ebp - 0x268], 0
lea eax, [ebp - 0x268]
push eax
push 0x8004667e
push dword [ebp - 0x264]
call dword [sym.imp.WS2_32.dll_ioctlsocket]
mov edx, dword [ebp - 0x264]
lea eax, [ebp - 0x270]
push eax
lea eax, [ebp - 0x260]
mov ecx, edi
push 2
push eax
call fcn.0042f92e
add esp, 0xc
test eax, eax
jne 0x4305d7
cmp dword [ebp - 0x270], 2
jne 0x4305d7
cmp byte [ebp - 0x260], 5
je 0x4300b8
push str.Received_invalid_version_in_initial_SOCKS5_response.
jmp 0x4305e3
mov al, byte [ebp - 0x25f]
test al, al
je 0x430249
cmp al, 2
jne 0x430210
test ebx, ebx
je 0x4300fe
mov edx, dword [ebp - 0x278]
test edx, edx
je 0x4300fe
lea ecx, [ebx + 1]
mov al, byte [ebx]
inc ebx
test al, al
jne 0x4300df
sub ebx, ecx
mov ecx, edx
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4300ed
sub ecx, edx
mov dword [ebp - 0x268], ecx
jmp 0x430106
xor ebx, ebx
and dword [ebp - 0x268], ebx
mov eax, dword [ebp - 0x288]
mov byte [ebp - 0x260], 1
mov byte [ebp - 0x25f], bl
test eax, eax
je 0x430132
test ebx, ebx
je 0x430132
push ebx
push eax
lea eax, [ebp - 0x25e]
push eax
call sub.MSVCR120.dll_memcpy
add esp, 0xc
mov ecx, dword [ebp - 0x278]
lea eax, [ebx + 2]
mov ebx, dword [ebp - 0x268]
mov byte [ebp + eax - 0x260], bl
inc eax
mov dword [ebp - 0x268], eax
test ecx, ecx
je 0x43016f
test ebx, ebx
je 0x43016f
push ebx
push ecx
lea eax, [ebp + eax - 0x260]
push eax
call sub.MSVCR120.dll_memcpy
mov eax, dword [ebp - 0x268]
add esp, 0xc
add eax, ebx
lea ecx, [ebp - 0x26c]
mov ebx, dword [ebp - 0x264]
mov edx, ebx
push ecx
push eax
mov dword [ebp - 0x268], eax
mov ecx, edi
lea eax, [ebp - 0x260]
push eax
call fcn.004289b6
add esp, 0xc
test eax, eax
jne 0x430206
mov eax, dword [ebp - 0x268]
cmp eax, dword [ebp - 0x26c]
jne 0x430206
lea eax, [ebp - 0x270]
mov edx, ebx
push eax
lea eax, [ebp - 0x260]
mov ecx, edi
push 2
push eax
call fcn.0042f92e
add esp, 0xc
test eax, eax
jne 0x4301fc
cmp dword [ebp - 0x270], 2
jne 0x4301fc
mov al, byte [ebp - 0x25f]
test al, al
je 0x430249
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.00428799
add esp, 0x10
jmp 0x4305eb
push str.Unable_to_receive_SOCKS5_sub_negotiation_response.
jmp 0x4305e3
push str.Failed_to_send_SOCKS5_sub_negotiation_request.
jmp 0x4305e3
cmp al, 1
jne 0x43021e
push str.SOCKS5_GSSAPI_per_message_authentication_is_not_supported.
jmp 0x4305e3
cmp al, 0xff
jne 0x43023f
test ebx, ebx
je 0x430235
cmp byte [ebx], 0
je 0x430235
push str.No_authentication_method_was_acceptable.
jmp 0x4305e3
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 0x4305e3
push str.Undocumented_SOCKS5_mode_attempted_to_be_used_by_server.
jmp 0x4305e3
cmp dword [ebp - 0x274], 0
push 3
mov word [ebp - 0x260], 0x105
pop ebx
mov byte [ebp - 0x25e], 0
jne 0x430295
mov byte [ebp - 0x25d], bl
lea eax, [ebp - 0x25b]
mov ebx, dword [ebp - 0x284]
push ebx
push dword [ebp - 0x27c]
mov byte [ebp - 0x25c], bl
push eax
call sub.MSVCR120.dll_memcpy
add esp, 0xc
add ebx, 5
jmp 0x43036d
mov edx, dword [ebp - 0x27c]
lea eax, [ebp - 0x274]
push eax
push dword [ebp + 0xc]
mov ecx, edi
call fcn.00427e28
pop ecx
pop ecx
cmp eax, 0xffffffff
jne 0x4302ba
push 6
jmp 0x4305ed
cmp eax, 1
jne 0x4302d4
lea edx, [ebp - 0x274]
mov ecx, edi
call fcn.004284ac
test eax, eax
jne 0x4305ee
mov eax, dword [ebp - 0x274]
test eax, eax
je 0x4305be
mov eax, dword [eax]
mov dword [ebp - 0x278], eax
test eax, eax
je 0x4305be
cmp dword [eax + 4], 2
jne 0x43034c
mov byte [ebp - 0x25d], 1
lea ecx, [ebp - 0x25d]
mov edi, dword [eax + 0x18]
lea eax, [ebp - 0x25c]
push 4
pop ebx
sub edi, eax
lea eax, [ebx + edi]
mov al, byte [ebp + eax - 0x25c]
mov byte [ebp + ebx - 0x260], al
inc ebx
movzx eax, byte [ebx + ecx - 4]
push eax
push 0x486b7c
push esi
call fcn.00428725
add esp, 0xc
lea ecx, [ebp - 0x25d]
cmp ebx, 8
jl 0x430313
mov edi, dword [ebp - 0x280]
jmp 0x430353
and dword [ebp - 0x278], 0
mov edx, dword [ebp - 0x274]
mov ecx, esi
call fcn.00427f87
cmp dword [ebp - 0x278], 0
je 0x4305be
mov ecx, dword [ebp + 0xc]
mov eax, ecx
mov edx, dword [ebp - 0x264]
sar eax, 8
mov byte [ebp + ebx - 0x260], al
lea eax, [ebp - 0x26c]
mov byte [ebp + ebx - 0x25f], cl
add ebx, 2
push eax
lea eax, [ebp - 0x260]
mov ecx, edi
push ebx
push eax
call fcn.004289b6
add esp, 0xc
test eax, eax
jne 0x4305b7
cmp ebx, dword [ebp - 0x26c]
jne 0x4305b7
mov edx, dword [ebp - 0x264]
lea eax, [ebp - 0x270]
push eax
lea eax, [ebp - 0x260]
mov ecx, edi
push 0xa
push eax
call fcn.0042f92e
add esp, 0xc
test eax, eax
jne 0x43058a
cmp dword [ebp - 0x270], 0xa
jne 0x43058a
cmp byte [ebp - 0x260], 5
je 0x430401
push str.SOCKS5_reply_has_wrong_version__version_should_be_5.
jmp 0x4305e3
mov bl, byte [ebp - 0x25f]
mov al, byte [ebp - 0x25d]
test bl, bl
je 0x430540
cmp al, 1
jne 0x430464
movzx ecx, byte [ebp - 0x258]
movzx eax, bl
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, byte [ebp - 0x25c]
push eax
push str.Cant_complete_SOCKS5_connection_to__d._d._d._d:_d.___d_
push esi
call fcn.00428799
add esp, 0x20
jmp 0x4305eb
cmp al, 3
jne 0x430499
movzx ecx, byte [ebp - 0x258]
movzx eax, bl
push eax
movzx eax, byte [ebp - 0x257]
shl ecx, 8
or ecx, eax
push ecx
push dword [ebp - 0x27c]
push str.Cant_complete_SOCKS5_connection_to__s:_d.___d_
push esi
call fcn.00428799
add esp, 0x14
jmp 0x4305eb
cmp al, 4
jne 0x4305eb
movzx edx, byte [ebp - 0x258]
movzx ecx, byte [ebp - 0x257]
movzx eax, bl
push eax
mov eax, edx
shl eax, 8
or eax, ecx
push eax
movzx eax, byte [ebp - 0x24d]
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 - 0x259]
push ecx
push edx
push eax
movzx eax, byte [ebp - 0x25a]
push eax
movzx eax, byte [ebp - 0x25b]
push eax
movzx eax, byte [ebp - 0x25c]
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.00428799
add esp, 0x50
jmp 0x4305eb
cmp al, 3
jne 0x430550
movzx ebx, byte [ebp - 0x25c]
add ebx, 7
jmp 0x430557
cmp al, 4
jne 0x430591
push 0x16
pop ebx
cmp ebx, 0xa
jle 0x430591
mov edx, dword [ebp - 0x264]
lea eax, [ebp - 0x270]
push eax
sub ebx, 0xa
lea eax, [ebp - 0x256]
push ebx
push eax
mov ecx, edi
call fcn.0042f92e
add esp, 0xc
test eax, eax
jne 0x43058a
cmp ebx, dword [ebp - 0x270]
je 0x430591
push str.Failed_to_receive_SOCKS5_connect_request_ack.
jmp 0x4305e3
lea eax, [ebp - 0x280]
mov dword [ebp - 0x280], 1
push eax
push 0x8004667e
push dword [ebp - 0x264]
call dword [sym.imp.WS2_32.dll_ioctlsocket]
xor eax, eax
jmp 0x4305ee
push str.Failed_to_send_SOCKS5_connect_request.
jmp 0x4305e3
push dword [ebp - 0x27c]
push str.Failed_to_resolve___s__for_SOCKS5_connect.
push esi
call fcn.00428799
add esp, 0xc
jmp 0x4302b3
push str.Unable_to_receive_initial_SOCKS5_response.
jmp 0x4305e3
push str.Unable_to_send_initial_SOCKS5_request.
push esi
call fcn.00428799
pop ecx
pop ecx
push 7
pop eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0047259d
mov esp, ebp
pop ebp
ret