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

Disassembly:
mov dword [rsp + 0x18], r8d
mov qword [rsp + 0x10], rdx
push rbx
push rbp
push rsi
push r12
push r13
push r15
sub rsp, 0x148
xor r13d, r13d
lea rax, [rsp + 0xa0]
mov ebp, r9d
mov dword [rsp + 0x28], r9d
mov esi, r8d
mov r15, rcx
mov qword [rsp + 0x20], rax
mov ebx, r13d
mov dword [rsp + 0x180], r13d
mov dword [rsp + 0x2c], r13d
test rcx, rcx
je 0x140016d0c
cmp dword [rcx], 0xbab1e
jne 0x140016d0c
cmp dword [rcx + 0x190], ebx
je 0x1400168fa
lea eax, [r13 + 8]
add rsp, 0x148
pop r15
pop r13
pop r12
pop rsi
pop rbp
pop rbx
ret
test r9d, r9d
jns 0x140016915
mov eax, 0xa
add rsp, 0x148
pop r15
pop r13
pop r12
pop rsi
pop rbp
pop rbx
ret
mov qword [rsp + 0x198], rdi
mov rdi, qword [rcx + 8]
mov r12d, 1
mov qword [rsp + 0x140], r14
test rdi, rdi
je 0x14001699a
nop word [rax + rax]
lea rdx, [rsp + 0x38]
mov rcx, rdi
call fcn.140015110
mov r9d, r13d
mov ecx, r12d
mov r11d, eax
lea r8, [rsp + 0x38]
nop dword [rax + rax]
or rdx, 0xffffffffffffffff
test r11d, ecx
je 0x14001696e
mov rdx, qword [r8]
inc ebx
mov eax, ecx
rol eax, 0x10
test r11d, eax
je 0x14001697d
mov rdx, qword [r8]
inc ebx
cmp rdx, 0xffffffffffffffff
je 0x140016992
inc r9d
add r8, 8
rol ecx, 1
cmp r9d, 5
jb 0x140016960
mov rdi, qword [rdi]
test rdi, rdi
jne 0x140016940
lea rdx, [rsp + 0x30]
mov rcx, r15
call fcn.140015f60
mov r11d, dword [rsp + 0x30]
test r11d, r11d
js 0x1400169bc
cmp r11d, ebp
cmovl ebp, r11d
mov dword [rsp + 0x28], ebp
mov r13d, dword [rsp + 0x1b0]
lea r14d, [rbx + rsi]
mov eax, r14d
test r13d, r13d
je 0x1400169dc
cmp qword [r15 + 0x178], 0xffffffffffffffff
je 0x1400169dc
inc eax
cmp eax, 0xa
jbe 0x140016a22
mov ecx, eax
shl rcx, 4
call qword [sub.MSVCR120.dll_malloc]
mov qword [rsp + 0x20], rax
test rax, rax
jne 0x140016a1d
mov eax, 3
mov rdi, qword [rsp + 0x198]
mov r14, qword [rsp + 0x140]
add rsp, 0x148
pop r15
pop r13
pop r12
pop rsi
pop rbp
pop rbx
ret
mov dword [rsp + 0x2c], r12d
xor r10d, r10d
mov esi, r10d
test ebx, ebx
je 0x140016af7
mov rbp, qword [r15 + 8]
mov edi, r10d
test rbp, rbp
je 0x140016af3
mov r13, qword [rsp + 0x20]
nop word [rax + rax]
lea rdx, [rsp + 0x38]
mov rcx, rbp
call fcn.140015110
xor r10d, r10d
mov r8, rdi
shl r8, 4
mov ecx, r12d
lea r9, [rsp + 0x38]
add r8, r13
lea r13d, [r10 + 4]
mov r11d, eax
nop dword [rax]
or rdx, 0xffffffffffffffff
test r11d, ecx
je 0x140016aa0
mov rax, qword [r9]
mov word [r8 + 8], r12w
inc esi
mov qword [r8], rax
mov rdx, qword [r9]
inc rdi
add r8, 0x10
mov eax, ecx
rol eax, 0x10
test r11d, eax
je 0x140016ac1
mov rax, qword [r9]
mov word [r8 + 8], r13w
inc esi
mov qword [r8], rax
mov rdx, qword [r9]
inc rdi
add r8, 0x10
cmp rdx, 0xffffffffffffffff
je 0x140016ad6
inc r10d
add r9, 8
rol ecx, 1
cmp r10d, 5
jb 0x140016a80
mov rbp, qword [rbp]
mov r13, qword [rsp + 0x20]
test rbp, rbp
jne 0x140016a50
mov r13d, dword [rsp + 0x1b0]
xor r10d, r10d
mov ebp, dword [rsp + 0x28]
mov r8d, dword [rsp + 0x190]
mov r9, qword [rsp + 0x20]
movsxd rax, esi
test r8d, r8d
je 0x140016b64
mov rdx, qword [rsp + 0x188]
add rax, rax
add rdx, 8
add esi, r8d
lea rcx, [r9 + rax*8 + 8]
nop word [rax + rax]
mov rax, qword [rdx - 8]
mov word [rcx], r10w
mov qword [rcx - 8], rax
test byte [rdx], r12b
je 0x140016b45
mov word [rcx], r12w
test byte [rdx], 2
je 0x140016b4e
or word [rcx], 2
test byte [rdx], 4
je 0x140016b57
or word [rcx], 4
add rcx, 0x10
add rdx, 0x10
dec r8
jne 0x140016b30
test r13d, r13d
je 0x140016b87
mov rcx, qword [r15 + 0x178]
cmp rcx, 0xffffffffffffffff
je 0x140016b87
mov eax, esi
add rax, rax
inc esi
mov qword [r9 + rax*8], rcx
mov word [r9 + rax*8 + 8], r12w
test esi, esi
je 0x140016c67
movsxd r8, ebp
mov edx, esi
mov rcx, r9
call fcn.140045fe0
mov edi, eax
test eax, eax
jle 0x140016c75
mov eax, dword [rsp + 0x190]
movsxd rdx, ebx
test eax, eax
je 0x140016c12
mov r8, qword [rsp + 0x188]
shl rdx, 4
sub rdx, r8
lea rcx, [r8 + 0xa]
mov r8, qword [rsp + 0x20]
lea r9, [rdx + r8]
mov r8d, eax
xor ebp, ebp
nop word [rax + rax]
movsx edx, word [r9 + rcx]
movzx eax, bp
test r12b, dl
je 0x140016bf0
mov eax, r12d
test dl, 4
je 0x140016bf9
or ax, 4
test dl, 2
je 0x140016c02
or ax, 2
mov word [rcx], ax
add rcx, 0x10
dec r8
jne 0x140016be0
mov ebp, dword [rsp + 0x28]
test r13d, r13d
je 0x140016c83
cmp qword [r15 + 0x178], 0xffffffffffffffff
mov rcx, qword [rsp + 0x20]
je 0x140016c8c
mov eax, r14d
add rax, rax
test byte [rcx + rax*8 + 0xa], r12b
je 0x140016c8c
nop word [rax + rax]
mov rcx, qword [r15 + 0x178]
xor r9d, r9d
lea rdx, [rsp + 0x60]
lea r8d, [r9 + 0x40]
call qword [sym.imp.WS2_32.dll_recv]
test eax, eax
jg 0x140016c40
mov rcx, qword [rsp + 0x20]
lea ebx, [rdi - 1]
jmp 0x140016c8e
mov rcx, qword [rsp + 0x20]
mov ebx, dword [rsp + 0x180]
jmp 0x140016c8e
mov ebx, dword [rsp + 0x180]
mov rcx, qword [rsp + 0x20]
jmp 0x140016c8e
mov rcx, qword [rsp + 0x20]
mov ebx, edi
jmp 0x140016c8e
mov ebx, edi
cmp dword [rsp + 0x2c], 0
je 0x140016c9b
call qword [sub.MSVCR120.dll_free]
mov rax, qword [rsp + 0x1a0]
test rax, rax
je 0x140016caa
mov dword [rax], ebx
cmp dword [rsp + 0x1a8], 0
je 0x140016d05
test esi, esi
jne 0x140016d05
xor eax, eax
cmp dword [r15], 0xbab1e
mov dword [rsp + 0x180], eax
jne 0x140016d05
cmp dword [r15 + 0x190], eax
jne 0x140016d05
lea rdx, [rsp + 0x180]
mov rcx, r15
call fcn.140015f60
test eax, eax
jne 0x140016d05
mov eax, dword [rsp + 0x180]
test eax, eax
je 0x140016d05
cmp eax, ebp
jg 0x140016cfd
test eax, eax
cmovs eax, ebp
mov ebp, eax
movsxd rcx, ebp
call fcn.140045e70
xor eax, eax
jmp 0x1400169fc
mov eax, 1
add rsp, 0x148
pop r15
pop r13
pop r12
pop rsi
pop rbp
pop rbx
ret