{"type": "func", "start": 5371665728, "end": 5371665859, "name": "LevelEditorLayer::create", "pseudocode": "// \n// LevelEditorLayer::create from 0x1402d1d40 to 0x1402d1dc3 (131 bytes)\n// \n// 3 xrefs:\n// > EditLevelLayer::onEdit @ 0x1400d83f8\n// > GJGameLoadingLayer::loadLevel @ 0x140249045\n// > <???> @ 0x1406d2f18\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\nLevelEditorLayer *LevelEditorLayer::create(GJGameLevel *a1, bool a2)\n{\n  LevelEditorLayer *v4; // rax\n  LevelEditorLayer *v5; // rbx\n  LevelEditorLayer *v7; // [rsp+40h] [rbp+18h]\n\n  v7 = (LevelEditorLayer *)operator new(0x3B60u);\n  v4 = LevelEditorLayer::LevelEditorLayer(v7);\n  v5 = v4;\n  if ( v4 )\n  {\n    if ( LevelEditorLayer::init(v4, a1, a2) )\n    {\n      cocos2d::CCObject::autorelease(v5);\n      return v5;\n    }\n    ((void (__fastcall *)(LevelEditorLayer *, __int64))v5->~LevelEditorLayer)(v5, 1);\n    return nullptr;\n  }\n  return v5;\n}", "assembly": "; \n; LevelEditorLayer::create from 0x1402d1d40 to 0x1402d1dc3 (131 bytes)\n; \n; 3 xrefs:\n; > EditLevelLayer::onEdit @ 0x1400d83f8\n; > GJGameLoadingLayer::loadLevel @ 0x140249045\n; > <???> @ 0x1406d2f18\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, 0x1402d1d40\nmov     [rsp+arg_8], rsi                                               ; +0x5, 0x1402d1d45\npush    rdi                                                            ; +0xa, 0x1402d1d4a\nsub     rsp, 20h                                                       ; +0xb, 0x1402d1d4b\nmovzx   edi, dl                                                        ; +0xf, 0x1402d1d4f\nmov     rsi, rcx                                                       ; +0x12, 0x1402d1d52\nmov     ecx, 3B60h; Size                                               ; +0x15, 0x1402d1d55\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x1a, 0x1402d1d5a\nmov     [rsp+28h+arg_10], rax                                          ; +0x1f, 0x1402d1d5f\nmov     rcx, rax                                                       ; +0x24, 0x1402d1d64\ncall    LevelEditorLayer__LevelEditorLayer                             ; +0x27, 0x1402d1d67\nmov     rbx, rax                                                       ; +0x2c, 0x1402d1d6c\ntest    rax, rax                                                       ; +0x2f, 0x1402d1d6f\njz      short loc_1402D1DB0                                            ; +0x32, 0x1402d1d72\nmovzx   r8d, dil                                                       ; +0x34, 0x1402d1d74\nmov     rdx, rsi                                                       ; +0x38, 0x1402d1d78\nmov     rcx, rax                                                       ; +0x3b, 0x1402d1d7b\ncall    LevelEditorLayer__init                                         ; +0x3e, 0x1402d1d7e\nmov     rcx, rbx                                                       ; +0x43, 0x1402d1d83\ntest    al, al                                                         ; +0x46, 0x1402d1d86\njz      short loc_1402D1DA3                                            ; +0x48, 0x1402d1d88\ncall    cs:?autorelease@CCObject@cocos2d@@QEAAPEAV12@XZ; cocos2d::CCObject::autorelease(void) ; +0x4a, 0x1402d1d8a\nmov     rax, rbx                                                       ; +0x50, 0x1402d1d90\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x53, 0x1402d1d93\nmov     rsi, [rsp+28h+arg_8]                                           ; +0x58, 0x1402d1d98\nadd     rsp, 20h                                                       ; +0x5d, 0x1402d1d9d\npop     rdi                                                            ; +0x61, 0x1402d1da1\nretn                                                                   ; +0x62, 0x1402d1da2\nmov     rax, [rbx]                                                     ; +0x63, 0x1402d1da3\nmov     edx, 1                                                         ; +0x66, 0x1402d1da6\ncall    qword ptr [rax+8]                                              ; +0x6b, 0x1402d1dab\nxor     ebx, ebx                                                       ; +0x6e, 0x1402d1dae\nmov     rax, rbx                                                       ; +0x70, 0x1402d1db0\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x73, 0x1402d1db3\nmov     rsi, [rsp+28h+arg_8]                                           ; +0x78, 0x1402d1db8\nadd     rsp, 20h                                                       ; +0x7d, 0x1402d1dbd\npop     rdi                                                            ; +0x81, 0x1402d1dc1\nretn                                                                   ; +0x82, 0x1402d1dc2", "xrefs": ["EditLevelLayer::onEdit @ 0x1400d83f8", "GJGameLoadingLayer::loadLevel @ 0x140249045", "<???> @ 0x1406d2f18"], "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"}