// File: menhits[P]phplus/src/msclStringFuncs.cpp
// Function: loadEntireFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool)
string loadEntireFile(string inName, bool printOutput)
{
	std::fstream inFile;
	
	if (printOutput)
		cout << "attempting to open '" << inName << "'..." << endl;
	
	inFile.open(inName);
	
	if (!inFile.is_open())
	{
		if (printOutput)
			cout << "'" << inName << "' failed to open :(" << endl;
		return "";
	}
	else
	{
		if (printOutput)
			cout << "file opended, reading file..." << endl;
		
		stringstream strStream;
		strStream << inFile.rdbuf();//read the file
		string out = strStream.str();//str holds the content of the file
		inFile.close();
		
		if (printOutput)
			cout << "file reading done, '" << inName << "' closed" << endl;
		
		return out;
	}
}

// Assembly:
subq $0x458, %rsp            # imm = 0x458
movq %rsi, 0x70(%rsp)
movq %rdi, 0x78(%rsp)
movb %dl, %al
movq %rdi, %rcx
movq %rcx, 0x80(%rsp)
movq %rdi, 0x450(%rsp)
movq %rsi, 0x448(%rsp)
andb $0x1, %al
movb %al, 0x447(%rsp)
leaq 0x230(%rsp), %rdi
callq 0xb420
testb $0x1, 0x447(%rsp)
je 0xaca04
movq 0x6b61b(%rip), %rdi     # 0x117fb0
leaq 0x2a09f(%rip), %rsi     # 0xd6a3b
callq 0xb380
movq %rax, 0x68(%rsp)
jmp 0xac9a8
movq 0x70(%rsp), %rsi
movq 0x68(%rsp), %rdi
callq 0xb340
movq %rax, 0x60(%rsp)
jmp 0xac9be
movq 0x60(%rsp), %rdi
leaq 0x2a086(%rip), %rsi     # 0xd6a50
callq 0xb380
movq %rax, 0x58(%rsp)
jmp 0xac9d6
movq 0x58(%rsp), %rdi
movq 0x6b59e(%rip), %rsi     # 0x117f80
callq 0xb3c0
jmp 0xac9e9
jmp 0xaca04
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x228(%rsp)
movl %eax, 0x224(%rsp)
jmp 0xacccc
movl $0x8, %edi
movl $0x10, %esi
callq 0xadd70
movl %eax, 0x54(%rsp)
jmp 0xaca19
movl 0x54(%rsp), %edx
movq 0x70(%rsp), %rsi
leaq 0x230(%rsp), %rdi
callq 0xb4d0
jmp 0xaca31
leaq 0x230(%rsp), %rdi
callq 0xb660
movb %al, 0x53(%rsp)
jmp 0xaca44
movb 0x53(%rsp), %al
testb $0x1, %al
jne 0xacb26
jmp 0xaca52
testb $0x1, 0x447(%rsp)
je 0xacab9
movq 0x6b54d(%rip), %rdi     # 0x117fb0
leaq 0x2a030(%rip), %rsi     # 0xd6a9a
callq 0xb380
movq %rax, 0x48(%rsp)
jmp 0xaca76
movq 0x70(%rsp), %rsi
movq 0x48(%rsp), %rdi
callq 0xb340
movq %rax, 0x40(%rsp)
jmp 0xaca8c
movq 0x40(%rsp), %rdi
leaq 0x29fbd(%rip), %rsi     # 0xd6a55
callq 0xb380
movq %rax, 0x38(%rsp)
jmp 0xacaa4
movq 0x38(%rsp), %rdi
movq 0x6b4d0(%rip), %rsi     # 0x117f80
callq 0xb3c0
jmp 0xacab7
jmp 0xacab9
leaq 0x223(%rsp), %rdi
movq %rdi, 0x30(%rsp)
callq 0xb690
movq 0x78(%rsp), %rdi
movq 0x30(%rsp), %rdx
leaq 0x24f43(%rip), %rsi     # 0xd1a1f
callq 0xb4c0
jmp 0xacae3
leaq 0x223(%rsp), %rdi
callq 0xb3f0
movl $0x1, 0x21c(%rsp)
jmp 0xaccaf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x228(%rsp)
movl %eax, 0x224(%rsp)
leaq 0x223(%rsp), %rdi
callq 0xb3f0
jmp 0xacccc
testb $0x1, 0x447(%rsp)
je 0xacb5f
movq 0x6b479(%rip), %rdi     # 0x117fb0
leaq 0x29f2b(%rip), %rsi     # 0xd6a69
callq 0xb380
movq %rax, 0x28(%rsp)
jmp 0xacb4a
movq 0x28(%rsp), %rdi
movq 0x6b42a(%rip), %rsi     # 0x117f80
callq 0xb3c0
jmp 0xacb5d
jmp 0xacb5f
leaq 0x90(%rsp), %rdi
callq 0xb2b0
jmp 0xacb6e
leaq 0xa0(%rsp), %rax
movq %rax, 0x18(%rsp)
leaq 0x230(%rsp), %rdi
callq 0xb3d0
movq %rax, 0x20(%rsp)
jmp 0xacb8f
movq 0x20(%rsp), %rsi
movq 0x18(%rsp), %rdi
callq 0xb0d0
jmp 0xacba0
movq 0x78(%rsp), %rdi
movb $0x0, 0x8f(%rsp)
leaq 0x90(%rsp), %rsi
callq 0xb370
jmp 0xacbbc
leaq 0x230(%rsp), %rdi
callq 0xb060
jmp 0xacbcb
testb $0x1, 0x447(%rsp)
je 0xacc6a
movq 0x6b3d0(%rip), %rdi     # 0x117fb0
leaq 0x29ea0(%rip), %rsi     # 0xd6a87
callq 0xb380
movq %rax, 0x10(%rsp)
jmp 0xacbf3
movq 0x70(%rsp), %rsi
movq 0x10(%rsp), %rdi
callq 0xb340
movq %rax, 0x8(%rsp)
jmp 0xacc09
movq 0x8(%rsp), %rdi
leaq 0x29e87(%rip), %rsi     # 0xd6a9c
callq 0xb380
movq %rax, (%rsp)
jmp 0xacc20
movq (%rsp), %rdi
movq 0x6b355(%rip), %rsi     # 0x117f80
callq 0xb3c0
jmp 0xacc32
jmp 0xacc6a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x228(%rsp)
movl %eax, 0x224(%rsp)
jmp 0xacca0
movq 0x78(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x228(%rsp)
movl %eax, 0x224(%rsp)
callq 0xb6e8
jmp 0xacca0
movb $0x1, 0x8f(%rsp)
movl $0x1, 0x21c(%rsp)
testb $0x1, 0x8f(%rsp)
jne 0xacc91
movq 0x78(%rsp), %rdi
callq 0xb6e8
leaq 0x90(%rsp), %rdi
callq 0xb2e0
jmp 0xaccaf
leaq 0x90(%rsp), %rdi
callq 0xb2e0
jmp 0xacccc
leaq 0x230(%rsp), %rdi
callq 0xb0e0
movq 0x80(%rsp), %rax
addq $0x458, %rsp            # imm = 0x458
retq
leaq 0x230(%rsp), %rdi
callq 0xb0e0
movq 0x228(%rsp), %rdi
callq 0xb680
nopw %cs:(%rax,%rax)