Function at 0x180003520
Capabilities:
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x730
mov rax, qword [0x18004e058]
xor rax, rsp
mov qword [rsp + 0x720], rax
mov r15, r8
mov r12, rdx
mov rsi, rcx
xor r13d, r13d
xor edx, edx
mov r8d, 0x110
lea rcx, [rsp + 0x50]
call fcn.180013310
lea r8d, [r13 + 0x20]
mov rdx, r12
lea rcx, [rsp + 0x50]
call fcn.180009310
nop
mov rax, qword [rsp + 0x50]
movsxd rcx, dword [rax + 4]
test byte [rsp + rcx + 0x60], 6
je 0x1800036d9
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x180003660
mov qword [rsp + 0x40], r13
mov qword [rsp + 0x30], r13
mov dword [rsp + 0x28], r13d
lea rcx, [rsp + 0x40]
mov qword [rsp + 0x20], rcx
mov r9d, 0x400
mov r8d, eax
xor edx, edx
mov ecx, 0x1300
call qword [sym.imp.KERNEL32.dll_FormatMessageA]
mov r8d, eax
mov qword [rsp + 0x1a0], r13
mov qword [rsp + 0x1b0], r13
mov qword [rsp + 0x1b8], send
mov rdx, qword [rsp + 0x40]
lea rcx, [rsp + 0x1a0]
call fcn.18000afd0
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_LocalFree]
movups xmm0, xmmword [rsp + 0x1a0]
movups xmmword [rsp + 0x1d8], xmm0
movups xmm1, xmmword [rsp + 0x1b0]
psrldq xmm1, 8
movq rdx, xmm1
cmp rdx, 0x10
jb 0x180003660
inc rdx
mov rcx, qword [rsp + 0x1d8]
mov rax, rcx
cmp rdx, 0x1000
jb 0x18000365a
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x18000412c
call fcn.180010c50
nop
mov rax, qword [rsp + 0x50]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_ifstream_char__struct_std::char_traits_char__.0
mov qword [rsp + rcx + 0x50], rax
mov rax, qword [rsp + 0x50]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xb0]
mov dword [rsp + rcx + 0x4c], edx
lea rcx, [rsp + 0x60]
call fcn.180009000
mov rax, qword [rsp + 0x50]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_istream_char__struct_std::char_traits_char__.0
mov qword [rsp + rcx + 0x50], rax
mov rax, qword [rsp + 0x50]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0x18]
mov dword [rsp + rcx + 0x4c], edx
lea rax, vtable.std::ios_base.0
mov qword [rsp + 0x100], rax
lea rcx, [rsp + 0x100]
call fcn.1800100a4
nop
jmp 0x1800040fd
mov rdx, r12
lea rcx, [rsp + 0x160]
call fcn.1800025a0
nop
lea rcx, [rsp + 0x160]
call fcn.180002030
test al, al
je 0x180003817
lea rcx, [rsp + 0x60]
call fcn.18000ad60
test rax, rax
jne 0x18000373f
mov rax, qword [rsp + 0x50]
movsxd rcx, dword [rax + 4]
lea rax, [rsp + 0x50]
add rcx, rax
mov edx, 6
mov r14d, 2
cmp qword [rcx + 0x48], 0
cmovne edx, r14d
or edx, dword [rcx + 0x10]
xor r8d, r8d
call fcn.180001d80
nop
mov rdx, qword [rsp + 0x178]
cmp rdx, 0x10
jb 0x180003782
inc rdx
mov rcx, qword [rsp + 0x160]
mov rax, rcx
cmp rdx, 0x1000
jb 0x18000377d
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x18000412c
call fcn.180010c50
mov qword [rsp + 0x170], r13
mov qword [rsp + 0x178], send
mov byte [rsp + 0x160], 0
mov rax, qword [rsp + 0x50]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_ifstream_char__struct_std::char_traits_char__.0
mov qword [rsp + rcx + 0x50], rax
mov rax, qword [rsp + 0x50]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xb0]
mov dword [rsp + rcx + 0x4c], edx
lea rcx, [rsp + 0x60]
call fcn.180009000
mov rax, qword [rsp + 0x50]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_istream_char__struct_std::char_traits_char__.0
mov qword [rsp + rcx + 0x50], rax
mov rax, qword [rsp + 0x50]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0x18]
mov dword [rsp + rcx + 0x4c], edx
lea rax, vtable.std::ios_base.0
mov qword [rsp + 0x100], rax
lea rcx, [rsp + 0x100]
call fcn.1800100a4
nop
jmp 0x1800040fd
mov r14d, 2
mov r8d, r14d
lea rcx, [rsp + 0x50]
call fcn.180009460
lea rax, [rsp + 0x50]
mov qword [rsp + 0x40], rax
mov rax, qword [rsp + 0x50]
movsxd rcx, dword [rax + 4]
mov rcx, qword [rsp + rcx + 0x98]
test rcx, rcx
je 0x180003851
mov rax, qword [rcx]
call qword [rax + htons]
nop
lea rcx, [rsp + 0x50]
call fcn.18000c430
mov byte [rsp + 0x48], al
mov rax, qword [rsp + 0x50]
movsxd rcx, dword [rax + 4]
test byte [rsp + rcx + 0x60], 6
jne 0x1800038aa
mov rcx, qword [rsp + rcx + 0x98]
mov rax, qword [rcx]
mov dword [rsp + 0x20], 1
mov r9d, 1
xor r8d, r8d
lea rdx, [rsp + 0x1c0]
call qword [rax + 0x50]
nop
mov rax, qword [rsp + 0x50]
movsxd rcx, dword [rax + 4]
mov rcx, qword [rsp + rcx + 0x98]
jmp 0x1800038cd
mov qword [rsp + 0x1c0], 0xffffffffffffffff
xorps xmm0, xmm0
movups xmmword [rsp + 0x1c8], xmm0
movsxd rax, dword [rax + 4]
mov rcx, qword [rsp + rax + 0x98]
test rcx, rcx
je 0x1800038d9
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_recv]
nop
mov rax, qword [rsp + 0x50]
movsxd rcx, dword [rax + 4]
mov eax, dword [rsp + rcx + 0x60]
lea r9, [rsp + 0x50]
add rcx, r9
mov edx, 4
cmp qword [rcx + 0x48], 0
cmovne edx, r13d
and eax, 0xfffffffe
or edx, eax
xor r8d, r8d
call fcn.180001d80
lea rax, [rsp + 0x50]
mov qword [rsp + 0x40], rax
mov rax, qword [rsp + 0x50]
movsxd rcx, dword [rax + 4]
mov rcx, qword [rsp + rcx + 0x98]
test rcx, rcx
je 0x180003930
mov rax, qword [rcx]
call qword [rax + htons]
nop
lea rcx, [rsp + 0x50]
call fcn.18000c430
mov byte [rsp + 0x48], al
mov rax, qword [rsp + 0x50]
movsxd rcx, dword [rax + 4]
test byte [rsp + rcx + 0x60], 6
jne 0x1800039b6
mov rcx, qword [rsp + rcx + 0x98]
mov rax, qword [rcx]
mov dword [rsp + 0x20], 1
xor r9d, r9d
xor r8d, r8d
lea rdx, [rsp + 0x1a0]
call qword [rax + 0x50]
mov rcx, qword [rsp + 0x1a8]
add rcx, qword [rsp + 0x1a0]
mov ebx, 6
cmp rcx, 0xffffffffffffffff
jne 0x1800039bb
mov rax, qword [rsp + 0x50]
movsxd rcx, dword [rax + 4]
lea rax, [rsp + 0x50]
add rcx, rax
mov edx, ebx
cmp qword [rcx + 0x48], 0
cmovne edx, r14d
or edx, dword [rcx + 0x10]
xor r8d, r8d
call fcn.180001d80
jmp 0x1800039bb
mov ebx, 6
mov rax, qword [rsp + 0x50]
movsxd rcx, dword [rax + 4]
mov rcx, qword [rsp + rcx + 0x98]
test rcx, rcx
je 0x1800039d8
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_recv]
nop
mov r11, qword [rsp + 0x1c8]
mov rdi, qword [rsp + 0x1c0]
lea r8, [r11 + rdi]
lea r9, [rsp + 0x1b5]
movabs r10, 0xcccccccccccccccd
test r8, r8
jns 0x180003a50
neg r8
nop word [rax + rax]
dec r9
mov rax, r10
mul r8
shr rdx, 3
movzx eax, dl
shl al, 2
lea ecx, [rax + rdx]
add cl, cl
sub r8b, cl
add r8b, 0x30
mov byte [r9], r8b
mov r8, rdx
test rdx, rdx
jne 0x180003a10
dec r9
mov byte [r9], 0x2d
jmp 0x180003a7a
dec r9
mov rax, r10
mul r8
shr rdx, 3
movzx eax, dl
shl al, 2
lea ecx, [rax + rdx]
add cl, cl
sub r8b, cl
add r8b, 0x30
mov byte [r9], r8b
mov r8, rdx
test rdx, rdx
jne 0x180003a50
mov qword [rsp + 0x180], r13
mov qword [rsp + 0x190], r13
mov edx, send
mov qword [rsp + 0x198], rdx
mov byte [rsp + 0x180], 0
lea rax, [rsp + 0x1b5]
cmp r9, rax
je 0x180003adf
lea r8, [rsp + 0x1b5]
sub r8, r9
mov rdx, r9
lea rcx, [rsp + 0x180]
call fcn.18000afd0
mov r11, qword [rsp + 0x1c8]
mov rdi, qword [rsp + 0x1c0]
mov rdx, qword [rsp + 0x198]
mov ecx, 0xc800000
xorps xmm0, xmm0
movq rax, xmm0
add rcx, rax
lea rax, [r11 + rdi]
cmp rax, rcx
jle 0x180003c2b
cmp rdx, 0x10
jb 0x180003b37
inc rdx
mov rcx, qword [rsp + 0x180]
mov rax, rcx
cmp rdx, 0x1000
jb 0x180003b32
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x180004126
call fcn.180010c50
mov qword [rsp + 0x190], r13
mov qword [rsp + 0x198], send
mov byte [rsp + 0x180], 0
mov rdx, qword [rsp + 0x178]
cmp rdx, 0x10
jb 0x180003b96
inc rdx
mov rcx, qword [rsp + 0x160]
mov rax, rcx
cmp rdx, 0x1000
jb 0x180003b91
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x18000412c
call fcn.180010c50
mov qword [rsp + 0x170], r13
mov qword [rsp + 0x178], send
mov byte [rsp + 0x160], 0
mov rax, qword [rsp + 0x50]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_ifstream_char__struct_std::char_traits_char__.0
mov qword [rsp + rcx + 0x50], rax
mov rax, qword [rsp + 0x50]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xb0]
mov dword [rsp + rcx + 0x4c], edx
lea rcx, [rsp + 0x60]
call fcn.180009000
mov rax, qword [rsp + 0x50]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_istream_char__struct_std::char_traits_char__.0
mov qword [rsp + rcx + 0x50], rax
mov rax, qword [rsp + 0x50]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0x18]
mov dword [rsp + rcx + 0x4c], edx
lea rax, vtable.std::ios_base.0
mov qword [rsp + 0x100], rax
lea rcx, [rsp + 0x100]
call fcn.1800100a4
nop
jmp 0x1800040fd
mov rdx, r15
cmp qword [r15 + 0x18], 0x10
jb 0x180003c38
mov rdx, qword [r15]
xor r9d, r9d
mov r8d, dword [r15 + 0x10]
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_send]
mov ecx, 0x3e8
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rdx, [rsp + 0x180]
cmp qword [rsp + 0x198], 0x10
cmovae rdx, qword [rsp + 0x180]
xor r9d, r9d
mov r8d, dword [rsp + 0x190]
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_send]
mov ecx, 0x3e8
call qword [sym.imp.KERNEL32.dll_Sleep]
nop dword [rax]
mov rax, qword [rsp + 0x50]
movsxd rcx, dword [rax + 4]
test byte [rsp + rcx + 0x60], 1
jne 0x180003cd2
lea rdx, [rsp + 0x320]
lea rcx, [rsp + 0x50]
call fcn.180009550
mov r8d, dword [rsp + 0x58]
test r8d, r8d
jle 0x180003c90
xor r9d, r9d
lea rdx, [rsp + 0x320]
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_send]
jmp 0x180003c90
lea rcx, [rsp + 0x60]
call fcn.18000ad60
test rax, rax
jne 0x180003d08
mov rax, qword [rsp + 0x50]
movsxd rcx, dword [rax + 4]
lea rax, [rsp + 0x50]
add rcx, rax
cmp qword [rcx + 0x48], 0
cmovne ebx, r14d
or ebx, dword [rcx + 0x10]
xor r8d, r8d
mov edx, ebx
call fcn.180001d80
xor edx, edx
mov r8d, 0x100
lea rcx, [rsp + 0x220]
call fcn.180013310
mov ecx, 0x3e8
call qword [sym.imp.KERNEL32.dll_Sleep]
xor r9d, r9d
mov r8d, 0xff
lea rdx, [rsp + 0x220]
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_recv]
cmp eax, 0xffffffff
jne 0x180003f59
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x180003e22
mov qword [rsp + 0x40], r13
mov qword [rsp + 0x30], r13
mov dword [rsp + 0x28], r13d
lea rcx, [rsp + 0x40]
mov qword [rsp + 0x20], rcx
mov r9d, 0x400
mov r8d, eax
xor edx, edx
mov ecx, 0x1300
call qword [sym.imp.KERNEL32.dll_FormatMessageA]
mov r8d, eax
mov qword [rsp + 0x1d8], r13
mov qword [rsp + 0x1e8], r13
mov qword [rsp + 0x1f0], send
mov rdx, qword [rsp + 0x40]
lea rcx, [rsp + 0x1d8]
call fcn.18000afd0
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_LocalFree]
movups xmm0, xmmword [rsp + 0x1d8]
movups xmmword [rsp + 0x1a0], xmm0
movups xmm1, xmmword [rsp + 0x1e8]
psrldq xmm1, 8
movq rdx, xmm1
cmp rdx, 0x10
jb 0x180003e22
inc rdx
mov rcx, qword [rsp + 0x1a0]
mov rax, rcx
cmp rdx, 0x1000
jb 0x180003e1c
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x180004120
call fcn.180010c50
nop
mov rdx, qword [rsp + 0x198]
cmp rdx, 0x10
jb 0x180003e65
inc rdx
mov rcx, qword [rsp + 0x180]
mov rax, rcx
cmp rdx, 0x1000
jb 0x180003e60
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x180004126
call fcn.180010c50
mov qword [rsp + 0x190], r13
mov qword [rsp + 0x198], send
mov byte [rsp + 0x180], 0
mov rdx, qword [rsp + 0x178]
cmp rdx, 0x10
jb 0x180003ec4
inc rdx
mov rcx, qword [rsp + 0x160]
mov rax, rcx
cmp rdx, 0x1000
jb 0x180003ebf
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x18000412c
call fcn.180010c50
mov qword [rsp + 0x170], r13
mov qword [rsp + 0x178], send
mov byte [rsp + 0x160], 0
mov rax, qword [rsp + 0x50]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_ifstream_char__struct_std::char_traits_char__.0
mov qword [rsp + rcx + 0x50], rax
mov rax, qword [rsp + 0x50]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xb0]
mov dword [rsp + rcx + 0x4c], edx
lea rcx, [rsp + 0x60]
call fcn.180009000
mov rax, qword [rsp + 0x50]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_istream_char__struct_std::char_traits_char__.0
mov qword [rsp + rcx + 0x50], rax
mov rax, qword [rsp + 0x50]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0x18]
mov dword [rsp + rcx + 0x4c], edx
lea rax, vtable.std::ios_base.0
mov qword [rsp + 0x100], rax
lea rcx, [rsp + 0x100]
call fcn.1800100a4
nop
jmp 0x1800040fd
lea rdx, str.File_received
lea rcx, [rsp + 0x220]
call fcn.180037090
test eax, eax
jne 0x180003f80
lea rcx, [rsp + 0x160]
call fcn.180002300
jmp 0x180003fc4
lea rdx, str.Resend_file
lea rcx, [rsp + 0x220]
call fcn.180037090
test eax, eax
jne 0x180003fc4
mov eax, dword [0x180051088]
cmp eax, 2
jge 0x180003fc4
inc eax
mov dword [0x180051088], eax
mov ecx, 0x1388
call qword [sym.imp.KERNEL32.dll_Sleep]
mov r8, r15
mov rdx, r12
mov rcx, rsi
call fcn.180003520
mov dword [0x180051088], r13d
mov rdx, qword [rsp + 0x198]
cmp rdx, 0x10
jb 0x18000400e
inc rdx
mov rcx, qword [rsp + 0x180]
mov rax, rcx
cmp rdx, 0x1000
jb 0x180004009
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x180004126
call fcn.180010c50
mov qword [rsp + 0x190], r13
mov qword [rsp + 0x198], send
mov byte [rsp + 0x180], 0
mov rdx, qword [rsp + 0x178]
cmp rdx, 0x10
jb 0x18000406d
inc rdx
mov rcx, qword [rsp + 0x160]
mov rax, rcx
cmp rdx, 0x1000
jb 0x180004068
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x18000412c
call fcn.180010c50
mov qword [rsp + 0x170], r13
mov qword [rsp + 0x178], send
mov byte [rsp + 0x160], 0
mov rax, qword [rsp + 0x50]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_ifstream_char__struct_std::char_traits_char__.0
mov qword [rsp + rcx + 0x50], rax
mov rax, qword [rsp + 0x50]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xb0]
mov dword [rsp + rcx + 0x4c], edx
lea rcx, [rsp + 0x60]
call fcn.180009000
mov rax, qword [rsp + 0x50]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_istream_char__struct_std::char_traits_char__.0
mov qword [rsp + rcx + 0x50], rax
mov rax, qword [rsp + 0x50]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0x18]
mov dword [rsp + rcx + 0x4c], edx
lea rax, vtable.std::ios_base.0
mov qword [rsp + 0x100], rax
lea rcx, [rsp + 0x100]
call fcn.1800100a4
nop
mov rcx, qword [rsp + 0x720]
xor rcx, rsp
call fcn.180010c30
add rsp, 0x730
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret
call fcn.180019de8
nop
call fcn.180019de8
nop
call fcn.180019de8
int3