{"type": "func", "start": 5373216128, "end": 5373216484, "name": "LevelBindingsLayer::create", "pseudocode": "// \n// LevelBindingsLayer::create from 0x14044c580 to 0x14044c6e4 (356 bytes)\n// \n// 3 xrefs:\n// > PlatformerControlsPopup::onKeyboard @ 0x140451840\n// > PlatformerControlsPopup::onController @ 0x1404518a0\n// > <???> @ 0x1409274e8\n// \n// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 11:32:25 +0000\n// \n\n// Hidden C++ exception states: #wind=1\nvoid *__fastcall LevelBindingsLayer::create(__int64 a1, char a2)\n{\n  void *v4; // rbx\n  __int64 v5; // r8\n  int v6; // r9d\n\n  v4 = operator new(0x4B0u);\n  memset(v4, 0, 0x4B0u);\n  sub_1403D56D0((__int64)v4);\n  *(_QWORD *)v4 = &LevelBindingsLayer::`vftable';\n  *((_QWORD *)v4 + 40) = &LevelBindingsLayer::`vftable';\n  *((_QWORD *)v4 + 41) = &LevelBindingsLayer::`vftable';\n  *((_QWORD *)v4 + 42) = &LevelBindingsLayer::`vftable';\n  *((_QWORD *)v4 + 43) = &LevelBindingsLayer::`vftable';\n  *((_QWORD *)v4 + 44) = &LevelBindingsLayer::`vftable';\n  *((_QWORD *)v4 + 51) = &LevelBindingsLayer::`vftable';\n  *((_QWORD *)v4 + 54) = &LevelBindingsLayer::`vftable';\n  *((_QWORD *)v4 + 68) = &LevelBindingsLayer::`vftable';\n  *((_QWORD *)v4 + 83) = &LevelBindingsLayer::`vftable';\n  *((_QWORD *)v4 + 84) = &LevelBindingsLayer::`vftable';\n  *((_BYTE *)v4 + 1193) = 0;\n  *((_QWORD *)v4 + 148) = a1;\n  *((_BYTE *)v4 + 1192) = a2;\n  *((_QWORD *)v4 + 135) = a1;\n  *((_BYTE *)v4 + 1088) = 0;\n  if ( !*(_QWORD *)(a1 + 16) )\n  {\n    LevelControlConfig::bindGlobalBinds(a1, a2);\n    *((_BYTE *)v4 + 1193) = 1;\n  }\n  *(_BYTE *)(*((_QWORD *)v4 + 148) + 24LL) = 0;\n  if ( KeybindingsLayer::init((__int64 *)v4, nullptr, v5, v6) )\n  {\n    cocos2d::CCObject::autorelease((cocos2d::CCObject *)v4);\n    return v4;\n  }\n  else\n  {\n    (*(void (__fastcall **)(void *, __int64))(*(_QWORD *)v4 + 8LL))(v4, 1);\n    return nullptr;\n  }\n}", "assembly": "; \n; LevelBindingsLayer::create from 0x14044c580 to 0x14044c6e4 (356 bytes)\n; \n; 3 xrefs:\n; > PlatformerControlsPopup::onKeyboard @ 0x140451840\n; > PlatformerControlsPopup::onController @ 0x1404518a0\n; > <???> @ 0x1409274e8\n; \n; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 11:32:25 +0000\n; \nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x14044c580\nmov     [rsp+arg_8], rsi                                               ; +0x5, 0x14044c585\npush    rdi                                                            ; +0xa, 0x14044c58a\nsub     rsp, 20h                                                       ; +0xb, 0x14044c58b\nmovzx   esi, dl                                                        ; +0xf, 0x14044c58f\nmov     rdi, rcx                                                       ; +0x12, 0x14044c592\nmov     ecx, 4B0h; Size                                                ; +0x15, 0x14044c595\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x1a, 0x14044c59a\nmov     rbx, rax                                                       ; +0x1f, 0x14044c59f\nmov     [rsp+28h+arg_10], rax                                          ; +0x22, 0x14044c5a2\nxor     edx, edx; Val                                                  ; +0x27, 0x14044c5a7\nmov     r8d, 4B0h; Size                                                ; +0x29, 0x14044c5a9\nmov     rcx, rax; void *                                               ; +0x2f, 0x14044c5af\ncall    memset                                                         ; +0x32, 0x14044c5b2\nmov     rcx, rbx                                                       ; +0x37, 0x14044c5b7\ncall    sub_1403D56D0                                                  ; +0x3a, 0x14044c5ba\nlea     rax, ??_7LevelBindingsLayer@@6B@; const LevelBindingsLayer::`vftable' ; +0x3f, 0x14044c5bf\nmov     [rbx], rax                                                     ; +0x46, 0x14044c5c6\nlea     rax, ??_7LevelBindingsLayer@@6B@_0; const LevelBindingsLayer::`vftable' ; +0x49, 0x14044c5c9\nmov     [rbx+140h], rax                                                ; +0x50, 0x14044c5d0\nlea     rax, ??_7LevelBindingsLayer@@6B@_1; const LevelBindingsLayer::`vftable' ; +0x57, 0x14044c5d7\nmov     [rbx+148h], rax                                                ; +0x5e, 0x14044c5de\nlea     rax, ??_7LevelBindingsLayer@@6B@_2; const LevelBindingsLayer::`vftable' ; +0x65, 0x14044c5e5\nmov     [rbx+150h], rax                                                ; +0x6c, 0x14044c5ec\nlea     rax, ??_7LevelBindingsLayer@@6B@_3; const LevelBindingsLayer::`vftable' ; +0x73, 0x14044c5f3\nmov     [rbx+158h], rax                                                ; +0x7a, 0x14044c5fa\nlea     rax, ??_7LevelBindingsLayer@@6B@_4; const LevelBindingsLayer::`vftable' ; +0x81, 0x14044c601\nmov     [rbx+160h], rax                                                ; +0x88, 0x14044c608\nlea     rax, ??_7LevelBindingsLayer@@6B@_5; const LevelBindingsLayer::`vftable' ; +0x8f, 0x14044c60f\nmov     [rbx+198h], rax                                                ; +0x96, 0x14044c616\nlea     rax, ??_7LevelBindingsLayer@@6B@_6; const LevelBindingsLayer::`vftable' ; +0x9d, 0x14044c61d\nmov     [rbx+1B0h], rax                                                ; +0xa4, 0x14044c624\nlea     rax, ??_7LevelBindingsLayer@@6B@_7; const LevelBindingsLayer::`vftable' ; +0xab, 0x14044c62b\nmov     [rbx+220h], rax                                                ; +0xb2, 0x14044c632\nlea     rax, ??_7LevelBindingsLayer@@6B@_8; const LevelBindingsLayer::`vftable' ; +0xb9, 0x14044c639\nmov     [rbx+298h], rax                                                ; +0xc0, 0x14044c640\nlea     rax, ??_7LevelBindingsLayer@@6B@_9; const LevelBindingsLayer::`vftable' ; +0xc7, 0x14044c647\nmov     [rbx+2A0h], rax                                                ; +0xce, 0x14044c64e\nmov     byte ptr [rbx+4A9h], 0                                         ; +0xd5, 0x14044c655\nmov     [rbx+4A0h], rdi                                                ; +0xdc, 0x14044c65c\nmov     [rbx+4A8h], sil                                                ; +0xe3, 0x14044c663\nmov     [rbx+438h], rdi                                                ; +0xea, 0x14044c66a\nmov     byte ptr [rbx+440h], 0                                         ; +0xf1, 0x14044c671\ncmp     qword ptr [rdi+10h], 0                                         ; +0xf8, 0x14044c678\njnz     short loc_14044C692                                            ; +0xfd, 0x14044c67d\nmovzx   edx, sil                                                       ; +0xff, 0x14044c67f\nmov     rcx, rdi                                                       ; +0x103, 0x14044c683\ncall    LevelControlConfig__bindGlobalBinds                            ; +0x106, 0x14044c686\nmov     byte ptr [rbx+4A9h], 1                                         ; +0x10b, 0x14044c68b\nmov     rcx, [rbx+4A0h]                                                ; +0x112, 0x14044c692\nmov     byte ptr [rcx+18h], 0                                          ; +0x119, 0x14044c699\nxor     edx, edx                                                       ; +0x11d, 0x14044c69d\nmov     rcx, rbx                                                       ; +0x11f, 0x14044c69f\ncall    KeybindingsLayer__init                                         ; +0x122, 0x14044c6a2\nmov     rcx, rbx                                                       ; +0x127, 0x14044c6a7\ntest    al, al                                                         ; +0x12a, 0x14044c6aa\njz      short loc_14044C6C7                                            ; +0x12c, 0x14044c6ac\ncall    cs:?autorelease@CCObject@cocos2d@@QEAAPEAV12@XZ; cocos2d::CCObject::autorelease(void) ; +0x12e, 0x14044c6ae\nmov     rax, rbx                                                       ; +0x134, 0x14044c6b4\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x137, 0x14044c6b7\nmov     rsi, [rsp+28h+arg_8]                                           ; +0x13c, 0x14044c6bc\nadd     rsp, 20h                                                       ; +0x141, 0x14044c6c1\npop     rdi                                                            ; +0x145, 0x14044c6c5\nretn                                                                   ; +0x146, 0x14044c6c6\nmov     rax, [rbx]                                                     ; +0x147, 0x14044c6c7\nmov     edx, 1                                                         ; +0x14a, 0x14044c6ca\ncall    qword ptr [rax+8]                                              ; +0x14f, 0x14044c6cf\nxor     eax, eax                                                       ; +0x152, 0x14044c6d2\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x154, 0x14044c6d4\nmov     rsi, [rsp+28h+arg_8]                                           ; +0x159, 0x14044c6d9\nadd     rsp, 20h                                                       ; +0x15e, 0x14044c6de\npop     rdi                                                            ; +0x162, 0x14044c6e2\nretn                                                                   ; +0x163, 0x14044c6e3", "xrefs": ["PlatformerControlsPopup::onKeyboard @ 0x140451840", "PlatformerControlsPopup::onController @ 0x1404518a0", "<???> @ 0x1409274e8"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}