{"type": "func", "start": 5070296, "end": 5070484, "name": "DialogLayer::updateChatPlacement", "pseudocode": "// \n// DialogLayer::updateChatPlacement from 0x4d5dd8 to 0x4d5e94 (188 bytes)\n// \n// 49 xrefs:\n// > PlayLayer::destroyPlayer @ 0x314236\n// > CreatorLayer::onMultiplayer @ 0x3aa6e8\n// > CreatorLayer::onSecretVault @ 0x3aab6a\n// > CreatorLayer::onTreasureRoom @ 0x3aad6a\n// > CreatorLayer::onTreasureRoom @ 0x3aae12\n// > CreatorLayer::onOnlyFullVersion @ 0x3ab184\n// > GJGarageLayer::onRewardedVideo @ 0x402714\n// > GJGarageLayer::showUnlockPopup @ 0x405b1e\n// > LevelPage::onTheTower @ 0x4088f8\n// > LevelPage::onSecretDoor @ 0x408d24\n// > OptionsLayer::onSecretVault @ 0x4219f6\n// > SongInfoLayer::showCustomMusicUnlockInfo @ 0x42d87e\n// > RetryLevelLayer::onRewardedVideo @ 0x43625a\n// > GameOptionsLayer::showPracticeMusicSyncUnlockInfo @ 0x4b198e\n// > DailyLevelPage::dailyStatusFailed @ 0x4d39c8\n// > GauntletSelectLayer::onPlay @ 0x4d6cda\n// > GJShopLayer::didPurchaseItem @ 0x4e1b60\n// > GJShopLayer::showReactMessage @ 0x4e25de\n// > GJShopLayer::showReactMessage @ 0x4e2a3e\n// > GJShopLayer::showCantAffordMessage @ 0x4e47d2\n// > SecretLayer2::showCompletedLevel @ 0x4ea3fc\n// > SecretLayer3::firstInteractionStep4 @ 0x4ea67e\n// > SecretLayer3::revealStep2 @ 0x4ea834\n// > SecretLayer3::revealStep5 @ 0x4eaa68\n// > SecretLayer2::onSecretLevel @ 0x4eac00\n// > SecretLayer3::showUnlockDialog @ 0x4eadf4\n// > SecretLayer3::revealStep4 @ 0x4eb0cc\n// > SecretLayer3::firstInteractionStep2 @ 0x4eb620\n// > SecretLayer3::onClick @ 0x4ebb3e\n// > SecretLayer2::onDoor @ 0x4edfbc\n// > SecretLayer4::showFirstDialog @ 0x4f00d4\n// > SecretLayer4::showDialog @ 0x4f06a6\n// > WorldSelectLayer::showCompleteDialog @ 0x4fc7b6\n// > FollowRewardPage::onRewardedVideo @ 0x4ffb74\n// > CharacterColorPage::onMode @ 0x565036\n// > LevelAreaLayer::showDialog @ 0x56b676\n// > LevelAreaInnerLayer::showFloor1CompleteDialog @ 0x56b8a6\n// > SecretRewardsLayer::showLockedChest @ 0x585486\n// > SecretRewardsLayer::onSpecialItem @ 0x5859ca\n// > SecretRewardsLayer::onSelectItem @ 0x585caa\n// > SecretRewardsLayer::onGoldChest @ 0x587404\n// > SecretRewardsLayer::showDialog01 @ 0x587d5e\n// > SecretRewardsLayer::showDialog03 @ 0x5886c0\n// > SecretRewardsLayer::showDialogMechanic @ 0x588f1a\n// > SecretRewardsLayer::showDialogDiamond @ 0x589596\n// > GJPathPage::showCantAffordMessage @ 0x58e8e6\n// > LevelListLayer::onClaimReward @ 0x58ed7a\n// > SecretLayer5::showFirstDialog @ 0x59c2c4\n// > SecretLayer5::showDialog @ 0x59d9e2\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 DialogLayer::updateChatPlacement(DialogLayer *a1, DialogChatPlacement a2)\n{\n  cocos2d::CCDirector *v4; // r0\n  cocos2d::CCLayer *m_mainLayer; // r6\n  void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r7\n  float v7; // r1\n  float v8; // s15\n  float v9; // r2\n  cocos2d::CCSize v10; // [sp+4h] [bp-18h] BYREF\n  cocos2d::CCPoint v11; // [sp+Ch] [bp-10h] BYREF\n\n  v4 = cocos2d::CCDirector::sharedDirector();\n  cocos2d::CCDirector::getWinSize(&v10, v4);\n  if ( a2 == Center )\n  {\n    m_mainLayer = a1->m_mainLayer;\n    setPosition = m_mainLayer->setPosition;\n    v7 = v10.width * 0.5;\n    v8 = v10.height * 0.5;\nLABEL_5:\n    v9 = v8;\n    goto LABEL_8;\n  }\n  if ( a2 == Top )\n  {\n    m_mainLayer = a1->m_mainLayer;\n    setPosition = m_mainLayer->setPosition;\n    v7 = v10.width * 0.5;\n    v8 = (float)(v10.height - 50.0) - 20.0;\n    goto LABEL_5;\n  }\n  if ( a2 != Bottom )\n    return;\n  m_mainLayer = a1->m_mainLayer;\n  v9 = 70.0;\n  setPosition = m_mainLayer->setPosition;\n  v7 = v10.width * 0.5;\nLABEL_8:\n  cocos2d::CCPoint::CCPoint(&v11, v7, v9);\n  setPosition(m_mainLayer, &v11);\n}", "assembly": "; \n; DialogLayer::updateChatPlacement from 0x4d5dd8 to 0x4d5e94 (188 bytes)\n; \n; 49 xrefs:\n; > PlayLayer::destroyPlayer @ 0x314236\n; > CreatorLayer::onMultiplayer @ 0x3aa6e8\n; > CreatorLayer::onSecretVault @ 0x3aab6a\n; > CreatorLayer::onTreasureRoom @ 0x3aad6a\n; > CreatorLayer::onTreasureRoom @ 0x3aae12\n; > CreatorLayer::onOnlyFullVersion @ 0x3ab184\n; > GJGarageLayer::onRewardedVideo @ 0x402714\n; > GJGarageLayer::showUnlockPopup @ 0x405b1e\n; > LevelPage::onTheTower @ 0x4088f8\n; > LevelPage::onSecretDoor @ 0x408d24\n; > OptionsLayer::onSecretVault @ 0x4219f6\n; > SongInfoLayer::showCustomMusicUnlockInfo @ 0x42d87e\n; > RetryLevelLayer::onRewardedVideo @ 0x43625a\n; > GameOptionsLayer::showPracticeMusicSyncUnlockInfo @ 0x4b198e\n; > DailyLevelPage::dailyStatusFailed @ 0x4d39c8\n; > GauntletSelectLayer::onPlay @ 0x4d6cda\n; > GJShopLayer::didPurchaseItem @ 0x4e1b60\n; > GJShopLayer::showReactMessage @ 0x4e25de\n; > GJShopLayer::showReactMessage @ 0x4e2a3e\n; > GJShopLayer::showCantAffordMessage @ 0x4e47d2\n; > SecretLayer2::showCompletedLevel @ 0x4ea3fc\n; > SecretLayer3::firstInteractionStep4 @ 0x4ea67e\n; > SecretLayer3::revealStep2 @ 0x4ea834\n; > SecretLayer3::revealStep5 @ 0x4eaa68\n; > SecretLayer2::onSecretLevel @ 0x4eac00\n; > SecretLayer3::showUnlockDialog @ 0x4eadf4\n; > SecretLayer3::revealStep4 @ 0x4eb0cc\n; > SecretLayer3::firstInteractionStep2 @ 0x4eb620\n; > SecretLayer3::onClick @ 0x4ebb3e\n; > SecretLayer2::onDoor @ 0x4edfbc\n; > SecretLayer4::showFirstDialog @ 0x4f00d4\n; > SecretLayer4::showDialog @ 0x4f06a6\n; > WorldSelectLayer::showCompleteDialog @ 0x4fc7b6\n; > FollowRewardPage::onRewardedVideo @ 0x4ffb74\n; > CharacterColorPage::onMode @ 0x565036\n; > LevelAreaLayer::showDialog @ 0x56b676\n; > LevelAreaInnerLayer::showFloor1CompleteDialog @ 0x56b8a6\n; > SecretRewardsLayer::showLockedChest @ 0x585486\n; > SecretRewardsLayer::onSpecialItem @ 0x5859ca\n; > SecretRewardsLayer::onSelectItem @ 0x585caa\n; > SecretRewardsLayer::onGoldChest @ 0x587404\n; > SecretRewardsLayer::showDialog01 @ 0x587d5e\n; > SecretRewardsLayer::showDialog03 @ 0x5886c0\n; > SecretRewardsLayer::showDialogMechanic @ 0x588f1a\n; > SecretRewardsLayer::showDialogDiamond @ 0x589596\n; > GJPathPage::showCantAffordMessage @ 0x58e8e6\n; > LevelListLayer::onClaimReward @ 0x58ed7a\n; > SecretLayer5::showFirstDialog @ 0x59c2c4\n; > SecretLayer5::showDialog @ 0x59d9e2\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\nPUSH            {R4-R7,LR}                                             ; +0x0, 0x4d5dd8\nSUB             SP, SP, #0x1C                                          ; +0x2, 0x4d5dda\nLDR             R5, =(__stack_chk_guard_ptr - 0x4D5DE6)                ; +0x4, 0x4d5ddc\nMOV             R6, R1                                                 ; +0x6, 0x4d5dde\nMOV             R4, R0                                                 ; +0x8, 0x4d5de0\nADD             R5, PC; __stack_chk_guard_ptr                          ; +0xa, 0x4d5de2\nLDR             R5, [R5]; __stack_chk_guard                            ; +0xc, 0x4d5de4\nLDR             R3, [R5]                                               ; +0xe, 0x4d5de6\nSTR             R3, [SP,#0x1C+var_8]                                   ; +0x10, 0x4d5de8\nBL              _ZN7cocos2d10CCDirector14sharedDirectorEv; cocos2d::CCDirector::sharedDirector(void) ; +0x12, 0x4d5dea\nMOV             R1, R0                                                 ; +0x16, 0x4d5dee\nADD             R0, SP, #0x1C+var_18; this                             ; +0x18, 0x4d5df0\nBL              _ZN7cocos2d10CCDirector10getWinSizeEv; cocos2d::CCDirector::getWinSize(void) ; +0x1a, 0x4d5df2\nCBNZ            R6, loc_4D5E1E                                         ; +0x1e, 0x4d5df6\nVMOV.F32        S15, #0.5                                              ; +0x20, 0x4d5df8\nLDR.W           R6, [R4,#0x1C0]                                        ; +0x24, 0x4d5dfc\nVLDR            S14, [SP,#0x1C+var_18]                                 ; +0x28, 0x4d5e00\nADD             R4, SP, #0x1C+var_10                                   ; +0x2c, 0x4d5e04\nLDR             R3, [R6]                                               ; +0x2e, 0x4d5e06\nMOV             R0, R4                                                 ; +0x30, 0x4d5e08\nLDR             R7, [R3,#0x5C]                                         ; +0x32, 0x4d5e0a\nVMUL.F32        S14, S14, S15                                          ; +0x34, 0x4d5e0c\nVMOV            R1, S14                                                ; +0x38, 0x4d5e10\nVLDR            S14, [SP,#0x1C+var_14]                                 ; +0x3c, 0x4d5e14\nVMUL.F32        S15, S14, S15                                          ; +0x40, 0x4d5e18\nB               loc_4D5E52                                             ; +0x44, 0x4d5e1c\nCMP             R6, #1                                                 ; +0x46, 0x4d5e1e\nBNE             loc_4D5E58                                             ; +0x48, 0x4d5e20\nVLDR            S14, =50.0                                             ; +0x4a, 0x4d5e22\nLDR.W           R6, [R4,#0x1C0]                                        ; +0x4e, 0x4d5e26\nADD             R4, SP, #0x1C+var_10                                   ; +0x52, 0x4d5e2a\nVLDR            S15, [SP,#0x1C+var_14]                                 ; +0x54, 0x4d5e2c\nMOV             R0, R4                                                 ; +0x58, 0x4d5e30\nLDR             R3, [R6]                                               ; +0x5a, 0x4d5e32\nVLDR            S13, [SP,#0x1C+var_18]                                 ; +0x5c, 0x4d5e34\nLDR             R7, [R3,#0x5C]                                         ; +0x60, 0x4d5e38\nVSUB.F32        S15, S15, S14                                          ; +0x62, 0x4d5e3a\nVMOV.F32        S14, #0.5                                              ; +0x66, 0x4d5e3e\nVMUL.F32        S14, S13, S14                                          ; +0x6a, 0x4d5e42\nVMOV            R1, S14                                                ; +0x6e, 0x4d5e46\nVMOV.F32        S14, #20.0                                             ; +0x72, 0x4d5e4a\nVSUB.F32        S15, S15, S14                                          ; +0x76, 0x4d5e4e\nVMOV            R2, S15                                                ; +0x7a, 0x4d5e52\nB               loc_4D5E7A                                             ; +0x7e, 0x4d5e56\nCMP             R6, #2                                                 ; +0x80, 0x4d5e58\nBNE             loc_4D5E84                                             ; +0x82, 0x4d5e5a\nVMOV.F32        S15, #0.5                                              ; +0x84, 0x4d5e5c\nLDR.W           R6, [R4,#0x1C0]                                        ; +0x88, 0x4d5e60\nVLDR            S14, [SP,#0x1C+var_18]                                 ; +0x8c, 0x4d5e64\nADD             R4, SP, #0x1C+var_10                                   ; +0x90, 0x4d5e68\nLDR             R2, flt_4D5E98; float                                  ; +0x92, 0x4d5e6a\nLDR             R3, [R6]                                               ; +0x94, 0x4d5e6c\nMOV             R0, R4; this                                           ; +0x96, 0x4d5e6e\nLDR             R7, [R3,#0x5C]                                         ; +0x98, 0x4d5e70\nVMUL.F32        S15, S14, S15                                          ; +0x9a, 0x4d5e72\nVMOV            R1, S15; float                                         ; +0x9e, 0x4d5e76\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0xa2, 0x4d5e7a\nMOV             R0, R6                                                 ; +0xa6, 0x4d5e7e\nMOV             R1, R4                                                 ; +0xa8, 0x4d5e80\nBLX             R7                                                     ; +0xaa, 0x4d5e82\nLDR             R2, [SP,#0x1C+var_8]                                   ; +0xac, 0x4d5e84\nLDR             R3, [R5]                                               ; +0xae, 0x4d5e86\nCMP             R2, R3                                                 ; +0xb0, 0x4d5e88\nBEQ             loc_4D5E90                                             ; +0xb2, 0x4d5e8a\nBLX             __stack_chk_fail                                       ; +0xb4, 0x4d5e8c\nADD             SP, SP, #0x1C                                          ; +0xb8, 0x4d5e90\nPOP             {R4-R7,PC}                                             ; +0xba, 0x4d5e92", "xrefs": ["PlayLayer::destroyPlayer @ 0x314236", "CreatorLayer::onMultiplayer @ 0x3aa6e8", "CreatorLayer::onSecretVault @ 0x3aab6a", "CreatorLayer::onTreasureRoom @ 0x3aad6a", "CreatorLayer::onTreasureRoom @ 0x3aae12", "CreatorLayer::onOnlyFullVersion @ 0x3ab184", "GJGarageLayer::onRewardedVideo @ 0x402714", "GJGarageLayer::showUnlockPopup @ 0x405b1e", "LevelPage::onTheTower @ 0x4088f8", "LevelPage::onSecretDoor @ 0x408d24", "OptionsLayer::onSecretVault @ 0x4219f6", "SongInfoLayer::showCustomMusicUnlockInfo @ 0x42d87e", "RetryLevelLayer::onRewardedVideo @ 0x43625a", "GameOptionsLayer::showPracticeMusicSyncUnlockInfo @ 0x4b198e", "DailyLevelPage::dailyStatusFailed @ 0x4d39c8", "GauntletSelectLayer::onPlay @ 0x4d6cda", "GJShopLayer::didPurchaseItem @ 0x4e1b60", "GJShopLayer::showReactMessage @ 0x4e25de", "GJShopLayer::showReactMessage @ 0x4e2a3e", "GJShopLayer::showCantAffordMessage @ 0x4e47d2", "SecretLayer2::showCompletedLevel @ 0x4ea3fc", "SecretLayer3::firstInteractionStep4 @ 0x4ea67e", "SecretLayer3::revealStep2 @ 0x4ea834", "SecretLayer3::revealStep5 @ 0x4eaa68", "SecretLayer2::onSecretLevel @ 0x4eac00", "SecretLayer3::showUnlockDialog @ 0x4eadf4", "SecretLayer3::revealStep4 @ 0x4eb0cc", "SecretLayer3::firstInteractionStep2 @ 0x4eb620", "SecretLayer3::onClick @ 0x4ebb3e", "SecretLayer2::onDoor @ 0x4edfbc", "SecretLayer4::showFirstDialog @ 0x4f00d4", "SecretLayer4::showDialog @ 0x4f06a6", "WorldSelectLayer::showCompleteDialog @ 0x4fc7b6", "FollowRewardPage::onRewardedVideo @ 0x4ffb74", "CharacterColorPage::onMode @ 0x565036", "LevelAreaLayer::showDialog @ 0x56b676", "LevelAreaInnerLayer::showFloor1CompleteDialog @ 0x56b8a6", "SecretRewardsLayer::showLockedChest @ 0x585486", "SecretRewardsLayer::onSpecialItem @ 0x5859ca", "SecretRewardsLayer::onSelectItem @ 0x585caa", "SecretRewardsLayer::onGoldChest @ 0x587404", "SecretRewardsLayer::showDialog01 @ 0x587d5e", "SecretRewardsLayer::showDialog03 @ 0x5886c0", "SecretRewardsLayer::showDialogMechanic @ 0x588f1a", "SecretRewardsLayer::showDialogDiamond @ 0x589596", "GJPathPage::showCantAffordMessage @ 0x58e8e6", "LevelListLayer::onClaimReward @ 0x58ed7a", "SecretLayer5::showFirstDialog @ 0x59c2c4", "SecretLayer5::showDialog @ 0x59d9e2"], "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"}