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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x530
mov eax, dword [0x4635a0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [0x463cc0]
test eax, eax
push esi
push dword [0x463c1c]
mov esi, 0x45587e
cmovne esi, eax
call fcn.00401014
add esp, 4
cmp eax, 2
jne 0x405be5
push str.Error:_IPv6_addresses_are_not_supported_with_Socks4._n
call fcn.00401186
add esp, 4
or eax, 0xffffffff
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0044590e
mov esp, ebp
pop ebp
ret
push edi
push 1
call fcn.00401041
mov edi, eax
add esp, 4
cmp edi, 0xffffffff
jne 0x405c22
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
lea eax, [ebp - 0x4ac]
push edi
push eax
call fcn.00401037
add esp, 8
cmp dword [0x463c14], 0
je 0x405c69
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 - 0x214]
push 0x208
push eax
call fcn.004011b3
movzx eax, word [0x463c10]
add esp, 8
mov word [ebp - 0x214], 0x104
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov ecx, esi
mov word [ebp - 0x212], ax
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x405ca0
sub ecx, edx
cmp ecx, 0x200
jb 0x405cd8
push str.Error:_username_is_too_long._n
call fcn.00401186
add esp, 4
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
pop edi
or eax, 0xffffffff
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0044590e
mov esp, ebp
pop ebp
ret
lea edx, [ebp - 0x20c]
mov ecx, esi
sub edx, esi
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edx + ecx - 1], al
test al, al
jne 0x405ce2
lea ecx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x405cf2
push ebx
push 2
lea eax, [ebp - 0x530]
sub esi, ecx
push eax
lea eax, [ebp - 0x52c]
push eax
push 0
push dword [0x463c1c]
lea ebx, [esi + 1]
call fcn.004011e5
add esp, 0x14
test eax, eax
je 0x405dde
test byte [0x463ccc], 2
jne 0x405d5e
push dword [0x463c1c]
push str.Error:_Failed_to_resolve_host__s_locally._n
call fcn.00401186
add esp, 8
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
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
cmp dword [0x463c14], 0
je 0x405d7a
push dword [0x463c1c]
push str.Host__s_will_be_resolved_by_the_proxy._n
call fcn.00401186
add esp, 8
push str.0.0.0.1
call dword [sym.imp.WS2_32.dll_inet_addr]
mov edx, dword [0x463c1c]
mov ecx, edx
mov dword [ebp - 0x210], eax
lea esi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x405d96
sub ecx, esi
lea eax, [ecx + ebx]
cmp eax, 0x200
jb 0x405db3
push str.Error:_host_name_is_too_long._n
jmp 0x405e9d
lea esi, [ebp - 0x20c]
mov ecx, edx
add esi, ebx
sub esi, edx
nop
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [esi + ecx - 1], al
test al, al
jne 0x405dc0
lea ecx, [edx + 1]
mov al, byte [edx]
inc edx
test al, al
jne 0x405dd0
sub edx, ecx
inc ebx
add ebx, edx
jmp 0x405e26
cmp dword [0x463c14], 0
mov eax, dword [ebp - 0x528]
mov dword [ebp - 0x210], eax
je 0x405e26
push dword [0x463c1c]
call fcn.00401014
add esp, 4
cmp eax, 0xffffffff
jne 0x405e26
push dword [ebp - 0x528]
call dword [sym.imp.WS2_32.dll_inet_ntoa]
push eax
push dword [0x463c1c]
push str.Host__s_locally_resolved_to__s._n
call fcn.00401186
add esp, 0xc
push 0
lea eax, [ebx + 8]
push eax
lea eax, [ebp - 0x214]
push eax
push edi
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jns 0x405e72
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
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
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 8
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x4ac]
push eax
call fcn.004011ae
add esp, 0xc
test eax, eax
jns 0x405e92
push str.Error:_short_response_from_proxy._n
jmp 0x405e9d
cmp byte [ebp - 0xb], 0x5a
je 0x405ec0
push str.Proxy_connection_failed._n
call fcn.00401186
add esp, 4
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
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
mov ecx, dword [ebp - 4]
mov eax, edi
pop ebx
pop edi
xor ecx, ebp
pop esi
call fcn.0044590e
mov esp, ebp
pop ebp
ret