Skip to content

Instantly share code, notes, and snippets.

@trietptm
Created June 19, 2014 07:32
Show Gist options
  • Save trietptm/c93b9ec3c298b81b7d8b to your computer and use it in GitHub Desktop.
Save trietptm/c93b9ec3c298b81b7d8b to your computer and use it in GitHub Desktop.
binary-auditing-training-package\005 - algorithm analysis\AlgoMe2\AnalyseMe004.exe
int __cdecl main(int argc, const char **argv, const char **envp)
{
signed int y_1; // ecx@1
signed int x_1; // eax@1
int remainder_1; // edx@2
unsigned int y_2; // esi@3
signed int x_2; // ecx@3
int remainder_2; // edx@4
signed int y_3; // esi@5
signed int x_3; // eax@5
int remainder_3; // edx@6
int remainder_4; // edx@8
y_1 = 0x777u;
x_1 = 0x666u;
do
{
remainder_1 = x_1 % y_1;
x_1 = y_1;
y_1 = remainder_1;
}
while ( remainder_1 );
y_2 = 0x54321u;
x_2 = 0x12345u;
do
{
remainder_2 = x_2 % (signed int)y_2;
x_2 = y_2;
y_2 = remainder_2;
}
while ( remainder_2 );
y_3 = 0x777u;
x_3 = 0x666u;
do
{
remainder_3 = x_3 % y_3;
x_3 = y_3;
y_3 = remainder_3;
}
while ( remainder_3 );
if ( x_2 )
{
do
{
remainder_4 = x_3 % x_2;
x_3 = x_2;
x_2 = remainder_4;
}
while ( remainder_4 );
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment