{"type": "func", "start": 7403332, "end": 7403950, "name": "EditorUI::scaleObjects", "pseudocode": "// \n// EditorUI::scaleObjects from 0x70f744 to 0x70f9ae (618 bytes)\n// \n// 3 xrefs:\n// > EditorUI::scaleXChanged @ 0x70fa24\n// > EditorUI::scaleYChanged @ 0x70fab4\n// > EditorUI::scaleXYChanged @ 0x70fb48\n// \n// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 11:57:43 +0000\n// \n\nunsigned int __fastcall EditorUI::scaleObjects(\n        cocos2d::CCArray *a1,\n        cocos2d::CCArray *this,\n        float a3,\n        float a4,\n        cocos2d::CCPoint *a5,\n        int a6,\n        char a7)\n{\n  unsigned int v9; // r7\n  int v12; // r11\n  float v13; // s16\n  float v14; // s20\n  unsigned int result; // r0\n  float v16; // s15\n  float v17; // s15\n  unsigned int i; // r7\n  GameObject *v19; // r11\n  float *v20; // r0\n  float v21; // s16\n  float v22; // s17\n  int v23; // r0\n  float v24; // s16\n  float v25; // s17\n  int v26; // r0\n  int v27; // [sp+Ch] [bp-28h]\n  float v28; // [sp+14h] [bp-20h] BYREF\n  float v29; // [sp+18h] [bp-1Ch]\n  _BYTE v30[8]; // [sp+1Ch] [bp-18h] BYREF\n  unsigned int v31[2]; // [sp+24h] [bp-10h] BYREF\n\n  v9 = 0;\n  v27 = (int)a1 + 344;\n  while ( v9 < cocos2d::CCArray::count(this) )\n  {\n    v12 = cocos2d::CCArray::objectAtIndex(this, v9);\n    v31[0] = *(_DWORD *)(v12 + 780);\n    std::unordered_map<int,GameObjectEditorState>::operator[](v27, v31);\n    if ( *((_BYTE *)a1 + 511) )\n    {\n      v13 = 4.0;\n      v14 = 0.25;\n    }\n    else\n    {\n      v13 = 4.0;\n      v14 = 0.5;\n      if ( !GameObject::isTrigger((GameObject *)v12) )\n        v13 = 2.0;\n    }\n    if ( a6 == 2 )\n      goto LABEL_9;\n    result = lroundf();\n    v17 = (float)(int)result / 100.0;\n    if ( v17 < v14 || v17 > v13 || (float)(v17 * *(float *)(v12 + 1132)) == *(float *)(v12 + 1008) )\n      return result;\n    if ( a6 != 1 )\n    {\nLABEL_9:\n      result = lroundf();\n      v16 = (float)(int)result / 100.0;\n      if ( v16 < v14 || v16 > v13 || (float)(v16 * *(float *)(v12 + 1136)) == *(float *)(v12 + 1012) )\n        return result;\n    }\n    ++v9;\n  }\n  if ( cocos2d::CCPoint::equals(a5, (const cocos2d::CCPoint *)&unk_D2DBE0) )\n  {\n    EditorUI::getGroupCenter((EditorUI *)v31, a1, this, 0);\n    cocos2d::CCPoint::operator=(a5, v31);\n  }\n  for ( i = 0; ; ++i )\n  {\n    result = cocos2d::CCArray::count(this);\n    if ( i >= result )\n      break;\n    v19 = (GameObject *)cocos2d::CCArray::objectAtIndex(this, i);\n    v31[0] = *((_DWORD *)v19 + 195);\n    v20 = (float *)std::unordered_map<int,GameObjectEditorState>::operator[]((int)a1 + 344, v31);\n    v21 = v20[2] * *((float *)v19 + 283);\n    v22 = v20[3] * *((float *)v19 + 284);\n    v23 = (*(int (__fastcall **)(GameObject *))(*(_DWORD *)v19 + 96))(v19);\n    v24 = v21 * a3;\n    v25 = v22 * a4;\n    cocos2d::CCPoint::operator-(&v28, v23, a5);\n    if ( a6 == 2 || (v28 = v28 * (float)(v24 / *((float *)v19 + 252)), a6 != 1) )\n      v29 = v29 * (float)(v25 / *((float *)v19 + 253));\n    cocos2d::CCPoint::operator+(v30, a5, &v28);\n    if ( a6 == 2 || (GameObject::updateCustomScaleX(v19, v24), a6 != 1) )\n      GameObject::updateCustomScaleY(v19, v25);\n    if ( !a7 )\n    {\n      v26 = (*(int (__fastcall **)(GameObject *))(*(_DWORD *)v19 + 96))(v19);\n      cocos2d::CCPoint::operator-(v31, v30, v26);\n      EditorUI::moveObject((int)a1, v19, (int)v31);\n    }\n  }\n  return result;\n}", "assembly": "; \n; EditorUI::scaleObjects from 0x70f744 to 0x70f9ae (618 bytes)\n; \n; 3 xrefs:\n; > EditorUI::scaleXChanged @ 0x70fa24\n; > EditorUI::scaleYChanged @ 0x70fab4\n; > EditorUI::scaleXYChanged @ 0x70fb48\n; \n; This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 11:57:43 +0000\n; \nPUSH.W          {R4-R11,LR}                                            ; +0x0, 0x70f744\nMOV             R6, R0                                                 ; +0x4, 0x70f748\nVPUSH           {D8-D10}                                               ; +0x6, 0x70f74a\nMOV             R5, R1                                                 ; +0xa, 0x70f74e\nMOVS            R7, #0                                                 ; +0xc, 0x70f750\nVMOV            S19, R3                                                ; +0xe, 0x70f752\nSUB             SP, SP, #0x34                                          ; +0x12, 0x70f756\nVLDR            S17, =100.0                                            ; +0x14, 0x70f758\nADD.W           R10, SP, #0x34+var_10                                  ; +0x18, 0x70f75c\nLDRB.W          R3, [SP,#0x34+arg_8]                                   ; +0x1c, 0x70f760\nVMOV            S18, R2                                                ; +0x20, 0x70f764\nLDR.W           R8, [SP,#0x34+arg_0]                                   ; +0x24, 0x70f768\nLDR             R4, [SP,#0x34+arg_4]                                   ; +0x28, 0x70f76c\nSTR             R3, [SP,#0x34+var_30]                                  ; +0x2a, 0x70f76e\nLDR             R3, =(__stack_chk_guard_ptr - 0x70F776)                ; +0x2c, 0x70f770\nADD             R3, PC; __stack_chk_guard_ptr                          ; +0x2e, 0x70f772\nLDR             R3, [R3]; __stack_chk_guard                            ; +0x30, 0x70f774\nSTR             R3, [SP,#0x34+var_2C]                                  ; +0x32, 0x70f776\nLDR             R2, [R3]                                               ; +0x34, 0x70f778\nADD.W           R3, R0, #0x158                                         ; +0x36, 0x70f77a\nSTR             R3, [SP,#0x34+var_28]                                  ; +0x3a, 0x70f77e\nSTR             R2, [SP,#0x34+var_8]                                   ; +0x3c, 0x70f780\nMOV             R0, R5; this                                           ; +0x3e, 0x70f782\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x40, 0x70f784\nCMP             R7, R0                                                 ; +0x44, 0x70f788\nBCS             loc_70F886                                             ; +0x46, 0x70f78a\nMOV             R1, R7; unsigned int                                   ; +0x48, 0x70f78c\nMOV             R0, R5; this                                           ; +0x4a, 0x70f78e\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x4c, 0x70f790\nMOV             R1, R10                                                ; +0x50, 0x70f794\nLDR.W           R3, [R0,#0x30C]                                        ; +0x52, 0x70f796\nMOV             R11, R0                                                ; +0x56, 0x70f79a\nLDR             R0, [SP,#0x34+var_28]                                  ; +0x58, 0x70f79c\nSTR             R3, [SP,#0x34+var_10]                                  ; +0x5a, 0x70f79e\nBL              _ZNSt6__ndk113unordered_mapIi21GameObjectEditorStateNS_4hashIiEENS_8equal_toIiEENS_9allocatorINS_4pairIKiS1_EEEEEixEOi; std::unordered_map<int,GameObjectEditorState>::operator[](int &&) ; +0x5c, 0x70f7a0\nLDRB.W          R2, [R6,#0x1FF]                                        ; +0x60, 0x70f7a4\nMOV             R9, R0                                                 ; +0x64, 0x70f7a8\nCBNZ            R2, loc_70F7C8                                         ; +0x66, 0x70f7aa\nMOV             R0, R11; this                                          ; +0x68, 0x70f7ac\nVMOV.F32        S16, #4.0                                              ; +0x6a, 0x70f7ae\nBL              _ZN10GameObject9isTriggerEv; GameObject::isTrigger(void) ; +0x6e, 0x70f7b2\nVMOV.F32        S15, #2.0                                              ; +0x72, 0x70f7b6\nVMOV.F32        S20, #0.5                                              ; +0x76, 0x70f7ba\nCMP             R0, #0                                                 ; +0x7a, 0x70f7be\nIT EQ                                                                  ; +0x7c, 0x70f7c0\nVMOVEQ.F32      S16, S15                                               ; +0x7e, 0x70f7c2\nB               loc_70F7D0                                             ; +0x82, 0x70f7c6\nVMOV.F32        S16, #4.0                                              ; +0x84, 0x70f7c8\nVMOV.F32        S20, #0.25                                             ; +0x88, 0x70f7cc\nCMP             R4, #2                                                 ; +0x8c, 0x70f7d0\nBNE             loc_70F800                                             ; +0x8e, 0x70f7d2\nVLDR            S15, [R9,#0xC]                                         ; +0x90, 0x70f7d4\nVMUL.F32        S15, S19, S15                                          ; +0x94, 0x70f7d8\nVMUL.F32        S15, S15, S17                                          ; +0x98, 0x70f7dc\nVMOV            R0, S15                                                ; +0x9c, 0x70f7e0\nBLX             lroundf                                                ; +0xa0, 0x70f7e4\nVMOV            S15, R0                                                ; +0xa4, 0x70f7e8\nVCVT.F32.S32    S15, S15                                               ; +0xa8, 0x70f7ec\nVDIV.F32        S15, S15, S17                                          ; +0xac, 0x70f7f0\nVCMPE.F32       S15, S20                                               ; +0xb0, 0x70f7f4\nVMRS            APSR_nzcv, FPSCR                                       ; +0xb4, 0x70f7f8\nBPL             loc_70F85A                                             ; +0xb8, 0x70f7fc\nB               loc_70F996                                             ; +0xba, 0x70f7fe\nVLDR            S15, [R9,#8]                                           ; +0xbc, 0x70f800\nVMUL.F32        S15, S18, S15                                          ; +0xc0, 0x70f804\nVMUL.F32        S15, S15, S17                                          ; +0xc4, 0x70f808\nVMOV            R0, S15                                                ; +0xc8, 0x70f80c\nBLX             lroundf                                                ; +0xcc, 0x70f810\nVMOV            S15, R0                                                ; +0xd0, 0x70f814\nVCVT.F32.S32    S15, S15                                               ; +0xd4, 0x70f818\nVDIV.F32        S15, S15, S17                                          ; +0xd8, 0x70f81c\nVCMPE.F32       S15, S20                                               ; +0xdc, 0x70f820\nVMRS            APSR_nzcv, FPSCR                                       ; +0xe0, 0x70f824\nBMI.W           loc_70F996                                             ; +0xe4, 0x70f828\nVCMPE.F32       S15, S16                                               ; +0xe8, 0x70f82c\nVMRS            APSR_nzcv, FPSCR                                       ; +0xec, 0x70f830\nBGT.W           loc_70F996                                             ; +0xf0, 0x70f834\nADDW            R2, R11, #0x46C                                        ; +0xf4, 0x70f838\nVLDR            S14, [R2]                                              ; +0xf8, 0x70f83c\nVMUL.F32        S15, S15, S14                                          ; +0xfc, 0x70f840\nVLDR            S14, [R11,#0x3F0]                                      ; +0x100, 0x70f844\nVCMP.F32        S15, S14                                               ; +0x104, 0x70f848\nVMRS            APSR_nzcv, FPSCR                                       ; +0x108, 0x70f84c\nBEQ.W           loc_70F996                                             ; +0x10c, 0x70f850\nCMP             R4, #1                                                 ; +0x110, 0x70f854\nBEQ             loc_70F882                                             ; +0x112, 0x70f856\nB               loc_70F7D4                                             ; +0x114, 0x70f858\nVCMPE.F32       S15, S16                                               ; +0x116, 0x70f85a\nVMRS            APSR_nzcv, FPSCR                                       ; +0x11a, 0x70f85e\nBGT.W           loc_70F996                                             ; +0x11e, 0x70f862\nADD.W           R3, R11, #0x470                                        ; +0x122, 0x70f866\nVLDR            S14, [R3]                                              ; +0x126, 0x70f86a\nVMUL.F32        S15, S15, S14                                          ; +0x12a, 0x70f86e\nVLDR            S14, [R11,#0x3F4]                                      ; +0x12e, 0x70f872\nVCMP.F32        S15, S14                                               ; +0x132, 0x70f876\nVMRS            APSR_nzcv, FPSCR                                       ; +0x136, 0x70f87a\nBEQ.W           loc_70F996                                             ; +0x13a, 0x70f87e\nADDS            R7, #1                                                 ; +0x13e, 0x70f882\nB               loc_70F782                                             ; +0x140, 0x70f884\nLDR             R1, =(unk_D2DBE0 - 0x70F88E)                           ; +0x142, 0x70f886\nMOV             R0, R8; this                                           ; +0x144, 0x70f888\nADD             R1, PC; unk_D2DBE0 ; cocos2d::CCPoint *                ; +0x146, 0x70f88a\nBL              _ZNK7cocos2d7CCPoint6equalsERKS0_; cocos2d::CCPoint::equals(cocos2d::CCPoint const&) ; +0x148, 0x70f88c\nCBZ             R0, loc_70F8A8                                         ; +0x14c, 0x70f890\nADD             R7, SP, #0x34+var_10                                   ; +0x14e, 0x70f892\nMOV             R1, R6; cocos2d::CCArray *                             ; +0x150, 0x70f894\nMOV             R2, R5; cocos2d::CCArray *                             ; +0x152, 0x70f896\nMOVS            R3, #0                                                 ; +0x154, 0x70f898\nMOV             R0, R7; this                                           ; +0x156, 0x70f89a\nBL              _ZN8EditorUI14getGroupCenterEPN7cocos2d7CCArrayEb; EditorUI::getGroupCenter(cocos2d::CCArray *,bool) ; +0x158, 0x70f89c\nMOV             R0, R8                                                 ; +0x15c, 0x70f8a0\nMOV             R1, R7                                                 ; +0x15e, 0x70f8a2\nBL              _ZN7cocos2d7CCPointaSERKS0_; cocos2d::CCPoint::operator=(cocos2d::CCPoint const&) ; +0x160, 0x70f8a4\nADD.W           R9, SP, #0x34+var_10                                   ; +0x164, 0x70f8a8\nADD.W           R10, SP, #0x34+var_20                                  ; +0x168, 0x70f8ac\nMOVS            R7, #0                                                 ; +0x16c, 0x70f8b0\nADD.W           R3, R6, #0x158                                         ; +0x16e, 0x70f8b2\nSTR             R3, [SP,#0x34+var_28]                                  ; +0x172, 0x70f8b6\nMOV             R0, R5; this                                           ; +0x174, 0x70f8b8\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x176, 0x70f8ba\nCMP             R7, R0                                                 ; +0x17a, 0x70f8be\nBCS             loc_70F996                                             ; +0x17c, 0x70f8c0\nMOV             R1, R7; unsigned int                                   ; +0x17e, 0x70f8c2\nMOV             R0, R5; this                                           ; +0x180, 0x70f8c4\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x182, 0x70f8c6\nMOV             R1, R9                                                 ; +0x186, 0x70f8ca\nLDR.W           R2, [R0,#0x30C]                                        ; +0x188, 0x70f8cc\nMOV             R11, R0                                                ; +0x18c, 0x70f8d0\nLDR             R0, [SP,#0x34+var_28]                                  ; +0x18e, 0x70f8d2\nSTR             R2, [SP,#0x34+var_10]                                  ; +0x190, 0x70f8d4\nBL              _ZNSt6__ndk113unordered_mapIi21GameObjectEditorStateNS_4hashIiEENS_8equal_toIiEENS_9allocatorINS_4pairIKiS1_EEEEEixEOi; std::unordered_map<int,GameObjectEditorState>::operator[](int &&) ; +0x192, 0x70f8d6\nADDW            R2, R11, #0x46C                                        ; +0x196, 0x70f8da\nVLDR            S16, [R2]                                              ; +0x19a, 0x70f8de\nADD.W           R2, R11, #0x470                                        ; +0x19e, 0x70f8e2\nVLDR            S17, [R2]                                              ; +0x1a2, 0x70f8e6\nLDR.W           R2, [R11]                                              ; +0x1a6, 0x70f8ea\nLDR             R2, [R2,#0x60]                                         ; +0x1aa, 0x70f8ee\nVLDR            S15, [R0,#8]                                           ; +0x1ac, 0x70f8f0\nVMUL.F32        S16, S15, S16                                          ; +0x1b0, 0x70f8f4\nVLDR            S15, [R0,#0xC]                                         ; +0x1b4, 0x70f8f8\nMOV             R0, R11                                                ; +0x1b8, 0x70f8fc\nVMUL.F32        S17, S15, S17                                          ; +0x1ba, 0x70f8fe\nBLX             R2                                                     ; +0x1be, 0x70f902\nMOV             R2, R8                                                 ; +0x1c0, 0x70f904\nVMUL.F32        S16, S16, S18                                          ; +0x1c2, 0x70f906\nVMUL.F32        S17, S17, S19                                          ; +0x1c6, 0x70f90a\nMOV             R1, R0                                                 ; +0x1ca, 0x70f90e\nMOV             R0, R10                                                ; +0x1cc, 0x70f910\nBL              _ZNK7cocos2d7CCPointmiERKS0_; cocos2d::CCPoint::operator-(cocos2d::CCPoint const&) ; +0x1ce, 0x70f912\nCMP             R4, #2                                                 ; +0x1d2, 0x70f916\nBNE             loc_70F930                                             ; +0x1d4, 0x70f918\nVLDR            S14, [R11,#0x3F4]                                      ; +0x1d6, 0x70f91a\nVLDR            S15, [SP,#0x34+var_1C]                                 ; +0x1da, 0x70f91e\nVDIV.F32        S14, S17, S14                                          ; +0x1de, 0x70f922\nVMUL.F32        S15, S15, S14                                          ; +0x1e2, 0x70f926\nVSTR            S15, [SP,#0x34+var_1C]                                 ; +0x1e6, 0x70f92a\nB               loc_70F948                                             ; +0x1ea, 0x70f92e\nVLDR            S14, [R11,#0x3F0]                                      ; +0x1ec, 0x70f930\nCMP             R4, #1                                                 ; +0x1f0, 0x70f934\nVLDR            S15, [SP,#0x34+var_20]                                 ; +0x1f2, 0x70f936\nVDIV.F32        S14, S16, S14                                          ; +0x1f6, 0x70f93a\nVMUL.F32        S15, S15, S14                                          ; +0x1fa, 0x70f93e\nVSTR            S15, [SP,#0x34+var_20]                                 ; +0x1fe, 0x70f942\nBNE             loc_70F91A                                             ; +0x202, 0x70f946\nADD             R0, SP, #0x34+var_18                                   ; +0x204, 0x70f948\nMOV             R1, R8                                                 ; +0x206, 0x70f94a\nMOV             R2, R10                                                ; +0x208, 0x70f94c\nBL              _ZNK7cocos2d7CCPointplERKS0_; cocos2d::CCPoint::operator+(cocos2d::CCPoint const&) ; +0x20a, 0x70f94e\nCMP             R4, #2                                                 ; +0x20e, 0x70f952\nBNE             loc_70F962                                             ; +0x210, 0x70f954\nMOV             R0, R11; this                                          ; +0x212, 0x70f956\nVMOV            R1, S17; float                                         ; +0x214, 0x70f958\nBL              _ZN10GameObject18updateCustomScaleYEf; GameObject::updateCustomScaleY(float) ; +0x218, 0x70f95c\nB               loc_70F970                                             ; +0x21c, 0x70f960\nMOV             R0, R11; this                                          ; +0x21e, 0x70f962\nVMOV            R1, S16; float                                         ; +0x220, 0x70f964\nBL              _ZN10GameObject18updateCustomScaleXEf; GameObject::updateCustomScaleX(float) ; +0x224, 0x70f968\nCMP             R4, #1                                                 ; +0x228, 0x70f96c\nBNE             loc_70F956                                             ; +0x22a, 0x70f96e\nLDR             R3, [SP,#0x34+var_30]                                  ; +0x22c, 0x70f970\nCBNZ            R3, loc_70F992                                         ; +0x22e, 0x70f972\nLDR.W           R2, [R11]                                              ; +0x230, 0x70f974\nMOV             R0, R11                                                ; +0x234, 0x70f978\nLDR             R2, [R2,#0x60]                                         ; +0x236, 0x70f97a\nBLX             R2                                                     ; +0x238, 0x70f97c\nADD             R1, SP, #0x34+var_18                                   ; +0x23a, 0x70f97e\nMOV             R2, R0                                                 ; +0x23c, 0x70f980\nMOV             R0, R9                                                 ; +0x23e, 0x70f982\nBL              _ZNK7cocos2d7CCPointmiERKS0_; cocos2d::CCPoint::operator-(cocos2d::CCPoint const&) ; +0x240, 0x70f984\nMOV             R0, R6                                                 ; +0x244, 0x70f988\nMOV             R1, R11                                                ; +0x246, 0x70f98a\nMOV             R2, R9                                                 ; +0x248, 0x70f98c\nBL              _ZN8EditorUI10moveObjectEP10GameObjectN7cocos2d7CCPointE; EditorUI::moveObject(GameObject *,cocos2d::CCPoint) ; +0x24a, 0x70f98e\nADDS            R7, #1                                                 ; +0x24e, 0x70f992\nB               loc_70F8B8                                             ; +0x250, 0x70f994\nLDR             R3, [SP,#0x34+var_2C]                                  ; +0x252, 0x70f996\nLDR             R2, [SP,#0x34+var_8]                                   ; +0x254, 0x70f998\nLDR             R3, [R3]                                               ; +0x256, 0x70f99a\nCMP             R2, R3                                                 ; +0x258, 0x70f99c\nBEQ             loc_70F9A4                                             ; +0x25a, 0x70f99e\nBLX             __stack_chk_fail                                       ; +0x25c, 0x70f9a0\nADD             SP, SP, #0x34 ; '4'                                    ; +0x260, 0x70f9a4\nVPOP            {D8-D10}                                               ; +0x262, 0x70f9a6\nPOP.W           {R4-R11,PC}                                            ; +0x266, 0x70f9aa", "xrefs": ["EditorUI::scaleXChanged @ 0x70fa24", "EditorUI::scaleYChanged @ 0x70fab4", "EditorUI::scaleXYChanged @ 0x70fb48"], "is_objc": false, "is_32_bit": true, "is_64_bit": false, "idp_name": "arm", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}