{"type": "func", "start": 5373269824, "end": 5373270045, "name": "SetupSmartTemplateLayer::FLAlert_Clicked", "pseudocode": "// \n// SetupSmartTemplateLayer::FLAlert_Clicked from 0x140459740 to 0x14045981d (221 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x1405f60a0\n// > <???> @ 0x1406daaa8\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\n// Hidden C++ exception states: #wind=1\nvoid SetupSmartTemplateLayer::FLAlert_Clicked(SetupSmartTemplateLayer *a1, FLAlertLayer *a2, bool a3)\n{\n  __int64 v5; // rcx\n  struct cocos2d::CCObject *v6; // rdx\n  __int64 v7; // r8\n  GJSearchObject *v8; // rax\n  LevelBrowserLayer *v9; // rax\n  void *v10; // [rsp+38h] [rbp+10h]\n\n  if ( a2->getTag(a2) == 5 && a3 )\n  {\n    v5 = qword_1406C2EC0;\n    if ( !qword_1406C2EC0 )\n    {\n      v10 = operator new(0x3D0u);\n      qword_1406C2EC0 = sub_140141280((__int64)v10);\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);\n      v5 = qword_1406C2EC0;\n    }\n    v6 = *(struct cocos2d::CCObject **)&a1->m_uID;\n    if ( v6 )\n    {\n      v7 = *(_QWORD *)(v5 + 960);\n      if ( v7 )\n      {\n        if ( *(_DWORD *)(v7 + 200) == v6[3].m_uIndexInArray )\n          *(_QWORD *)(v5 + 960) = 0;\n      }\n      cocos2d::CCArray::removeObject(*(cocos2d::CCArray **)(v5 + 952), v6, 1);\n    }\n    SetupSmartTemplateLayer::onClose((SetupSmartTemplateLayer *)((char *)a1 - 640), v6);\n    v8 = GJSearchObject::create_2(SmartTemplates);\n    v8->m_searchIsOverlay = 1;\n    v9 = LevelBrowserLayer::create(v8);\n    LevelBrowserLayer::show(v9);\n  }\n}", "assembly": "; \n; SetupSmartTemplateLayer::FLAlert_Clicked from 0x140459740 to 0x14045981d (221 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x1405f60a0\n; > <???> @ 0x1406daaa8\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\nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x140459740\npush    rdi                                                            ; +0x5, 0x140459745\nsub     rsp, 20h                                                       ; +0x6, 0x140459746\nmovzx   ebx, r8b                                                       ; +0xa, 0x14045974a\nmov     rdi, rcx                                                       ; +0xe, 0x14045974e\nmov     rax, [rdx]                                                     ; +0x11, 0x140459751\nmov     rcx, rdx                                                       ; +0x14, 0x140459754\ncall    qword ptr [rax+38h]                                            ; +0x17, 0x140459757\ncmp     eax, 5                                                         ; +0x1a, 0x14045975a\njnz     loc_140459812                                                  ; +0x1d, 0x14045975d\ntest    bl, bl                                                         ; +0x23, 0x140459763\njz      loc_140459812                                                  ; +0x25, 0x140459765\nmov     rcx, cs:qword_1406C2EC0                                        ; +0x2b, 0x14045976b\ntest    rcx, rcx                                                       ; +0x32, 0x140459772\njnz     short loc_1404597A6                                            ; +0x35, 0x140459775\nmov     ecx, 3D0h; Size                                                ; +0x37, 0x140459777\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x3c, 0x14045977c\nmov     [rsp+28h+arg_8], rax                                           ; +0x41, 0x140459781\nmov     rcx, rax                                                       ; +0x46, 0x140459786\ncall    sub_140141280                                                  ; +0x49, 0x140459789\nnop                                                                    ; +0x4e, 0x14045978e\nmov     cs:qword_1406C2EC0, rax                                        ; +0x4f, 0x14045978f\nmov     rdx, [rax]                                                     ; +0x56, 0x140459796\nmov     rcx, rax                                                       ; +0x59, 0x140459799\ncall    qword ptr [rdx+48h]                                            ; +0x5c, 0x14045979c\nmov     rcx, cs:qword_1406C2EC0                                        ; +0x5f, 0x14045979f\nmov     rdx, [rdi+8]                                                   ; +0x66, 0x1404597a6\ntest    rdx, rdx                                                       ; +0x6a, 0x1404597aa\njz      short loc_1404597E5                                            ; +0x6d, 0x1404597ad\nmov     r8, [rcx+3C0h]                                                 ; +0x6f, 0x1404597af\ntest    r8, r8                                                         ; +0x76, 0x1404597b6\njz      short loc_1404597D5                                            ; +0x79, 0x1404597b9\nmov     eax, [rdx+0C8h]                                                ; +0x7b, 0x1404597bb\ncmp     [r8+0C8h], eax                                                 ; +0x81, 0x1404597c1\njnz     short loc_1404597D5                                            ; +0x88, 0x1404597c8\nmov     qword ptr [rcx+3C0h], 0                                        ; +0x8a, 0x1404597ca\nmov     r8b, 1                                                         ; +0x95, 0x1404597d5\nmov     rcx, [rcx+3B8h]                                                ; +0x98, 0x1404597d8\ncall    cs:?removeObject@CCArray@cocos2d@@QEAAXPEAVCCObject@2@_N@Z; cocos2d::CCArray::removeObject(cocos2d::CCObject *,bool) ; +0x9f, 0x1404597df\nlea     rcx, [rdi-280h]                                                ; +0xa5, 0x1404597e5\ncall    SetupSmartTemplateLayer__onClose                               ; +0xac, 0x1404597ec\nmov     ecx, 65h ; 'e'                                                 ; +0xb1, 0x1404597f1\ncall    GJSearchObject__create_2                                       ; +0xb6, 0x1404597f6\nmov     byte ptr [rax+1CEh], 1                                         ; +0xbb, 0x1404597fb\nmov     rcx, rax                                                       ; +0xc2, 0x140459802\ncall    LevelBrowserLayer__create                                      ; +0xc5, 0x140459805\nmov     rcx, rax                                                       ; +0xca, 0x14045980a\ncall    LevelBrowserLayer__show                                        ; +0xcd, 0x14045980d\nmov     rbx, [rsp+28h+arg_0]                                           ; +0xd2, 0x140459812\nadd     rsp, 20h                                                       ; +0xd7, 0x140459817\npop     rdi                                                            ; +0xdb, 0x14045981b\nretn                                                                   ; +0xdc, 0x14045981c", "xrefs": ["<???> @ 0x1405f60a0", "<???> @ 0x1406daaa8"], "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"}