{"type": "func", "start": 5371618816, "end": 5371618949, "name": "GameSettingsLayer::onButtonsPerRow", "pseudocode": "// \n// GameSettingsLayer::onButtonsPerRow from 0x1402c6600 to 0x1402c6685 (133 bytes)\n// \n// 3 xrefs:\n// > GameSettingsLayer::addSpecialContent @ 0x1402c5ffa\n// > GameSettingsLayer::addSpecialContent @ 0x1402c6102\n// > <???> @ 0x14091dbb8\n// \n// This function is hookable on this platform (idp: pc, 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 11:29:22 +0000\n// \n\n__int64 __fastcall GameSettingsLayer::onButtonsPerRow(__int64 a1, __int64 a2)\n{\n  int v3; // eax\n  int v4; // edx\n  int v5; // edx\n  __int64 v6; // rdi\n  __int64 (__fastcall **v7)(__int64, const char *); // rbx\n  cocos2d::CCString *v8; // rax\n  const char *CString; // rax\n\n  v3 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 56LL))(a2);\n  v4 = 1;\n  if ( v3 != 1 )\n    v4 = -1;\n  v5 = *(_DWORD *)(a1 + 1156) + v4;\n  if ( v5 < 6 )\n  {\n    v5 = 6;\n  }\n  else if ( v5 >= 12 )\n  {\n    v5 = 12;\n  }\n  v6 = *(_QWORD *)(a1 + 1168);\n  *(_DWORD *)(a1 + 1156) = v5;\n  v7 = *(__int64 (__fastcall ***)(__int64, const char *))(v6 + 360);\n  v8 = cocos2d::CCString::createWithFormat((const char *)&word_1406ED6F8);\n  CString = cocos2d::CCString::getCString(v8);\n  return (*v7)(v6 + 360, CString);\n}", "assembly": "; \n; GameSettingsLayer::onButtonsPerRow from 0x1402c6600 to 0x1402c6685 (133 bytes)\n; \n; 3 xrefs:\n; > GameSettingsLayer::addSpecialContent @ 0x1402c5ffa\n; > GameSettingsLayer::addSpecialContent @ 0x1402c6102\n; > <???> @ 0x14091dbb8\n; \n; This function is hookable on this platform (idp: pc, 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 11:29:22 +0000\n; \nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x1402c6600\npush    rdi                                                            ; +0x5, 0x1402c6605\nsub     rsp, 20h                                                       ; +0x6, 0x1402c6606\nmov     rax, [rdx]                                                     ; +0xa, 0x1402c660a\nmov     rbx, rcx                                                       ; +0xd, 0x1402c660d\nmov     rcx, rdx                                                       ; +0x10, 0x1402c6610\ncall    qword ptr [rax+38h]                                            ; +0x13, 0x1402c6613\nmov     edx, 1                                                         ; +0x16, 0x1402c6616\nmov     ecx, 0FFFFFFFFh                                                ; +0x1b, 0x1402c661b\ncmp     eax, edx                                                       ; +0x20, 0x1402c6620\ncmovnz  edx, ecx                                                       ; +0x22, 0x1402c6622\nadd     edx, [rbx+484h]                                                ; +0x25, 0x1402c6625\ncmp     edx, 6                                                         ; +0x2b, 0x1402c662b\njl      short loc_1402C663C                                            ; +0x2e, 0x1402c662e\ncmp     edx, 0Ch                                                       ; +0x30, 0x1402c6630\njl      short loc_1402C6641                                            ; +0x33, 0x1402c6633\nmov     edx, 0Ch                                                       ; +0x35, 0x1402c6635\njmp     short loc_1402C6641                                            ; +0x3a, 0x1402c663a\nmov     edx, 6                                                         ; +0x3c, 0x1402c663c\nmov     rdi, [rbx+490h]                                                ; +0x41, 0x1402c6641\nlea     rcx, word_1406ED6F8                                            ; +0x48, 0x1402c6648\nmov     [rbx+484h], edx                                                ; +0x4f, 0x1402c664f\nmov     rbx, [rdi+168h]                                                ; +0x55, 0x1402c6655\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x5c, 0x1402c665c\nmov     rcx, rax                                                       ; +0x62, 0x1402c6662\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0x65, 0x1402c6665\nmov     rdx, rax                                                       ; +0x6b, 0x1402c666b\nlea     rcx, [rdi+168h]                                                ; +0x6e, 0x1402c666e\nmov     rax, [rbx]                                                     ; +0x75, 0x1402c6675\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x78, 0x1402c6678\nadd     rsp, 20h                                                       ; +0x7d, 0x1402c667d\npop     rdi                                                            ; +0x81, 0x1402c6681\njmp     rax                                                            ; +0x82, 0x1402c6682", "xrefs": ["GameSettingsLayer::addSpecialContent @ 0x1402c5ffa", "GameSettingsLayer::addSpecialContent @ 0x1402c6102", "<???> @ 0x14091dbb8"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "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"}