{"type": "func", "start": 5373178032, "end": 5373178179, "name": "LevelSelectLayer::updateDeathButton", "pseudocode": "// \n// LevelSelectLayer::updateDeathButton from 0x1404430b0 to 0x140443143 (147 bytes)\n// \n// 3 xrefs:\n// > LevelSelectLayer::init @ 0x1404424ab\n// > LevelSelectLayer::scrollLayerMoved @ 0x1404426b6\n// > <???> @ 0x140927194\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:32:22 +0000\n// \n\nvoid __fastcall LevelSelectLayer::updateDeathButton(__int64 a1, int a2)\n{\n  __int64 v4; // rcx\n  cocos2d::CCArray *v5; // rcx\n  int v6; // ecx\n  struct cocos2d::CCObject *v7; // rax\n  __int64 v8; // rdx\n  int v9; // ecx\n\n  if ( *(_QWORD *)(a1 + 472) )\n  {\n    v4 = *(_QWORD *)(a1 + 448);\n    if ( v4 )\n    {\n      v5 = *(cocos2d::CCArray **)(v4 + 448);\n      if ( v5 )\n      {\n        v6 = cocos2d::CCArray::count(v5);\n        if ( v6 > 0 )\n        {\n          v7 = cocos2d::CCArray::objectAtIndex(\n                 *(cocos2d::CCArray **)(*(_QWORD *)(a1 + 448) + 448LL),\n                 (v6 + a2 % v6) % v6);\n          v9 = *((_DWORD *)v7 + 82) - *((_DWORD *)v7 + 83);\n          if ( v9 == -1 || v9 == -2 )\n            v8 = 0;\n          else\n            LOBYTE(v8) = 1;\n          (*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 472) + 336LL))(*(_QWORD *)(a1 + 472), v8);\n        }\n      }\n    }\n  }\n}", "assembly": "; \n; LevelSelectLayer::updateDeathButton from 0x1404430b0 to 0x140443143 (147 bytes)\n; \n; 3 xrefs:\n; > LevelSelectLayer::init @ 0x1404424ab\n; > LevelSelectLayer::scrollLayerMoved @ 0x1404426b6\n; > <???> @ 0x140927194\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:32:22 +0000\n; \nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x1404430b0\npush    rdi                                                            ; +0x5, 0x1404430b5\nsub     rsp, 20h                                                       ; +0x6, 0x1404430b6\ncmp     qword ptr [rcx+1D8h], 0                                        ; +0xa, 0x1404430ba\nmov     edi, edx                                                       ; +0x12, 0x1404430c2\nmov     rbx, rcx                                                       ; +0x14, 0x1404430c4\njz      short loc_140443138                                            ; +0x17, 0x1404430c7\nmov     rcx, [rcx+1C0h]                                                ; +0x19, 0x1404430c9\ntest    rcx, rcx                                                       ; +0x20, 0x1404430d0\njz      short loc_140443138                                            ; +0x23, 0x1404430d3\nmov     rcx, [rcx+1C0h]                                                ; +0x25, 0x1404430d5\ntest    rcx, rcx                                                       ; +0x2c, 0x1404430dc\njz      short loc_140443138                                            ; +0x2f, 0x1404430df\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x31, 0x1404430e1\nmov     ecx, eax                                                       ; +0x37, 0x1404430e7\ntest    eax, eax                                                       ; +0x39, 0x1404430e9\njle     short loc_140443138                                            ; +0x3b, 0x1404430eb\nmov     eax, edi                                                       ; +0x3d, 0x1404430ed\ncdq                                                                    ; +0x3f, 0x1404430ef\nidiv    ecx                                                            ; +0x40, 0x1404430f0\nlea     eax, [rcx+rdx]                                                 ; +0x42, 0x1404430f2\ncdq                                                                    ; +0x45, 0x1404430f5\nidiv    ecx                                                            ; +0x46, 0x1404430f6\nmov     rcx, [rbx+1C0h]                                                ; +0x48, 0x1404430f8\nmov     rcx, [rcx+1C0h]                                                ; +0x4f, 0x1404430ff\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0x56, 0x140443106\nmov     ecx, [rax+148h]                                                ; +0x5c, 0x14044310c\nsub     ecx, [rax+14Ch]                                                ; +0x62, 0x140443112\ncmp     ecx, 0FFFFFFFFh                                                ; +0x68, 0x140443118\njz      short loc_140443126                                            ; +0x6b, 0x14044311b\ncmp     ecx, 0FFFFFFFEh                                                ; +0x6d, 0x14044311d\njz      short loc_140443126                                            ; +0x70, 0x140443120\nmov     dl, 1                                                          ; +0x72, 0x140443122\njmp     short loc_140443128                                            ; +0x74, 0x140443124\nxor     edx, edx                                                       ; +0x76, 0x140443126\nmov     rcx, [rbx+1D8h]                                                ; +0x78, 0x140443128\nmov     rax, [rcx]                                                     ; +0x7f, 0x14044312f\ncall    qword ptr [rax+150h]                                           ; +0x82, 0x140443132\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x88, 0x140443138\nadd     rsp, 20h                                                       ; +0x8d, 0x14044313d\npop     rdi                                                            ; +0x91, 0x140443141\nretn                                                                   ; +0x92, 0x140443142", "xrefs": ["LevelSelectLayer::init @ 0x1404424ab", "LevelSelectLayer::scrollLayerMoved @ 0x1404426b6", "<???> @ 0x140927194"], "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"}