Function at 0x100208ab
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28c
mov eax, dword [0x1013a420]
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 0x10020908
sub ecx, edx
cmp dword [ebp - 0x274], 0
mov dword [ebp - 0x284], ecx
jne 0x10020941
cmp ecx, 0xff
jbe 0x10020941
push ecx
push str.SOCKS5:_server_resolving_disabled_for_hostnames_of_length___255__actual_len_zu__n
push esi
call fcn.10018194
add esp, 0xc
mov dword [ebp - 0x274], 1
push 1
xor edx, edx
mov ecx, esi
call fcn.10016750
mov dword [ebp - 0x268], eax
pop ecx
test eax, eax
jns 0x1002096b
push str.Connection_time_out
push esi
call fcn.10018208
pop ecx
pop ecx
push 0x1c
jmp 0x1002105e
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.100301b6
pop ecx
pop ecx
cmp eax, 0xffffffff
jne 0x100209b7
push str.SOCKS5:_no_connection_here
push dword [edi]
jmp 0x10021055
test eax, eax
jne 0x100209c4
push str.SOCKS5:_connection_timeout
push dword [edi]
jmp 0x1002095d
test al, 4
je 0x100209cf
push str.SOCKS5:_error_occurred_during_connection
jmp 0x100209b0
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.10018425
add esp, 0xc
test eax, eax
jne 0x1002104f
movzx eax, byte [ebp - 0x25f]
add eax, 2
cmp dword [ebp - 0x26c], eax
jne 0x1002104f
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.100301b6
pop ecx
pop ecx
cmp eax, 0xffffffff
jne 0x10020a9b
push str.SOCKS5_nothing_to_read
jmp 0x100209b0
test eax, eax
jne 0x10020aa9
push str.SOCKS5_read_timeout
jmp 0x100209c0
test al, 4
je 0x10020ac2
push str.SOCKS5_read_error_occurred
push dword [edi]
call fcn.10018208
pop ecx
pop ecx
push 0x38
jmp 0x1002105e
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.100203a0
add esp, 0xc
test eax, eax
jne 0x10021048
cmp dword [ebp - 0x270], 2
jne 0x10021048
cmp byte [ebp - 0x260], 5
je 0x10020b29
push str.Received_invalid_version_in_initial_SOCKS5_response.
jmp 0x10021054
mov al, byte [ebp - 0x25f]
test al, al
je 0x10020cba
cmp al, 2
jne 0x10020c81
test ebx, ebx
je 0x10020b6f
mov edx, dword [ebp - 0x278]
test edx, edx
je 0x10020b6f
lea ecx, [ebx + 1]
mov al, byte [ebx]
inc ebx
test al, al
jne 0x10020b50
sub ebx, ecx
mov ecx, edx
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10020b5e
sub ecx, edx
mov dword [ebp - 0x268], ecx
jmp 0x10020b77
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 0x10020ba3
test ebx, ebx
je 0x10020ba3
push ebx
push eax
lea eax, [ebp - 0x25e]
push eax
call fcn.1003da60
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 0x10020be0
test ebx, ebx
je 0x10020be0
push ebx
push ecx
lea eax, [ebp + eax - 0x260]
push eax
call fcn.1003da60
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.10018425
add esp, 0xc
test eax, eax
jne 0x10020c77
mov eax, dword [ebp - 0x268]
cmp eax, dword [ebp - 0x26c]
jne 0x10020c77
lea eax, [ebp - 0x270]
mov edx, ebx
push eax
lea eax, [ebp - 0x260]
mov ecx, edi
push 2
push eax
call fcn.100203a0
add esp, 0xc
test eax, eax
jne 0x10020c6d
cmp dword [ebp - 0x270], 2
jne 0x10020c6d
mov al, byte [ebp - 0x25f]
test al, al
je 0x10020cba
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.10018208
add esp, 0x10
jmp 0x1002105c
push str.Unable_to_receive_SOCKS5_sub_negotiation_response.
jmp 0x10021054
push str.Failed_to_send_SOCKS5_sub_negotiation_request.
jmp 0x10021054
cmp al, 1
jne 0x10020c8f
push str.SOCKS5_GSSAPI_per_message_authentication_is_not_supported.
jmp 0x10021054
cmp al, 0xff
jne 0x10020cb0
test ebx, ebx
je 0x10020ca6
cmp byte [ebx], 0
je 0x10020ca6
push str.No_authentication_method_was_acceptable.
jmp 0x10021054
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 0x10021054
push str.Undocumented_SOCKS5_mode_attempted_to_be_used_by_server.
jmp 0x10021054
cmp dword [ebp - 0x274], 0
push 3
mov word [ebp - 0x260], 0x105
pop ebx
mov byte [ebp - 0x25e], 0
jne 0x10020d06
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 fcn.1003da60
add esp, 0xc
add ebx, 5
jmp 0x10020dde
mov edx, dword [ebp - 0x27c]
lea eax, [ebp - 0x274]
push eax
push dword [ebp + 0xc]
mov ecx, edi
call fcn.1001789a
pop ecx
pop ecx
cmp eax, 0xffffffff
jne 0x10020d2b
push 6
jmp 0x1002105e
cmp eax, 1
jne 0x10020d45
lea edx, [ebp - 0x274]
mov ecx, edi
call fcn.10017f1b
test eax, eax
jne 0x1002105f
mov eax, dword [ebp - 0x274]
test eax, eax
je 0x1002102f
mov eax, dword [eax]
mov dword [ebp - 0x278], eax
test eax, eax
je 0x1002102f
cmp dword [eax + 4], 2
jne 0x10020dbd
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 0x1013149c
push esi
call fcn.10018194
add esp, 0xc
lea ecx, [ebp - 0x25d]
cmp ebx, 8
jl 0x10020d84
mov edi, dword [ebp - 0x280]
jmp 0x10020dc4
and dword [ebp - 0x278], 0
mov edx, dword [ebp - 0x274]
mov ecx, esi
call fcn.100179f9
cmp dword [ebp - 0x278], 0
je 0x1002102f
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.10018425
add esp, 0xc
test eax, eax
jne 0x10021028
cmp ebx, dword [ebp - 0x26c]
jne 0x10021028
mov edx, dword [ebp - 0x264]
lea eax, [ebp - 0x270]
push eax
lea eax, [ebp - 0x260]
mov ecx, edi
push 0xa
push eax
call fcn.100203a0
add esp, 0xc
test eax, eax
jne 0x10020ffb
cmp dword [ebp - 0x270], 0xa
jne 0x10020ffb
cmp byte [ebp - 0x260], 5
je 0x10020e72
push str.SOCKS5_reply_has_wrong_version__version_should_be_5.
jmp 0x10021054
mov bl, byte [ebp - 0x25f]
mov al, byte [ebp - 0x25d]
test bl, bl
je 0x10020fb1
cmp al, 1
jne 0x10020ed5
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.10018208
add esp, 0x20
jmp 0x1002105c
cmp al, 3
jne 0x10020f0a
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.10018208
add esp, 0x14
jmp 0x1002105c
cmp al, 4
jne 0x1002105c
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.10018208
add esp, 0x50
jmp 0x1002105c
cmp al, 3
jne 0x10020fc1
movzx ebx, byte [ebp - 0x25c]
add ebx, 7
jmp 0x10020fc8
cmp al, 4
jne 0x10021002
push 0x16
pop ebx
cmp ebx, 0xa
jle 0x10021002
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.100203a0
add esp, 0xc
test eax, eax
jne 0x10020ffb
cmp ebx, dword [ebp - 0x270]
je 0x10021002
push str.Failed_to_receive_SOCKS5_connect_request_ack.
jmp 0x10021054
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 0x1002105f
push str.Failed_to_send_SOCKS5_connect_request.
jmp 0x10021054
push dword [ebp - 0x27c]
push str.Failed_to_resolve___s__for_SOCKS5_connect.
push esi
call fcn.10018208
add esp, 0xc
jmp 0x10020d24
push str.Unable_to_receive_initial_SOCKS5_response.
jmp 0x10021054
push str.Unable_to_send_initial_SOCKS5_request.
push esi
call fcn.10018208
pop ecx
pop ecx
push 7
pop eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.1003890f
mov esp, ebp
pop ebp
ret