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

Disassembly:
push rbp
push rsi
push rdi
push r13
push r14
push r15
sub rsp, 0x178
mov rax, qword [0x140088080]
xor rax, rsp
mov qword [rsp + 0x150], rax
mov rax, qword [rsp + 0x1d0]
lea rbp, [rsp + 0x70]
xor r15d, r15d
mov dword [rsp + 0x2c], r8d
mov qword [rsp + 0x30], rdx
mov edi, r15d
mov byte [rsp + 0x20], dil
mov r13d, r9d
mov qword [rsp + 0x38], rax
mov esi, r8d
mov dword [rsp + 0x28], r15d
mov r14, rcx
test rcx, rcx
je 0x1400218f0
cmp dword [rcx], 0xbab1e
jne 0x1400218f0
cmp byte [rcx + 0x18a], dil
je 0x1400214ef
lea eax, [r15 + 8]
jmp 0x1400215eb
test r13d, r13d
jns 0x1400214fe
mov eax, 0xa
jmp 0x1400215eb
mov qword [rsp + 0x170], rbx
mov rbx, qword [rcx + 8]
mov qword [rsp + 0x168], r12
test rbx, rbx
je 0x14002157d
nop word [rax + rax]
lea rdx, [rsp + 0x40]
mov rcx, rbx
call fcn.140022700
mov r10d, eax
lea r8, [rsp + 0x40]
mov eax, 1
mov r9d, r15d
nop dword [rax]
mov rdx, 0xffffffffffffffff
test r10d, eax
je 0x140021551
mov rdx, qword [r8]
inc edi
mov ecx, eax
rol ecx, 0x10
test r10d, ecx
je 0x140021560
mov rdx, qword [r8]
inc edi
cmp rdx, 0xffffffffffffffff
je 0x140021575
inc r9d
rol eax, 1
add r8, 8
cmp r9d, 5
jb 0x140021540
mov rbx, qword [rbx]
test rbx, rbx
jne 0x140021520
lea rdx, [rsp + 0x24]
mov rcx, r14
call fcn.140023a70
mov eax, dword [rsp + 0x24]
test eax, eax
js 0x140021599
cmp eax, r13d
cmovl r13d, eax
movzx r15d, byte [rsp + 0x1e0]
lea r12d, [rsi + rdi]
mov dword [rsp + 0x24], r12d
mov eax, r12d
test r15b, r15b
je 0x1400215bf
cmp qword [r14 + 0x178], 0xffffffffffffffff
je 0x1400215bf
inc eax
cmp eax, 0xa
jbe 0x140021611
mov ecx, eax
shl rcx, 4
call qword [sub.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rbp, rax
test rax, rax
jne 0x14002160c
lea eax, [rbp + 3]
mov rbx, qword [rsp + 0x170]
mov r12, qword [rsp + 0x168]
mov rcx, qword [rsp + 0x150]
xor rcx, rsp
call fcn.14006a410
add rsp, 0x178
pop r15
pop r14
pop r13
pop rdi
pop rsi
pop rbp
ret
mov byte [rsp + 0x20], 1
xor ebx, ebx
test edi, edi
je 0x1400216c9
mov rsi, qword [r14 + 8]
test rsi, rsi
je 0x1400216c5
mov r15d, 0x300
lea r12d, [rbx + 0x10]
lea rdx, [rsp + 0x40]
mov rcx, rsi
call fcn.140022700
mov r10d, eax
lea r8, [rsp + 0x40]
xor r9d, r9d
mov edx, 1
nop
mov rcx, 0xffffffffffffffff
test r10d, edx
je 0x140021674
mov rax, qword [r8]
mov ecx, ebx
add rcx, rcx
inc ebx
mov qword [rbp + rcx*8], rax
mov word [rbp + rcx*8 + 8], r15w
mov rcx, qword [r8]
mov eax, edx
rol eax, 0x10
test r10d, eax
je 0x140021696
mov rax, qword [r8]
mov ecx, ebx
add rcx, rcx
inc ebx
mov qword [rbp + rcx*8], rax
mov word [rbp + rcx*8 + 8], r12w
mov rcx, qword [r8]
cmp rcx, 0xffffffffffffffff
je 0x1400216ab
inc r9d
rol edx, 1
add r8, 8
cmp r9d, 5
jb 0x140021650
mov rsi, qword [rsi]
test rsi, rsi
jne 0x140021632
movzx r15d, byte [rsp + 0x1e0]
mov r12d, dword [rsp + 0x24]
mov esi, dword [rsp + 0x2c]
mov r11d, 0x400
test esi, esi
je 0x14002175e
mov rcx, qword [rsp + 0x30]
mov r15d, 0x300
add rcx, 8
mov r10d, esi
xor r12d, r12d
nop dword [rax]
mov rax, qword [rcx - 8]
mov r9d, ebx
shl r9, 4
add r9, rbp
mov r8d, ebx
mov qword [r9], rax
mov word [r9 + 8], r12w
movzx edx, word [rcx]
test dl, 1
je 0x14002171f
mov word [r9 + 8], r15w
movzx eax, r15w
movzx edx, word [rcx]
jmp 0x140021722
mov eax, r12d
test dl, 2
je 0x140021733
or ax, r11w
mov word [r9 + 8], ax
movzx edx, word [rcx]
test dl, 4
je 0x140021745
or ax, 0x10
add r8, r8
mov word [rbp + r8*8 + 8], ax
inc ebx
add rcx, 0x10
sub r10, 1
jne 0x1400216f0
movzx r15d, byte [rsp + 0x1e0]
lea r12d, [rsi + rdi]
test r15b, r15b
je 0x140021786
mov rcx, qword [r14 + 0x178]
cmp rcx, 0xffffffffffffffff
je 0x140021786
mov eax, ebx
add rax, rax
inc ebx
mov qword [rbp + rax*8], rcx
mov ecx, 0x300
mov word [rbp + rax*8 + 8], cx
test ebx, ebx
je 0x140021875
mov r8d, r13d
mov edx, ebx
mov rcx, rbp
call fcn.140040720
mov esi, eax
test eax, eax
jle 0x140021875
mov r11d, dword [rsp + 0x2c]
xor eax, eax
mov r9d, eax
test r11d, r11d
je 0x140021827
mov r10, qword [rsp + 0x30]
mov r15d, 0x300
add r10, 0xa
xor r12d, r12d
nop word [rax + rax]
mov ecx, r12d
lea edx, [rdi + r9]
add rdx, rdx
lea r10, [r10 + 0x10]
movsx r8d, word [rbp + rdx*8 + 0xa]
test r15d, r8d
mov eax, r8d
setne cl
movzx edx, cx
or dx, 4
and al, 0x10
cmove dx, cx
movzx eax, dx
or ax, 2
and r8d, 0x400
cmove ax, dx
inc r9d
mov word [r10 - 0x10], ax
cmp r9d, r11d
jb 0x1400217d0
movzx r15d, byte [rsp + 0x1e0]
mov r12d, dword [rsp + 0x24]
test r15b, r15b
je 0x14002187b
cmp qword [r14 + 0x178], 0xffffffffffffffff
je 0x14002187b
mov eax, r12d
mov ecx, 0x300
add rax, rax
test word [rbp + rax*8 + 0xa], cx
je 0x14002187b
nop dword [rax + rax]
mov rcx, qword [r14 + 0x178]
lea rdx, [rsp + 0x110]
xor r9d, r9d
lea r8d, [r9 + 0x40]
call qword [sym.imp.WS2_32.dll_recv]
test eax, eax
jg 0x140021850
lea edi, [rsi - 1]
jmp 0x14002187d
mov edi, dword [rsp + 0x28]
jmp 0x14002187d
mov edi, esi
cmp byte [rsp + 0x20], 0
je 0x14002188d
mov rcx, rbp
call qword [fcn.14006aeac]
mov rax, qword [rsp + 0x38]
test rax, rax
je 0x140021899
mov dword [rax], edi
cmp byte [rsp + 0x1d8], 0
je 0x1400218e9
test ebx, ebx
jne 0x1400218e9
xor eax, eax
cmp dword [r14], 0xbab1e
mov dword [rsp + 0x24], eax
jne 0x1400218e9
cmp byte [r14 + 0x18a], al
jne 0x1400218e9
lea rdx, [rsp + 0x24]
mov rcx, r14
call fcn.140023a70
test eax, eax
jne 0x1400218e9
mov ecx, dword [rsp + 0x24]
test ecx, ecx
je 0x1400218e9
cmp ecx, r13d
jg 0x1400218e1
test ecx, ecx
jns 0x1400218e4
mov ecx, r13d
call fcn.140040e00
xor eax, eax
jmp 0x1400215db
mov eax, 1
jmp 0x1400215eb