{"type": "func", "start": 4296435044, "end": 4296435180, "name": "GameSettingsLayer::onButtonsPerRow", "pseudocode": "// \n// GameSettingsLayer::onButtonsPerRow from 0x100166564 to 0x1001665ec (136 bytes)\n// \n// 2 xrefs:\n// > GameSettingsLayer::addSpecialContent @ 0x100165a6c\n// > GameSettingsLayer::addSpecialContent @ 0x100165b68\n// \n// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!\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 10:59:48 +0000\n// \n\n__int64 __fastcall GameSettingsLayer::onButtonsPerRow(__int64 a1, __int64 a2)\n{\n  int v3; // w9\n  int v4; // w8\n  __int64 v5; // x19\n  __int64 v6; // x0\n  __int64 CString; // x1\n\n  if ( (*(unsigned int (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2) == 1 )\n    v3 = 1;\n  else\n    v3 = -1;\n  v4 = *(_DWORD *)(a1 + 1148) + v3;\n  if ( v4 <= 6 )\n    v4 = 6;\n  if ( v4 >= 12 )\n    v4 = 12;\n  *(_DWORD *)(a1 + 1148) = v4;\n  v5 = *(_QWORD *)(a1 + 1160);\n  v6 = sub_1003065B0(\"%i\", v4);\n  CString = cocos2d::CCString::getCString(v6);\n  return (*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)v5 + 928LL))(v5, CString);\n}", "assembly": "; \n; GameSettingsLayer::onButtonsPerRow from 0x100166564 to 0x1001665ec (136 bytes)\n; \n; 2 xrefs:\n; > GameSettingsLayer::addSpecialContent @ 0x100165a6c\n; > GameSettingsLayer::addSpecialContent @ 0x100165b68\n; \n; This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!\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 10:59:48 +0000\n; \nSUB             SP, SP, #0x30                                          ; +0x0, 0x100166564\nSTP             X20, X19, [SP,#0x20+var_10]                            ; +0x4, 0x100166568\nSTP             X29, X30, [SP,#0x20+var_s0]                            ; +0x8, 0x10016656c\nADD             X29, SP, #0x20                                         ; +0xc, 0x100166570\nMOV             X19, X0                                                ; +0x10, 0x100166574\nLDR             X8, [X1]                                               ; +0x14, 0x100166578\nLDR             X8, [X8,#0x40]                                         ; +0x18, 0x10016657c\nMOV             X0, X1                                                 ; +0x1c, 0x100166580\nBLR             X8                                                     ; +0x20, 0x100166584\nLDR             W8, [X19,#0x47C]                                       ; +0x24, 0x100166588\nCMP             W0, #1                                                 ; +0x28, 0x10016658c\nCSINV           W9, W0, WZR, EQ                                        ; +0x2c, 0x100166590\nADD             W8, W8, W9                                             ; +0x30, 0x100166594\nCMP             W8, #6                                                 ; +0x34, 0x100166598\nMOV             W9, #6                                                 ; +0x38, 0x10016659c\nCSEL            W8, W8, W9, GT                                         ; +0x3c, 0x1001665a0\nCMP             W8, #0xC                                               ; +0x40, 0x1001665a4\nMOV             W9, #0xC                                               ; +0x44, 0x1001665a8\nCSEL            W8, W8, W9, LT                                         ; +0x48, 0x1001665ac\nSTR             W8, [X19,#0x47C]                                       ; +0x4c, 0x1001665b0\nLDR             X19, [X19,#0x488]                                      ; +0x50, 0x1001665b4\nSTR             X8, [SP,#0x20+var_20]                                  ; +0x54, 0x1001665b8\nADRL            X0, aI; \"%i\"                                           ; +0x58, 0x1001665bc\nBL              sub_1003065B0                                          ; +0x60, 0x1001665c4\nBL              cocos2d__CCString__getCString                          ; +0x64, 0x1001665c8\nMOV             X1, X0                                                 ; +0x68, 0x1001665cc\nLDR             X8, [X19]                                              ; +0x6c, 0x1001665d0\nLDR             X2, [X8,#0x3A0]                                        ; +0x70, 0x1001665d4\nMOV             X0, X19                                                ; +0x74, 0x1001665d8\nLDP             X29, X30, [SP,#0x20+var_s0]                            ; +0x78, 0x1001665dc\nLDP             X20, X19, [SP,#0x20+var_10]                            ; +0x7c, 0x1001665e0\nADD             SP, SP, #0x30 ; '0'                                    ; +0x80, 0x1001665e4\nBR              X2                                                     ; +0x84, 0x1001665e8", "xrefs": ["GameSettingsLayer::addSpecialContent @ 0x100165a6c", "GameSettingsLayer::addSpecialContent @ 0x100165b68"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "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"}