{"type": "func", "start": 7843092, "end": 7843392, "name": "EditorCommandsPopup::layoutCommandButtons", "pseudocode": "// \n// EditorCommandsPopup::layoutCommandButtons from 0x77ad14 to 0x77ae40 (300 bytes)\n// \n// 2 xrefs:\n// > EditorCommandsPopup::onBuildWindowContent @ 0x77af3c\n// > EditorCommandsPopup::onWindowResized @ 0x77af8c\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:59:23 +0000\n// \n\nvoid __fastcall EditorCommandsPopup::layoutCommandButtons(EditorCommandsPopup *this)\n{\n  int v2; // r0\n  float v3; // s16\n  cocos2d::CCArray *v4; // r0\n  float v5; // s18\n  cocos2d::CCArray *v6; // r10\n  float v7; // s19\n  float v8; // s17\n  signed int v9; // r5\n  float v10; // r3\n  int v11; // r4\n  float *v12; // r0\n  float *v13; // r6\n  void (__fastcall *v14)(float *, _BYTE *); // r11\n  float v15; // s17\n  float v16; // s17\n  float v17; // s15\n  _BYTE v18[8]; // [sp+4h] [bp-10h] BYREF\n\n  v2 = *((_DWORD *)this + 182);\n  if ( v2 && *((_DWORD *)this + 181) )\n  {\n    v3 = *((float *)this + 183) / 160.0;\n    if ( v3 < 0.6 )\n      v3 = 0.6;\n    v4 = (cocos2d::CCArray *)(*(int (__fastcall **)(int))(*(_DWORD *)v2 + 244))(v2);\n    v5 = v3 * 16.0;\n    v6 = v4;\n    v7 = v3 * 5.0;\n    v8 = v3 * 8.0;\n    if ( v4 )\n    {\n      v9 = 0;\n      v11 = cocos2d::CCArray::count(v4);\n      while ( v9 < v11 )\n      {\n        v12 = (float *)cocos2d::CCArray::objectAtIndex(v6, v9);\n        v13 = v12;\n        if ( v12 )\n        {\n          (*(void (__fastcall **)(float *, float))(*(_DWORD *)v12 + 80))(v12, COERCE_FLOAT(LODWORD(v3)));\n          v13[79] = v3;\n          v14 = *(void (__fastcall **)(float *, _BYTE *))(*(_DWORD *)v13 + 92);\n          cocos2d::CCPoint::CCPoint(\n            (cocos2d::CCPoint *)v18,\n            *((float *)this + 183) * 0.5,\n            (float)((float)-v8 - (float)(v5 * 0.5)) - (float)((float)v9 * (float)(v5 + v7)));\n          v14(v13, v18);\n        }\n        ++v9;\n      }\n      v15 = v8 + v8;\n      if ( v11 > 0 )\n        LODWORD(v10) = v11 - 1;\n      v16 = v15 + (float)((float)v11 * v5);\n      if ( v11 <= 0 )\n        v17 = 0.0;\n      else\n        v17 = v10;\n      if ( v11 > 0 )\n        v17 = (float)SLODWORD(v17) * v7;\n      ScrollableContentLayer::setContentHeight(*((ScrollableContentLayer **)this + 181), v16 + v17);\n    }\n  }\n}", "assembly": "; \n; EditorCommandsPopup::layoutCommandButtons from 0x77ad14 to 0x77ae40 (300 bytes)\n; \n; 2 xrefs:\n; > EditorCommandsPopup::onBuildWindowContent @ 0x77af3c\n; > EditorCommandsPopup::onWindowResized @ 0x77af8c\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:59:23 +0000\n; \nPUSH.W          {R4-R11,LR}                                            ; +0x0, 0x77ad14\nMOV             R8, R0                                                 ; +0x4, 0x77ad18\nVPUSH           {D8-D10}                                               ; +0x6, 0x77ad1a\nLDR             R3, =(__stack_chk_guard_ptr - 0x77AD24)                ; +0xa, 0x77ad1e\nADD             R3, PC; __stack_chk_guard_ptr                          ; +0xc, 0x77ad20\nLDR             R3, [R3]; __stack_chk_guard                            ; +0xe, 0x77ad22\nLDR.W           R0, [R0,#0x2D8]                                        ; +0x10, 0x77ad24\nSUB             SP, SP, #0x14                                          ; +0x14, 0x77ad28\nLDR             R2, [R3]                                               ; +0x16, 0x77ad2a\nMOV             R7, R3                                                 ; +0x18, 0x77ad2c\nSTR             R2, [SP,#0x14+var_8]                                   ; +0x1a, 0x77ad2e\nCMP             R0, #0                                                 ; +0x1c, 0x77ad30\nBEQ             loc_77AE2A                                             ; +0x1e, 0x77ad32\nLDR.W           R3, [R8,#0x2D4]                                        ; +0x20, 0x77ad34\nCMP             R3, #0                                                 ; +0x24, 0x77ad38\nBEQ             loc_77AE2A                                             ; +0x26, 0x77ad3a\nVLDR            S15, [R8,#0x2DC]                                       ; +0x28, 0x77ad3c\nLDR             R3, [R0]                                               ; +0x2c, 0x77ad40\nVLDR            S16, =160.0                                            ; +0x2e, 0x77ad42\nLDR.W           R3, [R3,#0xF4]                                         ; +0x32, 0x77ad46\nVMOV.F32        S18, #16.0                                             ; +0x36, 0x77ad4a\nVDIV.F32        S16, S15, S16                                          ; +0x3a, 0x77ad4e\nVLDR            S15, =0.6                                              ; +0x3e, 0x77ad52\nVCMP.F32        S16, S15                                               ; +0x42, 0x77ad56\nVMRS            APSR_nzcv, FPSCR                                       ; +0x46, 0x77ad5a\nIT MI                                                                  ; +0x4a, 0x77ad5e\nVMOVMI.F32      S16, S15                                               ; +0x4c, 0x77ad60\nBLX             R3                                                     ; +0x50, 0x77ad64\nVMOV.F32        S19, #5.0                                              ; +0x52, 0x77ad66\nVMOV.F32        S17, #8.0                                              ; +0x56, 0x77ad6a\nVMUL.F32        S18, S16, S18                                          ; +0x5a, 0x77ad6e\nMOV             R10, R0                                                ; +0x5e, 0x77ad72\nVMUL.F32        S19, S16, S19                                          ; +0x60, 0x77ad74\nVMUL.F32        S17, S16, S17                                          ; +0x64, 0x77ad78\nCMP             R0, #0                                                 ; +0x68, 0x77ad7c\nBEQ             loc_77AE2A                                             ; +0x6a, 0x77ad7e\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x6c, 0x77ad80\nADD.W           R9, SP, #0x14+var_10                                   ; +0x70, 0x77ad84\nMOVS            R5, #0                                                 ; +0x74, 0x77ad88\nVMOV.F32        S20, #0.5                                              ; +0x76, 0x77ad8a\nVNEG.F32        S21, S17                                               ; +0x7a, 0x77ad8e\nMOV             R4, R0                                                 ; +0x7e, 0x77ad92\nCMP             R5, R4                                                 ; +0x80, 0x77ad94\nBGE             loc_77ADF0                                             ; +0x82, 0x77ad96\nMOV             R0, R10; this                                          ; +0x84, 0x77ad98\nMOV             R1, R5; unsigned int                                   ; +0x86, 0x77ad9a\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x88, 0x77ad9c\nMOV             R6, R0                                                 ; +0x8c, 0x77ada0\nCBZ             R0, loc_77ADEC                                         ; +0x8e, 0x77ada2\nLDR             R3, [R0]                                               ; +0x90, 0x77ada4\nVMOV            R1, S16                                                ; +0x92, 0x77ada6\nLDR             R3, [R3,#0x50]                                         ; +0x96, 0x77adaa\nBLX             R3                                                     ; +0x98, 0x77adac\nVSTR            S16, [R6,#0x13C]                                       ; +0x9a, 0x77adae\nLDR             R3, [R6]                                               ; +0x9e, 0x77adb2\nMOV             R0, R9; this                                           ; +0xa0, 0x77adb4\nVMOV.F32        S13, S21                                               ; +0xa2, 0x77adb6\nVLDR            S14, [R8,#0x2DC]                                       ; +0xa6, 0x77adba\nLDR.W           R11, [R3,#0x5C]                                        ; +0xaa, 0x77adbe\nVMLS.F32        S13, S18, S20                                          ; +0xae, 0x77adc2\nVMUL.F32        S14, S14, S20                                          ; +0xb2, 0x77adc6\nVADD.F32        S15, S18, S19                                          ; +0xb6, 0x77adca\nVMOV            R1, S14; float                                         ; +0xba, 0x77adce\nVMOV            S14, R5                                                ; +0xbe, 0x77add2\nVCVT.F32.S32    S14, S14                                               ; +0xc2, 0x77add6\nVMLS.F32        S13, S14, S15                                          ; +0xc6, 0x77adda\nVMOV            R2, S13; float                                         ; +0xca, 0x77adde\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0xce, 0x77ade2\nMOV             R0, R6                                                 ; +0xd2, 0x77ade6\nMOV             R1, R9                                                 ; +0xd4, 0x77ade8\nBLX             R11                                                    ; +0xd6, 0x77adea\nADDS            R5, #1                                                 ; +0xd8, 0x77adec\nB               loc_77AD94                                             ; +0xda, 0x77adee\nVADD.F32        S17, S17, S17                                          ; +0xdc, 0x77adf0\nCMP             R4, #0                                                 ; +0xe0, 0x77adf4\nVMOV            S15, R4                                                ; +0xe2, 0x77adf6\nIT GT                                                                  ; +0xe6, 0x77adfa\nADDGT.W         R3, R4, #0xFFFFFFFF                                    ; +0xe8, 0x77adfc\nLDR.W           R0, [R8,#0x2D4]; this                                  ; +0xec, 0x77ae00\nVCVT.F32.S32    S15, S15                                               ; +0xf0, 0x77ae04\nVMLA.F32        S17, S15, S18                                          ; +0xf4, 0x77ae08\nITETT GT                                                               ; +0xf8, 0x77ae0c\nVMOVGT          S15, R3                                                ; +0xfa, 0x77ae0e\nVLDRLE          S15, =0.0                                              ; +0xfe, 0x77ae12\nVCVTGT.F32.S32  S15, S15                                               ; +0x102, 0x77ae16\nVMULGT.F32      S15, S15, S19                                          ; +0x106, 0x77ae1a\nVADD.F32        S15, S17, S15                                          ; +0x10a, 0x77ae1e\nVMOV            R1, S15; float                                         ; +0x10e, 0x77ae22\nBL              _ZN22ScrollableContentLayer16setContentHeightEf; ScrollableContentLayer::setContentHeight(float) ; +0x112, 0x77ae26\nLDR             R2, [SP,#0x14+var_8]                                   ; +0x116, 0x77ae2a\nLDR             R3, [R7]                                               ; +0x118, 0x77ae2c\nCMP             R2, R3                                                 ; +0x11a, 0x77ae2e\nBEQ             loc_77AE36                                             ; +0x11c, 0x77ae30\nBLX             __stack_chk_fail                                       ; +0x11e, 0x77ae32\nADD             SP, SP, #0x14                                          ; +0x122, 0x77ae36\nVPOP            {D8-D10}                                               ; +0x124, 0x77ae38\nPOP.W           {R4-R11,PC}                                            ; +0x128, 0x77ae3c", "xrefs": ["EditorCommandsPopup::onBuildWindowContent @ 0x77af3c", "EditorCommandsPopup::onWindowResized @ 0x77af8c"], "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"}