Function at 0x405b40
Capabilities:
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x45a986
mov eax, dword fs:[0]
push eax
sub esp, 0x260
mov eax, dword [0x479520]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [ebp - 0x260], ebx
mov esi, dword [ebp + 0xc]
mov edi, dword [ebp + 0x10]
mov dword [ebp - 0x264], esi
call fcn.00418791
mov ecx, eax
test ecx, ecx
je 0x405ec7
mov eax, dword [ecx]
call dword [eax + 0xc]
mov dword [ebp - 0x268], eax
lea ecx, [eax + 0x10]
mov dword [ebp - 0x26c], ecx
push 0x168
lea eax, [ebp - 0x240]
mov dword [ebp - 4], 0
push 0
push eax
call fcn.0043b130
mov ecx, dword [esi + 4]
add esp, 0xc
mov byte [ebp - 0x255], 0
test ecx, ecx
jne 0x405c41
cmp dword [edi + 0x2c], ecx
je 0x405c2a
push dword [esi]
lea ecx, [ebp - 0x25c]
mov bl, 1
call fcn.00403400
lea edx, [ebp - 0x240]
mov ecx, dword [eax]
sub edx, ecx
nop
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edx + ecx - 1], al
test al, al
jne 0x405bf0
mov edx, dword [ebp - 0x25c]
or eax, 0xffffffff
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x405c1b
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push str.0.0.0.1
call dword [sym.imp.WS2_32.dll_inet_addr]
mov ecx, eax
jmp 0x405c47
push str._nError:_could_not_resolve_a_hostname_through_SOCKS_4_proxy_server.
push 1
push ebx
call fcn.0040d4d0
mov ecx, str._n_tPlease_enable_SOCKS_4a_extension_or_specify_the_IP_address_of_the_target_host.
jmp 0x405e70
mov bl, byte [ebp - 0x255]
mov al, byte [esi + 9]
mov byte [ebp - 0x72], al
mov al, byte [esi + 8]
mov esi, dword [edi + 0x10]
mov word [ebp - 0x74], 0x104
mov byte [ebp - 0x71], al
mov dword [ebp - 0x70], ecx
call fcn.00418791
mov ecx, eax
test ecx, ecx
je 0x405ed1
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x25c], eax
push esi
lea ecx, [ebp - 0x25c]
mov byte [ebp - 4], 1
call fcn.004037c0
test al, al
jne 0x405c9c
push esi
lea ecx, [ebp - 0x25c]
call fcn.00403880
mov byte [ebp - 4], 0
mov eax, dword [edi + 0x10]
mov esi, dword [ebp - 0x25c]
mov eax, dword [eax - 0xc]
inc eax
push eax
lea eax, [ebp - 0x6c]
push esi
push eax
call fcn.0043a630
add esp, 0xc
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x405cd3
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [edi + 0x10]
mov edi, dword [eax - 0xc]
add edi, 9
test bl, bl
je 0x405d15
lea esi, [ebp - 0x240]
lea ecx, [esi + 1]
nop dword [eax]
mov al, byte [esi]
inc esi
test al, al
jne 0x405cf0
sub esi, ecx
lea eax, [esi + 1]
push eax
lea eax, [ebp - 0x240]
push eax
lea eax, [ebp - 0x74]
add eax, edi
push eax
call fcn.0043a630
inc edi
add esp, 0xc
add edi, esi
mov ebx, dword [ebp + 8]
xor esi, esi
test edi, edi
jle 0x405d3f
nop
push 0
mov eax, edi
sub eax, esi
push eax
lea eax, [ebp - 0x74]
add eax, esi
push eax
push ebx
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
je 0x405d73
add esi, eax
cmp esi, edi
jl 0x405d20
mov edi, dword [sym.imp.WS2_32.dll_recv]
xor esi, esi
push 0
mov eax, 8
sub eax, esi
push eax
lea eax, [ebp - 0xd8]
add eax, esi
push eax
push ebx
call edi
test eax, eax
je 0x405e58
cmp eax, 0xffffffff
je 0x405d92
add esi, eax
cmp esi, 8
jl 0x405d47
jmp 0x405da0
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
je 0x405d3f
mov ebx, dword [ebp - 0x260]
mov eax, 1
mov ecx, str._nError_:_connection_to_the_proxy_server_was_closed_unexpectedly.
jmp 0x405e78
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
jne 0x405e58
mov al, byte [ebp - 0xd7]
cmp al, 0x5a
je 0x405e51
mov edi, dword [ebp - 0x260]
movsx esi, al
mov eax, 4
sub esi, 0x5a
mov dword [ebp - 0x254], str.request_granted
cmp esi, eax
mov dword [ebp - 0x250], str.request_rejected_or_failed
mov dword [ebp - 0x24c], str.request_rejected_becasue_SOCKS_server_cannot_connect_to_identd_on_the_client
cmovg esi, eax
mov dword [ebp - 0x248], str.request_rejected_because_the_client_program_and_identd_report_different_user_ids
mov eax, dword [ebp - 0x264]
mov dword [ebp - 0x244], str.unknow_error
push dword [eax + 8]
push dword [eax]
push str._nError_:_the_proxy_server_cannot_establish_connection_to__s:_d
push 1
push edi
call fcn.0040d4d0
push dword [ebp + esi*4 - 0x254]
movsx eax, byte [ebp - 0xd7]
push eax
push str._n_tError___d___s_.
push 3
push edi
call fcn.0040d4d0
add esp, 0x28
cmp esi, 1
jne 0x405e83
push str._n_tPlease_confirm_that_the_target_host_address_is_correct.
push 3
push edi
call fcn.0040d4d0
push str._n_tThe_error_may_also_indicate_that_the_proxy_server_is_not_operating_properly.
push 3
push edi
call fcn.0040d4d0
add esp, 0x18
jmp 0x405e83
mov esi, 1
jmp 0x405e85
mov ebx, dword [ebp - 0x260]
push str._nError_:_connection_to_the_proxy_server_was_closed_unexpectedly.
push 1
push ebx
call fcn.0040d4d0
mov ecx, str._n_tPlease_make_sure_that_the_proxy_server_protocol_and_address_are_correct.
mov eax, 3
add esp, 0xc
push ecx
push eax
push ebx
call fcn.0040d4d0
add esp, 0xc
xor esi, esi
mov edi, dword [ebp - 0x268]
or eax, 0xffffffff
mov dword [ebp - 4], 0xffffffff
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x405ea7
mov ecx, dword [edi]
push edi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00438a38
mov esp, ebp
pop ebp
ret 0xc
push 0x80004005
call fcn.00402150
push 0x80004005
call fcn.00402150
int3