I am trying to understand some algorithm of how the thing works. Here is the function I got from decompiling my executable with Hey Rays.
I want to run this function to see the result and then understand how it works.
So the first thing I want to know what all the signature of this function means?
__usercall sub_401960<eax>(int a1<edi>)
__usercall
eax and diamond <>
edi and diamond <>
Then I want to know what these things mean:
*(_BYTE *)
and
__security_cookie
and what they're doing in the following code:
#include <stdio.h>
#include <stdlib.h>
int __usercall sub_401960<eax>(int a1<edi>)
{
int result; // eax@1
signed int v2; // esi@1
char v3; // cl@2
char v4; // cl@3
char v5; // cl@8
char v6; // cl@9
char v7; // cl@14
char v8; // cl@15
char v9; // cl@20
char v10; // cl@21
result = 0;
v2 = 0;
do
{
v3 = *(_BYTE *)(v2 + a1);
if ( (unsigned __int8)(v3 - 48) > 9u )
{
if ( (unsigned __int8)(v3 - 97) > 5u )
{
if ( (unsigned __int8)(v3 - 65) > 5u )
return result;
v4 = v3 - 55;
}
else
{
v4 = v3 - 87;
}
}
...
return result;
}
Sorry if I've asked such newbie question
What I want is to run the thing!