Function at 0x405fb0
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x788
mov eax, dword [0x4635a0]
xor eax, ebp
mov dword [ebp - 4], eax
movzx eax, word [0x463c10]
push edi
push eax
call dword [sym.imp.WS2_32.dll_htons]
movzx eax, ax
push 1
mov dword [ebp - 0x780], eax
call fcn.00401041
mov edi, eax
add esp, 4
cmp edi, 0xffffffff
jne 0x406016
call sub.WS2_32.dll_WSAGetLastError
push eax
call fcn.0041fbf0
push eax
push str.Proxy_connection_failed:__s._n
call fcn.00401186
add esp, 0xc
or eax, edi
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0044590e
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x6f0]
push edi
push eax
call fcn.00401037
add esp, 8
cmp dword [0x463c14], 0
je 0x40605d
push dword [0x463c08]
call fcn.0040109b
add esp, 4
movzx eax, ax
push eax
push dword [0x463c08]
call fcn.0040100a
add esp, 4
push eax
push str.Connected_to_proxy__s:_hu_n
call fcn.00401186
add esp, 0xc
lea eax, [ebp - 0x6f8]
push 5
push eax
call fcn.004011b3
add esp, 8
mov word [ebp - 0x6f8], 0x105
cmp dword [0x463cc0], 0
mov al, 1
mov byte [ebp - 0x6f6], 0
je 0x406098
mov al, 2
mov byte [ebp - 0x6f5], 2
mov byte [ebp - 0x6f7], al
movzx eax, al
push 0
add eax, 2
push eax
lea eax, [ebp - 0x6f8]
push eax
push edi
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jns 0x4060e5
call sub.WS2_32.dll_WSAGetLastError
push eax
call fcn.0041fbf0
push eax
push str.Error:_proxy_request:__s._n
call fcn.00401186
add esp, 0xc
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
or eax, 0xffffffff
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0044590e
mov esp, ebp
pop ebp
ret
push 2
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x6f0]
push eax
call fcn.004011ae
add esp, 0xc
test eax, eax
jns 0x406124
push str.Error:_malformed_first_response_from_proxy._n
call fcn.00401186
add esp, 4
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
or eax, 0xffffffff
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0044590e
mov esp, ebp
pop ebp
ret
cmp byte [ebp - 0xc], 5
je 0x406131
push str.Error:_got_wrong_server_version_in_response._n
jmp 0x406103
movzx eax, byte [ebp - 0xb]
push ebx
push esi
sub eax, 0
je 0x406297
sub eax, 2
je 0x406160
sub eax, 0xfd
je 0x406156
push str.Error:_proxy_selected_invalid_authentication_method._n
jmp 0x4064fd
push str.Error:_no_acceptable_authentication_method_proposed._n
jmp 0x4064fd
cmp dword [0x463c14], 0
je 0x406176
push str.Doing_username_and_password_authentication._n
call fcn.00401186
add esp, 4
mov esi, dword [0x463cc0]
test esi, esi
je 0x40614c
push 0x3a
push esi
call dword [sym.imp.MSVCR120.dll_strchr]
add esp, 8
test eax, eax
jne 0x40619a
push str.Error:_invalid_username:password_combo._n
jmp 0x4064fd
mov ecx, eax
sub ecx, esi
inc eax
mov ebx, eax
mov dword [ebp - 0x77c], ecx
mov dword [ebp - 0x784], eax
lea edx, [ebx + 1]
mov al, byte [ebx]
inc ebx
test al, al
jne 0x4061b0
sub ebx, edx
cmp ecx, 0xff
jbe 0x4061d8
push 0xff
push str.Error:_username_length_exceeds__d._n
call fcn.00401186
add esp, 8
jmp 0x406505
cmp ebx, 0xff
jbe 0x4061f7
push 0xff
push str.Error:_password_length_exceeds__d._n
call fcn.00401186
add esp, 8
jmp 0x406505
push ecx
lea eax, [ebp - 0x456]
mov byte [ebp - 0x458], 1
push esi
push eax
mov byte [ebp - 0x457], cl
call sub.MSVCR120.dll_memcpy
mov esi, dword [ebp - 0x77c]
lea eax, [ebp - 0x457]
push ebx
push dword [ebp - 0x784]
mov byte [ebp + esi - 0x456], bl
add esi, 2
add eax, esi
push eax
call sub.MSVCR120.dll_memcpy
add esp, 0x18
lea eax, [esi + 1]
add eax, ebx
push 0
push eax
lea eax, [ebp - 0x458]
push eax
push edi
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jns 0x40625e
push str.Error:_sending_proxy_authentication._n
jmp 0x4064fd
push 2
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x6f0]
push eax
call fcn.004011ae
add esp, 0xc
test eax, eax
jns 0x406281
push str.Error:_malformed_proxy_authentication_response._n
jmp 0x4064fd
cmp byte [ebp - 0xc], 1
jne 0x40628d
cmp byte [ebp - 0xb], 0
je 0x4062ad
push str.Error:_authentication_failed._n
jmp 0x4064fd
cmp dword [0x463c14], 0
je 0x4062ad
push str.No_authentication_needed._n
call fcn.00401186
add esp, 4
lea eax, [ebp - 0x254]
push 0x204
push eax
call fcn.004011b3
push dword [0x463c20]
lea eax, [ebp - 0x788]
mov word [ebp - 0x254], 0x105
push eax
lea eax, [ebp - 0x778]
mov byte [ebp - 0x252], 0
push eax
push 0
push dword [0x463c1c]
call fcn.004011e5
add esp, 0x1c
test eax, eax
je 0x406395
test byte [0x463ccc], 2
jne 0x40631b
push dword [0x463c1c]
push str.Error:_Failed_to_resolve_host__s_locally._n
call fcn.00401186
add esp, 8
jmp 0x406505
cmp dword [0x463c14], 0
je 0x406337
push dword [0x463c1c]
push str.Host__s_will_be_resolved_by_the_proxy._n
call fcn.00401186
add esp, 8
mov ecx, dword [0x463c1c]
mov ebx, ecx
mov byte [ebp - 0x251], 3
lea edx, [ebx + 1]
lea esp, [esp]
mov al, byte [ebx]
inc ebx
test al, al
jne 0x406350
sub ebx, edx
cmp ebx, 0xff
jbe 0x406378
push 0xff
push str.Error:_hostname_length_exceeds__d._n
call fcn.00401186
add esp, 8
jmp 0x406505
push ebx
push ecx
lea eax, [ebp - 0x24f]
mov byte [ebp - 0x250], bl
push eax
call sub.MSVCR120.dll_memcpy
add esp, 0xc
inc ebx
jmp 0x406423
movzx eax, word [ebp - 0x778]
sub eax, 2
je 0x4063bc
sub eax, 0x15
jne 0x406520
mov byte [ebp - 0x251], 4
lea esi, [ebp - 0x770]
lea ebx, [eax + 0x10]
jmp 0x4063ce
mov byte [ebp - 0x251], 1
lea esi, [ebp - 0x774]
mov ebx, 4
push ebx
lea eax, [ebp - 0x250]
push esi
push eax
call sub.MSVCR120.dll_memcpy
add esp, 0xc
cmp dword [0x463c14], 0
je 0x406423
push dword [0x463c1c]
call fcn.00401014
add esp, 4
cmp eax, 0xffffffff
jne 0x406423
push 0x41
lea eax, [ebp - 0x50]
push eax
movzx eax, word [ebp - 0x778]
push esi
push eax
call sub.WS2_32.dll_inet_ntop
push eax
push dword [0x463c1c]
push str.Host__s_locally_resolved_to__s._n
call fcn.00401186
add esp, 0xc
mov eax, dword [ebp - 0x780]
mov word [ebp + ebx - 0x250], ax
lea eax, [ebx + 6]
push 0
push eax
lea eax, [ebp - 0x254]
push eax
push edi
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jns 0x406467
call sub.WS2_32.dll_WSAGetLastError
push eax
call fcn.0041fbf0
push eax
push str.Error:_sending_proxy_request:__s._n
call fcn.00401186
add esp, 0xc
jmp 0x406505
push 2
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x6f0]
push eax
call fcn.004011ae
add esp, 0xc
test eax, eax
jns 0x406487
push str.Error:_malformed_second_response_from_proxy._n
jmp 0x4064fd
movsx eax, byte [ebp - 0xb]
cmp eax, 8
ja case.default.0x406490
jmp dword [eax*4 + 0x406530]
cmp dword [0x463c14], 0
je 0x4064ad
push str.connection_succeeded._n
call fcn.00401186
add esp, 4
pop esi
pop ebx
mov eax, edi
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0044590e
mov esp, ebp
pop ebp
ret
push str.Error:_general_SOCKS_server_failure._n
jmp 0x4064fd
push str.Error:_connection_not_allowed_by_ruleset._n
jmp 0x4064fd
push str.Error:_Network_unreachable._n
jmp 0x4064fd
push str.Error:_Host_unreachable._n
jmp 0x4064fd
push str.Error:_Connection_refused._n
jmp 0x4064fd
push str.Error:_TTL_expired._n
jmp 0x4064fd
push str.Error:_Command_not_supported._n
jmp 0x4064fd
push str.Error:_Address_type_not_supported._n
jmp 0x4064fd
push str.Error:_unassigned_value_in_the_reply._n
call fcn.00401186
add esp, 4
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
mov ecx, dword [ebp - 4]
or eax, 0xffffffff
pop esi
pop ebx
xor ecx, ebp
pop edi
call fcn.0044590e
mov esp, ebp
pop ebp
ret
push 0x455904
push str.assertion_failed:__s
call fcn.004010f0
nop
xchg edi, eax
inc eax
add al, al
inc eax
add bh, al
inc eax
add dh, cl
inc eax
add ch, dl
inc eax
add ah, bl
inc eax
add bl, ah
inc eax
add dl, ch
inc eax
add cl, dh
inc eax
add ah, cl
int3