Function at 0x451531
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c0
mov eax, dword [0x52de80]
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.004573ef
add esp, 0xc
test eax, eax
jne 0x451957
movzx eax, byte [ebp - 0x26b]
add eax, 2
cmp dword [ebp - 0x2b0], eax
jne 0x451957
lea eax, [ebp - 0x2b4]
mov edx, ebx
push eax
lea eax, [ebp - 0x26c]
mov ecx, esi
push 2
push eax
call fcn.004574ef
add esp, 0xc
test eax, eax
jne 0x451950
cmp dword [ebp - 0x2b4], 2
jne 0x451950
cmp byte [ebp - 0x26c], 5
je 0x451615
push str.Received_invalid_version_in_initial_SOCKS5_response.
jmp 0x45195c
mov al, byte [ebp - 0x26b]
test al, al
je 0x451774
cmp al, 2
jne 0x45173b
push edi
call fcn.004c7cb0
pop ecx
mov ecx, eax
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x2b8], ecx
test eax, eax
je 0x451650
push eax
call fcn.004c7cb0
pop ecx
mov ecx, dword [ebp - 0x2b8]
jmp 0x451652
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.004beb50
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.004beb50
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.004573ef
add esp, 0xc
test eax, eax
jne 0x451731
cmp edi, dword [ebp - 0x2b0]
jne 0x451731
lea eax, [ebp - 0x2b4]
mov edx, ebx
push eax
lea eax, [ebp - 0x26c]
mov ecx, esi
push 2
push eax
call fcn.004574ef
add esp, 0xc
test eax, eax
jne 0x451727
cmp dword [ebp - 0x2b4], 2
jne 0x451727
mov al, byte [ebp - 0x26b]
test al, al
je 0x451774
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.004572aa
add esp, 0x10
mov eax, 0x468
jmp 0x451968
push str.Unable_to_receive_SOCKS5_sub_negotiation_response.
jmp 0x45195c
push str.Failed_to_send_SOCKS5_sub_negotiation_request.
jmp 0x45195c
cmp al, 1
jne 0x451749
push str.SOCKS5_GSSAPI_per_message_authentication_is_not_supported.
jmp 0x45195c
cmp al, 0xff
jne 0x45176a
test edi, edi
je 0x451760
cmp byte [edi], 0
je 0x451760
push str.No_authentication_method_was_acceptable.
jmp 0x45195c
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 0x45195c
push str.Undocumented_SOCKS5_mode_attempted_to_be_used_by_server.
jmp 0x45195c
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.0045326b
pop ecx
pop ecx
cmp eax, 0xffffffff
je 0x451965
cmp eax, 1
jne 0x4517ab
lea edx, [ebp - 0xc]
mov ecx, esi
call fcn.00461a70
mov ebx, dword [ebp - 0xc]
test ebx, ebx
je 0x45193c
mov edi, dword [ebx]
test edi, edi
je 0x45193c
push 0x40
lea edx, [ebp - 0x2ac]
mov ecx, edi
call fcn.00453133
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.004c17dc
add esp, 0x18
cmp eax, 4
jne 0x45181f
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 0x451821
xor edi, edi
mov ecx, dword [esi]
mov edx, ebx
call fcn.004533bb
test edi, edi
je 0x45193c
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.004573ef
add esp, 0xc
test eax, eax
jne 0x451935
cmp dword [ebp - 0x2b0], ebx
jne 0x451935
lea eax, [ebp - 0x2b4]
mov edx, edi
push eax
lea eax, [ebp - 0x26c]
mov ecx, esi
push ebx
push eax
call fcn.004574ef
add esp, 0xc
test eax, eax
jne 0x45192e
cmp dword [ebp - 0x2b4], ebx
jne 0x45192e
cmp byte [ebp - 0x26c], 5
je 0x4518be
push str.SOCKS5_reply_has_wrong_version__version_should_be_5.
jmp 0x45195c
mov al, byte [ebp - 0x26b]
test al, al
je 0x45190d
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.004572aa
add esp, 0x20
jmp 0x451965
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 0x451968
push str.Failed_to_receive_SOCKS5_connect_request_ack.
jmp 0x45195c
push str.Failed_to_send_SOCKS5_connect_request.
jmp 0x45195c
push dword [esi + 0x34]
push str.Failed_to_resolve___s__for_SOCKS5_connect.
push dword [esi]
call fcn.004572aa
add esp, 0xc
jmp 0x451965
push str.Unable_to_receive_initial_SOCKS5_response.
jmp 0x45195c
push str.Unable_to_send_initial_SOCKS5_request.
push dword [esi]
call fcn.004572aa
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.004bc11d
mov esp, ebp
pop ebp
ret