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

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rbp
push rsi
push rdi
push r12
push r14
push r15
sub rsp, 0x70
mov rax, qword [0x180015010]
xor rax, rsp
mov qword [rsp + 0x68], rax
mov r15, rdx
mov rdi, rcx
xor sil, sil
xor r14d, r14d
mov ebx, r14d
mov r8d, 2
sub r8d, ebx
movsxd rax, ebx
lea rdx, [rsp + 0x20]
add rdx, rax
mov rcx, qword [rdi]
xor r9d, r9d
mov rcx, qword [rcx]
call qword [sym.imp.WS2_32.dll_recv]
mov ecx, eax
inc eax
cmp eax, 1
jbe 0x180005488
add ebx, ecx
mov dword [rdi + 8], ebx
cmp ebx, 2
jl 0x1800051e4
movzx ecx, word [rsp + 0x20]
call qword [sym.imp.WS2_32.dll_ntohs]
movsx ecx, ax
mov eax, 0xb60b60b7
imul ecx
add edx, ecx
sar edx, 9
mov eax, edx
shr eax, 0x1f
add edx, eax
mov word [rsp + 0x20], dx
mov word [r15], dx
mov dword [rdi + 8], r14d
cmp dx, 1
jne 0x180005266
mov rcx, rdi
call fcn.180005020
mov dword [r15 + 4], eax
mov sil, 1
jmp 0x180005488
cmp dx, 2
jne 0x180005302
mov rcx, rdi
call fcn.180005020
mov ebx, eax
mov r8d, eax
lea rdx, [rsp + 0x28]
mov rcx, rdi
call fcn.1800050b0
nop
mov dword [r15 + 4], ebx
lea rcx, [r15 + 8]
lea rax, [rsp + 0x28]
cmp rcx, rax
je 0x1800052b8
lea rdx, [rsp + 0x28]
cmp qword [rsp + 0x40], 0x10
cmovae rdx, qword [rsp + 0x28]
mov r8, qword [rsp + 0x38]
call fcn.180002050
mov sil, 1
mov rdx, qword [rsp + 0x40]
cmp rdx, 0x10
jb 0x180005488
inc rdx
mov rcx, qword [rsp + 0x28]
mov rax, rcx
cmp rdx, 0x1000
jb 0x180005483
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x180005483
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
cmp dx, 3
jne 0x180005488
mov rcx, rdi
call fcn.180005020
mov r8d, eax
lea rdx, [rsp + 0x48]
mov rcx, rdi
call fcn.1800050b0
nop
mov rcx, rdi
call fcn.180005020
movsxd rsi, eax
mov dword [rdi + 0xc], esi
mov dword [rdi + 8], r14d
mov rbp, rsi
mov rcx, rsi
call fcn.18000f474
mov r12, rax
mov ebx, r14d
test esi, esi
jle 0x18000537d
nop dword [rax]
mov r8d, esi
sub r8d, ebx
movsxd rdx, ebx
add rdx, r12
mov rcx, qword [rdi]
xor r9d, r9d
mov rcx, qword [rcx]
call qword [sym.imp.WS2_32.dll_recv]
mov ecx, eax
inc eax
cmp eax, 1
jbe 0x18000537d
add ebx, ecx
mov dword [rdi + 8], ebx
cmp ebx, esi
jl 0x180005350
mov dword [r15 + 4], esi
lea rcx, [r15 + 8]
lea rax, [rsp + 0x48]
cmp rcx, rax
je 0x1800053aa
lea rdx, [rsp + 0x48]
cmp qword [rsp + 0x60], 0x10
cmovae rdx, qword [rsp + 0x48]
mov r8, qword [rsp + 0x58]
call fcn.180002050
mov rsi, qword [r15 + 0x30]
mov rdx, qword [r15 + 0x28]
mov rcx, rsi
sub rcx, rdx
cmp rbp, rcx
jae 0x1800053c3
lea rax, [rdx + rbp]
jmp 0x1800053f6
jbe 0x1800053fa
mov rax, qword [r15 + 0x38]
sub rax, rdx
cmp rbp, rax
jbe 0x1800053df
mov rdx, rbp
lea rcx, [r15 + 0x28]
call fcn.180005a70
jmp 0x1800053fa
mov rbx, rbp
sub rbx, rcx
mov r8, rbx
xor edx, edx
mov rcx, rsi
call sub.VCRUNTIME140.dll_memset
lea rax, [rbx + rsi]
mov qword [r15 + 0x30], rax
mov r8, r14
test rbp, rbp
jle 0x180005445
lea r9, str.4_faO
nop dword [rax]
mov eax, 0xaaaaaaab
mul r14d
shr edx, 3
lea ecx, [rdx + rdx*2]
shl ecx, 2
mov eax, r14d
sub eax, ecx
movsxd rcx, eax
movzx edx, byte [r8 + r12]
sub dl, byte [r9 + rcx*4]
mov rax, qword [r15 + 0x28]
mov byte [r8 + rax], dl
inc r14d
inc r8
cmp r8, rbp
jl 0x180005410
mov sil, 1
mov rdx, qword [rsp + 0x60]
cmp rdx, 0x10
jb 0x180005488
inc rdx
mov rcx, qword [rsp + 0x48]
mov rax, rcx
cmp rdx, 0x1000
jb 0x180005483
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x180005483
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.18000f46c
movzx eax, sil
mov rcx, qword [rsp + 0x68]
xor rcx, rsp
call fcn.18000f410
lea r11, [rsp + 0x70]
mov rbx, qword [r11 + 0x40]
mov rbp, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rsi
ret