Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="utf-8"?>
- <CheatTable>
- <CheatEntries>
- <CheatEntry>
- <ID>147</ID>
- <Description>"x86/x64 Beep"</Description>
- <LastState/>
- <VariableType>Auto Assembler Script</VariableType>
- <AssemblerScript>/*
- https://msdn.microsoft.com/en-us/library/windows/desktop/ms679277(v=vs.85).aspx
- BOOL WINAPI Beep(
- _In_ DWORD dwFreq,
- _In_ DWORD dwDuration
- );
- */
- globalalloc(dobeep,1000)
- [ENABLE]
- dobeep:
- // align stack (ce will automatically use ebp/esp for 32 bit, at least in this test lol)
- mov rbp, rsp
- and rsp, -10
- {$lua}
- if targetIs64Bit() then
- return [[//code for if it is a 64bit application
- mov rcx, #300 // dwFreq
- mov rdx, #750 // dwDuration
- ]]
- else
- return [[//code for if it is a 32bit application
- push #750 // dwDuration
- push #300 // dwFreq
- ]]
- end
- {$asm}
- call beep
- // restore stack pointer
- mov rsp, rbp
- ret
- createThread(dobeep)
- [DISABLE]
- </AssemblerScript>
- </CheatEntry>
- </CheatEntries>
- </CheatTable>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement