{"type": "func", "start": 5371998128, "end": 5371998316, "name": "SelectArtLayer::onSelectCustom", "pseudocode": "// \n// SelectArtLayer::onSelectCustom from 0x140322fb0 to 0x14032306c (188 bytes)\n// \n// 8 xrefs:\n// > LevelSettingsLayer::onGArt @ 0x140321c8b\n// > SetupSmartBlockLayer::onSelectPremade @ 0x1404589f8\n// > SelectArtLayer::init @ 0x140322bac\n// > SelectArtLayer::init @ 0x140322cda\n// > SelectArtLayer::init @ 0x140322dee\n// > <???> @ 0x140693660\n// > <???> @ 0x140693670\n// > <???> @ 0x1406d4cf4\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 SelectArtLayer::onSelectCustom(SelectArtLayer *a1, cocos2d::CCObject *a2)\n{\n  int *p_m_line; // rbx\n  int v4; // eax\n  cocos2d::CCArray *m_lineSprites; // rcx\n  unsigned int v6; // edi\n  ButtonSprite *v7; // rax\n  const char *v8; // rdx\n\n  p_m_line = &a1->m_line;\n  if ( a2 )\n    *p_m_line = a2->getTag(a2);\n  v4 = *p_m_line;\n  if ( *p_m_line >= 1 )\n  {\n    *p_m_line = v4;\n    if ( v4 > 3 )\n      v4 = 3;\n  }\n  else\n  {\n    v4 = 1;\n    *p_m_line = 1;\n  }\n  m_lineSprites = a1->m_lineSprites;\n  v6 = 0;\n  *p_m_line = v4;\n  if ( cocos2d::CCArray::count(m_lineSprites) )\n  {\n    do\n    {\n      v7 = (ButtonSprite *)cocos2d::CCArray::objectAtIndex(a1->m_lineSprites, v6++);\n      v8 = \"GJ_button_02.png\";\n      if ( *p_m_line != v6 )\n        v8 = \"GJ_button_04.png\";\n      ButtonSprite::updateBGImage(v7, v8);\n    }\n    while ( v6 < cocos2d::CCArray::count(a1->m_lineSprites) );\n  }\n}", "assembly": "; \n; SelectArtLayer::onSelectCustom from 0x140322fb0 to 0x14032306c (188 bytes)\n; \n; 8 xrefs:\n; > LevelSettingsLayer::onGArt @ 0x140321c8b\n; > SetupSmartBlockLayer::onSelectPremade @ 0x1404589f8\n; > SelectArtLayer::init @ 0x140322bac\n; > SelectArtLayer::init @ 0x140322cda\n; > SelectArtLayer::init @ 0x140322dee\n; > <???> @ 0x140693660\n; > <???> @ 0x140693670\n; > <???> @ 0x1406d4cf4\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_8], rbx                                               ; +0x0, 0x140322fb0\nmov     [rsp+arg_10], rsi                                              ; +0x5, 0x140322fb5\npush    rdi                                                            ; +0xa, 0x140322fba\nsub     rsp, 20h                                                       ; +0xb, 0x140322fbb\nlea     rbx, [rcx+28Ch]                                                ; +0xf, 0x140322fbf\nmov     rsi, rcx                                                       ; +0x16, 0x140322fc6\ntest    rdx, rdx                                                       ; +0x19, 0x140322fc9\njz      short loc_140322FD9                                            ; +0x1c, 0x140322fcc\nmov     rax, [rdx]                                                     ; +0x1e, 0x140322fce\nmov     rcx, rdx                                                       ; +0x21, 0x140322fd1\ncall    qword ptr [rax+38h]                                            ; +0x24, 0x140322fd4\nmov     [rbx], eax                                                     ; +0x27, 0x140322fd7\nmov     eax, [rbx]                                                     ; +0x29, 0x140322fd9\ncmp     eax, 1                                                         ; +0x2b, 0x140322fdb\njge     short loc_140322FE9                                            ; +0x2e, 0x140322fde\nmov     eax, 1                                                         ; +0x30, 0x140322fe0\nmov     [rbx], eax                                                     ; +0x35, 0x140322fe5\njmp     short loc_140322FF5                                            ; +0x37, 0x140322fe7\nmov     [rbx], eax                                                     ; +0x39, 0x140322fe9\ncmp     eax, 3                                                         ; +0x3b, 0x140322feb\njle     short loc_140322FF5                                            ; +0x3e, 0x140322fee\nmov     eax, 3                                                         ; +0x40, 0x140322ff0\nmov     rcx, [rsi+280h]                                                ; +0x45, 0x140322ff5\nxor     edi, edi                                                       ; +0x4c, 0x140322ffc\nmov     [rbx], eax                                                     ; +0x4e, 0x140322ffe\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x50, 0x140323000\ntest    eax, eax                                                       ; +0x56, 0x140323006\njz      short loc_14032305C                                            ; +0x58, 0x140323008\nmov     [rsp+28h+arg_0], rbp                                           ; +0x5a, 0x14032300a\nlea     rbp, aGjButton04Png; \"GJ_button_04.png\"                        ; +0x5f, 0x14032300f\nnop     word ptr [rax+rax+00000000h]                                   ; +0x66, 0x140323016\nmov     rcx, [rsi+280h]                                                ; +0x70, 0x140323020\nmov     edx, edi                                                       ; +0x77, 0x140323027\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0x79, 0x140323029\ninc     edi                                                            ; +0x7f, 0x14032302f\nlea     rdx, aGjButton02Png; \"GJ_button_02.png\"                        ; +0x81, 0x140323031\ncmp     [rbx], edi                                                     ; +0x88, 0x140323038\nmov     rcx, rax                                                       ; +0x8a, 0x14032303a\ncmovnz  rdx, rbp                                                       ; +0x8d, 0x14032303d\ncall    ButtonSprite__updateBGImage                                    ; +0x91, 0x140323041\nmov     rcx, [rsi+280h]                                                ; +0x96, 0x140323046\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x9d, 0x14032304d\ncmp     edi, eax                                                       ; +0xa3, 0x140323053\njb      short loc_140323020                                            ; +0xa5, 0x140323055\nmov     rbp, [rsp+28h+arg_0]                                           ; +0xa7, 0x140323057\nmov     rbx, [rsp+28h+arg_8]                                           ; +0xac, 0x14032305c\nmov     rsi, [rsp+28h+arg_10]                                          ; +0xb1, 0x140323061\nadd     rsp, 20h                                                       ; +0xb6, 0x140323066\npop     rdi                                                            ; +0xba, 0x14032306a\nretn                                                                   ; +0xbb, 0x14032306b", "xrefs": ["LevelSettingsLayer::onGArt @ 0x140321c8b", "SetupSmartBlockLayer::onSelectPremade @ 0x1404589f8", "SelectArtLayer::init @ 0x140322bac", "SelectArtLayer::init @ 0x140322cda", "SelectArtLayer::init @ 0x140322dee", "<???> @ 0x140693660", "<???> @ 0x140693670", "<???> @ 0x1406d4cf4"], "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"}