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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x394
mov eax, dword [0x4635a0]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
xor esi, esi
push 1
mov dword [ebp - 0x364], esi
mov dword [ebp - 0x368], esi
call fcn.00401041
mov edi, eax
add esp, 4
cmp edi, 0xffffffff
jne 0x40559f
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
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0044590e
mov esp, ebp
pop ebp
ret
push ebx
push dword [0x463c20]
lea eax, [ebp - 0x37c]
push eax
lea eax, [ebp - 0xc8]
push eax
push 0
push dword [0x463c1c]
call fcn.004011e5
mov ebx, dword [sym.imp.MSVCR120.dll_free]
add esp, 0x14
test eax, eax
je 0x405614
test byte [0x463ccc], 2
jne 0x4055ec
push dword [0x463c1c]
push str.Error:_Failed_to_resolve_host__s_locally._n
call fcn.00401186
jmp 0x405997
cmp dword [0x463c14], esi
je 0x405607
push dword [0x463c1c]
push str.Host__s_will_be_resolved_by_the_proxy._n
call fcn.00401186
add esp, 8
mov eax, dword [0x463c1c]
mov dword [ebp - 0x36c], eax
jmp 0x405681
movzx ecx, word [ebp - 0xc8]
mov eax, ecx
sub eax, 2
je 0x405633
sub eax, 0x15
jne 0x405a32
lea eax, [ebp - 0xc0]
jmp 0x405639
lea eax, [ebp - 0xc4]
push 0x41
lea edx, [ebp - 0x48]
push edx
push eax
push ecx
call sub.WS2_32.dll_inet_ntop
lea eax, [ebp - 0x48]
mov dword [ebp - 0x36c], eax
cmp dword [0x463c14], esi
je 0x405681
push dword [0x463c1c]
call fcn.00401014
add esp, 4
cmp eax, 0xffffffff
jne 0x405681
lea eax, [ebp - 0x48]
push eax
push dword [0x463c1c]
push str.Host__s_locally_resolved_to__s._n
call fcn.00401186
add esp, 0xc
lea eax, [ebp - 0x370]
push eax
movzx eax, word [0x463c10]
push eax
push dword [ebp - 0x36c]
call fcn.004066c0
add esp, 0xc
mov esi, eax
push 0
push dword [ebp - 0x370]
push esi
push edi
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jns 0x4056d2
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 0x40599a
push esi
call ebx
lea eax, [ebp - 0x360]
xor esi, esi
push edi
push eax
call fcn.00401037
lea eax, [ebp - 0x364]
push eax
lea eax, [ebp - 0x360]
push eax
call fcn.00401221
add esp, 0x14
test eax, eax
je 0x405710
push str.Error_reading_proxy_response_Status_Line._n
call fcn.00401186
add esp, 4
jmp 0x40599a
push dword [ebp - 0x364]
call fcn.0040121c
add esp, 4
mov ebx, eax
cmp dword [0x463c18], esi
je 0x405736
push ebx
push str.Proxy_returned_status_code__d._n
call fcn.004011ea
add esp, 8
push dword [ebp - 0x364]
mov eax, dword [sym.imp.MSVCR120.dll_free]
call eax
lea eax, [ebp - 0x368]
mov dword [ebp - 0x364], esi
push eax
lea eax, [ebp - 0x360]
push eax
call fcn.00401064
add esp, 0xc
test eax, eax
jne 0x405969
cmp ebx, 0x197
jne 0x40597e
cmp dword [0x463cc0], esi
je 0x405986
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
push dword [ebp - 0x368]
lea eax, [ebp - 0x374]
push eax
call fcn.0040104b
add esp, 8
test eax, eax
je 0x4057ae
push str.Error_parsing_proxy_response_header._n
call fcn.00401186
jmp 0x4059a8
push dword [ebp - 0x368]
mov ebx, dword [sym.imp.MSVCR120.dll_free]
call ebx
lea eax, [ebp - 0x394]
mov dword [ebp - 0x368], esi
push eax
push dword [ebp - 0x374]
call fcn.00401087
add esp, 0xc
test eax, eax
jne 0x4057f8
push str.Error_getting_Proxy_Authenticate_challenge._n
call fcn.00401186
push dword [ebp - 0x374]
call fcn.00401055
add esp, 8
jmp 0x4059ab
push dword [ebp - 0x374]
call fcn.00401055
push 1
call fcn.00401041
mov edi, eax
add esp, 8
cmp edi, 0xffffffff
jne 0x405832
call sub.WS2_32.dll_WSAGetLastError
push eax
call fcn.0041fbf0
push eax
push str.Proxy_reconnection_failed:__s._n
call fcn.00401186
add esp, 0xc
jmp 0x4059ab
lea eax, [ebp - 0x394]
push eax
lea eax, [ebp - 0x370]
push eax
movzx eax, word [0x463c10]
push eax
push dword [ebp - 0x36c]
call fcn.00406730
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x405877
push str.Error_building_Proxy_Authorization_header._n
call fcn.00401186
lea eax, [ebp - 0x394]
push eax
call fcn.0040105a
jmp 0x405997
cmp dword [0x463c18], 0
je 0x40588e
push esi
push str.Reconnection_header:_n_s
call fcn.004011ea
add esp, 8
push 0
push dword [ebp - 0x370]
push esi
push edi
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jns 0x4058cc
call sub.WS2_32.dll_WSAGetLastError
push eax
call fcn.0041fbf0
push eax
push str.Error_sending_proxy_request:__s._n
call fcn.00401186
lea eax, [ebp - 0x394]
push eax
call fcn.0040105a
add esp, 0x10
jmp 0x40599a
push esi
call ebx
lea eax, [ebp - 0x394]
xor esi, esi
push eax
call fcn.0040105a
lea eax, [ebp - 0x360]
push edi
push eax
call fcn.00401037
lea eax, [ebp - 0x364]
push eax
lea eax, [ebp - 0x360]
push eax
call fcn.00401221
add esp, 0x18
test eax, eax
je 0x405916
push str.Error_reading_proxy_response_Status_Line._n
call fcn.00401186
add esp, 4
jmp 0x40599a
push dword [ebp - 0x364]
call fcn.0040121c
add esp, 4
mov ebx, eax
cmp dword [0x463c18], esi
je 0x40593c
push ebx
push str.Proxy_returned_status_code__d._n
call fcn.004011ea
add esp, 8
push dword [ebp - 0x364]
mov eax, dword [sym.imp.MSVCR120.dll_free]
call eax
lea eax, [ebp - 0x368]
mov dword [ebp - 0x364], esi
push eax
lea eax, [ebp - 0x360]
push eax
call fcn.00401064
add esp, 0xc
test eax, eax
je 0x40597e
push str.Error_reading_proxy_response_header._n
call fcn.00401186
mov ebx, dword [sym.imp.MSVCR120.dll_free]
add esp, 4
jmp 0x40599a
cmp ebx, 0xc8
je 0x4059e5
push ebx
push str.Proxy_returned_status_code__d._n
call fcn.00401186
mov ebx, dword [sym.imp.MSVCR120.dll_free]
add esp, 8
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
test esi, esi
je 0x4059ab
push esi
call ebx
add esp, 4
mov eax, dword [ebp - 0x364]
mov ebx, dword [sym.imp.MSVCR120.dll_free]
test eax, eax
je 0x4059c1
push eax
call ebx
add esp, 4
mov eax, dword [ebp - 0x368]
test eax, eax
je 0x4059d1
push eax
call ebx
add esp, 4
pop ebx
pop edi
or eax, 0xffffffff
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0044590e
mov esp, ebp
pop ebp
ret
push dword [ebp - 0x368]
call dword [sym.imp.MSVCR120.dll_free]
lea eax, [ebp - 0x378]
mov dword [ebp - 0x368], 0
push eax
lea eax, [ebp - 0x360]
push eax
call fcn.0040118b
push dword [ebp - 0x378]
push eax
push 1
call fcn.004011a9
mov ecx, dword [ebp - 4]
add esp, 0x18
mov eax, edi
xor ecx, ebp
pop ebx
pop edi
pop esi
call fcn.0044590e
mov esp, ebp
pop ebp
ret
push 0x455904
push str.assertion_failed:__s
call fcn.004010f0
int3