Advertisement
adafcaefc

Absolute's Multi scale Rewritten

May 15th, 2020
1,981
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.   // float avgx = 0, avgy = 0;
  2.  
  3.   cvtsi2ss xmm0,eax
  4.   cvtsi2ss xmm1,eax
  5.   cvtsi2ss xmm2,eax
  6.   cvtsi2ss xmm3,eax
  7.   cvtsi2ss xmm4,eax
  8.  
  9.   // float f;
  10.  
  11.   movss xmm3,[floatvalue]
  12.  
  13.   // int count = this->gmd.Read<int>(this->gmd.GetPointerAddress({ 0x3222D0, 0x168, 0x144, 0xB4, 0xB4, 0x3A0 }, GAME_NAME));
  14.  
  15.   mov ecx,[GeometryDash.exe+3222D0]
  16.   add ecx,168
  17.   mov ecx,[ecx]
  18.   add ecx,144
  19.   mov ecx,[ecx]
  20.   add ecx,B4
  21.   mov ecx,[ecx]
  22.   add ecx,B4
  23.   mov ecx,[ecx]
  24.   add ecx,3A0
  25.   mov ecx,[ecx]
  26.  
  27.   // for (auto i = 0; i < count; ++i)
  28.  
  29.   dec eax
  30.   for1:
  31.   inc eax
  32.  
  33.   // uint32_t obj = this->gmd.GetPointerAddress({ 0x3222D0, 0x168, 0x234, 0x20, 0x8, static_cast<uint32_t>(0x4 * i), 0 }, GAME_NAME);
  34.  
  35.   mov esi,[GeometryDash.exe+3222D0]
  36.   add esi,168
  37.   mov esi,[esi]
  38.   add esi,234
  39.   mov esi,[esi]
  40.   add esi,20
  41.   mov esi,[esi]
  42.   add esi,8
  43.   mov esi,[esi]
  44.   add esi,eax
  45.   add esi,eax
  46.   add esi,eax
  47.   add esi,eax
  48.   mov esi,[esi]
  49.  
  50.   // if (this->gmd.Read<bool>(obj + OFFSET_SELECTED))
  51.  
  52.   cmp byte ptr[esi+3DA],0
  53.   je exit1
  54.  
  55.   // selected.push_back(obj);
  56.  
  57.   inc edi
  58.   mov [tableaddr+edi*4],esi
  59.  
  60.  
  61.   // avgx += this->gmd.Read<float>(obj + OFFSET_X);
  62.   // avgy += this->gmd.Read<float>(obj + OFFSET_Y);
  63.  
  64.   addss xmm0,[esi+34]
  65.   addss xmm1,[esi+38]
  66.  
  67.   exit1:
  68.   cmp eax,ecx
  69.  
  70.   jl for1 // loop for 1
  71.  
  72.   cvtsi2ss xmm2,edi // length
  73.  
  74.   // avgx /= selected.size();
  75.  
  76.   divss xmm0,xmm2
  77.  
  78.   // avgy /= selected.size();
  79.  
  80.   divss xmm1,xmm2
  81.  
  82.   xor eax,eax
  83.   inc eax // counter starts at 1
  84.  
  85.   // for (const auto &obj : selected)
  86.  
  87.   dec eax
  88.   for2:
  89.   inc eax
  90.   mov esi,[tableaddr+eax*4]
  91.  
  92.   // float scale = this->gmd.Read<float>(obj + OFFSET_SCALE)*f;
  93.  
  94.   movss xmm2,[esi+35C]
  95.   mulss xmm2,xmm3
  96.  
  97.   // this->gmd.Write(obj + OFFSET_X, avgx + (this->gmd.Read<float>(obj + OFFSET_X) - avgx)*f);
  98.  
  99.   movss xmm4,[esi+34]
  100.   subss xmm4,xmm0
  101.   mulss xmm4,xmm3
  102.   addss xmm4,xmm0
  103.   movss [esi+34],xmm4
  104.  
  105.   // this->gmd.Write(obj + OFFSET_Y, avgy + (this->gmd.Read<float>(obj + OFFSET_Y) - avgy)*f);
  106.  
  107.   movss xmm4,[esi+38]
  108.   subss xmm4,xmm1
  109.   mulss xmm4,xmm3
  110.   addss xmm4,xmm1
  111.   movss [esi+38],xmm4
  112.  
  113.   // this->gmd.Write(obj + OFFSET_SCALE, scale);
  114.  
  115.   movss [esi+35C],xmm2
  116.  
  117.   // this->gmd.Write(obj + OFFSET_SCALE_X, scale);
  118.  
  119.   movss [esi+28],xmm2
  120.  
  121.   // this->gmd.Write(obj + OFFSET_SCALE_Y, scale);
  122.  
  123.   movss [esi+2C],xmm2
  124.  
  125.   cmp eax,edi
  126.   jl for2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement