constWORLDant

ROOTME ARM 본문

0x02 Reverse Engineer/0x03. Etc

ROOTME ARM

data type ConS_tanT 2018.05.19 17:55

void __fastcall __noreturn main_0(int a1, int argv)

{

  size_t status; // [sp+8h] [bp-1Ch]

  char *s; // [sp+Ch] [bp-18h]

  int index; // [sp+14h] [bp-10h]

  int v5; // [sp+14h] [bp-10h]


  if ( a1 != 2 )

  {

    puts("Please input password");

    exit(1);

  }

  s = *(char **)(argv + 4);

  printf("Checking %s for password...\n", *(_DWORD *)(argv + 4));

  status = strlen(s);                           // 6글자

  if ( status != 6 )

  {

    puts("Loser...");

    exit(status);

  }

  index = 6 - strlen(s);                        // v4 = 0

  if ( *s != s[5] )                             // s[5] =s 

    ++index;

  if ( (unsigned __int8)*s + 1 != (unsigned __int8)s[1] )// s[1]=t

    ++index;

  if ( (unsigned __int8)s[3] + 1 != (unsigned __int8)*s )// s[0] = s

    ++index;

  if ( (unsigned __int8)s[2] + 4 != (unsigned __int8)s[5] )// s[2] = 's' - 4 = 'o'

    ++index;

  if ( (unsigned __int8)s[4] + 2 != (unsigned __int8)s[2] )// s[4] = m

    ++index;

  v5 = index + (unsigned __int8)(s[3] ^ 'r') + (unsigned __int8)s[6];// s[3]= r

  if ( !v5 )

  {                                             // storms

    puts("Success, you rocks!");

    exit(0);

  }

  puts("Loser...");

  exit(v5);

}

'0x02 Reverse Engineer > 0x03. Etc' 카테고리의 다른 글

ROOTME PE-SEHVEH  (0) 2018.05.21
ROOTME Macho keygen or not  (0) 2018.05.19
ROOTME ARM  (0) 2018.05.19
ROOTME NO SOFTWARE BREAKPOINTS  (0) 2018.05.19
ROOTME PYC-BYTECODE  (0) 2018.05.19
ROOTME ELF PTRACE  (0) 2018.05.19
0 Comments
댓글쓰기 폼