Function at 0x40df40
Capabilities:
Connect socket
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
push ebp
lea ebp, [esp - 0x104]
sub esp, 0x104
push 0xffffffffffffffff
push 0x422370
mov eax, dword fs:[0]
push eax
sub esp, 0xc
mov eax, dword [0x42e070]
xor eax, ebp
mov dword [ebp + 0x100], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov ebx, edx
mov eax, dword [ebp + 0x110]
mov esi, dword [ebp + 0x10c]
mov dword [ebp - 0x14], esi
mov dword [ebp - 0x18], ecx
mov dword [ebp - 4], 0
push 0x10
test eax, eax
jne 0x40dfa9
push ecx
push ebx
call sub.WS2_32.dll_connect
jmp 0x40e264
push eax
push ebx
call sub.WS2_32.dll_connect
test eax, eax
jne 0x40e264
push 0xff
push eax
lea eax, [ebp]
push eax
call fcn.00410d60
push 6
call fcn.00410b68
mov edi, eax
mov al, 2
mov byte [edi], 5
mov byte [edi + 1], al
mov byte [edi + 2], 0
mov byte [edi + 3], al
mov byte [edi + 4], 3
mov byte [edi + 5], 0
mov eax, dword [esi + 4]
add esp, 0x10
test eax, eax
jne 0x40dff8
push 0x3e8
jmp 0x40dff9
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0
push 6
push edi
push ebx
call sub.WS2_32.dll_send
push 0
push 0xff
lea ecx, [ebp]
push ecx
push ebx
call sub.WS2_32.dll_recv
push edi
call fcn.0040e6ce
add esp, 4
cmp byte [ebp], 5
je 0x40e034
mov eax, 0x2742
jmp 0x40e264
mov al, byte [ebp + 1]
test al, al
jne 0x40e0cf
push 0xc
call fcn.00410b68
mov esi, eax
xor eax, eax
mov dword [esi], eax
mov dword [esi + 4], eax
mov dword [esi + 8], eax
mov byte [esi + 2], al
mov eax, dword [ebp - 0x18]
add esp, 4
mov byte [esi], 5
mov byte [esi + 1], 1
mov byte [esi + 3], 3
mov byte [esi + 4], 1
mov edx, dword [eax + 4]
push 0
push 0xc
mov dword [edi + 5], edx
mov ax, word [eax + 2]
push esi
mov word [edi + 9], ax
push ebx
mov byte [esi + 0xb], 0
call sub.WS2_32.dll_send
push 0xff
lea ecx, [ebp]
push 0
push ecx
call fcn.00410d60
add esp, 0xc
push 0
push 0xff
lea edx, [ebp]
push edx
push ebx
call sub.WS2_32.dll_recv
push esi
call fcn.0040e6ce
add esp, 4
cmp byte [ebp], 5
jne 0x40e02a
mov al, byte [ebp + 1]
test al, al
jne 0x40e0cc
xor eax, eax
jmp 0x40e264
mov esi, dword [ebp - 0x14]
movsx ebx, al
push ebx
push str.retval__d
call fcn.0040f8d4
lea eax, [ebx - 1]
add esp, 8
mov dword [esi + 8], 1
cmp eax, 8
ja case.default.0x40e0f3
jmp dword [eax*4 + 0x40e28c]
lea edi, [esi + 0x116]
mov ecx, 9
mov esi, str.SOCKS:_general_SOCKS_server_failure
rep movsd dword es:[edi], dword [esi]
mov eax, ebx
jmp 0x40e264
lea edi, [esi + 0x116]
mov ecx, 0xa
mov esi, str.SOCKS:_connection_not_allowed_by_ruleset
rep movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
mov eax, ebx
jmp 0x40e264
lea edi, [esi + 0x116]
mov ecx, 6
mov esi, str.SOCKS:_Network_unreachable
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
mov eax, ebx
jmp 0x40e264
mov eax, dword [str.SOCKS:_Host_unreachable]
mov dword [esi + 0x116], eax
mov ecx, dword [0x42be14]
mov dword [esi + 0x11a], ecx
mov edx, dword [0x42be18]
mov dword [esi + 0x11e], edx
mov eax, dword [0x42be1c]
mov dword [esi + 0x122], eax
mov ecx, dword [0x42be20]
mov dword [esi + 0x126], ecx
mov edx, dword [0x42be24]
mov dword [esi + 0x12a], edx
mov eax, ebx
jmp 0x40e264
lea edi, [esi + 0x116]
mov ecx, 6
mov esi, str.SOCKS:_Connection_refused
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
mov eax, ebx
jmp 0x40e264
mov eax, dword [str.SOCKS:_TTL_expired]
mov dword [esi + 0x116], eax
mov ecx, dword [0x42be4c]
mov dword [esi + 0x11a], ecx
mov edx, dword [0x42be50]
mov dword [esi + 0x11e], edx
mov eax, dword [0x42be54]
mov dword [esi + 0x122], eax
mov cx, word [0x42be58]
mov word [esi + 0x126], cx
mov dl, byte [0x42be5a]
mov byte [esi + 0x128], dl
mov eax, ebx
jmp 0x40e264
lea edi, [esi + 0x116]
mov ecx, 7
mov esi, str.SOCKS:_Command_not_supported
rep movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
mov eax, ebx
jmp 0x40e264
lea edi, [esi + 0x116]
mov ecx, 8
mov esi, str.SOCKS:_Address_type_not_supported
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
mov eax, ebx
jmp 0x40e264
lea edi, [esi + 0x116]
mov ecx, 6
mov esi, str.SOCKS:_to_XFF_unassigned
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
mov eax, ebx
jmp 0x40e264
lea edi, [esi + 0x116]
mov ecx, 0x10
mov esi, str.SOCKS:_General_Failure_or_Failed_to_connect_destination_server.
rep movsd dword es:[edi], dword [esi]
mov eax, ebx
jmp 0x40e264
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x100]
xor ecx, ebp
call fcn.0040e6d9
add ebp, 0x104
mov esp, ebp
pop ebp
ret 8