{"type": "func", "start": 9183220, "end": 9183360, "name": "EditorOptionsLayer::onButtonsPerRow", "pseudocode": "// \n// EditorOptionsLayer::onButtonsPerRow from 0x8c1ff4 to 0x8c2080 (140 bytes)\n// \n// 4 xrefs:\n// > <???> @ 0xa08c0\n// > EditorOptionsLayer::setupOptions @ 0x8db818\n// > EditorOptionsLayer::setupOptions @ 0x8db8f4\n// > <???> @ 0x122d818\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\nvoid EditorOptionsLayer::onButtonsPerRow(EditorOptionsLayer *a1, cocos2d::CCObject *a2)\n{\n  int v3; // w0\n  int m_buttonsPerRow; // w2\n  int v5; // w2\n  cocos2d::CCLabelBMFont *m_buttonsPerRowLabel; // x20\n  cocos2d::CCLabelBMFont_vtbl *v7; // x3\n  void (__fastcall *setString)(cocos2d::CCLabelBMFont *__hidden, const unsigned __int8 *); // x19\n  cocos2d::CCString *v9; // x0\n  const char *CString; // x0\n\n  v3 = a2->getTag(a2);\n  m_buttonsPerRow = a1->m_buttonsPerRow;\n  if ( v3 == 1 )\n    v5 = m_buttonsPerRow + 1;\n  else\n    v5 = m_buttonsPerRow - 1;\n  m_buttonsPerRowLabel = a1->m_buttonsPerRowLabel;\n  if ( v5 < 6 )\n    v5 = 6;\n  v7 = m_buttonsPerRowLabel->cocos2d::CCSpriteBatchNode::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;\n  if ( v5 > 12 )\n    v5 = 12;\n  a1->m_buttonsPerRow = v5;\n  setString = v7->setString;\n  v9 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(\n                              (cocos2d::CCString *)\"%i\",\n                              (const char *)(unsigned int)v5);\n  CString = cocos2d::CCString::getCString(v9);\n  setString(m_buttonsPerRowLabel, (const unsigned __int8 *)CString);\n}", "assembly": "; \n; EditorOptionsLayer::onButtonsPerRow from 0x8c1ff4 to 0x8c2080 (140 bytes)\n; \n; 4 xrefs:\n; > <???> @ 0xa08c0\n; > EditorOptionsLayer::setupOptions @ 0x8db818\n; > EditorOptionsLayer::setupOptions @ 0x8db8f4\n; > <???> @ 0x122d818\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\nSTP             X29, X30, [SP,#-0x20+var_s0]!                          ; +0x0, 0x8c1ff4\nMOV             X29, SP                                                ; +0x4, 0x8c1ff8\nSTP             X19, X20, [SP,#var_s10]                                ; +0x8, 0x8c1ffc\nMOV             X19, X0                                                ; +0xc, 0x8c2000\nMOV             X0, X1                                                 ; +0x10, 0x8c2004\nLDR             X1, [X1]                                               ; +0x14, 0x8c2008\nLDR             X1, [X1,#0x40]                                         ; +0x18, 0x8c200c\nBLR             X1                                                     ; +0x1c, 0x8c2010\nCMP             W0, #1                                                 ; +0x20, 0x8c2014\nLDR             W2, [X19,#0x440]                                       ; +0x24, 0x8c2018\nB.EQ            loc_8C2078                                             ; +0x28, 0x8c201c\nSUB             W2, W2, #1                                             ; +0x2c, 0x8c2020\nLDR             X20, [X19,#0x448]                                      ; +0x30, 0x8c2024\nCMP             W2, #6                                                 ; +0x34, 0x8c2028\nMOV             W0, #6                                                 ; +0x38, 0x8c202c\nCSEL            W2, W2, W0, GE                                         ; +0x3c, 0x8c2030\nMOV             W0, #0xC                                               ; +0x40, 0x8c2034\nCMP             W2, #0xC                                               ; +0x44, 0x8c2038\nLDR             X3, [X20]                                              ; +0x48, 0x8c203c\nCSEL            W2, W2, W0, LE                                         ; +0x4c, 0x8c2040\nADRP            X0, #(aSongidI+8)@PAGE; \"%i\"                           ; +0x50, 0x8c2044\nMOV             W1, W2; char *                                         ; +0x54, 0x8c2048\nSTR             W2, [X19,#0x440]                                       ; +0x58, 0x8c204c\nADD             X0, X0, #(aSongidI+8)@PAGEOFF; this                    ; +0x5c, 0x8c2050\nLDR             X19, [X3,#0x390]                                       ; +0x60, 0x8c2054\nBL              _ZN7cocos2d8CCString16createWithFormatEPKcz; cocos2d::CCString::createWithFormat(char const*,...) ; +0x64, 0x8c2058\nBL              _ZNK7cocos2d8CCString10getCStringEv; cocos2d::CCString::getCString(void) ; +0x68, 0x8c205c\nMOV             X1, X0                                                 ; +0x6c, 0x8c2060\nMOV             X0, X20                                                ; +0x70, 0x8c2064\nBLR             X19                                                    ; +0x74, 0x8c2068\nLDP             X19, X20, [SP,#var_s10]                                ; +0x78, 0x8c206c\nLDP             X29, X30, [SP+var_s0],#0x20                            ; +0x7c, 0x8c2070\nRET                                                                    ; +0x80, 0x8c2074\nADD             W2, W2, #1                                             ; +0x84, 0x8c2078\nB               loc_8C2024                                             ; +0x88, 0x8c207c", "xrefs": ["<???> @ 0xa08c0", "EditorOptionsLayer::setupOptions @ 0x8db818", "EditorOptionsLayer::setupOptions @ 0x8db8f4", "<???> @ 0x122d818"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}