{"type": "func", "start": 4297713152, "end": 4297713270, "name": "EditorOptionsLayer::onButtonsPerRow", "pseudocode": "// \n// EditorOptionsLayer::onButtonsPerRow from 0x10029e600 to 0x10029e676 (118 bytes)\n// \n// 2 xrefs:\n// > EditorOptionsLayer::setupOptions @ 0x10029e1bb\n// > EditorOptionsLayer::setupOptions @ 0x10029e291\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 __fastcall EditorOptionsLayer::onButtonsPerRow(EditorOptionsLayer *a1, cocos2d::CCObject *a2)\n{\n  char v2; // al\n  int v3; // eax\n  int v4; // ecx\n  int v5; // esi\n  cocos2d::CCLabelBMFont *m_buttonsPerRowLabel; // rbx\n  cocos2d::CCString *v7; // rax\n  const char *CString; // rax\n  char v9; // [rsp-8h] [rbp-10h]\n\n  v9 = v2;\n  v3 = a1->m_buttonsPerRow + 2 * (((unsigned int (__fastcall *)(cocos2d::CCObject *))a2->getTag)(a2) == 1) - 1;\n  v4 = 6;\n  if ( v3 >= 7 )\n    v4 = v3;\n  v5 = 12;\n  if ( v4 < 12 )\n    v5 = v4;\n  a1->m_buttonsPerRow = v5;\n  m_buttonsPerRowLabel = a1->m_buttonsPerRowLabel;\n  v7 = (cocos2d::CCString *)sub_1007AB580(\"%i\", v9);\n  CString = cocos2d::CCString::getCString(v7);\n  ((void (__fastcall *)(cocos2d::CCLabelBMFont *, const char *))m_buttonsPerRowLabel->setString)(\n    m_buttonsPerRowLabel,\n    CString);\n}", "assembly": "; \n; EditorOptionsLayer::onButtonsPerRow from 0x10029e600 to 0x10029e676 (118 bytes)\n; \n; 2 xrefs:\n; > EditorOptionsLayer::setupOptions @ 0x10029e1bb\n; > EditorOptionsLayer::setupOptions @ 0x10029e291\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\npush    rbp                                                            ; +0x0, 0x10029e600\nmov     rbp, rsp                                                       ; +0x1, 0x10029e601\npush    rbx                                                            ; +0x4, 0x10029e604\npush    rax; char                                                      ; +0x5, 0x10029e605\nmov     rbx, rdi                                                       ; +0x6, 0x10029e606\nmov     rax, [rsi]                                                     ; +0x9, 0x10029e609\nmov     rdi, rsi                                                       ; +0xc, 0x10029e60c\ncall    qword ptr [rax+40h]                                            ; +0xf, 0x10029e60f\nxor     ecx, ecx                                                       ; +0x12, 0x10029e612\ncmp     eax, 1                                                         ; +0x14, 0x10029e614\nsetz    cl                                                             ; +0x17, 0x10029e617\nmov     eax, [rbx+3ECh]                                                ; +0x1a, 0x10029e61a\nlea     eax, [rax+rcx*2]                                               ; +0x20, 0x10029e620\ndec     eax                                                            ; +0x23, 0x10029e623\ncmp     eax, 7                                                         ; +0x25, 0x10029e625\nmov     ecx, 6                                                         ; +0x28, 0x10029e628\ncmovge  ecx, eax                                                       ; +0x2d, 0x10029e62d\ncmp     ecx, 0Ch                                                       ; +0x30, 0x10029e630\nmov     esi, 0Ch                                                       ; +0x33, 0x10029e633\ncmovl   esi, ecx                                                       ; +0x38, 0x10029e638\nmov     [rbx+3ECh], esi                                                ; +0x3b, 0x10029e63b\nmov     rbx, [rbx+3F8h]                                                ; +0x41, 0x10029e641\nlea     rdi, aI; \"%i\"                                                  ; +0x48, 0x10029e648\nxor     eax, eax                                                       ; +0x4f, 0x10029e64f\ncall    sub_1007AB580                                                  ; +0x51, 0x10029e651\nmov     rdi, rax                                                       ; +0x56, 0x10029e656\ncall    cocos2d__CCString__getCString                                  ; +0x59, 0x10029e659\nmov     rcx, [rbx]                                                     ; +0x5e, 0x10029e65e\nmov     rcx, [rcx+390h]                                                ; +0x61, 0x10029e661\nmov     rdi, rbx                                                       ; +0x68, 0x10029e668\nmov     rsi, rax                                                       ; +0x6b, 0x10029e66b\nadd     rsp, 8                                                         ; +0x6e, 0x10029e66e\npop     rbx                                                            ; +0x72, 0x10029e672\npop     rbp                                                            ; +0x73, 0x10029e673\njmp     rcx                                                            ; +0x74, 0x10029e674", "xrefs": ["EditorOptionsLayer::setupOptions @ 0x10029e1bb", "EditorOptionsLayer::setupOptions @ 0x10029e291"], "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"}