Function at 0x4517da
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c0
mov eax, dword [0x52fe80]
xor eax, ebp
mov dword [ebp - 8], eax
and dword [ebp - 0x2b8], 0
lea eax, [ebp - 0x2b8]
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
push eax
push 0x8004667e
mov ebx, dword [esi + 0xa0]
mov edi, ecx
push ebx
mov dword [ebp - 0xc], edx
mov dword [ebp - 0x2c0], ebx
call dword [sym.imp.WS2_32.dll_ioctlsocket]
test edi, edi
mov byte [ebp - 0x26c], 5
lea ecx, [ebp - 0x2b0]
mov word [ebp - 0x26a], 0x200
setne al
mov edx, ebx
inc al
mov byte [ebp - 0x26b], al
movzx eax, al
push ecx
add eax, 2
mov ecx, esi
push eax
lea eax, [ebp - 0x26c]
push eax
call fcn.00457699
add esp, 0xc
test eax, eax
jne 0x451c00
movzx eax, byte [ebp - 0x26b]
add eax, 2
cmp dword [ebp - 0x2b0], eax
jne 0x451c00
lea eax, [ebp - 0x2b4]
mov edx, ebx
push eax
lea eax, [ebp - 0x26c]
mov ecx, esi
push 2
push eax
call fcn.00457799
add esp, 0xc
test eax, eax
jne 0x451bf9
cmp dword [ebp - 0x2b4], 2
jne 0x451bf9
cmp byte [ebp - 0x26c], 5
je 0x4518be
push str.Received_invalid_version_in_initial_SOCKS5_response.
jmp 0x451c05
mov al, byte [ebp - 0x26b]
test al, al
je 0x451a1d
cmp al, 2
jne 0x4519e4
push edi
call fcn.004c80b0
pop ecx
mov ecx, eax
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x2b8], ecx
test eax, eax
je 0x4518f9
push eax
call fcn.004c80b0
pop ecx
mov ecx, dword [ebp - 0x2b8]
jmp 0x4518fb
xor eax, eax
push ecx
mov dword [ebp - 0x2bc], eax
lea eax, [ebp - 0x26a]
push edi
push eax
mov byte [ebp - 0x26c], 1
mov byte [ebp - 0x26b], cl
call fcn.004bebf0
mov edi, dword [ebp - 0x2b8]
add esp, 0xc
mov eax, dword [ebp - 0x2bc]
mov edx, dword [ebp - 0xc]
push eax
mov byte [ebp + edi - 0x26a], al
add edi, 3
lea eax, [ebp - 0x26c]
push edx
add eax, edi
push eax
call fcn.004bebf0
add edi, dword [ebp - 0x2bc]
lea eax, [ebp - 0x2b0]
add esp, 0xc
mov edx, ebx
mov ecx, esi
push eax
lea eax, [ebp - 0x26c]
push edi
push eax
call fcn.00457699
add esp, 0xc
test eax, eax
jne 0x4519da
cmp edi, dword [ebp - 0x2b0]
jne 0x4519da
lea eax, [ebp - 0x2b4]
mov edx, ebx
push eax
lea eax, [ebp - 0x26c]
mov ecx, esi
push 2
push eax
call fcn.00457799
add esp, 0xc
test eax, eax
jne 0x4519d0
cmp dword [ebp - 0x2b4], 2
jne 0x4519d0
mov al, byte [ebp - 0x26b]
test al, al
je 0x451a1d
movzx eax, al
push eax
movzx eax, byte [ebp - 0x26c]
push eax
push str.User_was_rejected_by_the_SOCKS5_server___d__d_.
push dword [esi]
call fcn.00457554
add esp, 0x10
mov eax, 0x468
jmp 0x451c11
push str.Unable_to_receive_SOCKS5_sub_negotiation_response.
jmp 0x451c05
push str.Failed_to_send_SOCKS5_sub_negotiation_request.
jmp 0x451c05
cmp al, 1
jne 0x4519f2
push str.SOCKS5_GSSAPI_per_message_authentication_is_not_supported.
jmp 0x451c05
cmp al, 0xff
jne 0x451a13
test edi, edi
je 0x451a09
cmp byte [edi], 0
je 0x451a09
push str.No_authentication_method_was_acceptable.
jmp 0x451c05
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 0x451c05
push str.Undocumented_SOCKS5_mode_attempted_to_be_used_by_server.
jmp 0x451c05
mov edx, dword [esi + 0x34]
lea eax, [ebp - 0xc]
push eax
movzx eax, word [esi + 0x58]
mov ecx, esi
push eax
mov dword [ebp - 0x26c], 0x1000105
call fcn.00453515
pop ecx
pop ecx
cmp eax, 0xffffffff
je 0x451c0e
cmp eax, 1
jne 0x451a54
lea edx, [ebp - 0xc]
mov ecx, esi
call fcn.00461d1c
mov ebx, dword [ebp - 0xc]
test ebx, ebx
je 0x451be5
mov edi, dword [ebx]
test edi, edi
je 0x451be5
push 0x40
lea edx, [ebp - 0x2ac]
mov ecx, edi
call fcn.004533dd
pop ecx
lea eax, [ebp - 0xa]
push eax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0xe]
push eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x2ac]
push str._hu._hu._hu._hu
push eax
call fcn.004c187d
add esp, 0x18
cmp eax, 4
jne 0x451ac8
mov al, byte [ebp - 0x10]
mov byte [ebp - 0x268], al
mov al, byte [ebp - 0xe]
mov byte [ebp - 0x267], al
mov al, byte [ebp - 0xc]
mov byte [ebp - 0x266], al
mov al, byte [ebp - 0xa]
mov byte [ebp - 0x265], al
jmp 0x451aca
xor edi, edi
mov ecx, dword [esi]
mov edx, ebx
call fcn.00453665
test edi, edi
je 0x451be5
movzx eax, word [esi + 0x58]
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov edi, dword [ebp - 0x2c0]
mov ecx, esi
mov word [ebp - 0x264], ax
mov edx, edi
lea eax, [ebp - 0x2b0]
push eax
push 0xa
pop ebx
lea eax, [ebp - 0x26c]
push ebx
push eax
call fcn.00457699
add esp, 0xc
test eax, eax
jne 0x451bde
cmp dword [ebp - 0x2b0], ebx
jne 0x451bde
lea eax, [ebp - 0x2b4]
mov edx, edi
push eax
lea eax, [ebp - 0x26c]
mov ecx, esi
push ebx
push eax
call fcn.00457799
add esp, 0xc
test eax, eax
jne 0x451bd7
cmp dword [ebp - 0x2b4], ebx
jne 0x451bd7
cmp byte [ebp - 0x26c], 5
je 0x451b67
push str.SOCKS5_reply_has_wrong_version__version_should_be_5.
jmp 0x451c05
mov al, byte [ebp - 0x26b]
test al, al
je 0x451bb6
movzx eax, al
push eax
push dword [ebp - 0x264]
call dword [sym.imp.WS2_32.dll_ntohs]
movzx eax, ax
push eax
movzx eax, byte [ebp - 0x265]
push eax
movzx eax, byte [ebp - 0x266]
push eax
movzx eax, byte [ebp - 0x267]
push eax
movzx eax, byte [ebp - 0x268]
push eax
push str.Cant_complete_SOCKS5_connection_to__d._d._d._d:_d.___d_
push dword [esi]
call fcn.00457554
add esp, 0x20
jmp 0x451c0e
lea eax, [ebp - 0x2c0]
mov dword [ebp - 0x2c0], 1
push eax
push 0x8004667e
push edi
call dword [sym.imp.WS2_32.dll_ioctlsocket]
xor eax, eax
jmp 0x451c11
push str.Failed_to_receive_SOCKS5_connect_request_ack.
jmp 0x451c05
push str.Failed_to_send_SOCKS5_connect_request.
jmp 0x451c05
push dword [esi + 0x34]
push str.Failed_to_resolve___s__for_SOCKS5_connect.
push dword [esi]
call fcn.00457554
add esp, 0xc
jmp 0x451c0e
push str.Unable_to_receive_initial_SOCKS5_response.
jmp 0x451c05
push str.Unable_to_send_initial_SOCKS5_request.
push dword [esi]
call fcn.00457554
pop ecx
pop ecx
xor eax, eax
inc eax
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004bc1bd
mov esp, ebp
pop ebp
ret