{"type": "func", "start": 4298759916, "end": 4298760076, "name": "EditorPauseLayer::onResetUnusedColors", "pseudocode": "// \n// EditorPauseLayer::onResetUnusedColors from 0x10039deec to 0x10039df8c (160 bytes)\n// \n// 1 xrefs:\n// > EditorPauseLayer::customSetup @ 0x10039c6cc\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 __fastcall EditorPauseLayer::onResetUnusedColors(EditorPauseLayer *a1, cocos2d::CCObject *a2)\n{\n  FLAlertLayer *v3; // x19\n  void *__p[2]; // [xsp+8h] [xbp-28h] BYREF\n  char v5; // [xsp+1Fh] [xbp-11h]\n\n  if ( !a1->m_saved )\n  {\n    sub_100009900(\n      __p,\n      \"Reset all unused color channels?\\n<cy>This will make those channels available as 'next free'</c>\");\n    v3 = FLAlertLayer::create_1(\n           (__int64)&a1->FLAlertLayerProtocol,\n           (__int64)\"Reset Unused Colors\",\n           (__int64)__p,\n           (__int64)\"NO\",\n           (__int64)\"YES\",\n           300.0);\n    if ( v5 < 0 )\n      operator delete(__p[0]);\n    ((void (__fastcall *)(FLAlertLayer *, __int64))v3->setTag)(v3, 2);\n    ((void (__fastcall *)(FLAlertLayer *))v3->show)(v3);\n  }\n}", "assembly": "; \n; EditorPauseLayer::onResetUnusedColors from 0x10039deec to 0x10039df8c (160 bytes)\n; \n; 1 xrefs:\n; > EditorPauseLayer::customSetup @ 0x10039c6cc\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\nSUB             SP, SP, #0x40                                          ; +0x0, 0x10039deec\nSTP             X20, X19, [SP,#0x30+var_10]                            ; +0x4, 0x10039def0\nSTP             X29, X30, [SP,#0x30+var_s0]                            ; +0x8, 0x10039def4\nADD             X29, SP, #0x30                                         ; +0xc, 0x10039def8\nLDRB            W8, [X0,#0x230]                                        ; +0x10, 0x10039defc\nTBNZ            W8, #0, loc_10039DF7C                                  ; +0x14, 0x10039df00\nMOV             X19, X0                                                ; +0x18, 0x10039df04\nADRL            X1, aResetAllUnused; \"Reset all unused color channels?\\n<cy>T\"... ; +0x1c, 0x10039df08\nADD             X0, SP, #0x30+__p; int                                 ; +0x24, 0x10039df10\nBL              sub_100009900                                          ; +0x28, 0x10039df14\nADRL            X1, aResetUnusedCol; \"Reset Unused Colors\"             ; +0x2c, 0x10039df18\nADRL            X3, aNo; \"NO\"                                          ; +0x34, 0x10039df20\nADRL            X4, aYes; \"YES\"                                        ; +0x3c, 0x10039df28\nMOV             W8, #0x43960000                                        ; +0x44, 0x10039df30\nFMOV            S0, W8                                                 ; +0x48, 0x10039df34\nADD             X0, X19, #0x228                                        ; +0x4c, 0x10039df38\nADD             X2, SP, #0x30+__p                                      ; +0x50, 0x10039df3c\nBL              FLAlertLayer__create_1                                 ; +0x54, 0x10039df40\nMOV             X19, X0                                                ; +0x58, 0x10039df44\nLDRSB           W8, [SP,#0x30+var_11]                                  ; +0x5c, 0x10039df48\nTBZ             W8, #0x1F, loc_10039DF58                               ; +0x60, 0x10039df4c\nLDR             X0, [SP,#0x30+__p]; __p                                ; +0x64, 0x10039df50\nBL              __ZdlPv; operator delete(void *)                       ; +0x68, 0x10039df54\nLDR             X8, [X19]                                              ; +0x6c, 0x10039df58\nLDR             X8, [X8,#0x48]                                         ; +0x70, 0x10039df5c\nMOV             X0, X19                                                ; +0x74, 0x10039df60\nMOV             W1, #2                                                 ; +0x78, 0x10039df64\nBLR             X8                                                     ; +0x7c, 0x10039df68\nLDR             X8, [X19]                                              ; +0x80, 0x10039df6c\nLDR             X8, [X8,#0x508]                                        ; +0x84, 0x10039df70\nMOV             X0, X19                                                ; +0x88, 0x10039df74\nBLR             X8                                                     ; +0x8c, 0x10039df78\nLDP             X29, X30, [SP,#0x30+var_s0]                            ; +0x90, 0x10039df7c\nLDP             X20, X19, [SP,#0x30+var_10]                            ; +0x94, 0x10039df80\nADD             SP, SP, #0x40 ; '@'                                    ; +0x98, 0x10039df84\nRET                                                                    ; +0x9c, 0x10039df88", "xrefs": ["EditorPauseLayer::customSetup @ 0x10039c6cc"], "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"}