{"type": "func", "start": 5371402608, "end": 5371402746, "name": "EditorOptionsLayer::onButtonsPerRow", "pseudocode": "// \n// EditorOptionsLayer::onButtonsPerRow from 0x140291970 to 0x1402919fa (138 bytes)\n// \n// 3 xrefs:\n// > EditorOptionsLayer::setupOptions @ 0x140291570\n// > EditorOptionsLayer::setupOptions @ 0x140291629\n// > <???> @ 0x1406d19b8\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; // eax\n  int m_buttonsPerRow; // edx\n  int v5; // r8d\n  int v6; // edx\n  cocos2d::CCLabelBMFont *m_buttonsPerRowLabel; // rax\n  cocos2d::CCLabelProtocol_vtbl *v8; // rbx\n  cocos2d::CCString *v9; // rax\n  const char *CString; // rax\n\n  v3 = a2->getTag(a2);\n  m_buttonsPerRow = a1->m_buttonsPerRow;\n  v5 = m_buttonsPerRow - 1;\n  v6 = m_buttonsPerRow + 1;\n  if ( v3 != 1 )\n    v6 = v5;\n  if ( v6 < 6 )\n  {\n    v6 = 6;\n  }\n  else if ( v6 >= 12 )\n  {\n    v6 = 12;\n  }\n  m_buttonsPerRowLabel = a1->m_buttonsPerRowLabel;\n  a1->m_buttonsPerRow = v6;\n  v8 = m_buttonsPerRowLabel->cocos2d::CCLabelProtocol::__vftable;\n  v9 = cocos2d::CCString::createWithFormat(\"%i\", v6);\n  CString = cocos2d::CCString::getCString(v9);\n  v8->setString(&a1->m_buttonsPerRowLabel->cocos2d::CCLabelProtocol, CString);\n}", "assembly": "; \n; EditorOptionsLayer::onButtonsPerRow from 0x140291970 to 0x1402919fa (138 bytes)\n; \n; 3 xrefs:\n; > EditorOptionsLayer::setupOptions @ 0x140291570\n; > EditorOptionsLayer::setupOptions @ 0x140291629\n; > <???> @ 0x1406d19b8\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\nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x140291970\npush    rdi                                                            ; +0x5, 0x140291975\nsub     rsp, 20h                                                       ; +0x6, 0x140291976\nmov     rax, [rdx]                                                     ; +0xa, 0x14029197a\nmov     rdi, rcx                                                       ; +0xd, 0x14029197d\nmov     rcx, rdx                                                       ; +0x10, 0x140291980\ncall    qword ptr [rax+38h]                                            ; +0x13, 0x140291983\nmov     edx, [rdi+3F0h]                                                ; +0x16, 0x140291986\nlea     r8d, [rdx-1]                                                   ; +0x1c, 0x14029198c\ninc     edx                                                            ; +0x20, 0x140291990\ncmp     eax, 1                                                         ; +0x22, 0x140291992\ncmovnz  edx, r8d                                                       ; +0x25, 0x140291995\ncmp     edx, 6                                                         ; +0x29, 0x140291999\njl      short loc_1402919AA                                            ; +0x2c, 0x14029199c\ncmp     edx, 0Ch                                                       ; +0x2e, 0x14029199e\njl      short loc_1402919AF                                            ; +0x31, 0x1402919a1\nmov     edx, 0Ch                                                       ; +0x33, 0x1402919a3\njmp     short loc_1402919AF                                            ; +0x38, 0x1402919a8\nmov     edx, 6                                                         ; +0x3a, 0x1402919aa\nmov     rax, [rdi+3F8h]                                                ; +0x3f, 0x1402919af\nlea     rcx, aI_11; \"%i\"                                               ; +0x46, 0x1402919b6\nmov     [rdi+3F0h], edx                                                ; +0x4d, 0x1402919bd\nmov     rbx, [rax+168h]                                                ; +0x53, 0x1402919c3\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x5a, 0x1402919ca\nmov     rcx, rax                                                       ; +0x60, 0x1402919d0\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0x63, 0x1402919d3\nmov     rcx, [rdi+3F8h]                                                ; +0x69, 0x1402919d9\nmov     rdx, rax                                                       ; +0x70, 0x1402919e0\nadd     rcx, 168h                                                      ; +0x73, 0x1402919e3\nmov     rax, [rbx]                                                     ; +0x7a, 0x1402919ea\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x7d, 0x1402919ed\nadd     rsp, 20h                                                       ; +0x82, 0x1402919f2\npop     rdi                                                            ; +0x86, 0x1402919f6\njmp     rax                                                            ; +0x87, 0x1402919f7", "xrefs": ["EditorOptionsLayer::setupOptions @ 0x140291570", "EditorOptionsLayer::setupOptions @ 0x140291629", "<???> @ 0x1406d19b8"], "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"}