// File: /workspace/github_cpp_makefile_star2_O1/luigix25[P]SSLP/server_files/server.cpp
// Function: cmd_get()
bool cmd_get(){

	int len;

	char *encryptedData = recvDataHMAC(client_socket,len);
	if(encryptedData == NULL)
		return false;

	EncryptedChunk ec;
	ec.setCipherText(encryptedData);				//now in charge of memory management
	ec.size = len;

	Chunk c;

	DecryptManager dm;
	if(!dm.DecryptUpdate(c,ec))			return false;
	if(!dm.DecryptFinal(c))				return false;

	string filename(c.getPlainText());

	if(filename.size() >= MAX_FILENAME_LENGTH){
		return false;
	}

	string path(SERVER_PATH);
	cout<<path<<endl;
	if(!SendFile(path,client_socket,filename,SERVER_PRIVKEY_PATH,false)){
		cout << "[ERROR] sendFile failed" << endl;
		return false;
	}
	else{
		cout << "[LOG] sendFile correct" << endl;
		return true;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x80, %rsp
leaq 0xb321(%rip), %rdi      # 0x10580
leaq 0xc(%rsp), %rsi
callq 0x6f64
testq %rax, %rax
je 0x5319
movq %rax, %rbx
leaq 0x68(%rsp), %r14
movq %r14, %rdi
callq 0xa1da
movq %r14, %rdi
movq %rbx, %rsi
callq 0xa228
movl 0xc(%rsp), %eax
movl %eax, 0x78(%rsp)
leaq 0x30(%rsp), %rdi
callq 0xa0c4
movq %rsp, %rdi
callq 0x7e5c
movq %rsp, %rdi
leaq 0x30(%rsp), %rsi
leaq 0x68(%rsp), %rdx
callq 0x7efa
testb %al, %al
je 0x52f9
movq %rsp, %rdi
leaq 0x30(%rsp), %rsi
callq 0x8018
testb %al, %al
je 0x52f9
leaq 0x30(%rsp), %rdi
callq 0xa192
leaq 0x48(%rsp), %rdi
leaq 0x10(%rsp), %rdx
movq %rax, %rsi
callq 0x66c4
cmpq $0x63, 0x50(%rsp)
jbe 0x532a
xorl %ebx, %ebx
jmp 0x5419
xorl %ebx, %ebx
movq %rsp, %rdi
callq 0x7ee6
leaq 0x30(%rsp), %rdi
callq 0xa0d8
leaq 0x68(%rsp), %rdi
callq 0xa1ee
jmp 0x531b
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x80, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x20(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x5d07(%rip), %rsi      # 0xb041
leaq 0x5d16(%rip), %rdx      # 0xb057
leaq 0x10(%rsp), %rdi
callq 0x6792
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq 0xac74(%rip), %rdi      # 0xffd0
callq 0x4530
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x4440
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x4330
leaq 0xb1ee(%rip), %rsi      # 0x10580
leaq 0x5cd8(%rip), %rcx      # 0xb071
leaq 0x10(%rsp), %rdi
leaq 0x48(%rsp), %rdx
xorl %r8d, %r8d
callq 0x87fe
movl %eax, %ebx
leaq 0x5ced(%rip), %rax      # 0xb0a1
leaq 0x5cce(%rip), %rsi      # 0xb089
testb %bl, %bl
cmovneq %rax, %rsi
movzbl %bl, %edx
xorq $0x17, %rdx
movq 0xac01(%rip), %r14      # 0xffd0
movq %r14, %rdi
callq 0x4530
movq (%r14), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x4440
movsbl %al, %esi
movq 0xabdb(%rip), %rdi      # 0xffd0
callq 0x4040
movq %rax, %rdi
callq 0x4330
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x5419
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x4480
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x52fb
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x4480
jmp 0x52fb
movq %rax, %rbx
jmp 0x546c
jmp 0x5489
jmp 0x5489
movq %rax, %rbx
jmp 0x5494
jmp 0x544d
movq %rax, %rbx
jmp 0x549e
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x546c
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x4480
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x548c
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x4480
jmp 0x548c
movq %rax, %rbx
movq %rsp, %rdi
callq 0x7ee6
leaq 0x30(%rsp), %rdi
callq 0xa0d8
leaq 0x68(%rsp), %rdi
callq 0xa1ee
movq %rbx, %rdi
callq 0x4830