Function at 0x458028
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c0
mov eax, dword [0x4d3a00]
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.0045dbfd
add esp, 0xc
test eax, eax
jne 0x45844e
movzx eax, byte [ebp - 0x26b]
add eax, 2
cmp dword [ebp - 0x2b0], eax
jne 0x45844e
lea eax, [ebp - 0x2b4]
mov edx, ebx
push eax
lea eax, [ebp - 0x26c]
mov ecx, esi
push 2
push eax
call fcn.0045dcfd
add esp, 0xc
test eax, eax
jne 0x458447
cmp dword [ebp - 0x2b4], 2
jne 0x458447
cmp byte [ebp - 0x26c], 5
je 0x45810c
push str.Received_invalid_version_in_initial_SOCKS5_response.
jmp 0x458453
mov al, byte [ebp - 0x26b]
test al, al
je 0x45826b
cmp al, 2
jne 0x458232
push edi
call fcn.00483680
pop ecx
mov ecx, eax
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x2b8], ecx
test eax, eax
je 0x458147
push eax
call fcn.00483680
pop ecx
mov ecx, dword [ebp - 0x2b8]
jmp 0x458149
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.00481c00
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.00481c00
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.0045dbfd
add esp, 0xc
test eax, eax
jne 0x458228
cmp edi, dword [ebp - 0x2b0]
jne 0x458228
lea eax, [ebp - 0x2b4]
mov edx, ebx
push eax
lea eax, [ebp - 0x26c]
mov ecx, esi
push 2
push eax
call fcn.0045dcfd
add esp, 0xc
test eax, eax
jne 0x45821e
cmp dword [ebp - 0x2b4], 2
jne 0x45821e
mov al, byte [ebp - 0x26b]
test al, al
je 0x45826b
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.0045dab8
add esp, 0x10
mov eax, 0x468
jmp 0x45845f
push str.Unable_to_receive_SOCKS5_sub_negotiation_response.
jmp 0x458453
push str.Failed_to_send_SOCKS5_sub_negotiation_request.
jmp 0x458453
cmp al, 1
jne 0x458240
push str.SOCKS5_GSSAPI_per_message_authentication_is_not_supported.
jmp 0x458453
cmp al, 0xff
jne 0x458261
test edi, edi
je 0x458257
cmp byte [edi], 0
je 0x458257
push str.No_authentication_method_was_acceptable.
jmp 0x458453
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 0x458453
push str.Undocumented_SOCKS5_mode_attempted_to_be_used_by_server.
jmp 0x458453
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.00459dc4
pop ecx
pop ecx
cmp eax, 0xffffffff
je 0x45845c
cmp eax, 1
jne 0x4582a2
lea edx, [ebp - 0xc]
mov ecx, esi
call fcn.00468273
mov ebx, dword [ebp - 0xc]
test ebx, ebx
je 0x458433
mov edi, dword [ebx]
test edi, edi
je 0x458433
push 0x40
lea edx, [ebp - 0x2ac]
mov ecx, edi
call fcn.00459c8c
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.0047db99
add esp, 0x18
cmp eax, 4
jne 0x458316
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 0x458318
xor edi, edi
mov ecx, dword [esi]
mov edx, ebx
call fcn.00459f14
test edi, edi
je 0x458433
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.0045dbfd
add esp, 0xc
test eax, eax
jne 0x45842c
cmp dword [ebp - 0x2b0], ebx
jne 0x45842c
lea eax, [ebp - 0x2b4]
mov edx, edi
push eax
lea eax, [ebp - 0x26c]
mov ecx, esi
push ebx
push eax
call fcn.0045dcfd
add esp, 0xc
test eax, eax
jne 0x458425
cmp dword [ebp - 0x2b4], ebx
jne 0x458425
cmp byte [ebp - 0x26c], 5
je 0x4583b5
push str.SOCKS5_reply_has_wrong_version__version_should_be_5.
jmp 0x458453
mov al, byte [ebp - 0x26b]
test al, al
je 0x458404
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.0045dab8
add esp, 0x20
jmp 0x45845c
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 0x45845f
push str.Failed_to_receive_SOCKS5_connect_request_ack.
jmp 0x458453
push str.Failed_to_send_SOCKS5_connect_request.
jmp 0x458453
push dword [esi + 0x34]
push str.Failed_to_resolve___s__for_SOCKS5_connect.
push dword [esi]
call fcn.0045dab8
add esp, 0xc
jmp 0x45845c
push str.Unable_to_receive_initial_SOCKS5_response.
jmp 0x458453
push str.Unable_to_send_initial_SOCKS5_request.
push dword [esi]
call fcn.0045dab8
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.0047aabf
mov esp, ebp
pop ebp
ret