Function at 0x45145b
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.00457319
add esp, 0xc
test eax, eax
jne 0x451881
movzx eax, byte [ebp - 0x26b]
add eax, 2
cmp dword [ebp - 0x2b0], eax
jne 0x451881
lea eax, [ebp - 0x2b4]
mov edx, ebx
push eax
lea eax, [ebp - 0x26c]
mov ecx, esi
push 2
push eax
call fcn.00457419
add esp, 0xc
test eax, eax
jne 0x45187a
cmp dword [ebp - 0x2b4], 2
jne 0x45187a
cmp byte [ebp - 0x26c], 5
je 0x45153f
push str.Received_invalid_version_in_initial_SOCKS5_response.
jmp 0x451886
mov al, byte [ebp - 0x26b]
test al, al
je 0x45169e
cmp al, 2
jne 0x451665
push edi
call fcn.004c8000
pop ecx
mov ecx, eax
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x2b8], ecx
test eax, eax
je 0x45157a
push eax
call fcn.004c8000
pop ecx
mov ecx, dword [ebp - 0x2b8]
jmp 0x45157c
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.004beea0
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.004beea0
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.00457319
add esp, 0xc
test eax, eax
jne 0x45165b
cmp edi, dword [ebp - 0x2b0]
jne 0x45165b
lea eax, [ebp - 0x2b4]
mov edx, ebx
push eax
lea eax, [ebp - 0x26c]
mov ecx, esi
push 2
push eax
call fcn.00457419
add esp, 0xc
test eax, eax
jne 0x451651
cmp dword [ebp - 0x2b4], 2
jne 0x451651
mov al, byte [ebp - 0x26b]
test al, al
je 0x45169e
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.004571d4
add esp, 0x10
mov eax, 0x468
jmp 0x451892
push str.Unable_to_receive_SOCKS5_sub_negotiation_response.
jmp 0x451886
push str.Failed_to_send_SOCKS5_sub_negotiation_request.
jmp 0x451886
cmp al, 1
jne 0x451673
push str.SOCKS5_GSSAPI_per_message_authentication_is_not_supported.
jmp 0x451886
cmp al, 0xff
jne 0x451694
test edi, edi
je 0x45168a
cmp byte [edi], 0
je 0x45168a
push str.No_authentication_method_was_acceptable.
jmp 0x451886
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 0x451886
push str.Undocumented_SOCKS5_mode_attempted_to_be_used_by_server.
jmp 0x451886
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.00453195
pop ecx
pop ecx
cmp eax, 0xffffffff
je 0x45188f
cmp eax, 1
jne 0x4516d5
lea edx, [ebp - 0xc]
mov ecx, esi
call fcn.00461999
mov ebx, dword [ebp - 0xc]
test ebx, ebx
je 0x451866
mov edi, dword [ebx]
test edi, edi
je 0x451866
push 0x40
lea edx, [ebp - 0x2ac]
mov ecx, edi
call fcn.0045305d
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.004c1b2c
add esp, 0x18
cmp eax, 4
jne 0x451749
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 0x45174b
xor edi, edi
mov ecx, dword [esi]
mov edx, ebx
call fcn.004532e5
test edi, edi
je 0x451866
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.00457319
add esp, 0xc
test eax, eax
jne 0x45185f
cmp dword [ebp - 0x2b0], ebx
jne 0x45185f
lea eax, [ebp - 0x2b4]
mov edx, edi
push eax
lea eax, [ebp - 0x26c]
mov ecx, esi
push ebx
push eax
call fcn.00457419
add esp, 0xc
test eax, eax
jne 0x451858
cmp dword [ebp - 0x2b4], ebx
jne 0x451858
cmp byte [ebp - 0x26c], 5
je 0x4517e8
push str.SOCKS5_reply_has_wrong_version__version_should_be_5.
jmp 0x451886
mov al, byte [ebp - 0x26b]
test al, al
je 0x451837
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.004571d4
add esp, 0x20
jmp 0x45188f
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 0x451892
push str.Failed_to_receive_SOCKS5_connect_request_ack.
jmp 0x451886
push str.Failed_to_send_SOCKS5_connect_request.
jmp 0x451886
push dword [esi + 0x34]
push str.Failed_to_resolve___s__for_SOCKS5_connect.
push dword [esi]
call fcn.004571d4
add esp, 0xc
jmp 0x45188f
push str.Unable_to_receive_initial_SOCKS5_response.
jmp 0x451886
push str.Unable_to_send_initial_SOCKS5_request.
push dword [esi]
call fcn.004571d4
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.004bc45f
mov esp, ebp
pop ebp
ret