Here are some tips that may help you, but just remember that any one with a good understanding of assembler will found it.
Lets imagine your program is like you describe:
int main() {
if (myCheck()) {
std::cout << "License pass\n";
}
....
And here is the disassembler of the code.
00000000004006d3 <main>:
4006d3: 55 push %rbp
4006d4: 48 89 e5 mov %rsp,%rbp
4006d7: e8 da ff ff ff callq 4006b6 <_Z7myCheckv>
4006dc: 84 c0 test %al,%al
4006de: 74 0f je 4006ef <main+0x1c>
4006e0: be d1 07 40 00 mov $0x4007d1,%esi
4006e5: bf 40 10 60 00 mov $0x601040,%edi
4006ea: e8 b1 fe ff ff callq 4005a0 <_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@plt>
4006ef: b8 00 00 00 00 mov $0x0,%eax
4006f4: 5d pop %rbp
4006f5: c3 retq
So by adding asm statements in your code you can make it more difficult.
#define OPS1 "xor \%rbx,\%rbx\n"
int main() {
__asm__ volatile (
"push %rax\n"
"xor %rax,%rax\n"
"pop %rax\n"
);
if (myCheck()) {
std::cout << "License pass\n";
}
__asm__ volatile (OPS1);
And here is the output
4006d3: 55 push %rbp
4006d4: 48 89 e5 mov %rsp,%rbp
4006d7: 50 push %rax
4006d8: 48 31 c0 xor %rax,%rax
4006db: 58 pop %rax
4006dc: e8 d5 ff ff ff callq 4006b6 <_Z7myCheckv>
4006e1: 84 c0 test %al,%al
4006e3: 74 0f je 4006f4 <main+0x21>
4006e5: be e1 07 40 00 mov $0x4007e1,%esi
4006ea: bf 40 10 60 00 mov $0x601040,%edi
4006ef: e8 ac fe ff ff callq 4005a0 <_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@plt>
4006f4: 48 31 db xor %rbx,%rbx
4006f7: b8 00 00 00 00 mov $0x0,%eax
4006fc: 5d pop %rbp
4006fd: c3 retq
This case is really really easy, but if you have a good understanding of templates, assembler you complicate a bit the code generated.