LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: luigix25[P]SSLP/library/library.cpp
// Function: NetSocket::closeConnection()
void NetSocket::closeConnection(){
	if(isClosed)
		return;
	close(this->socket);
	isClosed = true;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
testb $0x1, 0x4(%rax)
je 0x7e6c
jmp 0x7e7f
movq -0x10(%rbp), %rax
movl (%rax), %edi
callq 0x4a00
movq -0x10(%rbp), %rax
movb $0x1, 0x4(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: luigix25[P]SSLP/library/library.cpp
// Function: NetSocket::sendInt(int)
bool NetSocket::sendInt(int value){
	if(isClosed)
		return false;

	int status;
	uint32_t tosend;

	tosend = htonl(value);
	//status = send(sd, &tosend, sizeof(uint32_t), 0);
	status = sendto(this->socket, &tosend, sizeof(int32_t), 0,NULL,0);
	if(status < (int)sizeof(int32_t))	{
		perror("[Error] send");
		return false;
	}

	return (status==sizeof(uint32_t));

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
testb $0x1, 0x4(%rax)
je 0x7eb3
movb $0x0, -0x1(%rbp)
jmp 0x7f0a
movl -0x14(%rbp), %edi
callq 0x43c0
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, -0x1c(%rbp)
movl (%rax), %edi
leaq -0x1c(%rbp), %rsi
movl $0x4, %edx
xorl %r9d, %r9d
xorl %eax, %eax
movl %eax, %r8d
movl %r9d, %ecx
callq 0x40a0
movl %eax, -0x18(%rbp)
cmpl $0x4, -0x18(%rbp)
jge 0x7efa
leaq 0x621c(%rip), %rdi      # 0xe10b
callq 0x4430
movb $0x0, -0x1(%rbp)
jmp 0x7f0a
movslq -0x18(%rbp), %rax
cmpq $0x4, %rax
sete %al
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: luigix25[P]SSLP/library/library.cpp
// Function: NetSocket::utilitySend(char const*, unsigned int)
bool NetSocket::utilitySend(const char* buffer,uint32_t len){

	if(isClosed)
		return false;

	uint32_t inviati = 0;
	int32_t ret =  0;

	while(inviati < len){

		ret = sendto(this->socket,buffer+inviati,len-inviati,0,NULL,0);
		if(ret == -1){
			perror("[Error] send");
			return false;
		} 
		inviati += ret;
	}
	
	return (inviati == len);

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
testb $0x1, 0x4(%rax)
je 0x7f47
movb $0x0, -0x1(%rbp)
jmp 0x7fbb
movl $0x0, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jae 0x7fad
movq -0x30(%rbp), %rax
movl (%rax), %edi
movq -0x18(%rbp), %rsi
movl -0x20(%rbp), %eax
addq %rax, %rsi
movl -0x1c(%rbp), %eax
subl -0x20(%rbp), %eax
movl %eax, %eax
movl %eax, %edx
xorl %r9d, %r9d
xorl %eax, %eax
movl %eax, %r8d
movl %r9d, %ecx
callq 0x40a0
movl %eax, -0x24(%rbp)
cmpl $-0x1, -0x24(%rbp)
jne 0x7fa2
leaq 0x6174(%rip), %rdi      # 0xe10b
callq 0x4430
movb $0x0, -0x1(%rbp)
jmp 0x7fbb
movl -0x24(%rbp), %eax
addl -0x20(%rbp), %eax
movl %eax, -0x20(%rbp)
jmp 0x7f55
movl -0x20(%rbp), %eax
cmpl -0x1c(%rbp), %eax
sete %al
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: luigix25[P]SSLP/library/library.cpp
// Function: NetSocket::utilityRecv(char*, unsigned int)
bool NetSocket::utilityRecv(char* buffer,uint32_t len){
	uint32_t ricevuti = 0;
	int ret = 0;

	while(ricevuti < len){ 										//posso leggere meno byte
		ret = recvfrom(this->socket,buffer+ricevuti,len-ricevuti,0,NULL,0);
		if(ret == -1){
			perror("[Error] recv");
			return false;	
		}
		ricevuti += ret;
	}

	return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movl $0x0, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jae 0x8050
movq -0x30(%rbp), %rax
movl (%rax), %edi
movq -0x18(%rbp), %rsi
movl -0x20(%rbp), %eax
addq %rax, %rsi
movl -0x1c(%rbp), %eax
subl -0x20(%rbp), %eax
movl %eax, %eax
movl %eax, %edx
xorl %ecx, %ecx
xorl %eax, %eax
movl %eax, %r9d
movq %r9, %r8
callq 0x43d0
movl %eax, -0x24(%rbp)
cmpl $-0x1, -0x24(%rbp)
jne 0x8045
leaq 0x641f(%rip), %rdi      # 0xe459
callq 0x4430
movb $0x0, -0x1(%rbp)
jmp 0x8054
movl -0x24(%rbp), %eax
addl -0x20(%rbp), %eax
movl %eax, -0x20(%rbp)
jmp 0x7ff9
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nop
// File: luigix25[P]SSLP/library/library.cpp
// Function: NetSocket::recvData(unsigned int)
char* NetSocket::recvData(uint32_t len){

	char *buffer = new char[len];
	if(buffer == NULL)
		return NULL;

	if(utilityRecv(buffer,len))
		return buffer;
	else
		return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movl -0x14(%rbp), %eax
movl %eax, %edi
callq 0x4040
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x80c6
movq $0x0, -0x8(%rbp)
jmp 0x80ee
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rsi
movl -0x14(%rbp), %edx
callq 0x7fd0
testb $0x1, %al
jne 0x80dc
jmp 0x80e6
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x80ee
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: luigix25[P]SSLP/library/library.cpp
// Function: NetSocket::recvInt(int&)
bool NetSocket::recvInt(int &val){

	int ret,tmp;

	ret = recvfrom(this->socket,&tmp,sizeof(uint32_t),0,NULL,0);
	if(ret < (int)sizeof(uint32_t)){
		perror("[Error] recv");
		return 0;
	}

	val = ntohl(tmp);

	return (ret == (int)sizeof(uint32_t));

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %edi
leaq -0x20(%rbp), %rsi
movl $0x4, %edx
xorl %ecx, %ecx
xorl %eax, %eax
movl %eax, %r9d
movq %r9, %r8
callq 0x43d0
movl %eax, -0x1c(%rbp)
cmpl $0x4, -0x1c(%rbp)
jge 0x8149
leaq 0x631b(%rip), %rdi      # 0xe459
callq 0x4430
movb $0x0, -0x1(%rbp)
jmp 0x8165
movl -0x20(%rbp), %edi
callq 0x4690
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
cmpl $0x4, -0x1c(%rbp)
sete %al
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
// File: luigix25[P]SSLP/library/library.cpp
// Function: get_file_list[abi:cxx11](char const*)
vector<string> get_file_list(const char* path){

	DIR* folder = opendir(path);
	struct dirent* dp;
	vector <string> result;

	while( (dp = readdir(folder)) != NULL){						//WARNING SICUREZZA
		char *filename = dp->d_name;
		if(filename[0] == '.')
			continue;
		result.push_back(filename);
	}

	closedir(folder);
	return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x70(%rbp)
movq %rdi, %rax
movq %rax, -0x78(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x47f0
movq -0x70(%rbp), %rdi
movq %rax, -0x18(%rbp)
movb $0x0, -0x21(%rbp)
callq 0x8b40
movq -0x18(%rbp), %rdi
callq 0x4800
movq %rax, -0x80(%rbp)
jmp 0x81b7
movq -0x80(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0x827c
movq -0x20(%rbp), %rax
addq $0x13, %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2e, %eax
jne 0x81f4
jmp 0x81a8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x82a7
movq -0x40(%rbp), %rax
movq %rax, -0x90(%rbp)
leaq -0x61(%rbp), %rdi
movq %rdi, -0x88(%rbp)
callq 0x4910
movq -0x90(%rbp), %rsi
movq -0x88(%rbp), %rdx
leaq -0x60(%rbp), %rdi
callq 0x76e0
jmp 0x8228
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x8b60
jmp 0x8237
leaq -0x60(%rbp), %rdi
callq 0x42b0
leaq -0x61(%rbp), %rdi
callq 0x4530
jmp 0x81a8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x8271
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x42b0
leaq -0x61(%rbp), %rdi
callq 0x4530
jmp 0x82a7
movq -0x18(%rbp), %rdi
callq 0x4850
jmp 0x8287
movb $0x1, -0x21(%rbp)
testb $0x1, -0x21(%rbp)
jne 0x829a
movq -0x70(%rbp), %rdi
callq 0x77d0
movq -0x78(%rbp), %rax
addq $0x90, %rsp
popq %rbp
retq
movq -0x70(%rbp), %rdi
callq 0x77d0
movq -0x30(%rbp), %rdi
callq 0x4900
nopl (%rax)
// File: luigix25[P]SSLP/library/library.cpp
// Function: split(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
vector<string> split (string s, string delimiter) {
    size_t pos_start = 0, pos_end, delim_len = delimiter.length();
    string token;
    vector<string> res;

    while ((pos_end = s.find (delimiter, pos_start)) != string::npos) {
        token = s.substr (pos_start, pos_end - pos_start);
        pos_start = pos_end + delim_len;
        res.push_back (token);
    }

    res.push_back (s.substr (pos_start));
    return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movq %rdx, -0xc0(%rbp)
movq %rsi, -0xc8(%rbp)
movq %rdi, %rax
movq -0xc0(%rbp), %rdi
movq %rax, -0xb0(%rbp)
movq %rax, %rcx
movq %rcx, -0xb8(%rbp)
movq %rax, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdi, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
callq 0x47e0
movq %rax, -0x30(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x4780
movq -0xb0(%rbp), %rdi
movb $0x0, -0x51(%rbp)
callq 0x8b40
movq -0xc0(%rbp), %rsi
movq -0xc8(%rbp), %rdi
movq -0x20(%rbp), %rdx
callq 0x4a20
movq %rax, -0x28(%rbp)
cmpq $-0x1, %rax
je 0x83d0
movq -0xc8(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
subq %rdx, %rcx
leaq -0x78(%rbp), %rdi
callq 0x44f0
jmp 0x836c
leaq -0x50(%rbp), %rdi
movq %rdi, -0xd0(%rbp)
leaq -0x78(%rbp), %rsi
movq %rsi, -0xd8(%rbp)
callq 0x4650
movq -0xd8(%rbp), %rdi
callq 0x42b0
movq -0xb0(%rbp), %rdi
movq -0xd0(%rbp), %rsi
movq -0x28(%rbp), %rax
movq -0x30(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
callq 0x8b90
jmp 0x83b7
jmp 0x832a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x845f
movq -0xc8(%rbp), %rsi
movq -0x20(%rbp), %rdx
leaq -0xa8(%rbp), %rdi
movq $-0x1, %rcx
callq 0x44f0
jmp 0x83f0
movq -0xb0(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0x8b60
jmp 0x8405
leaq -0xa8(%rbp), %rdi
callq 0x42b0
movb $0x1, -0x51(%rbp)
testb $0x1, -0x51(%rbp)
jne 0x8446
jmp 0x843a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0x42b0
jmp 0x845f
movq -0xb0(%rbp), %rdi
callq 0x77d0
leaq -0x50(%rbp), %rdi
callq 0x42b0
movq -0xb8(%rbp), %rax
addq $0xe0, %rsp
popq %rbp
retq
movq -0xb0(%rbp), %rdi
callq 0x77d0
leaq -0x50(%rbp), %rdi
callq 0x42b0
movq -0x80(%rbp), %rdi
callq 0x4900
nopl (%rax)
// File: luigix25[P]SSLP/library/library.cpp
// Function: sendIntHMAC(NetSocket&, int)
bool sendIntHMAC(NetSocket& sender_socket,int32_t value){

	if(!sender_socket.sendInt(value))
		return false;

	HMACManager hm;

	Chunk c;
	c.setPlainText((char*)&value,false);
	c.size = sizeof(uint32_t);
	hm.HMACUpdate(c);

	char *digest = hm.HMACFinal(LOCAL_NONCE);

	if(digest == NULL) return false;
	bool return_value;

	return_value = sender_socket.sendData(digest,HASH_SIZE);

	delete[] digest;

	return return_value;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x7e90
testb $0x1, %al
jne 0x84a8
movb $0x0, -0x1(%rbp)
jmp 0x8599
leaq -0x20(%rbp), %rdi
callq 0xa900
leaq -0x38(%rbp), %rdi
callq 0xd6b0
jmp 0x84bc
leaq -0x38(%rbp), %rdi
leaq -0x14(%rbp), %rsi
xorl %edx, %edx
callq 0xd7a0
jmp 0x84cd
movl $0x4, -0x28(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0xaa10
jmp 0x84e3
leaq -0x20(%rbp), %rdi
xorl %esi, %esi
callq 0xaac0
movq %rax, -0x60(%rbp)
jmp 0x84f4
movq -0x60(%rbp), %rax
movq %rax, -0x50(%rbp)
cmpq $0x0, -0x50(%rbp)
jne 0x8535
movb $0x0, -0x1(%rbp)
movl $0x1, -0x54(%rbp)
jmp 0x857a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x858e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x38(%rbp), %rdi
callq 0xd6d0
jmp 0x858e
movq -0x10(%rbp), %rdi
movq -0x50(%rbp), %rsi
movl $0x20, %edx
callq 0x8060
movb %al, -0x61(%rbp)
jmp 0x854c
movb -0x61(%rbp), %al
andb $0x1, %al
movb %al, -0x55(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x70(%rbp)
cmpq $0x0, %rax
je 0x856b
movq -0x70(%rbp), %rdi
callq 0x46d0
movb -0x55(%rbp), %al
andb $0x1, %al
movb %al, -0x1(%rbp)
movl $0x1, -0x54(%rbp)
leaq -0x38(%rbp), %rdi
callq 0xd6d0
leaq -0x20(%rbp), %rdi
callq 0xabf0
jmp 0x8599
leaq -0x20(%rbp), %rdi
callq 0xabf0
jmp 0x85a4
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x70, %rsp
popq %rbp
retq
movq -0x40(%rbp), %rdi
callq 0x4900
nopl (%rax)
// File: luigix25[P]SSLP/library/library.cpp
// Function: recvIntHMAC(NetSocket&, int&)
bool recvIntHMAC(NetSocket& receiver_socket,int32_t& value){

	if(!receiver_socket.recvInt(value))
		return false;

	char *received_digest = receiver_socket.recvData(HASH_SIZE);
	if(received_digest == NULL)
		return false;


	HMACManager hm;
	Chunk c;
	c.size = sizeof(uint32_t);
	c.setPlainText((char*)&value,false);

	hm.HMACUpdate(c);
	char *digest = hm.HMACFinal(REMOTE_NONCE);

	if(digest == NULL){
		return false;
	}

	bool result;

	if(CRYPTO_memcmp(received_digest,digest,HASH_SIZE)){
		cout<<"HASH DIVERSI"<<endl;
		cout<<"Ricevuto:"<<endl;
		//close connection
		result = false;
	} else {
		result = true;
	}

	delete[] digest;
	delete[] received_digest;
	return result;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x8100
testb $0x1, %al
jne 0x85dd
movb $0x0, -0x1(%rbp)
jmp 0x877f
movq -0x10(%rbp), %rdi
movl $0x20, %esi
callq 0x8090
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x85ff
movb $0x0, -0x1(%rbp)
jmp 0x877f
leaq -0x28(%rbp), %rdi
callq 0xa900
leaq -0x40(%rbp), %rdi
callq 0xd6b0
jmp 0x8613
movl $0x4, -0x30(%rbp)
movq -0x18(%rbp), %rsi
leaq -0x40(%rbp), %rdi
xorl %edx, %edx
callq 0xd7a0
jmp 0x862b
leaq -0x28(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0xaa10
jmp 0x863a
leaq -0x28(%rbp), %rdi
movl $0x1, %esi
callq 0xaac0
movq %rax, -0x68(%rbp)
jmp 0x864e
movq -0x68(%rbp), %rax
movq %rax, -0x58(%rbp)
cmpq $0x0, -0x58(%rbp)
jne 0x8698
movb $0x0, -0x1(%rbp)
movl $0x1, -0x5c(%rbp)
jmp 0x8760
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x8774
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x40(%rbp), %rdi
callq 0xd6d0
jmp 0x8774
movq -0x20(%rbp), %rdi
movq -0x58(%rbp), %rsi
movl $0x20, %edx
callq 0x4920
movl %eax, -0x6c(%rbp)
jmp 0x86af
movl -0x6c(%rbp), %eax
cmpl $0x0, %eax
je 0x8713
movq 0xa8fa(%rip), %rdi      # 0x12fb8
leaq 0x5da1(%rip), %rsi      # 0xe466
callq 0x44a0
movq %rax, -0x78(%rbp)
jmp 0x86d0
movq -0x78(%rbp), %rdi
movq 0xa8cd(%rip), %rsi      # 0x12fa8
callq 0x4500
jmp 0x86e2
movq 0xa8cf(%rip), %rdi      # 0x12fb8
leaq 0x5d83(%rip), %rsi      # 0xe473
callq 0x44a0
movq %rax, -0x80(%rbp)
jmp 0x86fb
movq -0x80(%rbp), %rdi
movq 0xa8a2(%rip), %rsi      # 0x12fa8
callq 0x4500
jmp 0x870d
movb $0x0, -0x5d(%rbp)
jmp 0x8717
movb $0x1, -0x5d(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0x88(%rbp)
cmpq $0x0, %rax
je 0x8734
movq -0x88(%rbp), %rdi
callq 0x46d0
movq -0x20(%rbp), %rax
movq %rax, -0x90(%rbp)
cmpq $0x0, %rax
je 0x8751
movq -0x90(%rbp), %rdi
callq 0x46d0
movb -0x5d(%rbp), %al
andb $0x1, %al
movb %al, -0x1(%rbp)
movl $0x1, -0x5c(%rbp)
leaq -0x40(%rbp), %rdi
callq 0xd6d0
leaq -0x28(%rbp), %rdi
callq 0xabf0
jmp 0x877f
leaq -0x28(%rbp), %rdi
callq 0xabf0
jmp 0x878d
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x90, %rsp
popq %rbp
retq
movq -0x48(%rbp), %rdi
callq 0x4900
nopw %cs:(%rax,%rax)
// File: luigix25[P]SSLP/library/library.cpp
// Function: sendDataHMAC(NetSocket&, char const*, int)
bool sendDataHMAC(NetSocket& sender_socket,const char *data,int32_t length){

	if(!sendIntHMAC(sender_socket,length+HASH_SIZE))
		return false;

	if(!sender_socket.sendData(data,length)){
		return false;
	}

	HMACManager hmac;

	if(!hmac.HMACUpdate(data,length)) return false;

	char *digest = hmac.HMACFinal(LOCAL_NONCE);

	bool ret = sender_socket.sendData(digest,HASH_SIZE);

	delete[] digest;
	return ret;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
movl -0x1c(%rbp), %esi
addl $0x20, %esi
callq 0x8480
testb $0x1, %al
jne 0x87cf
movb $0x0, -0x1(%rbp)
jmp 0x88a2
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %edx
callq 0x8060
testb $0x1, %al
jne 0x87ec
movb $0x0, -0x1(%rbp)
jmp 0x88a2
leaq -0x28(%rbp), %rdi
movq %rdi, -0x50(%rbp)
callq 0xa900
movq -0x50(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %edx
callq 0xaa70
movb %al, -0x42(%rbp)
jmp 0x880e
movb -0x42(%rbp), %al
testb $0x1, %al
jne 0x883b
jmp 0x8817
movb $0x0, -0x1(%rbp)
movl $0x1, -0x38(%rbp)
jmp 0x8899
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x28(%rbp), %rdi
callq 0xabf0
jmp 0x88ad
leaq -0x28(%rbp), %rdi
xorl %esi, %esi
callq 0xaac0
movq %rax, -0x58(%rbp)
jmp 0x884c
movq -0x58(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rdi
movq -0x40(%rbp), %rsi
movl $0x20, %edx
callq 0x8060
movb %al, -0x59(%rbp)
jmp 0x886b
movb -0x59(%rbp), %al
andb $0x1, %al
movb %al, -0x41(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x68(%rbp)
cmpq $0x0, %rax
je 0x888a
movq -0x68(%rbp), %rdi
callq 0x46d0
movb -0x41(%rbp), %al
andb $0x1, %al
movb %al, -0x1(%rbp)
movl $0x1, -0x38(%rbp)
leaq -0x28(%rbp), %rdi
callq 0xabf0
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x70, %rsp
popq %rbp
retq
movq -0x30(%rbp), %rdi
callq 0x4900
nopw %cs:(%rax,%rax)
// File: luigix25[P]SSLP/library/WriteFileManager.cpp
// Function: WriteFileManager::WriteFileManager(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, unsigned long)
WriteFileManager::WriteFileManager(string &name, uint64_t size) : FileManager(name,size){
	if(file_exists()){
		original_file_name = file_name;
		string tmp(".tmp");
		string new_name = file_name + tmp;
		changeName(new_name);
	} else{
		original_file_name = "";
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x80(%rbp)
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x9830
movq -0x80(%rbp), %rdi
leaq 0x9209(%rip), %rax      # 0x12d30
movq %rax, (%rdi)
addq $0x248, %rdi            # imm = 0x248
movq %rdi, -0x88(%rbp)
callq 0x4780
movq -0x80(%rbp), %rdi
callq 0x9960
movb %al, -0x71(%rbp)
jmp 0x9b4b
movb -0x71(%rbp), %al
testb $0x1, %al
jne 0x9b57
jmp 0x9c2f
movq -0x80(%rbp), %rdi
movq %rdi, %rsi
addq $0x8, %rsi
addq $0x248, %rdi            # imm = 0x248
callq 0x4050
jmp 0x9b70
leaq -0x49(%rbp), %rdi
movq %rdi, -0x90(%rbp)
callq 0x4910
movq -0x90(%rbp), %rdx
leaq 0x4917(%rip), %rsi      # 0xe4a5
leaq -0x48(%rbp), %rdi
callq 0x76e0
jmp 0x9b99
leaq -0x49(%rbp), %rdi
callq 0x4530
movq -0x80(%rbp), %rsi
addq $0x8, %rsi
leaq -0x70(%rbp), %rdi
leaq -0x48(%rbp), %rdx
callq 0x7850
jmp 0x9bb9
movq -0x80(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x9a70
jmp 0x9bc8
leaq -0x70(%rbp), %rdi
callq 0x42b0
leaq -0x48(%rbp), %rdi
callq 0x42b0
jmp 0x9c4a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x9c53
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x49(%rbp), %rdi
callq 0x4530
jmp 0x9c53
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x9c24
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x42b0
leaq -0x48(%rbp), %rdi
callq 0x42b0
jmp 0x9c53
movq -0x80(%rbp), %rdi
addq $0x248, %rdi            # imm = 0x248
leaq 0x4631(%rip), %rsi      # 0xe272
callq 0x4750
jmp 0x9c48
jmp 0x9c4a
addq $0x90, %rsp
popq %rbp
retq
movq -0x88(%rbp), %rdi
callq 0x42b0
movq -0x80(%rbp), %rdi
callq 0x9aa0
movq -0x20(%rbp), %rdi
callq 0x4900
nopw %cs:(%rax,%rax)
// File: luigix25[P]SSLP/library/WriteFileManager.cpp
// Function: WriteFileManager::openStream()
bool WriteFileManager::openStream(){
	if(!fs.is_open()){
		fs.open(file_name, fstream::out | fstream::app | fstream::binary);
		if(fs.fail()){ 
			cout << "[LOG] file can't open" << endl;
			return false;
		}
	}
	return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x18(%rbp)
addq $0x28, %rdi
callq 0x48c0
testb $0x1, %al
jne 0x9d5e
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x28, %rcx
movq %rcx, -0x28(%rbp)
addq $0x8, %rax
movq %rax, -0x20(%rbp)
movl $0x10, %edi
movl $0x1, %esi
callq 0x78d0
movl %eax, %edi
movl $0x4, %esi
callq 0x78d0
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rsi
movl %eax, %edx
callq 0x4770
movq -0x18(%rbp), %rax
movq %rax, %rdi
addq $0x28, %rdi
movq 0x28(%rax), %rax
addq -0x18(%rax), %rdi
callq 0x4030
testb $0x1, %al
jne 0x9d34
jmp 0x9d5c
movq 0x927d(%rip), %rdi      # 0x12fb8
leaq 0x4768(%rip), %rsi      # 0xe4aa
callq 0x44a0
movq %rax, %rdi
movq 0x9257(%rip), %rsi      # 0x12fa8
callq 0x4500
movb $0x0, -0x1(%rbp)
jmp 0x9d62
jmp 0x9d5e
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: luigix25[P]SSLP/library/WriteFileManager.cpp
// Function: WriteFileManager::write(Chunk&)
file_status WriteFileManager::write(Chunk& c){ //write in append
	if(!openStream()){ // Check if stream its open
		return FILE_ERROR;
	}
	fs.write(c.getPlainText(), c.size); // Write new block in to the file
	if(!fs){
		return FILE_ERROR;
	}

	remaining_size -= c.size;
	closeStream();
	if(remaining_size <= 0){
		return END_OF_FILE;
	}
	return NO_ERRORS; // All good
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x20(%rbp)
movq (%rdi), %rax
callq *(%rax)
testb $0x1, %al
jne 0x9d9d
movl $0x2, -0x4(%rbp)
jmp 0x9e31
movq -0x20(%rbp), %rax
addq $0x28, %rax
addq $0x10, %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rdi
callq 0xd7e0
movq -0x28(%rbp), %rdi
movq %rax, %rsi
movq -0x18(%rbp), %rax
movslq 0x10(%rax), %rdx
callq 0x4700
movq -0x20(%rbp), %rax
movq %rax, %rdi
addq $0x28, %rdi
movq 0x28(%rax), %rax
addq -0x18(%rax), %rdi
callq 0x4210
testb $0x1, %al
jne 0x9de8
jmp 0x9df1
movl $0x2, -0x4(%rbp)
jmp 0x9e31
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rax
movslq 0x10(%rax), %rcx
movq 0x240(%rdi), %rax
subq %rcx, %rax
movq %rax, 0x240(%rdi)
callq 0x98f0
movq -0x20(%rbp), %rax
cmpq $0x0, 0x240(%rax)
ja 0x9e2a
movl $0x3, -0x4(%rbp)
jmp 0x9e31
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: luigix25[P]SSLP/library/WriteFileManager.cpp
// Function: WriteFileManager::finalize(bool)
void WriteFileManager::finalize(bool error){
	if(error || remaining_size > 0){ // after error, remove file
		remove((const char*)file_name.c_str());
		return;
	}
	if(original_file_name != ""){ // end of write, substitute previous file with tmp
		remove((const char*)original_file_name.c_str());
		rename((const char*)file_name.c_str(),(const char*)original_file_name.c_str());
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
andb $0x1, %al
movb %al, -0x9(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
testb $0x1, -0x9(%rbp)
jne 0x9e70
movq -0x18(%rbp), %rax
cmpq $0x0, 0x240(%rax)
jbe 0x9e87
movq -0x18(%rbp), %rdi
addq $0x8, %rdi
callq 0x41e0
movq %rax, %rdi
callq 0x4950
jmp 0x9ee9
movq -0x18(%rbp), %rdi
addq $0x248, %rdi            # imm = 0x248
leaq 0x43d9(%rip), %rsi      # 0xe272
callq 0x78f0
testb $0x1, %al
jne 0x9ea4
jmp 0x9ee9
movq -0x18(%rbp), %rdi
addq $0x248, %rdi            # imm = 0x248
callq 0x41e0
movq %rax, %rdi
callq 0x4950
movq -0x18(%rbp), %rdi
addq $0x8, %rdi
callq 0x41e0
movq -0x18(%rbp), %rdi
movq %rax, -0x20(%rbp)
addq $0x248, %rdi            # imm = 0x248
callq 0x41e0
movq -0x20(%rbp), %rdi
movq %rax, %rsi
callq 0x42a0
addq $0x20, %rsp
popq %rbp
retq
nop
// File: luigix25[P]SSLP/library/ReadFileManager.cpp
// Function: ReadFileManager::compute_size_file()
uint64_t ReadFileManager::compute_size_file(){
	fs.open(file_name, fstream::in | fstream::binary);
	if(fs.fail()){ 
		cout << "LOG: file can't open" << endl;
		return false;
	}	
	fs.seekg (0,fs.end);
	uint64_t length = fs.tellg(); 
	fs.close();
	return length;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movq %rax, %rcx
addq $0x28, %rcx
movq %rcx, -0x40(%rbp)
addq $0x8, %rax
movq %rax, -0x38(%rbp)
movl $0x8, %edi
movl $0x4, %esi
callq 0x78d0
movq -0x40(%rbp), %rdi
movq -0x38(%rbp), %rsi
movl %eax, %edx
callq 0x4770
movq -0x30(%rbp), %rax
movq %rax, %rdi
addq $0x28, %rdi
movq 0x28(%rax), %rax
addq -0x18(%rax), %rdi
callq 0x4030
testb $0x1, %al
jne 0x9fd3
jmp 0x9fff
movq 0x8fde(%rip), %rdi      # 0x12fb8
leaq 0x44f2(%rip), %rsi      # 0xe4d3
callq 0x44a0
movq %rax, %rdi
movq 0x8fb8(%rip), %rsi      # 0x12fa8
callq 0x4500
movq $0x0, -0x8(%rbp)
jmp 0xa04c
movq -0x30(%rbp), %rdi
addq $0x28, %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0x2, %edx
callq 0x4740
movq -0x30(%rbp), %rdi
addq $0x28, %rdi
callq 0x48e0
movq %rax, -0x28(%rbp)
movq %rdx, -0x20(%rbp)
leaq -0x28(%rbp), %rdi
callq 0xa2a0
movq -0x30(%rbp), %rdi
movq %rax, -0x18(%rbp)
addq $0x28, %rdi
callq 0x4090
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: luigix25[P]SSLP/library/ReadFileManager.cpp
// Function: ReadFileManager::openStream()
bool ReadFileManager::openStream(){
	if(!fs.is_open()){
		fs.open(file_name, fstream::in | fstream::binary);
		if(fs.fail()){ 
			cout << "LOG: file can't open" << endl;
			return false;
		}
	}
	return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x18(%rbp)
addq $0x28, %rdi
callq 0x48c0
testb $0x1, %al
jne 0xa12e
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x28, %rcx
movq %rcx, -0x28(%rbp)
addq $0x8, %rax
movq %rax, -0x20(%rbp)
movl $0x8, %edi
movl $0x4, %esi
callq 0x78d0
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rsi
movl %eax, %edx
callq 0x4770
movq -0x18(%rbp), %rax
movq %rax, %rdi
addq $0x28, %rdi
movq 0x28(%rax), %rax
addq -0x18(%rax), %rdi
callq 0x4030
testb $0x1, %al
jne 0xa104
jmp 0xa12c
movq 0x8ead(%rip), %rdi      # 0x12fb8
leaq 0x43c1(%rip), %rsi      # 0xe4d3
callq 0x44a0
movq %rax, %rdi
movq 0x8e87(%rip), %rsi      # 0x12fa8
callq 0x4500
movb $0x0, -0x1(%rbp)
jmp 0xa132
jmp 0xa12e
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: luigix25[P]SSLP/library/ReadFileManager.cpp
// Function: ReadFileManager::read(Chunk&)
file_status ReadFileManager::read(Chunk &c){ 	

	if(!openStream()){
		return FILE_ERROR;
	}	
	uint64_t chunk_address = file_size - remaining_size; //secure, only internal modify
	uint64_t size; // curent chunk size
	if(remaining_size >= MAX_CHUNK_SIZE){
		size = MAX_CHUNK_SIZE;
	} else{
		size = remaining_size; //if last chunk have lower size
	}
	c.size = size;
	fs.seekg(chunk_address); // Set position on disk in input stream
	c.setPlainText(new char[size]);

	fs.read(c.getPlainText(), size);
	if(!fs){
		return FILE_ERROR;
	}

	remaining_size -= c.size;

	closeStream();
	
	if(remaining_size <= 0){
		return END_OF_FILE;
	}
	return NO_ERRORS;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x40(%rbp)
movq (%rdi), %rax
callq *(%rax)
testb $0x1, %al
jne 0xa16d
movl $0x2, -0x4(%rbp)
jmp 0xa289
movq -0x40(%rbp), %rax
movq 0x238(%rax), %rcx
subq 0x240(%rax), %rcx
movq %rcx, -0x20(%rbp)
cmpq $0x40000, 0x240(%rax) # imm = 0x40000
jb 0xa19a
movq $0x40000, -0x28(%rbp)   # imm = 0x40000
jmp 0xa1a9
movq -0x40(%rbp), %rax
movq 0x240(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x40(%rbp), %rax
movq -0x28(%rbp), %rcx
movl %ecx, %edx
movq -0x18(%rbp), %rcx
movl %edx, 0x10(%rcx)
addq $0x28, %rax
movq %rax, -0x58(%rbp)
movq -0x20(%rbp), %rsi
leaq -0x38(%rbp), %rdi
callq 0xa2c0
movq -0x58(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x46a0
movq -0x18(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x28(%rbp), %rdi
callq 0x4040
movq -0x50(%rbp), %rdi
movq %rax, %rsi
callq 0xd760
movq -0x40(%rbp), %rax
addq $0x28, %rax
movq %rax, -0x48(%rbp)
movq -0x18(%rbp), %rdi
callq 0xd7e0
movq -0x48(%rbp), %rdi
movq %rax, %rsi
movq -0x28(%rbp), %rdx
callq 0x4680
movq -0x40(%rbp), %rax
movq %rax, %rdi
addq $0x28, %rdi
movq 0x28(%rax), %rax
addq -0x18(%rax), %rdi
callq 0x4210
testb $0x1, %al
jne 0xa240
jmp 0xa249
movl $0x2, -0x4(%rbp)
jmp 0xa289
movq -0x40(%rbp), %rdi
movq -0x18(%rbp), %rax
movslq 0x10(%rax), %rcx
movq 0x240(%rdi), %rax
subq %rcx, %rax
movq %rax, 0x240(%rdi)
callq 0x98f0
movq -0x40(%rbp), %rax
cmpq $0x0, 0x240(%rax)
ja 0xa282
movl $0x3, -0x4(%rbp)
jmp 0xa289
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: luigix25[P]SSLP/library/EncryptManager.cpp
// Function: EncryptManager::EncryptManager()
EncryptManager::EncryptManager(){

  	this->ctx = EVP_CIPHER_CTX_new();
  	if(!EVP_EncryptInit(ctx, EVP_aes_128_cbc(), this->key, this->IV)){
  		perror("Error In EVP_EncryptInit");
  	}

	incrementIV();

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
callq 0x42e0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq (%rax), %rax
movq %rax, -0x10(%rbp)
callq 0x4260
movq -0x10(%rbp), %rdi
movq %rax, %rsi
leaq 0x9323(%rip), %rdx      # 0x13660
leaq 0x932c(%rip), %rcx      # 0x13670
callq 0x46e0
cmpl $0x0, %eax
jne 0xa35a
leaq 0x41a5(%rip), %rdi      # 0xe4fa
callq 0x4430
callq 0xd3f0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: luigix25[P]SSLP/library/EncryptManager.cpp
// Function: EncryptManager::EncryptUpdate(char*&, int&, char const*, int)
bool EncryptManager::EncryptUpdate(char *& ciphertext, int32_t& ciphertext_len, const char* plaintext ,int32_t plaintext_len){

	ciphertext = new char[plaintext_len + AES_BLOCK];
 	
 	if(!EVP_EncryptUpdate(this->ctx, (unsigned char*)ciphertext, &ciphertext_len, (unsigned char*)plaintext, plaintext_len)){
    	perror("Error in EVP_EncryptUpdate");
    	return false;
    }

    return true;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movl %r8d, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movl -0x2c(%rbp), %eax
addl $0x10, %eax
movslq %eax, %rdi
callq 0x4040
movq %rax, %rdx
movq -0x38(%rbp), %rax
movq -0x18(%rbp), %rcx
movq %rdx, (%rcx)
movq (%rax), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
movl -0x2c(%rbp), %r8d
callq 0x40b0
cmpl $0x0, %eax
jne 0xa472
leaq 0x40ac(%rip), %rdi      # 0xe513
callq 0x4430
movb $0x0, -0x1(%rbp)
jmp 0xa476
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: luigix25[P]SSLP/library/EncryptManager.cpp
// Function: EncryptManager::EncryptUpdate(EncryptedChunk&, Chunk&)
bool EncryptManager::EncryptUpdate(EncryptedChunk& ec, Chunk& c){

	ec.setCipherText(new char[c.size + AES_BLOCK]);
 	
 	if(!EVP_EncryptUpdate(this->ctx, (unsigned char*)ec.getCipherText(), &ec.size, (unsigned char*)c.getPlainText(), c.size)){
    	perror("Error in EVP_EncryptUpdate");
    	return false;
    }

    return true;

	//return EncryptUpdate(ec.ciphertext,ec.size,c.plaintext,c.size);

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x20(%rbp), %rax
movl 0x10(%rax), %eax
addl $0x10, %eax
movslq %eax, %rdi
callq 0x4040
movq -0x48(%rbp), %rdi
movq %rax, %rsi
callq 0xd930
movq -0x40(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rdi
callq 0xd970
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
callq 0xd7e0
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq %rax, %rcx
movq -0x20(%rbp), %rax
movl 0x10(%rax), %r8d
callq 0x40b0
cmpl $0x0, %eax
jne 0xa532
leaq 0x3fec(%rip), %rdi      # 0xe513
callq 0x4430
movb $0x0, -0x1(%rbp)
jmp 0xa536
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: luigix25[P]SSLP/library/EncryptManager.cpp
// Function: EncryptManager::EncryptFinal(char*, int&)
bool EncryptManager::EncryptFinal(char* ciphertext,int32_t &len){

	int local_len;
	
	if(!EVP_EncryptFinal(ctx, (unsigned char*)ciphertext + len, &local_len)){
		perror("Error in EVP_EncryptFinal");
		return false;
	}
  	len += local_len;
	//EVP_CIPHER_CTX_free(ctx);
	return true;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rax
movslq (%rax), %rax
addq %rax, %rsi
leaq -0x24(%rbp), %rdx
callq 0x4970
cmpl $0x0, %eax
jne 0xa5d9
leaq 0x3f60(%rip), %rdi      # 0xe52e
callq 0x4430
movb $0x0, -0x1(%rbp)
jmp 0xa5e8
movl -0x24(%rbp), %ecx
movq -0x20(%rbp), %rax
addl (%rax), %ecx
movl %ecx, (%rax)
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: luigix25[P]SSLP/library/DecryptManager.cpp
// Function: DecryptManager::DecryptManager()
DecryptManager::DecryptManager(){
	
	this->ctx = EVP_CIPHER_CTX_new();
  	if(!EVP_DecryptInit(ctx, EVP_aes_128_cbc(), this->key, this->IV)){
  		perror("Error In EVP_DecryptInit");
  	}

	incrementIV();

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
callq 0x42e0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq (%rax), %rax
movq %rax, -0x10(%rbp)
callq 0x4260
movq -0x10(%rbp), %rdi
movq %rax, %rsi
leaq 0x9023(%rip), %rdx      # 0x13660
leaq 0x902c(%rip), %rcx      # 0x13670
callq 0x4130
cmpl $0x0, %eax
jne 0xa65a
leaq 0x3ef3(%rip), %rdi      # 0xe548
callq 0x4430
callq 0xd3f0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: luigix25[P]SSLP/library/DecryptManager.cpp
// Function: DecryptManager::DecryptUpdate(Chunk&, EncryptedChunk&)
bool DecryptManager::DecryptUpdate(Chunk &c, EncryptedChunk& ec){
	
	c.setPlainText(new char[ec.size + AES_BLOCK]);


    if(!EVP_DecryptUpdate(this->ctx, (unsigned char*)c.getPlainText(), &c.size, (unsigned char*)ec.getCipherText(), ec.size)){
    	perror("Error in EVP_DecryptUpdate");
    	return false;
    }

    return true;


}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x20(%rbp), %rax
movl 0x10(%rax), %eax
addl $0x10, %eax
movslq %eax, %rdi
callq 0x4040
movq -0x48(%rbp), %rdi
movq %rax, %rsi
callq 0xd760
movq -0x40(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rdi
callq 0xd7e0
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
callq 0xd970
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq %rax, %rcx
movq -0x20(%rbp), %rax
movl 0x10(%rax), %r8d
callq 0x42c0
cmpl $0x0, %eax
jne 0xa7a2
leaq 0x3dca(%rip), %rdi      # 0xe561
callq 0x4430
movb $0x0, -0x1(%rbp)
jmp 0xa7a6
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: luigix25[P]SSLP/library/DecryptManager.cpp
// Function: DecryptManager::DecryptUpdate(char*&, int&, char const*, int)
bool DecryptManager::DecryptUpdate(char *& plaintext,int32_t& plaintext_len,const char* ciphertext,int ciphertext_len){
    plaintext = new char[ciphertext_len + AES_BLOCK];


    if(!EVP_DecryptUpdate(this->ctx, (unsigned char*)plaintext, &plaintext_len, (unsigned char*)ciphertext, ciphertext_len)){
    	perror("Error in EVP_DecryptUpdate");
    	return false;
    }

    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movl %r8d, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movl -0x2c(%rbp), %eax
addl $0x10, %eax
movslq %eax, %rdi
callq 0x4040
movq %rax, %rdx
movq -0x38(%rbp), %rax
movq -0x18(%rbp), %rcx
movq %rdx, (%rcx)
movq (%rax), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
movl -0x2c(%rbp), %r8d
callq 0x42c0
cmpl $0x0, %eax
jne 0xa832
leaq 0x3d3a(%rip), %rdi      # 0xe561
callq 0x4430
movb $0x0, -0x1(%rbp)
jmp 0xa836
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: luigix25[P]SSLP/library/DecryptManager.cpp
// Function: DecryptManager::DecryptFinal(char*, int&)
bool DecryptManager::DecryptFinal(char* plaintext,int32_t &plaintext_len){
	int len;
	
	if(!EVP_DecryptFinal(ctx, (unsigned char*)plaintext + plaintext_len, &len)){
		perror("Error in EVP_DecryptFinal");
		return false;
	}
  	
  	plaintext_len += len;
	//EVP_CIPHER_CTX_free(ctx);
	return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rax
movslq (%rax), %rax
addq %rax, %rsi
leaq -0x24(%rbp), %rdx
callq 0x4070
cmpl $0x0, %eax
jne 0xa899
leaq 0x3cee(%rip), %rdi      # 0xe57c
callq 0x4430
movb $0x0, -0x1(%rbp)
jmp 0xa8a8
movl -0x24(%rbp), %ecx
movq -0x20(%rbp), %rax
addl (%rax), %ecx
movl %ecx, (%rax)
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: luigix25[P]SSLP/library/HMACManager.cpp
// Function: HMACManager::HMACManager()
HMACManager::HMACManager(){
  this->mdctx = HMAC_CTX_new();
 // size_t key_hmac_size = HMAC_KEY_SIZE;


    if(!HMAC_Init_ex(mdctx, this->hmac_key, HMAC_KEY_SIZE, EVP_sha256(), NULL)){
      perror("Error In HMAC_Init_ex");
    }

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
callq 0x4630
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq (%rax), %rax
movq %rax, -0x10(%rbp)
callq 0x48b0
movq -0x10(%rbp), %rdi
movq %rax, %rcx
leaq 0x8d43(%rip), %rsi      # 0x13680
movl $0x10, %edx
xorl %eax, %eax
movl %eax, %r8d
callq 0x4230
cmpl $0x0, %eax
jne 0xa95d
leaq 0x3c3e(%rip), %rdi      # 0xe596
callq 0x4430
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: luigix25[P]SSLP/library/HMACManager.cpp
// Function: HMACManager::HMACUpdate(EncryptedChunk&)
bool HMACManager::HMACUpdate(EncryptedChunk &ec){

    if(!HMAC_Update(mdctx, (unsigned char*) ec.getCipherText(),ec.size)){
    	perror("Error in EVP_DecryptUpdate");
    	return false;
    }

    return true;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0xd970
movq -0x20(%rbp), %rdi
movq %rax, %rsi
movq -0x18(%rbp), %rax
movslq 0x10(%rax), %rdx
callq 0x4560
cmpl $0x0, %eax
jne 0xa9ff
leaq 0x3b6d(%rip), %rdi      # 0xe561
callq 0x4430
movb $0x0, -0x1(%rbp)
jmp 0xaa03
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
nop
// File: luigix25[P]SSLP/library/HMACManager.cpp
// Function: HMACManager::HMACUpdate(Chunk&)
bool HMACManager::HMACUpdate(Chunk &ec){

    if(!HMAC_Update(mdctx, (unsigned char*) ec.getPlainText(),ec.size)){
    	perror("Error in EVP_DecryptUpdate");
    	return false;
    }

    return true;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0xd7e0
movq -0x20(%rbp), %rdi
movq %rax, %rsi
movq -0x18(%rbp), %rax
movslq 0x10(%rax), %rdx
callq 0x4560
cmpl $0x0, %eax
jne 0xaa5f
leaq 0x3b0d(%rip), %rdi      # 0xe561
callq 0x4430
movb $0x0, -0x1(%rbp)
jmp 0xaa63
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
nop
// File: luigix25[P]SSLP/library/HMACManager.cpp
// Function: HMACManager::HMACUpdate(char const*, int)
bool HMACManager::HMACUpdate(const char *pt,int len){

    if(!HMAC_Update(mdctx, (unsigned char*) pt,len)){
      perror("Error in EVP_DecryptUpdate");
      return false;
    }

    return true;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rsi
movslq -0x1c(%rbp), %rdx
callq 0x4560
cmpl $0x0, %eax
jne 0xaaae
leaq 0x3abe(%rip), %rdi      # 0xe561
callq 0x4430
movb $0x0, -0x1(%rbp)
jmp 0xaab2
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: luigix25[P]SSLP/library/HMACManager.cpp
// Function: HMACManager::HMACFinal(enum_nonce)
char* HMACManager::HMACFinal(enum_nonce en){
	int hash_size = EVP_MD_size(EVP_sha256());
	char *digest = new char [HASH_SIZE];

  if(nonce != 0){
    Chunk c;
    c.size = sizeof(uint32_t);
    c.setInt(nonce[en]);

    if(!HMACUpdate(c)){
      return NULL;
    }

    nonce[en]++;
  }
  
	if(!HMAC_Final(mdctx, (unsigned char*)digest, (unsigned int*)&hash_size)){
		perror("Error in HMAC_Final");
		return NULL;
	}

//	HMAC_CTX_free(mdctx);
	return digest;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x58(%rbp)
callq 0x48b0
movq %rax, %rdi
callq 0x41b0
movl %eax, -0x18(%rbp)
movl $0x20, %edi
callq 0x4040
movq %rax, -0x20(%rbp)
leaq -0x38(%rbp), %rdi
movq %rdi, -0x50(%rbp)
callq 0xd6b0
movq -0x50(%rbp), %rdi
movl $0x4, -0x28(%rbp)
movl -0x14(%rbp), %eax
movl %eax, %ecx
leaq 0x8b1b(%rip), %rax      # 0x13634
leaq (%rax,%rcx,4), %rsi
callq 0xd800
jmp 0xab24
movq -0x58(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0xaa10
movb %al, -0x59(%rbp)
jmp 0xab36
movb -0x59(%rbp), %al
testb $0x1, %al
jne 0xab67
jmp 0xab3f
movq $0x0, -0x8(%rbp)
movl $0x1, -0x48(%rbp)
jmp 0xab8a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x38(%rbp), %rdi
callq 0xd6d0
jmp 0xabdf
movl -0x14(%rbp), %eax
movl %eax, %ecx
leaq 0x8ac1(%rip), %rax      # 0x13634
movl (%rax,%rcx,4), %edx
addl $0x1, %edx
leaq 0x8ab4(%rip), %rax      # 0x13634
movl %edx, (%rax,%rcx,4)
movl $0x0, -0x48(%rbp)
leaq -0x38(%rbp), %rdi
callq 0xd6d0
movl -0x48(%rbp), %eax
testl %eax, %eax
je 0xab9e
jmp 0xab9c
jmp 0xabd5
movq -0x58(%rbp), %rax
movq (%rax), %rdi
movq -0x20(%rbp), %rsi
leaq -0x18(%rbp), %rdx
callq 0x4100
cmpl $0x0, %eax
jne 0xabcd
leaq 0x39ee(%rip), %rdi      # 0xe5ac
callq 0x4430
movq $0x0, -0x8(%rbp)
jmp 0xabd5
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
movq -0x40(%rbp), %rdi
callq 0x4900
nopl (%rax,%rax)
// File: luigix25[P]SSLP/library/HMACManager.cpp
// Function: HMACManager::setLocalNonce(unsigned int)
bool HMACManager::setLocalNonce(uint32_t new_nonce){
  if(/*nonce[LOCAL_NONCE] != 0 || */new_nonce == 0)
    return false;

  nonce[LOCAL_NONCE] = new_nonce;

  return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x8(%rbp)
cmpl $0x0, -0x8(%rbp)
jne 0xac33
movb $0x0, -0x1(%rbp)
jmp 0xac40
movl -0x8(%rbp), %eax
movl %eax, 0x89f8(%rip)      # 0x13634
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
popq %rbp
retq
nopw (%rax,%rax)
// File: luigix25[P]SSLP/library/HMACManager.cpp
// Function: HMACManager::setRemoteNonce(unsigned int)
bool HMACManager::setRemoteNonce(uint32_t new_nonce){
  if(/*nonce[REMOTE_NONCE] != 0 ||*/ new_nonce == 0)
    return false;

  nonce[REMOTE_NONCE] = new_nonce;

  return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x8(%rbp)
cmpl $0x0, -0x8(%rbp)
jne 0xac63
movb $0x0, -0x1(%rbp)
jmp 0xac70
movl -0x8(%rbp), %eax
movl %eax, 0x89cc(%rip)      # 0x13638
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
popq %rbp
retq
nopw (%rax,%rax)
// File: luigix25[P]SSLP/library/RSAVerifyManager.cpp
// Function: RSAVerifyManager::RSAVerifyManager(char const*)
RSAVerifyManager::RSAVerifyManager(const char *pubkey_path){
	
	this->mdctx = EVP_MD_CTX_new();
  if(!this->mdctx){
    perror("ERRORE new");
  }

	//size_t key_hmac_size = sizeof(KEY_HMAC);
  FILE* pubkey_file = fopen(pubkey_path, "r");
  if(!pubkey_file){ cerr << "Error: cannot open file '" << pubkey_path << "' (missing?)\n"; exit(1); }
  this->pubkey = PEM_read_PUBKEY(pubkey_file, NULL, NULL, NULL);
  fclose(pubkey_file);
  if(!this->pubkey){ cerr << "Error: PEM_read_PUBKEY returned NULL\n"; exit(1); }


  if(!EVP_VerifyInit(this->mdctx,EVP_sha256())){
  	perror("Error In RSA_Init_ex");
  }

  shouldFree = true;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
callq 0x45b0
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
cmpq $0x0, (%rax)
jne 0xacb9
leaq 0x390c(%rip), %rdi      # 0xe5c0
callq 0x4430
movq -0x10(%rbp), %rdi
leaq 0x3665(%rip), %rsi      # 0xe329
callq 0x45f0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0xad0c
movq 0x830d(%rip), %rdi      # 0x12fe8
leaq 0x3569(%rip), %rsi      # 0xe24b
callq 0x44a0
movq %rax, %rdi
movq -0x10(%rbp), %rsi
callq 0x44a0
movq %rax, %rdi
leaq 0x3568(%rip), %rsi      # 0xe265
callq 0x44a0
movl $0x1, %edi
callq 0x4640
movq -0x18(%rbp), %rdi
xorl %eax, %eax
movl %eax, %ecx
movq %rcx, %rsi
movq %rcx, %rdx
callq 0x4960
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rdi
callq 0x44b0
movq -0x20(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0xad5b
movq 0x82a3(%rip), %rdi      # 0x12fe8
leaq 0x387f(%rip), %rsi      # 0xe5cb
callq 0x44a0
movl $0x1, %edi
callq 0x4640
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
callq 0x48b0
movq -0x28(%rbp), %rdi
movq %rax, %rsi
callq 0x49b0
cmpl $0x0, %eax
jne 0xad88
leaq 0x386e(%rip), %rdi      # 0xe5f1
callq 0x4430
movq -0x20(%rbp), %rax
movb $0x1, 0x10(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: luigix25[P]SSLP/library/RSAVerifyManager.cpp
// Function: RSAVerifyManager::RSAVerifyManager(PublicKey&)
RSAVerifyManager::RSAVerifyManager(PublicKey &pubClass){
  
  this->mdctx = EVP_MD_CTX_new();
  if(!this->mdctx){
    perror("ERRORE new");
  }

  this->pubkey = pubClass.getKey();
  if(!EVP_VerifyInit(this->mdctx,EVP_sha256())){
      perror("Error In RSA_Init_ex");
    }

  shouldFree = false;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
callq 0x45b0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
cmpq $0x0, (%rax)
jne 0xadd9
leaq 0x37ec(%rip), %rdi      # 0xe5c0
callq 0x4430
movq -0x10(%rbp), %rdi
callq 0xd650
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq (%rax), %rax
movq %rax, -0x20(%rbp)
callq 0x48b0
movq -0x20(%rbp), %rdi
movq %rax, %rsi
callq 0x49b0
cmpl $0x0, %eax
jne 0xae16
leaq 0x37e0(%rip), %rdi      # 0xe5f1
callq 0x4430
movq -0x18(%rbp), %rax
movb $0x0, 0x10(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: luigix25[P]SSLP/library/RSAVerifyManager.cpp
// Function: RSAVerifyManager::RSAUpdate(EncryptedChunk&)
bool RSAVerifyManager::RSAUpdate(EncryptedChunk &ec){

    if(!EVP_VerifyUpdate(this->mdctx, (unsigned char*) ec.getCipherText(),ec.size)){
    	perror("Error in RSA_VerifyUpdate");
    	return false;
    }

    return true;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0xd970
movq -0x20(%rbp), %rdi
movq %rax, %rsi
movq -0x18(%rbp), %rax
movslq 0x10(%rax), %rdx
callq 0x49c0
cmpl $0x0, %eax
jne 0xae7f
leaq 0x3792(%rip), %rdi      # 0xe606
callq 0x4430
movb $0x0, -0x1(%rbp)
jmp 0xae83
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
nop