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

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbx
sub rsp, 0xa8
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x20], 0xfffffffffffffffe
mov rdi, rcx
mov rcx, qword [rcx + 8]
test rcx, rcx
je 0x1400411e0
mov eax, dword [rcx + 8]
nop word cs:[rax + rax]
test eax, eax
je 0x1400411e0
lea edx, [rax + 1]
lock cmpxchg dword [rcx + 8], edx
jne 0x140040ec0
mov rax, qword [rdi]
mov rcx, qword [rdi + 8]
add rdi, 0x10
xorps xmm0, xmm0
movaps xmmword [rbp], xmm0
test rcx, rcx
je 0x140040eed
lock inc dword [rcx + 8]
mov qword [rbp], rax
mov qword [rbp + 8], rcx
mov r12, qword [rax + 0xb0]
mov r15, qword [rax + 0xb8]
mov r14, qword [rdi]
mov rax, rbp
mov qword [rbp - 0x28], rax
mov rax, qword gs:[0x58]
mov rax, qword [rax]
mov rax, qword [rax + 8]
test rax, rax
mov qword [rbp - 0x10], rcx
je 0x140040f2f
mov rcx, qword [rax + 8]
jmp 0x140040f31
xor ecx, ecx
mov edx, 0xa8
mov r8d, setsockopt
call fcn.140027bd0
mov rsi, rax
lea r13, [rdi + 8]
mov qword [rbp - 0x20], rax
mov qword [rbp - 0x18], 0
mov rbx, qword [rdi + 0x20]
test rbx, rbx
je 0x140040f6a
lea rax, [r13 + 0x10]
mov rax, qword [rax]
lock inc dword [rbx + 0xc]
jmp 0x140040f6c
xor eax, eax
dec r15
add rdi, 0x68
movzx ecx, byte [r13 + 8]
mov qword [rsi + 0x20], 0
lea rdx, [0x140041260]
mov qword [rsi + 0x28], rdx
mov dword [rsi + 0x30], 0
xorps xmm0, xmm0
movups xmmword [rsi], xmm0
movups xmmword [rsi + 0x10], xmm0
mov byte [rsi + 0x38], cl
movups xmmword [rsi + 0x40], xmm0
test rbx, rbx
je 0x140040fb7
lea rcx, [rsi + 0x40]
mov qword [rcx], rax
mov qword [rcx + 8], rbx
lock inc dword [rbx + 0xc]
mov qword [rsi + 0x50], r12
mov qword [rsi + 0x58], r15
movaps xmm1, xmmword [rbp]
movups xmmword [rsi + 0x60], xmm1
movaps xmmword [rbp], xmm0
mov rcx, rsi
add rcx, 0x70
mov rdx, rdi
call fcn.140041970
test rbx, rbx
je 0x140040fee
lock dec dword [rbx + 0xc]
jne 0x140040fee
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + ioctlsocket]
add r14, 0x28
lea rbx, [rbp - 0x20]
mov qword [rbp - 0x18], rsi
mov qword [rbp - 0x38], r12
mov dword [rbp - 0x40], r15d
mov qword [rbp - 0x30], r15
test byte [r13 + 8], 0x10
jne 0x14004101b
mov rax, qword [r14 + 8]
add r14, 8
lock inc dword [rax + 0x30]
jmp 0x140041030
mov rax, qword [r14 + 8]
add r14, 8
lock inc dword [rax + 0x30]
test r15, r15
je 0x1400410f4
mov rcx, qword [r13]
cmp rcx, 0xffffffffffffffff
je 0x1400410c7
mov dword [rbp + 0x1c], 0
mov dword [rbp - 4], 0
mov qword [rsp + 0x28], rsi
lea rax, [rbp - 4]
mov qword [rsp + 0x20], rax
mov qword [rsp + 0x30], 0
lea rdx, [rbp - 0x40]
mov r15d, 1
lea r9, [rbp + 0x1c]
mov r8d, 1
call qword [sym.imp.WS2_32.dll_WSARecv]
mov edi, eax
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x4d2
mov ecx, 0x274d
cmovne ecx, eax
cmp eax, 0x40
mov eax, 0x2746
cmovne eax, ecx
mov r14, qword [r14]
test edi, edi
je 0x1400410e5
cmp eax, 0x3e5
je 0x1400410e5
mov ecx, dword [rbp + 0x1c]
mov dword [rsi + 0x30], 1
lea rdx, [0x14009de58]
mov qword [rsi], rdx
mov dword [rsi + 0x10], eax
mov dword [rsi + 0x14], ecx
jmp 0x140041110
mov r14, qword [r14]
mov dword [rsi + 0x30], 1
lea rax, [0x14009de58]
mov qword [rsi], rax
mov qword [rsi + 0x10], 0x2719
jmp 0x140041110
xor eax, eax
lock cmpxchg dword [rsi + 0x30], r15d
cmp eax, 1
je 0x140041110
jmp 0x140041170
mov r14, qword [r14]
mov dword [rsi + 0x30], 1
lea rax, [0x14009de58]
mov qword [rsi], rax
mov qword [rsi + 0x10], 0
mov rcx, qword [r14 + 0x28]
mov r8d, 2
xor edx, edx
mov r9, rsi
call qword [sym.imp.KERNEL32.dll_PostQueuedCompletionStatus]
test eax, eax
jne 0x140041170
lea rdi, [r14 + 0x60]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov qword [rsi + 0x20], 0
mov rax, qword [r14 + 0x98]
test rax, rax
je 0x140041150
mov qword [rax + 0x20], rsi
jmp 0x140041157
mov qword [r14 + 0x90], rsi
mov qword [r14 + 0x98], rsi
mov eax, 1
xchg dword [r14 + 0x58], eax
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xorps xmm0, xmm0
movups xmmword [rbx], xmm0
lea rcx, [rbp - 0x28]
call fcn.140041ae0
mov rsi, qword [rbp + 8]
test rsi, rsi
mov rdi, qword [rbp - 0x10]
je 0x1400411a9
lock dec dword [rsi + 8]
jne 0x1400411a9
mov rax, qword [rsi]
mov rcx, rsi
call qword [rax]
lock dec dword [rsi + 0xc]
jne 0x1400411a9
mov rax, qword [rsi]
mov rcx, rsi
call qword [rax + ioctlsocket]
test rdi, rdi
je 0x1400411cb
lock dec dword [rdi + 8]
jne 0x1400411cb
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax]
lock dec dword [rdi + 0xc]
jne 0x1400411cb
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax + ioctlsocket]
nop
add rsp, 0xa8
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
call fcn.140040ba0
int3