// подобрать правильное значение Sum #include int Sum = 0xf2f; int check (void); int main () { if ( check () != Sum ) return 0; MessageBox (0, "Hello World!", "test", MB_OK); return 0; } int check () { int _cnt; DWORD ptr1 = (DWORD)main; __asm { push ebx push ecx push edx mov ebx, main mov ecx, check xor eax, eax mark: mov edx, ds:[ebx] and edx, 0x000000ff add eax, edx inc ebx cmp ebx, ecx jnz mark mov _cnt, eax pop edx pop ecx pop ebx } _cnt -= 4 * ((ptr1>>24) + ((ptr1>>16)&0xff)); return _cnt; }