LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/csMOOC[P]UIUC/Application.cpp
// Function: Application::Application(char*)
Application::Application(char *infile) {
	int i;
	par = new Params();
	srand (time(NULL));
	par->setparams(infile);
	log = new Log(par);
	en = new EmulNet(par);
	mp1 = (MP1Node **) malloc(par->EN_GPSZ * sizeof(MP1Node *));

	/*
	 * Init all nodes
	 */
	for( i = 0; i < par->EN_GPSZ; i++ ) {
		Member *memberNode = new Member;
		memberNode->inited = false;
		Address *addressOfMemberNode = new Address();
		Address joinaddr;
		joinaddr = getjoinaddr();
		addressOfMemberNode = (Address *) en->ENinit(addressOfMemberNode, par->PORTNUM);
		mp1[i] = new MP1Node(memberNode, par, en, log, addressOfMemberNode);
		log->LOG(&(mp1[i]->getMemberNode()->addr), "APP");
		delete addressOfMemberNode;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x7117(%rip), %rax      # 0xad30
movq %rax, (%rdi)
movl $0x38, %edi
callq 0x21a0
movq %rax, %r15
movq %rax, %rdi
callq 0x4c90
movq %r15, 0x40(%rbx)
xorl %edi, %edi
callq 0x2150
movl %eax, %edi
callq 0x2170
movq 0x40(%rbx), %rdi
movq %r14, %rsi
callq 0x4c98
movl $0x18, %edi
callq 0x21a0
movq %rax, %r14
movq 0x40(%rbx), %rsi
movq %rax, %rdi
callq 0x47b4
movq %r14, 0x30(%rbx)
movl $0x1bb8e30, %edi        # imm = 0x1BB8E30
callq 0x21a0
movq %rax, %r14
movq 0x40(%rbx), %rsi
movq %rax, %rdi
callq 0x334c
movq %r14, 0x28(%rbx)
movq 0x40(%rbx), %rax
movslq 0x18(%rax), %rdi
shlq $0x3, %rdi
callq 0x2240
movq %rax, 0x38(%rbx)
movq 0x40(%rbx), %rax
cmpl $0x0, 0x18(%rax)
jle 0x3d85
leaq 0x35a4(%rip), %r12      # 0x7257
xorl %r15d, %r15d
movl $0x98, %edi
callq 0x21a0
movq %rax, %r13
movq %rax, %rdi
callq 0x4226
movb $0x0, 0xe(%r13)
movl $0x6, %edi
callq 0x21a0
movq %rax, %r14
movw $0x0, 0x10(%rsp)
movl $0x1, 0xc(%rsp)
leaq 0x12(%rsp), %rdi
leaq 0xc(%rsp), %rsi
callq 0x4d6a
movq 0x28(%rbx), %rdi
movq 0x40(%rbx), %rax
movswl 0x30(%rax), %edx
movq %r14, %rsi
callq 0x3538
movq %rax, %rbp
movl $0x30, %edi
callq 0x21a0
movq %rax, %r14
movq 0x40(%rbx), %rdx
movq 0x28(%rbx), %rcx
movq 0x30(%rbx), %r8
movq %rax, %rdi
movq %r13, %rsi
movq %rbp, %r9
callq 0x25f6
movq 0x38(%rbx), %rax
movq %r14, (%rax,%r15,8)
movq 0x30(%rbx), %rdi
movq 0x38(%rbx), %rax
movq (%rax,%r15,8), %rax
movq 0x20(%rax), %rsi
addq $0x8, %rsi
movq %r12, %rdx
xorl %eax, %eax
callq 0x4800
testq %rbp, %rbp
je 0x3d71
movl $0x6, %esi
movq %rbp, %rdi
callq 0x21b0
incq %r15
movq 0x40(%rbx), %rax
movslq 0x18(%rax), %rax
cmpq %rax, %r15
jl 0x3cb6
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movl $0x1bb8e30, %esi        # imm = 0x1BB8E30
jmp 0x3dca
movq %rax, %rbx
movl $0x18, %esi
jmp 0x3dca
movq %rax, %rbx
movl $0x38, %esi
movq %r15, %rdi
jmp 0x3dcd
movq %rax, %rbx
movl $0x98, %esi
movq %r13, %rdi
jmp 0x3dcd
movq %rax, %rbx
movl $0x30, %esi
movq %r14, %rdi
callq 0x21b0
movq %rbx, %rdi
callq 0x22f0
// File: /workspace/github_cpp_makefile_star2_O1/csMOOC[P]UIUC/Application.cpp
// Function: Application::~Application()
Application::~Application() {
	delete log;
	delete en;
	for ( int i = 0; i < par->EN_GPSZ; i++ ) {
		delete mp1[i];
	}
	free(mp1);
	delete par;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x6f38(%rip), %rax      # 0xad30
movq %rax, (%rdi)
movq 0x30(%rdi), %rdi
testq %rdi, %rdi
je 0x3e0a
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0x3e19
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x40(%rbx), %rax
cmpl $0x0, 0x18(%rax)
jle 0x3e49
xorl %r14d, %r14d
movq 0x38(%rbx), %rax
movq (%rax,%r14,8), %rdi
testq %rdi, %rdi
je 0x3e39
movq (%rdi), %rax
callq *0x8(%rax)
incq %r14
movq 0x40(%rbx), %rax
movslq 0x18(%rax), %rax
cmpq %rax, %r14
jl 0x3e26
movq 0x38(%rbx), %rdi
callq 0x2210
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
je 0x3e6c
movl $0x38, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x21b0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/csMOOC[P]UIUC/Application.cpp
// Function: Application::fail()
void Application::fail() {
	int i, removed;

	// fail half the members at time t=400
	if( par->DROP_MSG && par->getcurrtime() == 50 ) {
		par->dropmsg = 1;
	}

	if( par->SINGLE_FAILURE && par->getcurrtime() == 100 ) {
		removed = (rand() % par->EN_GPSZ);
		#ifdef DEBUGLOG
		log->LOG(&mp1[removed]->getMemberNode()->addr, "Node failed at time=%d", par->getcurrtime());
		#endif
		mp1[removed]->getMemberNode()->bFailed = true;
	}
	else if( par->getcurrtime() == 100 ) {
		removed = rand() % par->EN_GPSZ/2;
		for ( i = removed; i < removed + par->EN_GPSZ/2; i++ ) {
			#ifdef DEBUGLOG
			log->LOG(&mp1[i]->getMemberNode()->addr, "Node failed at time = %d", par->getcurrtime());
			#endif
			mp1[i]->getMemberNode()->bFailed = true;
		}
	}

	if( par->DROP_MSG && par->getcurrtime() == 300) {
		par->dropmsg=0;
	}

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x40(%rdi), %rdi
cmpl $0x0, 0x20(%rdi)
je 0x4101
callq 0x4d50
cmpl $0x32, %eax
jne 0x4101
movq 0x40(%rbx), %rax
movl $0x1, 0x24(%rax)
movq 0x40(%rbx), %rdi
cmpl $0x0, 0x4(%rdi)
je 0x4169
callq 0x4d50
cmpl $0x64, %eax
jne 0x4169
callq 0x2060
movq 0x40(%rbx), %rdi
cltd
idivl 0x18(%rdi)
movq 0x30(%rbx), %r14
movq 0x38(%rbx), %rax
movslq %edx, %r12
movq (%rax,%r12,8), %rax
movq 0x20(%rax), %r15
addq $0x8, %r15
callq 0x4d50
leaq 0x3153(%rip), %rdx      # 0x7298
movq %r14, %rdi
movq %r15, %rsi
movl %eax, %ecx
xorl %eax, %eax
callq 0x4800
movq 0x38(%rbx), %rax
movq (%rax,%r12,8), %rax
movq 0x20(%rax), %rax
movb $0x1, 0x10(%rax)
jmp 0x41f6
movq 0x40(%rbx), %rdi
callq 0x4d50
cmpl $0x64, %eax
jne 0x41f6
callq 0x2060
movq 0x40(%rbx), %rdi
movl 0x18(%rdi), %ecx
cltd
idivl %ecx
cmpl $0x2, %ecx
jl 0x41f6
movl %edx, %ebp
shrl $0x1f, %ebp
addl %edx, %ebp
sarl %ebp
movslq %ebp, %r13
leaq 0x3111(%rip), %r14      # 0x72af
movq 0x30(%rbx), %r15
movq 0x38(%rbx), %rax
movq (%rax,%r13,8), %rax
movq 0x20(%rax), %r12
addq $0x8, %r12
callq 0x4d50
movq %r15, %rdi
movq %r12, %rsi
movq %r14, %rdx
movl %eax, %ecx
xorl %eax, %eax
callq 0x4800
movq 0x38(%rbx), %rax
movq (%rax,%r13,8), %rax
movq 0x20(%rax), %rax
movb $0x1, 0x10(%rax)
incq %r13
movq 0x40(%rbx), %rdi
movl 0x18(%rdi), %eax
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
addl %ebp, %ecx
movslq %ecx, %rax
cmpq %rax, %r13
jl 0x419e
movq 0x40(%rbx), %rdi
cmpl $0x0, 0x20(%rdi)
je 0x4217
callq 0x4d50
cmpl $0x12c, %eax            # imm = 0x12C
jne 0x4217
movq 0x40(%rbx), %rax
movl $0x0, 0x24(%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/csMOOC[P]UIUC/Params.cpp
// Function: Params::setparams(char*)
void Params::setparams(char *config_file) {
	FILE *fp = fopen(config_file,"r");

	fscanf(fp,"MAX_NNB: %d", &MAX_NNB);
	fscanf(fp,"\nSINGLE_FAILURE: %d", &SINGLE_FAILURE);
	fscanf(fp,"\nDROP_MSG: %d", &DROP_MSG);
	fscanf(fp,"\nMSG_DROP_PROB: %lf", &MSG_DROP_PROB);

	//printf("Parameters of the test case: %d %d %d %lf\n", MAX_NNB, SINGLE_FAILURE, DROP_MSG, MSG_DROP_PROB);

	EN_GPSZ = MAX_NNB;
	STEP_RATE=.25;
	MAX_MSG_SIZE = 4000;
	globaltime = 0;
	dropmsg = 0;
	allNodesJoined = 0;
	for ( unsigned int i = 0; i < EN_GPSZ; i++ ) {
		allNodesJoined += i;
	}
	fclose(fp);
	return;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rax
movq %rdi, %rbx
leaq 0x27ec(%rip), %rsi      # 0x7495
movq %rax, %rdi
callq 0x2200
movq %rax, %r14
leaq 0x27dc(%rip), %rsi      # 0x7497
xorl %ebp, %ebp
movq %rax, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x2310
leaq 0x4(%rbx), %rdx
leaq 0x27ce(%rip), %rsi      # 0x74a3
movq %r14, %rdi
xorl %eax, %eax
callq 0x2310
leaq 0x20(%rbx), %rdx
leaq 0x27cd(%rip), %rsi      # 0x74b7
movq %r14, %rdi
xorl %eax, %eax
callq 0x2310
leaq 0x8(%rbx), %rdx
leaq 0x27c6(%rip), %rsi      # 0x74c5
movq %r14, %rdi
xorl %eax, %eax
callq 0x2310
movl (%rbx), %eax
movl %eax, 0x18(%rbx)
movabsq $0x3fd0000000000000, %rcx # imm = 0x3FD0000000000000
movq %rcx, 0x10(%rbx)
movl $0xfa0, 0x1c(%rbx)      # imm = 0xFA0
movq $0x0, 0x24(%rbx)
testl %eax, %eax
je 0x4d41
leal -0x1(%rax), %ecx
leal -0x2(%rax), %edx
imulq %rcx, %rdx
shrq %rdx
leal (%rax,%rdx), %ebp
decl %ebp
movl %ebp, 0x2c(%rbx)
movq %r14, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x2190
// File: /workspace/github_cpp_makefile_star2_O1/csMOOC[P]UIUC/Member.cpp
// Function: MemberListEntry::MemberListEntry(MemberListEntry const&)
MemberListEntry::MemberListEntry(const MemberListEntry &anotherMLE) {
	this->heartbeat = anotherMLE.heartbeat;
	this->id = anotherMLE.id;
	this->port = anotherMLE.port;
	this->timestamp = anotherMLE.timestamp;
}

// Assembly:
movq 0x8(%rsi), %rax
movq %rax, 0x8(%rdi)
movl (%rsi), %eax
movl %eax, (%rdi)
movzwl 0x4(%rsi), %eax
movw %ax, 0x4(%rdi)
movq 0x10(%rsi), %rax
movq %rax, 0x10(%rdi)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/csMOOC[P]UIUC/Member.cpp
// Function: MemberListEntry::operator=(MemberListEntry const&)
MemberListEntry& MemberListEntry::operator =(const MemberListEntry &anotherMLE) {
	MemberListEntry temp(anotherMLE);
	swap(heartbeat, temp.heartbeat);
	swap(id, temp.id);
	swap(port, temp.port);
	swap(timestamp, temp.timestamp);
	return *this;
}

// Assembly:
movq %rdi, %rax
movups 0x8(%rsi), %xmm0
movl (%rsi), %ecx
movzwl 0x4(%rsi), %edx
movups %xmm0, 0x8(%rdi)
movl %ecx, (%rdi)
movw %dx, 0x4(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O1/csMOOC[P]UIUC/Member.cpp
// Function: Member::Member(Member const&)
Member::Member(const Member &anotherMember) {
	this->addr = anotherMember.addr;
	this->inited = anotherMember.inited;
	this->inGroup = anotherMember.inGroup;
	this->bFailed = anotherMember.bFailed;
	this->nnb = anotherMember.nnb;
	this->heartbeat = anotherMember.heartbeat;
	this->pingCounter = anotherMember.pingCounter;
	this->timeOutCounter = anotherMember.timeOutCounter;
	this->memberList = anotherMember.memberList;
	this->myPos = anotherMember.myPos;
	this->mp1q = anotherMember.mp1q;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r12
movq %rdi, %rbx
leaq 0x5f41(%rip), %rax      # 0xad60
movq %rax, (%rdi)
leaq 0x28(%rdi), %r14
leaq 0x48(%rdi), %r15
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%rdi)
movups %xmm0, 0x38(%rdi)
movups %xmm0, 0x48(%rdi)
movups %xmm0, 0x58(%rdi)
movups %xmm0, 0x68(%rdi)
movups %xmm0, 0x78(%rdi)
movups %xmm0, 0x88(%rdi)
movq %r15, %rdi
xorl %esi, %esi
callq 0x4598
movzwl 0xc(%r12), %eax
movw %ax, 0xc(%rbx)
movl 0x8(%r12), %eax
movl %eax, 0x8(%rbx)
movb 0xe(%r12), %al
movb %al, 0xe(%rbx)
movb 0xf(%r12), %al
movb %al, 0xf(%rbx)
movb 0x10(%r12), %al
movb %al, 0x10(%rbx)
movl 0x14(%r12), %eax
movl %eax, 0x14(%rbx)
movq 0x18(%r12), %rax
movq %rax, 0x18(%rbx)
movl 0x20(%r12), %eax
movl %eax, 0x20(%rbx)
movl 0x24(%r12), %eax
movl %eax, 0x24(%rbx)
leaq 0x28(%r12), %rsi
movq %r14, %rdi
callq 0x4f72
movq 0x40(%r12), %rax
movq %rax, 0x40(%rbx)
addq $0x48, %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x50dc
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %r12
jmp 0x4ee2
movq %rax, %r12
movq %r15, %rdi
callq 0x46f4
movq (%r14), %rdi
testq %rdi, %rdi
je 0x4ef6
movq 0x38(%rbx), %rsi
subq %rdi, %rsi
callq 0x21b0
movq %r12, %rdi
callq 0x22f0
// File: /workspace/github_cpp_makefile_star2_O1/luigix25[P]SSLP/client_files/client.cpp
// Function: close_handler(int)
void close_handler(int s){
	cout<<endl<<"Terminating.."<<endl;
	server_socket.closeConnection();
	KeyManager::destroyKeys();
	exit(s);

}

// Assembly:
pushq %rbx
movl %edi, %ebx
movq 0xb2aa(%rip), %rdi      # 0xffc0
callq 0x41e0
leaq 0x62e2(%rip), %rsi      # 0xb004
movq %rax, %rdi
callq 0x4420
movq %rax, %rdi
callq 0x41e0
leaq 0xb827(%rip), %rdi      # 0x10560
callq 0x6b4c
callq 0xa1f4
movl %ebx, %edi
callq 0x4560
// File: /workspace/github_cpp_makefile_star2_O1/luigix25[P]SSLP/client_files/client.cpp
// Function: print_hex(unsigned char*, unsigned int)
void print_hex(unsigned char* buff, unsigned int size)
{
    printf("Printing %d bytes\n", size);
    for(unsigned int i=0; i<size; i++)
        printf("%02hx", *((unsigned char*)(buff + i)));
    printf("\n");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x6299(%rip), %rdi      # 0xb012
xorl %eax, %eax
callq 0x4050
testl %ebp, %ebp
je 0x4da8
movl %ebp, %r15d
leaq 0x6297(%rip), %r14      # 0xb025
xorl %r12d, %r12d
movzbl (%rbx,%r12), %esi
movq %r14, %rdi
xorl %eax, %eax
callq 0x4050
incq %r12
cmpq %r12, %r15
jne 0x4d91
movl $0xa, %edi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x4650
// File: /workspace/github_cpp_makefile_star2_O1/luigix25[P]SSLP/client_files/client.cpp
// Function: setup_sockaddr(char*, int)
struct sockaddr_in setup_sockaddr(char *ip,int port){

	struct sockaddr_in sv_addr;

	memset(&sv_addr,0,sizeof(sv_addr));

	sv_addr.sin_family = AF_INET;
	sv_addr.sin_port = htons(port);
	inet_pton(AF_INET,ip,&sv_addr.sin_addr);
	return sv_addr;

}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rax
xorps %xmm0, %xmm0
leaq 0x4(%rsp), %rbx
movaps %xmm0, -0x4(%rbx)
movw $0x2, -0x4(%rbx)
rolw $0x8, %si
movw %si, -0x2(%rbx)
movl $0x2, %edi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x4850
movq -0x4(%rbx), %rax
movq 0x4(%rbx), %rdx
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/luigix25[P]SSLP/client_files/client.cpp
// Function: cmd_quit()
void cmd_quit(){

	cout<<"Closing Connection"<<endl;
	KeyManager::destroyKeys();
	server_socket.closeConnection();
	exit(0);

}

// Assembly:
pushq %rax
movq 0xb089(%rip), %rdi      # 0xffc0
leaq 0x61ba(%rip), %rsi      # 0xb0f8
callq 0x4420
movq %rax, %rdi
callq 0x41e0
callq 0xa1f4
leaq 0xb609(%rip), %rdi      # 0x10560
callq 0x6b4c
xorl %edi, %edi
callq 0x4560
// File: /workspace/github_cpp_makefile_star2_O1/luigix25[P]SSLP/client_files/client.cpp
// Function: send_command(unsigned int)
bool send_command(uint32_t command){

	EncryptManager em;

	Chunk c;
	c.setInt(command);
	c.size = 4;

	EncryptedChunk ec;

	if(!em.EncryptUpdate(ec,c)) 	return false;
	if(!em.EncryptFinal(ec))		return false;

	if(!sendDataHMAC(server_socket,ec.getCipherText(),ec.size)){			//aggiorno il nonce
		cout<<"[Error] send"<<endl;
		return false;
	}

	return true;
}

// Assembly:
pushq %rbx
subq $0x40, %rsp
movl %edi, 0xc(%rsp)
movq %rsp, %rdi
callq 0x7f28
leaq 0x28(%rsp), %rdi
callq 0xa378
leaq 0x28(%rsp), %rdi
leaq 0xc(%rsp), %rsi
callq 0xa44c
movl $0x4, 0x38(%rsp)
leaq 0x10(%rsp), %rdi
callq 0xa48e
movq %rsp, %rdi
leaq 0x10(%rsp), %rsi
leaq 0x28(%rsp), %rdx
callq 0x8026
testb %al, %al
je 0x502f
movq %rsp, %rdi
leaq 0x10(%rsp), %rsi
callq 0x80a4
testb %al, %al
je 0x502f
leaq 0x10(%rsp), %rdi
callq 0xa516
movl 0x20(%rsp), %edx
leaq 0xb585(%rip), %rdi      # 0x10560
movq %rax, %rsi
callq 0x71c2
movb $0x1, %bl
testb %al, %al
jne 0x5031
movq 0xafd0(%rip), %rbx      # 0xffc0
leaq 0x6114(%rip), %rsi      # 0xb10b
movl $0xc, %edx
movq %rbx, %rdi
callq 0x44e0
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x4410
movsbl %al, %esi
movq 0xaf9e(%rip), %rdi      # 0xffc0
callq 0x4040
movq %rax, %rdi
callq 0x42f0
xorl %ebx, %ebx
leaq 0x10(%rsp), %rdi
callq 0xa4a2
leaq 0x28(%rsp), %rdi
callq 0xa38c
movq %rsp, %rdi
callq 0x7fb2
movl %ebx, %eax
addq $0x40, %rsp
popq %rbx
retq
jmp 0x5057
movq %rax, %rbx
jmp 0x506e
movq %rax, %rbx
jmp 0x5078
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0xa4a2
leaq 0x28(%rsp), %rdi
callq 0xa38c
movq %rsp, %rdi
callq 0x7fb2
movq %rbx, %rdi
callq 0x47d0
// File: /workspace/github_cpp_makefile_star2_O1/luigix25[P]SSLP/client_files/client.cpp
// Function: cmd_get()
bool cmd_get(){

	//if(!server_socket.sendInt(GET_COMMAND)) return;
	if(!send_command(GET_COMMAND)) return false;
	string filename;
	cin >> setw(MAX_FILENAME_LENGTH) >> filename;

	//clears the overflow, if any
	pulisci_buff();

	string path(CLIENT_PATH);

	EncryptManager em;
	Chunk c;
	c.setPlainText((char*)filename.c_str(),false);		//i don't need to free memory
	c.size = filename.size()+1;

	EncryptedChunk ec;

	if(!em.EncryptUpdate(ec,c)) return false;
	if(!em.EncryptFinal(ec))	return false;


	if(!sendDataHMAC(server_socket,ec.getCipherText(),ec.size)) return false;			
	if(!ReceiveFile(path,filename,server_socket,public_key_rsa,true)){
		//cout << "[Error] ReceiveFile" << endl;
		return false;
	}
	else{
		//cout << "[LOG] ReceiveFile Correct" << endl;
		return true;
	}
	
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x80, %rsp
movl $0x2, %edi
callq 0x4f63
testb %al, %al
je 0x599c
leaq 0x38(%rsp), %r14
movq %r14, -0x10(%r14)
movq $0x0, -0x8(%r14)
movb $0x0, (%r14)
movq 0xa736(%rip), %rdi      # 0xffd0
movq (%rdi), %rax
movq -0x18(%rax), %rax
movq $0x64, 0x10(%rdi,%rax)
leaq 0x28(%rsp), %rsi
callq 0x45b0
movq 0xa715(%rip), %rdi      # 0xffd0
movabsq $0x7fffffffffffffff, %rsi # imm = 0x7FFFFFFFFFFFFFFF
movl $0xa, %edx
callq 0x42b0
leaq 0x70(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x58a4(%rip), %rsi      # 0xb183
leaq 0x58b3(%rip), %rdx      # 0xb199
leaq 0x60(%rsp), %rdi
callq 0x6a9e
leaq 0x8(%rsp), %rdi
callq 0x7f28
leaq 0x48(%rsp), %rdi
callq 0xa378
movq 0x28(%rsp), %rsi
leaq 0x48(%rsp), %rdi
xorl %edx, %edx
callq 0xa40c
movl 0x30(%rsp), %eax
incl %eax
movl %eax, 0x58(%rsp)
leaq 0x10(%rsp), %rdi
callq 0xa48e
leaq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
leaq 0x48(%rsp), %rdx
callq 0x8026
testb %al, %al
je 0x59a0
leaq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x80a4
testb %al, %al
je 0x59a0
leaq 0x10(%rsp), %rdi
callq 0xa516
movl 0x20(%rsp), %edx
leaq 0xabf7(%rip), %rdi      # 0x10560
movq %rax, %rsi
callq 0x71c2
testb %al, %al
je 0x59a0
leaq 0xabe4(%rip), %rdx      # 0x10560
leaq 0xabd5(%rip), %rcx      # 0x10558
leaq 0x60(%rsp), %rdi
leaq 0x28(%rsp), %rsi
movl $0x1, %r8d
callq 0x905e
movl %eax, %ebx
jmp 0x59a2
xorl %ebx, %ebx
jmp 0x59ee
xorl %ebx, %ebx
leaq 0x10(%rsp), %rdi
callq 0xa4a2
leaq 0x48(%rsp), %rdi
callq 0xa38c
leaq 0x8(%rsp), %rdi
callq 0x7fb2
movq 0x60(%rsp), %rdi
cmpq %r15, %rdi
je 0x59d7
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x4450
movq 0x28(%rsp), %rdi
cmpq %r14, %rdi
je 0x59ee
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x4450
movl %ebx, %eax
addq $0x80, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x59ff
movq %rax, %rbx
jmp 0x5a22
movq %rax, %rbx
jmp 0x5a2c
movq %rax, %rbx
jmp 0x5a36
jmp 0x5a10
movq %rax, %rbx
jmp 0x5a4d
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0xa4a2
leaq 0x48(%rsp), %rdi
callq 0xa38c
leaq 0x8(%rsp), %rdi
callq 0x7fb2
movq 0x60(%rsp), %rdi
cmpq %r15, %rdi
je 0x5a4d
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x4450
movq 0x28(%rsp), %rdi
cmpq %r14, %rdi
je 0x5a64
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x4450
movq %rbx, %rdi
callq 0x47d0
// File: /workspace/github_cpp_makefile_star2_O1/luigix25[P]SSLP/client_files/client.cpp
// Function: select_command(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
bool select_command(string &buffer){


	if(buffer.compare("!help") == 0){
		return cmd_help();
	} else if(buffer.compare("!list") == 0){
		return cmd_list();
	} else if(buffer.compare("!quit") == 0){
		cmd_quit();
		return true;							//will never reach here
	} else if(buffer.compare("!get") == 0){
		return cmd_get();
	} else if (buffer.compare("!upload") == 0){
		return cmd_upload();
	} else {
		cout<<">"<<buffer<<"<"<<endl;
		cout<<"Invalid Command"<<endl;
	//	exit(-1);
		pulisci_buff();
		return true;
	}


}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq 0x577d(%rip), %rsi      # 0xb1f7
callq 0x4120
testl %eax, %eax
je 0x5ba3
leaq 0x576f(%rip), %rsi      # 0xb1fd
movq %r14, %rdi
callq 0x4120
testl %eax, %eax
je 0x5bb2
leaq 0x575e(%rip), %rsi      # 0xb203
movq %r14, %rdi
callq 0x4120
testl %eax, %eax
je 0x5bd6
leaq 0x574d(%rip), %rsi      # 0xb209
movq %r14, %rdi
callq 0x4120
testl %eax, %eax
je 0x5bbe
leaq 0x573b(%rip), %rsi      # 0xb20e
movq %r14, %rdi
callq 0x4120
testl %eax, %eax
je 0x5bca
movq 0xa4d6(%rip), %rbx      # 0xffc0
leaq 0x5725(%rip), %rsi      # 0xb216
movl $0x1, %edx
movq %rbx, %rdi
callq 0x44e0
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %rbx, %rdi
callq 0x44e0
movq %rax, %r14
leaq 0x5701(%rip), %rsi      # 0xb218
movl $0x1, %edx
movq %rax, %rdi
callq 0x44e0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x4410
movsbl %al, %esi
movq %r14, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x42f0
leaq 0x56c8(%rip), %rsi      # 0xb21a
movl $0xf, %edx
movq %rbx, %rdi
callq 0x44e0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x4410
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x42f0
movq 0xa443(%rip), %rdi      # 0xffd0
movabsq $0x7fffffffffffffff, %rsi # imm = 0x7FFFFFFFFFFFFFFF
movl $0xa, %edx
callq 0x42b0
jmp 0x5ba8
callq 0x4dfa
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x5088
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x5860
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x5520
callq 0x4f2f
// File: /workspace/github_cpp_makefile_star2_O1/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:
cmpb $0x0, 0x4(%rdi)
je 0x6b6d
xorl %eax, %eax
retq
pushq %rax
bswapl %esi
leaq 0x4(%rsp), %rax
movl %esi, (%rax)
movl (%rdi), %edi
movl $0x4, %edx
movq %rax, %rsi
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x4080
cmpl $0x3, %eax
jle 0x6ba3
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
cmpl $0x4, %eax
sete %al
addq $0x8, %rsp
retq
leaq 0x4561(%rip), %rdi      # 0xb10b
callq 0x43b0
xorl %eax, %eax
jmp 0x6b9e
nop
// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
xorl %ebx, %ebx
cmpb $0x0, 0x4(%rdi)
jne 0x6bfa
movl %edx, %ebp
testl %edx, %edx
je 0x6bf5
movq %rsi, %r14
movq %rdi, %r15
xorl %ebx, %ebx
movl (%r15), %edi
movl %ebx, %esi
addq %r14, %rsi
movl %ebp, %edx
subl %ebx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x4080
cmpl $-0x1, %eax
je 0x6c07
addl %eax, %ebx
cmpl %ebp, %ebx
jb 0x6bd1
cmpl %ebp, %ebx
sete %bl
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x44fd(%rip), %rdi      # 0xb10b
callq 0x43b0
xorl %ebx, %ebx
jmp 0x6bfa
nop
// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testl %edx, %edx
sete %bl
je 0x6c72
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %r15
movl (%rdi), %edi
movl %edx, %edx
xorl %r12d, %r12d
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x4360
cmpl $-0x1, %eax
je 0x6c66
movl %r12d, %ecx
movl %eax, %r12d
addl %ecx, %r12d
movl %ebp, %edx
subl %r12d, %edx
setbe %bl
jbe 0x6c72
movl (%r15), %edi
movl %r12d, %esi
addq %r14, %rsi
jmp 0x6c36
leaq 0x47ec(%rip), %rdi      # 0xb459
callq 0x43b0
movl %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 %r15
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
movl %esi, %edi
callq 0x4030
movq %rax, %r15
movq %r14, %rdi
movq %rax, %rsi
movl %ebx, %edx
callq 0x6c18
xorl %ecx, %ecx
testb %al, %al
cmovneq %r15, %rcx
movq %rcx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movl (%rdi), %edi
leaq 0xc(%rsp), %rsi
movl $0x4, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x4360
cmpl $0x3, %eax
jle 0x6cf0
movl 0xc(%rsp), %ecx
bswapl %ecx
movl %ecx, (%rbx)
cmpl $0x4, %eax
sete %al
addq $0x10, %rsp
popq %rbx
retq
leaq 0x4762(%rip), %rdi      # 0xb459
callq 0x43b0
xorl %eax, %eax
jmp 0x6cea
// File: /workspace/github_cpp_makefile_star2_O1/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x46b0
movq %rax, %r14
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq $0x0, 0x10(%rbx)
leaq 0x10(%rsp), %r13
movq %rsp, %r15
movq %r14, %rdi
callq 0x46c0
movq %rax, %r12
testq %rax, %rax
je 0x6d8b
cmpb $0x2e, 0x13(%r12)
je 0x6d31
addq $0x13, %r12
movq %r13, (%rsp)
movq %r12, %rdi
callq 0x41c0
leaq (%rax,%r12), %rdx
movq %r15, %rdi
movq %r12, %rsi
callq 0x6a9e
movq %rbx, %rdi
movq %r15, %rsi
callq 0x7430
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x6d31
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x4450
jmp 0x6d31
movq %r14, %rdi
callq 0x4720
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x6dc1
movq %rax, %r14
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x6dc4
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x4450
jmp 0x6dc4
movq %rax, %r14
movq %rbx, %rdi
callq 0x6958
movq %r14, %rdi
callq 0x47d0
// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq 0x8(%rdx), %rax
movq %rax, 0x30(%rsp)
leaq 0x48(%rsp), %rax
movq %rax, -0x10(%rax)
xorl %ebx, %ebx
movq %rbx, -0x8(%rax)
movb $0x0, (%rax)
movq %rbx, 0x10(%rdi)
xorps %xmm0, %xmm0
movq %rdi, 0x8(%rsp)
movups %xmm0, (%rdi)
leaq 0x10(%rsp), %r12
leaq 0x38(%rsp), %r13
movq (%r15), %rsi
movq 0x8(%r15), %rcx
movq %r14, %rdi
movq %rbx, %rdx
callq 0x47c0
cmpq $-0x1, %rax
je 0x6e89
movq %rax, %rbp
movq %rax, %rcx
subq %rbx, %rcx
movq %r12, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x4460
movq %r13, %rdi
movq %r12, %rsi
callq 0x4570
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x6e72
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x4450
addq 0x30(%rsp), %rbp
movq 0x8(%rsp), %rdi
movq %r13, %rsi
callq 0x73e8
movq %rbp, %rbx
jmp 0x6e1c
leaq 0x10(%rsp), %rdi
movq %r14, %rsi
movq %rbx, %rdx
movq $-0x1, %rcx
callq 0x4460
leaq 0x10(%rsp), %rsi
movq 0x8(%rsp), %rdi
callq 0x7430
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x6ecb
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x4450
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x6ee7
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x4450
movq 0x8(%rsp), %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x6f23
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x4450
jmp 0x6f23
jmp 0x6f20
jmp 0x6f20
movq %rax, %r14
movq 0x8(%rsp), %rdi
callq 0x6958
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x6f49
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x4450
movq %r14, %rdi
callq 0x47d0
// File: /workspace/github_cpp_makefile_star2_O1/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 %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movl %esi, 0xc(%rsp)
callq 0x6b64
testb %al, %al
je 0x6fcd
movq %rsp, %rdi
callq 0x82f8
leaq 0x10(%rsp), %rdi
callq 0xa378
leaq 0x10(%rsp), %rdi
leaq 0xc(%rsp), %rsi
xorl %edx, %edx
callq 0xa40c
leaq 0x10(%rsp), %rsi
movl $0x4, 0x10(%rsi)
movq %rsp, %rdi
callq 0x83a2
movq %rsp, %rdi
xorl %esi, %esi
callq 0x840c
movq %rax, %r14
testq %rax, %rax
je 0x6fd1
movq %rbx, %rdi
movq %r14, %rsi
movl $0x20, %edx
callq 0x6bb4
movl %eax, %ebx
movq %r14, %rdi
callq 0x45c0
jmp 0x6fd3
xorl %ebx, %ebx
jmp 0x6fe5
xorl %ebx, %ebx
leaq 0x10(%rsp), %rdi
callq 0xa38c
movq %rsp, %rdi
callq 0x84da
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
retq
jmp 0x6ff8
jmp 0x6ff8
movq %rax, %rbx
jmp 0x7005
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0xa38c
movq %rsp, %rdi
callq 0x84da
movq %rbx, %rdi
callq 0x47d0
// File: /workspace/github_cpp_makefile_star2_O1/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 %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r15
movq %rdi, %r14
callq 0x6cb6
testb %al, %al
je 0x716f
movl $0x20, %edi
callq 0x4030
movq %rax, %rbx
movq %r14, %rdi
movq %rax, %rsi
movl $0x20, %edx
callq 0x6c18
xorl %r14d, %r14d
testb %al, %al
cmoveq %r14, %rbx
je 0x718b
leaq 0x8(%rsp), %rdi
callq 0x82f8
leaq 0x10(%rsp), %rdi
callq 0xa378
leaq 0x10(%rsp), %rdi
movl $0x4, 0x10(%rdi)
movq %r15, %rsi
xorl %edx, %edx
callq 0xa40c
leaq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x83a2
leaq 0x8(%rsp), %rdi
movl $0x1, %esi
callq 0x840c
movq %rax, %r15
testq %rax, %rax
je 0x7174
movl $0x20, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x47e0
testl %eax, %eax
sete %r14b
je 0x715d
movq 0x8eea(%rip), %r12      # 0xffc0
leaq 0x4389(%rip), %rsi      # 0xb466
movl $0xc, %edx
movq %r12, %rdi
callq 0x44e0
movq (%r12), %rax
addq -0x18(%rax), %r12
movq %r12, %rdi
movl $0xa, %esi
callq 0x4410
movsbl %al, %esi
movq 0x8eb7(%rip), %rdi      # 0xffc0
callq 0x4040
movq %rax, %rdi
callq 0x42f0
movq 0x8ea3(%rip), %r12      # 0xffc0
leaq 0x434f(%rip), %rsi      # 0xb473
movl $0x9, %edx
movq %r12, %rdi
callq 0x44e0
movq (%r12), %rax
addq -0x18(%rax), %r12
movq %r12, %rdi
movl $0xa, %esi
callq 0x4410
movsbl %al, %esi
movq 0x8e70(%rip), %rdi      # 0xffc0
callq 0x4040
movq %rax, %rdi
callq 0x42f0
movq %r15, %rdi
callq 0x45c0
movq %rbx, %rdi
callq 0x45c0
jmp 0x7177
xorl %r14d, %r14d
jmp 0x718b
xorl %r14d, %r14d
leaq 0x10(%rsp), %rdi
callq 0xa38c
leaq 0x8(%rsp), %rdi
callq 0x84da
movl %r14d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x71a3
movq %rax, %rbx
jmp 0x71b0
jmp 0x71a3
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0xa38c
leaq 0x8(%rsp), %rdi
callq 0x84da
movq %rbx, %rdi
callq 0x47d0
// File: /workspace/github_cpp_makefile_star2_O1/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 %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %r14d
movq %rsi, %r15
movq %rdi, %rbx
leal 0x20(%r14), %esi
callq 0x6f51
testb %al, %al
je 0x723d
movq %rbx, %rdi
movq %r15, %rsi
movl %r14d, %edx
callq 0x6bb4
testb %al, %al
je 0x723d
movq %rsp, %r12
movq %r12, %rdi
callq 0x82f8
movq %r12, %rdi
movq %r15, %rsi
movl %r14d, %edx
callq 0x83e4
testb %al, %al
je 0x7241
movq %rsp, %rdi
xorl %esi, %esi
callq 0x840c
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
movl $0x20, %edx
callq 0x6bb4
movl %eax, %ebx
testq %r14, %r14
je 0x7243
movq %r14, %rdi
callq 0x45c0
jmp 0x7243
xorl %ebx, %ebx
jmp 0x724b
xorl %ebx, %ebx
movq %rsp, %rdi
callq 0x84da
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x725d
jmp 0x725d
movq %rax, %rbx
movq %rsp, %rdi
callq 0x84da
movq %rbx, %rdi
callq 0x47d0
// File: /workspace/github_cpp_makefile_star2_O1/luigix25[P]SSLP/library/library.cpp
// Function: recvDataHMAC(NetSocket&, int&)
char* recvDataHMAC(NetSocket& receiver_socket,int32_t &length){

	if(!recvIntHMAC(receiver_socket,length))
		return false;

	length -= HASH_SIZE;

	char *data = receiver_socket.recvData(length);

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

	char *digest = hmac.HMACFinal(REMOTE_NONCE);

	if(digest == NULL) return NULL;

	char *received_digest = receiver_socket.recvData(HASH_SIZE);

	if(received_digest == NULL){
		delete[] digest;
		return NULL;
	}

	if(CRYPTO_memcmp(received_digest,digest,HASH_SIZE)){
		cout<<"HASH DIVERSI"<<endl;
		delete[] digest;
		delete[] received_digest;
		return NULL;
	}

	delete[] digest;
	delete[] received_digest;
	return data;


}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r12
callq 0x7015
testb %al, %al
je 0x738b
movl (%rbx), %r14d
addl $-0x20, %r14d
movl %r14d, (%rbx)
movq %r14, %rdi
callq 0x4030
movq %rax, %r13
movq %r12, %rdi
movq %rax, %rsi
movl %r14d, %edx
callq 0x6c18
xorl %r15d, %r15d
testb %al, %al
cmovneq %r13, %r15
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x82f8
movl (%rbx), %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x83e4
testb %al, %al
je 0x7390
leaq 0x8(%rsp), %rdi
movl $0x1, %esi
callq 0x840c
movq %rax, %rbx
testq %rax, %rax
je 0x7390
movl $0x20, %edi
callq 0x4030
movq %rax, %r14
movq %r12, %rdi
movq %rax, %rsi
movl $0x20, %edx
callq 0x6c18
xorl %r12d, %r12d
testb %al, %al
cmoveq %r12, %r14
je 0x7395
movl $0x20, %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x47e0
testl %eax, %eax
je 0x737e
movq 0x8c84(%rip), %r15      # 0xffc0
leaq 0x4123(%rip), %rsi      # 0xb466
movl $0xc, %edx
movq %r15, %rdi
callq 0x44e0
movq (%r15), %rax
addq -0x18(%rax), %r15
movq %r15, %rdi
movl $0xa, %esi
callq 0x4410
movsbl %al, %esi
movq 0x8c52(%rip), %rdi      # 0xffc0
callq 0x4040
movq %rax, %rdi
callq 0x42f0
xorl %r15d, %r15d
movq %rbx, %rdi
callq 0x45c0
movq %r15, %r12
jmp 0x7398
xorl %r12d, %r12d
jmp 0x73aa
xorl %r12d, %r12d
jmp 0x73a0
movq %rbx, %r14
movq %r14, %rdi
callq 0x45c0
leaq 0x8(%rsp), %rdi
callq 0x84da
movq %r12, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x73bf
jmp 0x73bf
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x84da
movq %rbx, %rdi
callq 0x47d0
// File: /workspace/github_cpp_makefile_star2_O1/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rbx
callq 0x787c
leaq 0x82fc(%rip), %rax      # 0xfd40
movq %rax, (%rbx)
leaq 0x248(%rbx), %r14
leaq 0x258(%rbx), %r12
movq %r12, 0x248(%rbx)
movq $0x0, 0x250(%rbx)
movb $0x0, 0x258(%rbx)
movq %rbx, %rdi
callq 0x7952
testb %al, %al
je 0x7af8
leaq 0x8(%rbx), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x4220
leaq 0x10(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x3a0c(%rip), %rsi      # 0xb4a5
leaq 0x3a09(%rip), %rdx      # 0xb4a9
movq %rsp, %rdi
callq 0x6a9e
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
movq %r15, %rsi
callq 0x69b3
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x79ca
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7ae0
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x4450
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x7b13
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x4450
jmp 0x7b13
movq 0x250(%rbx), %rdx
leaq 0x376c(%rip), %rcx      # 0xb272
movq %r14, %rdi
xorl %esi, %esi
xorl %r8d, %r8d
callq 0x46e0
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %r15
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7b44
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x4450
jmp 0x7b44
movq %rax, %r15
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x7b61
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x4450
jmp 0x7b61
jmp 0x7b5e
movq %rax, %r15
movq (%r14), %rdi
cmpq %r12, %rdi
je 0x7b75
movq (%r12), %rsi
incq %rsi
callq 0x4450
movq %rbx, %rdi
callq 0x79d4
movq %r15, %rdi
callq 0x47d0
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
addq $0xa8, %rdi
callq 0x40d0
movb $0x1, %bl
testb %al, %al
jne 0x7c17
leaq 0x28(%r14), %rdi
leaq 0x8(%r14), %rsi
movl $0x15, %edx
callq 0x4640
movq 0x28(%r14), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x48(%r14,%rax)
je 0x7c17
movq 0x83e6(%rip), %rbx      # 0xffc0
leaq 0x38c9(%rip), %rsi      # 0xb4aa
movl $0x15, %edx
movq %rbx, %rdi
callq 0x44e0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x4410
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x42f0
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %rax
callq *(%rax)
movl $0x2, %ebp
testb %al, %al
je 0x7c8a
leaq 0x38(%rbx), %r15
movq %r14, %rdi
callq 0xa446
movslq 0x10(%r14), %rdx
movq %r15, %rdi
movq %rax, %rsi
callq 0x45f0
movq 0x28(%rbx), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x48(%rbx,%rax)
jne 0x7c8a
movslq 0x10(%r14), %rax
subq %rax, 0x240(%rbx)
movq %rbx, %rdi
callq 0x7912
xorl %eax, %eax
cmpq $0x0, 0x240(%rbx)
sete %al
leal (%rax,%rax,2), %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 %rbx
movq %rdi, %rbx
testl %esi, %esi
jne 0x7cde
cmpq $0x0, 0x240(%rbx)
jne 0x7cde
leaq 0x248(%rbx), %rdi
leaq 0x35ba(%rip), %rsi      # 0xb272
callq 0x4120
testl %eax, %eax
je 0x7ce8
movq 0x248(%rbx), %rdi
callq 0x4810
movq 0x8(%rbx), %rdi
movq 0x248(%rbx), %rsi
popq %rbx
jmp 0x4250
movq 0x8(%rbx), %rdi
popq %rbx
jmp 0x4810
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq 0x28(%rdi), %rbx
leaq 0x8(%rdi), %rsi
movq %rbx, %rdi
movl $0xc, %edx
callq 0x4640
movq 0x28(%r14), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x48(%r14,%rax)
je 0x7da9
movq 0x8257(%rip), %rbx      # 0xffc0
leaq 0x3763(%rip), %rsi      # 0xb4d3
movl $0x14, %edx
movq %rbx, %rdi
callq 0x44e0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x4410
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x42f0
xorl %r14d, %r14d
jmp 0x7dcb
movq %rbx, %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0x4620
movq %rbx, %rdi
callq 0x47a0
movq %rax, %r14
movq %rbx, %rdi
callq 0x4070
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
addq $0xa8, %rdi
callq 0x40d0
movb $0x1, %bl
testb %al, %al
jne 0x7e67
leaq 0x28(%r14), %rdi
leaq 0x8(%r14), %rsi
movl $0xc, %edx
callq 0x4640
movq 0x28(%r14), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x48(%r14,%rax)
je 0x7e67
movq 0x8196(%rip), %rbx      # 0xffc0
leaq 0x36a2(%rip), %rsi      # 0xb4d3
movl $0x14, %edx
movq %rbx, %rdi
callq 0x44e0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x4410
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x42f0
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %rax
callq *(%rax)
movl $0x2, %ebp
testb %al, %al
je 0x7f1d
movq 0x238(%rbx), %rsi
movq 0x240(%rbx), %rax
subq %rax, %rsi
movl $0x40000, %r15d         # imm = 0x40000
cmpq %r15, %rax
cmovbq %rax, %r15
movl %r15d, 0x10(%r14)
leaq 0x28(%rbx), %r12
movq %r12, %rdi
xorl %edx, %edx
callq 0x45a0
movq %r15, %rdi
callq 0x4030
movq %r14, %rdi
movq %rax, %rsi
callq 0xa3d4
movq %r14, %rdi
callq 0xa446
movq %r12, %rdi
movq %rax, %rsi
movq %r15, %rdx
callq 0x4590
movq 0x28(%rbx), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x48(%rbx,%rax)
jne 0x7f1d
movslq 0x10(%r14), %rax
subq %rax, 0x240(%rbx)
movq %rbx, %rdi
callq 0x7912
xorl %eax, %eax
cmpq $0x0, 0x240(%rbx)
sete %al
leal (%rax,%rax,2), %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x4280
movq %rax, %r14
movq %rax, (%rbx)
callq 0x4230
leaq 0x865a(%rip), %rdx      # 0x105a0
leaq 0x8663(%rip), %rcx      # 0x105b0
movq %r14, %rdi
movq %rax, %rsi
callq 0x45d0
testl %eax, %eax
je 0x7f68
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xa21c
leaq 0x358b(%rip), %rdi      # 0xb4fa
callq 0x43b0
jmp 0x7f5c
// File: /workspace/github_cpp_makefile_star2_O1/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl %r8d, %ebx
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
leal 0x10(%rbx), %eax
movslq %eax, %rdi
callq 0x4030
movq %rax, (%r12)
movq (%r13), %rdi
movq %rax, %rsi
movq %r15, %rdx
movq %r14, %rcx
movl %ebx, %r8d
callq 0x4090
movl %eax, %ebx
testl %eax, %eax
je 0x8017
testl %ebx, %ebx
setne %al
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x34f5(%rip), %rdi      # 0xb513
callq 0x43b0
jmp 0x8008
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
movslq 0x10(%rdx), %rdi
addq $0x10, %rdi
callq 0x4030
movq %rbx, %rdi
movq %rax, %rsi
callq 0xa4dc
movq (%r15), %r15
movq %rbx, %rdi
callq 0xa516
movq %rax, %r12
addq $0x10, %rbx
movq %r14, %rdi
callq 0xa446
movl 0x10(%r14), %r8d
movq %r15, %rdi
movq %r12, %rsi
movq %rbx, %rdx
movq %rax, %rcx
callq 0x4090
movl %eax, %ebx
testl %eax, %eax
je 0x8095
testl %ebx, %ebx
setne %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x3477(%rip), %rdi      # 0xb513
callq 0x43b0
jmp 0x8084
nop