Function at 0x140066bb0
Capabilities:
Get socket status
Receive data
Receive data on socket

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x380
mov rax, qword [0x1400c7008]
xor rax, rsp
mov qword [rsp + 0x370], rax
xor ebx, ebx
xor r15b, r15b
xor ebp, ebp
mov r13, r8
mov r14, rdx
mov r12, rcx
lea eax, [rbx + 2]
test rdx, rdx
je 0x140066c0d
xor ecx, ecx
mov word [rdx], ax
call qword [sym.imp.WS2_32.dll_htonl]
xor ecx, ecx
mov dword [r14 + 4], eax
call qword [sym.imp.WS2_32.dll_htons]
mov word [r14 + 2], ax
movsxd rax, r12d
lea ecx, [r12 + 1]
mov qword [rsp + 0x38], rax
xor edi, edi
mov dword [rsp + 0x34], ecx
mov qword [rsp + 0x58], rax
lea rdx, [rsp + 0x50]
lea rax, [rsp + 0x48]
mov dword [rsp + 0x50], 1
xor r9d, r9d
mov qword [rsp + 0x20], rax
xor r8d, r8d
mov qword [rsp + 0x48], 5
call qword [sym.imp.WS2_32.dll_select]
mov esi, eax
call fcn.140084ad0
mov dword [r13], eax
mov ecx, dword [r13]
test ecx, ecx
jne 0x140066ea3
test esi, esi
je 0x140066e7b
js 0x140066e5b
lea r8d, [rcx + 1]
xor r9d, r9d
mov rcx, r12
lea rdx, [rsp + 0x30]
call qword [sym.imp.WS2_32.dll_recv]
cmp eax, 1
jne 0x140066e3b
movzx edx, byte [rsp + 0x30]
cmp rdi, 3
jne 0x140066ca5
movzx r15d, dl
jmp 0x140066cd8
cmp rdi, 4
jne 0x140066ccf
movsx ecx, r15b
sub ecx, 1
je 0x140066cc8
sub ecx, 2
je 0x140066cc3
cmp ecx, 1
jne 0x140066cf9
lea ebx, [rdi + 0xc]
jmp 0x140066cd8
lea ebx, [rdx + 1]
jmp 0x140066cd8
mov ebx, 4
jmp 0x140066cd8
cmp rdi, 0x10e
jge 0x140066cdf
mov byte [rsp + rdi + 0x260], dl
inc ebp
lea eax, [rbx + 6]
inc rdi
cmp ebp, eax
jge 0x140066d29
mov rax, qword [rsp + 0x38]
mov ecx, dword [rsp + 0x34]
jmp 0x140066c20
cmp dword [0x1400cfe94], 1
jb 0x140066ea3
mov ecx, 0x1000021
call fcn.14000e3d0
test al, al
je 0x140066ea3
lea rdx, str.recv_socks_reply:_Socks_proxy_returned_bad_address_type
mov ecx, 0x1000021
jmp 0x140066e9e
cmp byte [rsp + 0x260], 5
jne 0x140066e12
cmp byte [rsp + 0x261], 0
jne 0x140066e12
cmp r15b, 1
jne 0x140066e0b
test r14, r14
je 0x140066e0b
mov eax, dword [rsp + 0x264]
mov dword [r14 + 4], eax
movzx eax, word [rsp + 0x268]
mov word [r14 + 2], ax
xor eax, eax
cmp dword [0x1400cfe94], 1
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x40], rax
jb 0x140066e0b
lea ecx, [rax + 1]
call fcn.14000e3d0
test al, al
je 0x140066e0b
lea r9, [rsp + 0x38]
mov r8d, 2
lea rdx, [0x14009b168]
mov rcx, r14
call fcn.140064eb0
mov r8, rax
lea rdx, str.SOCKS_proxy_wants_us_to_send_UDP_to__s
mov ecx, 1
call fcn.14000e000
mov rcx, qword [rsp + 0x38]
test rcx, rcx
je 0x140066de1
nop dword [rax]
mov rbx, qword [rcx]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, rbx
test rbx, rbx
jne 0x140066dd0
mov rdi, qword [rsp + 0x40]
test rdi, rdi
je 0x140066e0b
nop dword [rax + rax]
mov rcx, qword [rdi + 0x10]
mov rbx, qword [rdi]
call qword [rdi + reloc.WS2_32.dll_htonl]
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rdi, rbx
test rbx, rbx
jne 0x140066df0
mov al, 1
jmp 0x140066ea5
cmp dword [0x1400cfe94], 1
jb 0x140066ea3
mov ecx, 0x1000021
call fcn.14000e3d0
test al, al
je 0x140066ea3
lea rdx, str.recv_socks_reply:_Socks_proxy_returned_bad_reply
mov ecx, 0x1000021
jmp 0x140066e9e
cmp dword [0x1400cfe94], 1
jb 0x140066ea3
mov ecx, 0x1000121
call fcn.14000e3d0
test al, al
je 0x140066ea3
lea rdx, str.recv_socks_reply:_TCP_port_read_failed_on_recv__
jmp 0x140066e99
cmp dword [0x1400cfe94], 1
jb 0x140066ea3
mov ecx, 0x1000121
call fcn.14000e3d0
test al, al
je 0x140066ea3
lea rdx, str.recv_socks_reply:_TCP_port_read_failed_on_select__
jmp 0x140066e99
cmp dword [0x1400cfe94], 1
jb 0x140066ea3
mov ecx, 0x1000121
call fcn.14000e3d0
test al, al
je 0x140066ea3
lea rdx, str.recv_socks_reply:_TCP_port_read_timeout_expired
mov ecx, 0x1000121
call fcn.14000e000
xor al, al
mov rcx, qword [rsp + 0x370]
xor rcx, rsp
call fcn.140088150
mov rbx, qword [rsp + 0x3d0]
add rsp, 0x380
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret