{"type": "func", "start": 4298839344, "end": 4298839420, "name": "DialogLayer::addToMainScene", "pseudocode": "// \n// DialogLayer::addToMainScene from 0x1003b1530 to 0x1003b157c (76 bytes)\n// \n// 8 xrefs:\n// > DailyLevelPage::dailyStatusFailed @ 0x100216306\n// > sub_10029EC20 @ 0x10029ee1d\n// > LevelListLayer::onClaimReward @ 0x10034a8c6\n// > sub_100602BF0 @ 0x100602ded\n// > SongInfoLayer::showCustomMusicUnlockInfo @ 0x1006d9841\n// > SecretRewardsLayer::onGoldChest @ 0x10070f2f5\n// > SecretRewardsLayer::showLockedChest @ 0x10070fee6\n// > SecretRewardsLayer::onSelectItem @ 0x100711708\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 12:29:26 +0000\n// \n\n__int64 __fastcall DialogLayer::addToMainScene(__int64 a1, __int64 a2)\n{\n  __int64 v2; // r14\n  int HighestChildZ; // eax\n  __int64 v4; // rdx\n\n  v2 = *(_QWORD *)(cocos2d::CCDirector::sharedDirector(a1, a2) + 272);\n  HighestChildZ = cocos2d::CCScene::getHighestChildZ(v2);\n  v4 = 1000;\n  if ( HighestChildZ >= 1000 )\n    v4 = (unsigned int)cocos2d::CCScene::getHighestChildZ(v2) + 1;\n  return (*(__int64 (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)v2 + 464LL))(v2, a1, v4);\n}", "assembly": "; \n; DialogLayer::addToMainScene from 0x1003b1530 to 0x1003b157c (76 bytes)\n; \n; 8 xrefs:\n; > DailyLevelPage::dailyStatusFailed @ 0x100216306\n; > sub_10029EC20 @ 0x10029ee1d\n; > LevelListLayer::onClaimReward @ 0x10034a8c6\n; > sub_100602BF0 @ 0x100602ded\n; > SongInfoLayer::showCustomMusicUnlockInfo @ 0x1006d9841\n; > SecretRewardsLayer::onGoldChest @ 0x10070f2f5\n; > SecretRewardsLayer::showLockedChest @ 0x10070fee6\n; > SecretRewardsLayer::onSelectItem @ 0x100711708\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 12:29:26 +0000\n; \npush    rbp                                                            ; +0x0, 0x1003b1530\nmov     rbp, rsp                                                       ; +0x1, 0x1003b1531\npush    r14                                                            ; +0x4, 0x1003b1534\npush    rbx                                                            ; +0x6, 0x1003b1536\nmov     rbx, rdi                                                       ; +0x7, 0x1003b1537\ncall    cocos2d__CCDirector__sharedDirector                            ; +0xa, 0x1003b153a\nmov     r14, [rax+110h]                                                ; +0xf, 0x1003b153f\nmov     rdi, r14                                                       ; +0x16, 0x1003b1546\ncall    cocos2d__CCScene__getHighestChildZ                             ; +0x19, 0x1003b1549\nmov     edx, 3E8h                                                      ; +0x1e, 0x1003b154e\ncmp     eax, 3E8h                                                      ; +0x23, 0x1003b1553\njl      short loc_1003B1566                                            ; +0x28, 0x1003b1558\nmov     rdi, r14                                                       ; +0x2a, 0x1003b155a\ncall    cocos2d__CCScene__getHighestChildZ                             ; +0x2d, 0x1003b155d\nmov     edx, eax                                                       ; +0x32, 0x1003b1562\ninc     edx                                                            ; +0x34, 0x1003b1564\nmov     rax, [r14]                                                     ; +0x36, 0x1003b1566\nmov     rax, [rax+1D0h]                                                ; +0x39, 0x1003b1569\nmov     rdi, r14                                                       ; +0x40, 0x1003b1570\nmov     rsi, rbx                                                       ; +0x43, 0x1003b1573\npop     rbx                                                            ; +0x46, 0x1003b1576\npop     r14                                                            ; +0x47, 0x1003b1577\npop     rbp                                                            ; +0x49, 0x1003b1579\njmp     rax                                                            ; +0x4a, 0x1003b157a", "xrefs": ["DailyLevelPage::dailyStatusFailed @ 0x100216306", "sub_10029EC20 @ 0x10029ee1d", "LevelListLayer::onClaimReward @ 0x10034a8c6", "sub_100602BF0 @ 0x100602ded", "SongInfoLayer::showCustomMusicUnlockInfo @ 0x1006d9841", "SecretRewardsLayer::onGoldChest @ 0x10070f2f5", "SecretRewardsLayer::showLockedChest @ 0x10070fee6", "SecretRewardsLayer::onSelectItem @ 0x100711708"], "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"}