{"type": "func", "start": 4297052304, "end": 4297052649, "name": "EditLevelLayer::onBack", "pseudocode": "// \n// EditLevelLayer::onBack from 0x1001fd090 to 0x1001fd1e9 (345 bytes)\n// \n// 5 xrefs:\n// > EditLevelLayer::onDelete @ 0x1001fe118\n// > EditLevelLayer::FLAlert_Clicked @ 0x1001fe188\n// > EditLevelLayer::keyBackClicked @ 0x1001fe605\n// > sub_1001FE610 @ 0x1001fe61c\n// > EditLevelLayer::init @ 0x1001fb83d\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 EditLevelLayer::onBack(EditLevelLayer *a1, cocos2d::CCObject *a2)\n{\n  double v2; // xmm0_8\n  unsigned int v3; // r14d\n  __int64 v4; // rax\n  GameLevelManager *v5; // rbx\n  GameLevelManager *v6; // rax\n  std::string *p_m_searchKey; // rax\n  const char *v8; // rsi\n  cocos2d::CCScene *SearchScene; // rbx\n  GJSearchObject *v10; // rax\n  cocos2d::CCDirector *v11; // r14\n  cocos2d::CCTransitionFade *v12; // rax\n  __int128 v13; // [rsp+0h] [rbp-30h] BYREF\n  void *__p; // [rsp+10h] [rbp-20h]\n\n  if ( cocos2d::CCDirector::sharedDirector()->m_bIsTransitioning )\n    return;\n  if ( (unsigned int)sub_100720070(a1->m_textInputs) )\n  {\n    v3 = 0;\n    do\n    {\n      v4 = sub_1007200C0(a1->m_textInputs, v3);\n      (*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v4 + 1144LL))(v4, 0);\n      ++v3;\n    }\n    while ( v3 < (unsigned int)sub_100720070(a1->m_textInputs) );\n  }\n  EditLevelLayer::verifyLevelName(a1);\n  ((void (__fastcall *)(EditLevelLayer *, _QWORD))a1->setKeypadEnabled)(a1, 0);\n  v5 = GameLevelManager::sharedState();\n  v6 = GameLevelManager::sharedState();\n  if ( (v6->m_searchKey.m_data.m_short.sizex2 & 1) != 0 )\n  {\n    sub_100006B70(&v13, v6->m_searchKey.m_data.m_long.longStorage, v6->m_searchKey.m_data.m_long.size, v2);\n    if ( (v13 & 1) == 0 )\n      goto LABEL_7;\nLABEL_9:\n    v8 = (const char *)__p;\n    goto LABEL_10;\n  }\n  p_m_searchKey = &v6->m_searchKey;\n  __p = p_m_searchKey->m_data.m_long.longStorage;\n  v13 = *(_OWORD *)&p_m_searchKey->m_data.m_short.sizex2;\n  if ( (v13 & 1) != 0 )\n    goto LABEL_9;\nLABEL_7:\n  v8 = (char *)&v13 + 1;\nLABEL_10:\n  SearchScene = GameLevelManager::getSearchScene(v5, v8);\n  if ( (v13 & 1) != 0 )\n    operator delete(__p);\n  if ( GameLevelManager::sharedState()->m_returnToLocalLevels || !SearchScene )\n  {\n    GameLevelManager::sharedState()->m_returnToLocalLevels = 0;\n    v10 = GJSearchObject::create_2(MyLevels);\n    SearchScene = LevelBrowserLayer::scene(v10);\n  }\n  v11 = cocos2d::CCDirector::sharedDirector();\n  v12 = cocos2d::CCTransitionFade::create_1(0.5, SearchScene);\n  cocos2d::CCDirector::replaceScene(v11, v12);\n}", "assembly": "; \n; EditLevelLayer::onBack from 0x1001fd090 to 0x1001fd1e9 (345 bytes)\n; \n; 5 xrefs:\n; > EditLevelLayer::onDelete @ 0x1001fe118\n; > EditLevelLayer::FLAlert_Clicked @ 0x1001fe188\n; > EditLevelLayer::keyBackClicked @ 0x1001fe605\n; > sub_1001FE610 @ 0x1001fe61c\n; > EditLevelLayer::init @ 0x1001fb83d\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    rbp                                                            ; +0x0, 0x1001fd090\nmov     rbp, rsp                                                       ; +0x1, 0x1001fd091\npush    r14                                                            ; +0x4, 0x1001fd094\npush    rbx                                                            ; +0x6, 0x1001fd096\nsub     rsp, 20h                                                       ; +0x7, 0x1001fd097\nmov     rbx, rdi                                                       ; +0xb, 0x1001fd09b\ncall    cocos2d__CCDirector__sharedDirector                            ; +0xe, 0x1001fd09e\ncmp     byte ptr [rax+0A8h], 0                                         ; +0x13, 0x1001fd0a3\njnz     loc_1001FD1E0                                                  ; +0x1a, 0x1001fd0aa\nmov     rdi, [rbx+1D0h]                                                ; +0x20, 0x1001fd0b0\ncall    sub_100720070                                                  ; +0x27, 0x1001fd0b7\ntest    eax, eax                                                       ; +0x2c, 0x1001fd0bc\njz      short loc_1001FD101                                            ; +0x2e, 0x1001fd0be\nxor     r14d, r14d                                                     ; +0x30, 0x1001fd0c0\nnop     word ptr [rax+rax+00000000h]                                   ; +0x33, 0x1001fd0c3\nmov     rdi, [rbx+1D0h]                                                ; +0x40, 0x1001fd0d0\nmov     esi, r14d                                                      ; +0x47, 0x1001fd0d7\ncall    sub_1007200C0                                                  ; +0x4a, 0x1001fd0da\nmov     rcx, [rax]                                                     ; +0x4f, 0x1001fd0df\nmov     rdi, rax                                                       ; +0x52, 0x1001fd0e2\nxor     esi, esi                                                       ; +0x55, 0x1001fd0e5\ncall    qword ptr [rcx+478h]                                           ; +0x57, 0x1001fd0e7\ninc     r14d                                                           ; +0x5d, 0x1001fd0ed\nmov     rdi, [rbx+1D0h]                                                ; +0x60, 0x1001fd0f0\ncall    sub_100720070                                                  ; +0x67, 0x1001fd0f7\ncmp     r14d, eax                                                      ; +0x6c, 0x1001fd0fc\njb      short loc_1001FD0D0                                            ; +0x6f, 0x1001fd0ff\nmov     rdi, rbx                                                       ; +0x71, 0x1001fd101\ncall    EditLevelLayer__verifyLevelName                                ; +0x74, 0x1001fd104\nmov     rax, [rbx]                                                     ; +0x79, 0x1001fd109\nmov     rdi, rbx                                                       ; +0x7c, 0x1001fd10c\nxor     esi, esi                                                       ; +0x7f, 0x1001fd10f\ncall    qword ptr [rax+420h]                                           ; +0x81, 0x1001fd111\ncall    GameLevelManager__sharedState                                  ; +0x87, 0x1001fd117\nmov     rbx, rax                                                       ; +0x8c, 0x1001fd11c\ncall    GameLevelManager__sharedState                                  ; +0x8f, 0x1001fd11f\ntest    byte ptr [rax+290h], 1                                         ; +0x94, 0x1001fd124\njnz     short loc_1001FD14E                                            ; +0x9b, 0x1001fd12b\nadd     rax, 290h                                                      ; +0x9d, 0x1001fd12d\nmov     rcx, [rax+10h]                                                 ; +0xa3, 0x1001fd133\nmov     [rbp+__p], rcx                                                 ; +0xa7, 0x1001fd137\nmovups  xmm0, xmmword ptr [rax]                                        ; +0xab, 0x1001fd13b\nmovaps  [rbp+var_30], xmm0                                             ; +0xae, 0x1001fd13e\ntest    byte ptr [rbp+var_30], 1                                       ; +0xb2, 0x1001fd142\njnz     short loc_1001FD16B                                            ; +0xb6, 0x1001fd146\nlea     rsi, [rbp+var_30+1]                                            ; +0xb8, 0x1001fd148\njmp     short loc_1001FD16F                                            ; +0xbc, 0x1001fd14c\nmov     rdx, [rax+298h]                                                ; +0xbe, 0x1001fd14e\nmov     rsi, [rax+2A0h]                                                ; +0xc5, 0x1001fd155\nlea     rdi, [rbp+var_30]                                              ; +0xcc, 0x1001fd15c\ncall    sub_100006B70                                                  ; +0xd0, 0x1001fd160\ntest    byte ptr [rbp+var_30], 1                                       ; +0xd5, 0x1001fd165\njz      short loc_1001FD148                                            ; +0xd9, 0x1001fd169\nmov     rsi, [rbp+__p]                                                 ; +0xdb, 0x1001fd16b\nmov     rdi, rbx                                                       ; +0xdf, 0x1001fd16f\ncall    GameLevelManager__getSearchScene                               ; +0xe2, 0x1001fd172\nmov     rbx, rax                                                       ; +0xe7, 0x1001fd177\ntest    byte ptr [rbp+var_30], 1                                       ; +0xea, 0x1001fd17a\njz      short loc_1001FD189                                            ; +0xee, 0x1001fd17e\nmov     rdi, [rbp+__p]; __p                                            ; +0xf0, 0x1001fd180\ncall    __ZdlPv; operator delete(void *)                               ; +0xf4, 0x1001fd184\ncall    GameLevelManager__sharedState                                  ; +0xf9, 0x1001fd189\ncmp     byte ptr [rax+2C8h], 0                                         ; +0xfe, 0x1001fd18e\njnz     short loc_1001FD19C                                            ; +0x105, 0x1001fd195\ntest    rbx, rbx                                                       ; +0x107, 0x1001fd197\njnz     short loc_1001FD1BD                                            ; +0x10a, 0x1001fd19a\ncall    GameLevelManager__sharedState                                  ; +0x10c, 0x1001fd19c\nmov     byte ptr [rax+2C8h], 0                                         ; +0x111, 0x1001fd1a1\nmov     edi, 62h ; 'b'                                                 ; +0x118, 0x1001fd1a8\ncall    GJSearchObject__create_2                                       ; +0x11d, 0x1001fd1ad\nmov     rdi, rax                                                       ; +0x122, 0x1001fd1b2\ncall    LevelBrowserLayer__scene                                       ; +0x125, 0x1001fd1b5\nmov     rbx, rax                                                       ; +0x12a, 0x1001fd1ba\ncall    cocos2d__CCDirector__sharedDirector                            ; +0x12d, 0x1001fd1bd\nmov     r14, rax                                                       ; +0x132, 0x1001fd1c2\nmovss   xmm0, cs:dword_100814FA8                                       ; +0x135, 0x1001fd1c5\nmov     rdi, rbx                                                       ; +0x13d, 0x1001fd1cd\ncall    cocos2d__CCTransitionFade__create_1                            ; +0x140, 0x1001fd1d0\nmov     rdi, r14                                                       ; +0x145, 0x1001fd1d5\nmov     rsi, rax                                                       ; +0x148, 0x1001fd1d8\ncall    cocos2d__CCDirector__replaceScene                              ; +0x14b, 0x1001fd1db\nadd     rsp, 20h                                                       ; +0x150, 0x1001fd1e0\npop     rbx                                                            ; +0x154, 0x1001fd1e4\npop     r14                                                            ; +0x155, 0x1001fd1e5\npop     rbp                                                            ; +0x157, 0x1001fd1e7\nretn                                                                   ; +0x158, 0x1001fd1e8", "xrefs": ["EditLevelLayer::onDelete @ 0x1001fe118", "EditLevelLayer::FLAlert_Clicked @ 0x1001fe188", "EditLevelLayer::keyBackClicked @ 0x1001fe605", "sub_1001FE610 @ 0x1001fe61c", "EditLevelLayer::init @ 0x1001fb83d"], "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"}