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

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
lea rbp, [rsp - 0x1050]
mov eax, 0x1150
call fcn.140006450
sub rsp, rax
mov rax, qword [0x14000b040]
xor rax, rsp
mov qword [rbp + 0x1040], rax
mov rbx, rdx
mov rdi, rcx
xor edx, edx
mov r8d, 0x108
lea rcx, [rsp + 0x30]
call sub.VCRUNTIME140.dll_memset
mov rdx, rbx
cmp qword [rbx + 0x18], 0xf
jbe 0x140001993
mov rdx, qword [rbx]
lea rcx, [rsp + 0x30]
call fcn.1400041b0
mov rax, qword [rsp + 0x30]
movsxd rcx, dword [rax + 4]
lea rsi, vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov qword [rsp + rcx + 0x30], rsi
mov rax, qword [rsp + 0x30]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xa8]
mov dword [rsp + rcx + 0x2c], edx
mov rax, qword [rsp + 0x30]
movsxd rcx, dword [rax + 4]
lea rax, [rsp + 0x30]
add rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_bool___cdecl_std::ios_base::operator__void_const___ptr64]
test al, al
je 0x1400019f3
lea rdx, str.Failed_to_open_file_for_writing:
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
jmp 0x140001a78
xor r9d, r9d
mov r8d, 0x1000
lea rdx, [rbp + 0x40]
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_recv]
test eax, eax
jle 0x140001a3c
nop dword [rax]
mov r8d, eax
lea rdx, [rbp + 0x40]
lea rcx, [rsp + 0x30]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::write_char_const____ptr64__long_long___int64_____ptr64]
xor r9d, r9d
mov r8d, 0x1000
lea rdx, [rbp + 0x40]
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_recv]
test eax, eax
jg 0x140001a10
lea rcx, [rsp + 0x38]
call fcn.1400040f0
test rax, rax
jne 0x140001a6a
mov rax, qword [rsp + 0x30]
movsxd rcx, dword [rax + 4]
lea rax, [rsp + 0x30]
add rcx, rax
xor r8d, r8d
mov edx, 2
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool____ptr64]
lea rdx, str.File_received_successfully:
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.140004790
cmp qword [rbx + 0x18], 0xf
mov rdx, rbx
jbe 0x140001a8a
mov rdx, qword [rbx]
mov r8, qword [rbx + 0x10]
mov rcx, rax
call fcn.140005010
lea rdx, [0x140004970]
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
nop
mov rax, qword [rsp + 0x30]
movsxd rcx, dword [rax + 4]
mov qword [rsp + rcx + 0x30], rsi
mov rax, qword [rsp + 0x30]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xa8]
mov dword [rsp + rcx + 0x2c], edx
lea rax, vtable.std::basic_filebuf_char__struct_std::char_traits_char__.0
mov qword [rsp + 0x38], rax
cmp qword [rbp - 0x48], 0
je 0x140001b04
lea rcx, [rbp - 0x58]
mov rax, qword [rsp + 0x50]
cmp qword [rax], rcx
jne 0x140001b04
mov rdx, qword [rbp - 0x38]
mov rcx, qword [rbp - 0x40]
mov qword [rax], rcx
mov rax, qword [rsp + 0x70]
mov qword [rax], rcx
sub edx, ecx
mov rax, qword [rbp - 0x78]
mov dword [rax], edx
cmp byte [rbp - 0x4c], 0
je 0x140001b14
lea rcx, [rsp + 0x38]
call fcn.1400040f0
lea rcx, [rsp + 0x38]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::destructor_void____ptr64]
nop
lea rcx, [rsp + 0x40]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::destructor_void____ptr64]
lea rcx, [rbp - 0x28]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::destructor_void____ptr64]
mov rcx, qword [rbp + 0x1040]
xor rcx, rsp
call fcn.1400053b0
mov rbx, qword [rsp + 0x1180]
add rsp, 0x1150
pop rdi
pop rsi
pop rbp
ret