Guest User

Untitled

a guest
Sep 17th, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.11 KB | None | 0 0
  1. unsigned int __fastcall makePID__(unsigned int idSet, int speciesValue, void *b, int generationType, void *d, void *e)
  2. {
  3.   int v6; // r5@1
  4.   unsigned int v7; // r6@1
  5.   int v8; // r4@1
  6.   unsigned int PID; // r4@2
  7.   unsigned int v10; // r7@3
  8.   unsigned int v11; // r4@3
  9.   void *v13; // [sp+0h] [bp-18h]@1
  10.  
  11.   v6 = generationType;
  12.   v7 = idSet;
  13.   v8 = speciesValue;
  14.   v13 = b;
  15.   if ( generationType == 2 )
  16.   {
  17.     PID = rand__();
  18.   }
  19.   else
  20.   {
  21.     v10 = rand__() & 0xFFFFFF00;
  22.     v11 = sub_2018614(v8, v13, v6);
  23.     if ( v6 || (sub_201AF88)() )
  24.     {
  25.       if ( v6 == 1 && !sub_201AF88(v11) )
  26.         v11 = rand__() + 1;
  27.     }
  28.     else
  29.     {
  30.       v11 += rand__();
  31.     }
  32.     PID = v11 | v10;
  33.   }
  34.   if ( e )
  35.   {
  36.     if ( e == 1 )
  37.     {
  38.       PID = PID | ((v7 ^ ((v7 & 0xFFFF0000) >> 16) ^ PID) << 16);
  39.       if ( (PID & 0x10000) != d << 16 )
  40.         goto LABEL_19;
  41.       return PID;
  42.     }
  43.     if ( e != 2 )
  44.       return PID;
  45.   }
  46.   else if ( checkShiny__(v7, PID) == 1 )
  47.   {
  48.     PID ^= 0x10000000u;
  49.   }
  50.   if ( (PID & 0x10000) != d << 16 )
  51. LABEL_19:
  52.     PID ^= 0x10000u;
  53.   return PID;
  54. }
Advertisement
Add Comment
Please, Sign In to add comment