{"type": "func", "start": 5373177872, "end": 5373178029, "name": "LevelSelectLayer::onDeathTracker", "pseudocode": "// \n// LevelSelectLayer::onDeathTracker from 0x140443010 to 0x1404430ad (157 bytes)\n// \n// 2 xrefs:\n// > LevelSelectLayer::init @ 0x140442413\n// > <???> @ 0x140927188\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\n__int64 __fastcall LevelSelectLayer::onDeathTracker(__int64 a1)\n{\n  __int64 v1; // rdi\n  signed int v2; // ebx\n  cocos2d::CCArray *v3; // rcx\n  signed int v4; // ecx\n  __int64 result; // rax\n  _DWORD *v6; // rcx\n  _QWORD *v7; // rax\n\n  v1 = *(_QWORD *)(a1 + 448);\n  v2 = *(_DWORD *)(v1 + 588);\n  v3 = *(cocos2d::CCArray **)(v1 + 480);\n  if ( *(_BYTE *)(v1 + 456) )\n  {\n    v4 = cocos2d::CCArray::count(v3);\n    if ( v2 <= 0 )\n    {\n      for ( ; v2 < 0; v2 += v4 )\n        ;\n    }\n    else\n    {\n      v2 %= v4;\n    }\n    v3 = *(cocos2d::CCArray **)(v1 + 480);\n  }\n  result = (__int64)cocos2d::CCArray::objectAtIndex(v3, v2);\n  v6 = *(_DWORD **)(result + 424);\n  if ( v6 )\n  {\n    result = (unsigned int)(v6[82] - v6[83]);\n    if ( (_DWORD)result != -1 && (_DWORD)result != -2 && v6[243] != 5 )\n    {\n      v7 = DeathTrackerPopup::create((__int64)v6);\n      return (*(__int64 (__fastcall **)(_QWORD *))(*v7 + 1064LL))(v7);\n    }\n  }\n  return result;\n}", "assembly": "; \n; LevelSelectLayer::onDeathTracker from 0x140443010 to 0x1404430ad (157 bytes)\n; \n; 2 xrefs:\n; > LevelSelectLayer::init @ 0x140442413\n; > <???> @ 0x140927188\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, 0x140443010\npush    rdi                                                            ; +0x5, 0x140443015\nsub     rsp, 20h                                                       ; +0x6, 0x140443016\nmov     rdi, [rcx+1C0h]                                                ; +0xa, 0x14044301a\ncmp     byte ptr [rdi+1C8h], 0                                         ; +0x11, 0x140443021\nmov     ebx, [rdi+24Ch]                                                ; +0x18, 0x140443028\nmov     rcx, [rdi+1E0h]                                                ; +0x1e, 0x14044302e\njz      short loc_14044305B                                            ; +0x25, 0x140443035\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x27, 0x140443037\nmov     ecx, eax                                                       ; +0x2d, 0x14044303d\ntest    ebx, ebx                                                       ; +0x2f, 0x14044303f\njle     short loc_14044304C                                            ; +0x31, 0x140443041\nmov     eax, ebx                                                       ; +0x33, 0x140443043\ncdq                                                                    ; +0x35, 0x140443045\nidiv    ecx                                                            ; +0x36, 0x140443046\nmov     ebx, edx                                                       ; +0x38, 0x140443048\njmp     short loc_140443054                                            ; +0x3a, 0x14044304a\njns     short loc_140443054                                            ; +0x3c, 0x14044304c\nxchg    ax, ax                                                         ; +0x3e, 0x14044304e\nadd     ebx, ecx                                                       ; +0x40, 0x140443050\njs      short loc_140443050                                            ; +0x42, 0x140443052\nmov     rcx, [rdi+1E0h]                                                ; +0x44, 0x140443054\nmov     edx, ebx                                                       ; +0x4b, 0x14044305b\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0x4d, 0x14044305d\nmov     rcx, [rax+1A8h]                                                ; +0x53, 0x140443063\ntest    rcx, rcx                                                       ; +0x5a, 0x14044306a\njz      short loc_1404430A2                                            ; +0x5d, 0x14044306d\nmov     eax, [rcx+148h]                                                ; +0x5f, 0x14044306f\nsub     eax, [rcx+14Ch]                                                ; +0x65, 0x140443075\ncmp     eax, 0FFFFFFFFh                                                ; +0x6b, 0x14044307b\njz      short loc_1404430A2                                            ; +0x6e, 0x14044307e\ncmp     eax, 0FFFFFFFEh                                                ; +0x70, 0x140443080\njz      short loc_1404430A2                                            ; +0x73, 0x140443083\ncmp     dword ptr [rcx+3CCh], 5                                        ; +0x75, 0x140443085\njz      short loc_1404430A2                                            ; +0x7c, 0x14044308c\ncall    DeathTrackerPopup__create                                      ; +0x7e, 0x14044308e\nmov     rcx, [rax]                                                     ; +0x83, 0x140443093\nmov     rdx, [rcx+428h]                                                ; +0x86, 0x140443096\nmov     rcx, rax                                                       ; +0x8d, 0x14044309d\ncall    rdx                                                            ; +0x90, 0x1404430a0\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x92, 0x1404430a2\nadd     rsp, 20h                                                       ; +0x97, 0x1404430a7\npop     rdi                                                            ; +0x9b, 0x1404430ab\nretn                                                                   ; +0x9c, 0x1404430ac", "xrefs": ["LevelSelectLayer::init @ 0x140442413", "<???> @ 0x140927188"], "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"}