{"type": "func", "start": 5370035632, "end": 5370035761, "name": "CustomizeObjectLayer::getButtonByTag", "pseudocode": "// \n// CustomizeObjectLayer::getButtonByTag from 0x140143db0 to 0x140143e31 (129 bytes)\n// \n// 5 xrefs:\n// > CustomizeObjectLayer::colorSetupClosed @ 0x1401424ac\n// > CustomizeObjectLayer::onNextColorChannel @ 0x14014308b\n// > CustomizeObjectLayer::toggleVisible @ 0x1401434b7\n// > CustomizeObjectLayer::updateCurrentSelection @ 0x1401436c1\n// > <???> @ 0x140917450\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:27:10 +0000\n// \n\nstruct cocos2d::CCObject *__fastcall CustomizeObjectLayer::getButtonByTag(__int64 a1, int a2)\n{\n  unsigned int v4; // ebx\n  struct cocos2d::CCObject *v5; // rsi\n\n  v4 = 0;\n  if ( !cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 704)) )\n    return nullptr;\n  while ( 1 )\n  {\n    v5 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 704), v4);\n    if ( (*(unsigned int (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v5 + 56LL))(v5) == a2 )\n      break;\n    if ( ++v4 >= cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 704)) )\n      return nullptr;\n  }\n  return v5;\n}", "assembly": "; \n; CustomizeObjectLayer::getButtonByTag from 0x140143db0 to 0x140143e31 (129 bytes)\n; \n; 5 xrefs:\n; > CustomizeObjectLayer::colorSetupClosed @ 0x1401424ac\n; > CustomizeObjectLayer::onNextColorChannel @ 0x14014308b\n; > CustomizeObjectLayer::toggleVisible @ 0x1401434b7\n; > CustomizeObjectLayer::updateCurrentSelection @ 0x1401436c1\n; > <???> @ 0x140917450\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:27:10 +0000\n; \nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x140143db0\nmov     [rsp+arg_8], rbp                                               ; +0x5, 0x140143db5\nmov     [rsp+arg_10], rsi                                              ; +0xa, 0x140143dba\npush    rdi                                                            ; +0xf, 0x140143dbf\nsub     rsp, 20h                                                       ; +0x10, 0x140143dc0\nmov     rdi, rcx                                                       ; +0x14, 0x140143dc4\nmov     ebp, edx                                                       ; +0x17, 0x140143dc7\nmov     rcx, [rcx+2C0h]                                                ; +0x19, 0x140143dc9\nxor     ebx, ebx                                                       ; +0x20, 0x140143dd0\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x22, 0x140143dd2\ntest    eax, eax                                                       ; +0x28, 0x140143dd8\njz      short loc_140143E15                                            ; +0x2a, 0x140143dda\nnop     dword ptr [rax+00h]                                            ; +0x2c, 0x140143ddc\nmov     rcx, [rdi+2C0h]                                                ; +0x30, 0x140143de0\nmov     edx, ebx                                                       ; +0x37, 0x140143de7\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0x39, 0x140143de9\nmov     rsi, rax                                                       ; +0x3f, 0x140143def\nmov     rcx, [rax]                                                     ; +0x42, 0x140143df2\nmov     rdx, [rcx+38h]                                                 ; +0x45, 0x140143df5\nmov     rcx, rax                                                       ; +0x49, 0x140143df9\ncall    rdx                                                            ; +0x4c, 0x140143dfc\ncmp     eax, ebp                                                       ; +0x4e, 0x140143dfe\njz      short loc_140143E2C                                            ; +0x50, 0x140143e00\nmov     rcx, [rdi+2C0h]                                                ; +0x52, 0x140143e02\ninc     ebx                                                            ; +0x59, 0x140143e09\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x5b, 0x140143e0b\ncmp     ebx, eax                                                       ; +0x61, 0x140143e11\njb      short loc_140143DE0                                            ; +0x63, 0x140143e13\nxor     eax, eax                                                       ; +0x65, 0x140143e15\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x67, 0x140143e17\nmov     rbp, [rsp+28h+arg_8]                                           ; +0x6c, 0x140143e1c\nmov     rsi, [rsp+28h+arg_10]                                          ; +0x71, 0x140143e21\nadd     rsp, 20h                                                       ; +0x76, 0x140143e26\npop     rdi                                                            ; +0x7a, 0x140143e2a\nretn                                                                   ; +0x7b, 0x140143e2b\nmov     rax, rsi                                                       ; +0x7c, 0x140143e2c\njmp     short loc_140143E17                                            ; +0x7f, 0x140143e2f", "xrefs": ["CustomizeObjectLayer::colorSetupClosed @ 0x1401424ac", "CustomizeObjectLayer::onNextColorChannel @ 0x14014308b", "CustomizeObjectLayer::toggleVisible @ 0x1401434b7", "CustomizeObjectLayer::updateCurrentSelection @ 0x1401436c1", "<???> @ 0x140917450"], "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"}