Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define WIN32_LEAN_AND_MEAN
- #define NOWINRES
- #define NOSERVICE
- #define NOMCX
- #define NOIME
- #include <windows.h>
- #pragma comment(lib, "user32.lib")
- int main(void)
- {
- char stuffz[] = "Hello World!";
- ;you should probably use a few different sqrt implementations for GOOD detectability
- __asm
- {
- mov eax, 1649616 ;((6^2)^2)^2 = 6 (how many bytes to jump)
- push esp
- push eax
- fld [esp]
- pop eax
- mov ebx, eax
- pop eax
- _fsqrt_do1:
- fsqrt
- call _fsqrt_do2
- _fsqrt_do3:
- mov eax, _fsqrt_do1
- mov ebx, 3791
- add ebx, 111
- sub eax, 1 ;get before
- call eax
- _fsqrt_do2:
- cmp ebx, 3902
- je _doentry
- fsqrt
- pop eax ;eax = return address
- cmp eax, _fsqrt_do3 ;always true (should be!)
- je _fsqrt_do3
- _doentry:
- mov ebx, ondetect ;ondetect label
- push eax
- fst [esp] ;read out result (should == 6)
- pop eax
- sub ebx, eax
- jmp ebx
- mov eax, 0
- ret
- ondetect:
- push 0 ;opcode 0x52 (1 byte)
- call ExitProcess ;opcode 0xE8 (5 bytes)
- realentry:
- push 0
- push stuffz
- push stuffz
- push 0
- call MessageBoxA
- };
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement