Skip to content

Instantly share code, notes, and snippets.

View igorsegallafa's full-sized avatar
🎯
Focusing

Igor Segalla igorsegallafa

🎯
Focusing
View GitHub Profile
if( ( hModuleSnap = CreateToolhelp32Snapshot( TH32CS_SNAPMODULE, GetCurrentProcessId() ) ) != INVALID_HANDLE_VALUE )
{
me32.dwSize = sizeof( me32 );
if( Module32First( hModuleSnap, &me32 ) )
{
do
{
if( me32.hModule == GetModuleHandle( NULL ) )
continue;
/**
* An Anti-Reverse Engineering Guide, Joshua Tully
* https://www.codeproject.com/Articles/30815/An-Anti-Reverse-Engineering-Guide
* You can find all methods of anti-debugging here: https://gist.github.com/igorsegallafa/3dd15c67e7091e9734a417fe1079129b
*/
bool FindDebugger1::HasDebugger()
{
__try { __asm INT 0x2D }
__except (EXCEPTION_EXECUTE_HANDLER){ return false; }
/**
* An Anti-Reverse Engineering Guide, Joshua Tully
* https://www.codeproject.com/Articles/30815/An-Anti-Reverse-Engineering-Guide
*/
bool FindDebugger1::HasDebugger()
{
__try { __asm INT 0x2D }
__except (EXCEPTION_EXECUTE_HANDLER){ return false; }
@igorsegallafa
igorsegallafa / LitSolid.fx
Created May 26, 2020 17:34
Mesh Skinning
PS_INPUT VS( VS_INPUT input )
{
PS_INPUT output;
float4 position = mul(input.pos, GetSkinMatrix(input.blendIndice));
float4 worldPosition = mul( position, World );
float4 normalPosition = mul(input.normal, GetSkinMatrix(input.blendIndice));
float4 normalWorldPosition = mul(normalPosition, World);
float4 viewPosition = mul( worldPosition, View );