Function at 0x513ed0
Capabilities:
Receive data
Receive data on socket

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x5d3958
push eax
mov dword fs:[0], esp
push ebx
push ebp
mov ebp, dword [esp + 0x18]
push esi
mov esi, ecx
mov ebx, 5
push edi
mov eax, dword [esi + 0x20]
cmp eax, ebx
jge 0x513f6e
mov ecx, ebx
push 0
sub ecx, eax
lea edx, [eax + esi + 0x18]
push ecx
push edx
push ebp
call sub.WSOCK32.dll_recv
mov edi, eax
push str.recv_socks5_connect_reply
push edi
mov ecx, esi
call fcn.00513450
test eax, eax
jne 0x51414f
mov ecx, dword [esi + 0x20]
add ecx, edi
mov eax, ecx
mov dword [esi + 0x20], ecx
cmp eax, ebx
jge 0x513f3c
mov eax, 0x2733
jmp 0x51414f
cmp byte [esi + 0x1b], 1
jne 0x513f47
mov dword [esi + 0x28], ebx
jmp 0x513f51
movsx eax, byte [esi + 0x1c]
add eax, 2
mov dword [esi + 0x28], eax
mov ecx, dword [esi + 0x28]
push ecx
call fcn.005a9fe9
add esp, 4
mov dword [esi + 0x2c], eax
test eax, eax
jne 0x513f6e
mov eax, 0x753b
jmp 0x51414f
mov al, byte [esi + 0x19]
test al, al
jne 0x51403e
cmp byte [esi + 0x18], bl
jne 0x51403e
mov eax, dword [esi + 0x24]
mov edx, dword [esi + 0x28]
sub edx, eax
push 0
push edx
mov edx, dword [esi + 0x2c]
add eax, edx
push eax
push ebp
call sub.WSOCK32.dll_recv
mov edi, eax
push str.recv_socks5_connect_reply
push edi
mov ecx, esi
call fcn.00513450
test eax, eax
jne 0x51414f
mov edx, dword [esi + 0x24]
mov ecx, dword [esi + 0x28]
add edx, edi
mov eax, edx
mov dword [esi + 0x24], edx
cmp eax, ecx
jge 0x513fcb
mov eax, 0x2733
jmp 0x51414f
push str.socks5:_connect_reply_OK_n
mov ecx, esi
call fcn.005133a0
mov eax, dword [esp + 0x24]
test eax, eax
je 0x514037
mov edi, dword [esp + 0x28]
mov al, byte [esi + 0x1c]
mov byte [edi], al
mov edx, dword [esi + 0x2c]
lea ecx, [edi + 1]
mov ax, word [edx]
mov word [ecx], ax
mov dl, byte [edx + 2]
mov byte [ecx + 2], dl
mov eax, dword [edi]
test eax, eax
jne 0x514029
mov eax, dword [esi + 0xd4]
lea ecx, [esp + 0x24]
push 1
push ecx
mov eax, dword [eax + 0x130]
mov ecx, esi
push eax
call fcn.00513530
test eax, eax
jne 0x51414f
mov edx, dword [esp + 0x24]
mov dword [edi], edx
mov eax, dword [esi + 0x2c]
mov edx, dword [esp + 0x2c]
mov cx, word [eax + 3]
mov word [edx], cx
xor eax, eax
jmp 0x51414f
mov eax, dword [0x68d01c]
mov dword [esp + 0x20], eax
mov eax, dword [esi + 0xa4]
mov dword [esp + 0x18], 0
test eax, eax
je 0x51405d
mov eax, dword [eax]
jmp 0x514065
mov ecx, dword [esi + 0xa0]
mov eax, dword [ecx]
mov ecx, dword [esi + 0x30]
test ecx, ecx
je 0x5140e3
cmp byte [esi + 0x18], bl
jne 0x5140e3
mov edx, dword [0x692c80]
push eax
lea eax, [esp + 0x24]
push edx
push eax
call fcn.005a6a18
mov ecx, dword [esp + 0x2c]
add esp, 0xc
push 1
push ecx
mov ecx, esi
call fcn.005132d0
mov edx, dword [esp + 0x20]
mov ecx, dword [esi + 0x8c]
push edx
call fcn.00518410
movsx eax, byte [esi + 0x19]
mov ecx, dword [esi + 0x30]
push eax
push ecx
lea edx, [esp + 0x28]
push str.Error_code___ld__socks_ret_code___d_n
push edx
call fcn.005a6a18
mov eax, dword [esp + 0x30]
add esp, 0x10
mov ecx, esi
push eax
call fcn.005133a0
mov esi, dword [esi + 0x30]
lea ecx, [esp + 0x20]
mov dword [esp + 0x18], 0xffffffff
call fcn.005adc4d
mov eax, esi
jmp 0x51414f
mov ecx, dword [0x69207c]
push eax
lea edx, [esp + 0x24]
push ecx
push edx
call fcn.005a6a18
mov eax, dword [esp + 0x2c]
add esp, 0xc
mov ecx, esi
push 1
push eax
call fcn.005132d0
mov ecx, dword [esp + 0x20]
push ecx
mov ecx, dword [esi + 0x8c]
call fcn.00518410
movsx edx, byte [esi + 0x19]
push edx
lea eax, [esp + 0x24]
push str.Error_code___d_n
push eax
call fcn.005a6a18
mov ecx, dword [esp + 0x2c]
add esp, 0xc
push ecx
mov ecx, esi
call fcn.005133a0
lea ecx, [esp + 0x20]
mov dword [esp + 0x18], 0xffffffff
call fcn.005adc4d
mov eax, 0x755d
mov ecx, dword [esp + 0x10]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0xc
ret 0x10