{"type": "func", "start": 5372728224, "end": 5372728848, "name": "KeybindingsLayer::dKeybindingsLayer", "pseudocode": "// \n// KeybindingsLayer::dKeybindingsLayer from 0x1403d53a0 to 0x1403d5610 (624 bytes)\n// \n// 3 xrefs:\n// > sub_1403D5610 @ 0x1403d561f\n// > sub_14044C6F0 @ 0x14044c6ff\n// > <???> @ 0x140924998\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:31:36 +0000\n// \n\n// Merged with: KeybindingsLayer::~KeybindingsLayer, LevelBindingsLayer::~LevelBindingsLayer\n__int64 __fastcall KeybindingsLayer::dKeybindingsLayer(__int64 a1)\n{\n  _QWORD *v2; // rax\n  __int64 v3; // rdx\n  __int64 v4; // rbx\n  int *v5; // rax\n  void *v6; // rcx\n  void *v7; // rdx\n  cocos2d::CCObject *v8; // rcx\n  void (__fastcall ***v9)(_QWORD, __int64); // rcx\n  _BYTE v11[16]; // [rsp+30h] [rbp-88h] BYREF\n  void *Block[2]; // [rsp+40h] [rbp-78h] BYREF\n  __m128i si128; // [rsp+50h] [rbp-68h]\n  size_t v14[4]; // [rsp+60h] [rbp-58h] BYREF\n  _QWORD v15[4]; // [rsp+80h] [rbp-38h] BYREF\n\n  *(_QWORD *)a1 = &KeybindingsLayer::`vftable';\n  *(_QWORD *)(a1 + 320) = &KeybindingsLayer::`vftable';\n  *(_QWORD *)(a1 + 328) = &KeybindingsLayer::`vftable';\n  *(_QWORD *)(a1 + 336) = &KeybindingsLayer::`vftable';\n  *(_QWORD *)(a1 + 344) = &KeybindingsLayer::`vftable';\n  *(_QWORD *)(a1 + 352) = &KeybindingsLayer::`vftable';\n  *(_QWORD *)(a1 + 408) = &KeybindingsLayer::`vftable';\n  *(_QWORD *)(a1 + 432) = &KeybindingsLayer::`vftable';\n  *(_QWORD *)(a1 + 544) = &KeybindingsLayer::`vftable';\n  *(_QWORD *)(a1 + 664) = &KeybindingsLayer::`vftable';\n  *(_QWORD *)(a1 + 672) = &KeybindingsLayer::`vftable';\n  if ( *(_QWORD *)(a1 + 1120) && *(int *)(a1 + 1048) >= 0 )\n  {\n    Block[1] = nullptr;\n    Block[0] = sub_14003D460(0x20u);\n    si128 = _mm_load_si128((const __m128i *)&xmmword_140836610);\n    strcpy((char *)Block[0], \"keybindings.tab.\");\n    v2 = sub_1400D2750(v15, *(_DWORD *)(a1 + 1048));\n    sub_140076160((char *)v14, v3, Block, v2);\n    v4 = *(_QWORD *)(a1 + 1120);\n    v5 = sub_140080E00();\n    *(_DWORD *)(*(_QWORD *)sub_1400834C0(v5, (__int64)v11, v14) + 48LL) = *(_DWORD *)(v4 + 436);\n    sub_14003D310((__int64)v14);\n    if ( si128.m128i_i64[1] > 0xFuLL )\n    {\n      v6 = Block[0];\n      if ( (unsigned __int64)(si128.m128i_i64[1] + 1) >= 0x1000 )\n      {\n        v6 = *((void **)Block[0] - 1);\n        if ( (unsigned __int64)((char *)Block[0] - (char *)v6 - 8) > 0x1F )\n          invoke_watson(nullptr, nullptr, nullptr, 0, 0);\n      }\n      j_j_free(v6);\n    }\n    sub_14003D310((__int64)v15);\n  }\n  dword_140909798 = *(_DWORD *)(a1 + 1048);\n  if ( &qword_1408FE4A8 != (void **)(a1 + 1144) )\n  {\n    v7 = (void *)(a1 + 1144);\n    if ( *(_QWORD *)(a1 + 1168) > 0xFu )\n      v7 = *(void **)(a1 + 1144);\n    sub_1400405A0(&qword_1408FE4A8, v7, *(_QWORD *)(a1 + 1160));\n  }\n  v8 = *(cocos2d::CCObject **)(a1 + 1072);\n  if ( v8 )\n    cocos2d::CCObject::release(v8);\n  if ( *(_BYTE *)(a1 + 1088) )\n  {\n    v9 = *(void (__fastcall ****)(_QWORD, __int64))(a1 + 1080);\n    if ( v9 )\n      (**v9)(v9, 1);\n  }\n  sub_14003D310(a1 + 1144);\n  sub_14019EF40((__int64 *)(a1 + 1024));\n  sub_14019F010((__int64 *)(a1 + 1000));\n  return SetupTriggerPopup::dSetupTriggerPopup(a1);\n}", "assembly": "; \n; KeybindingsLayer::dKeybindingsLayer from 0x1403d53a0 to 0x1403d5610 (624 bytes)\n; \n; 3 xrefs:\n; > sub_1403D5610 @ 0x1403d561f\n; > sub_14044C6F0 @ 0x14044c6ff\n; > <???> @ 0x140924998\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:31:36 +0000\n; \nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x1403d53a0\npush    rdi                                                            ; +0x5, 0x1403d53a5\nsub     rsp, 0B0h                                                      ; +0x6, 0x1403d53a6\nmov     rax, cs:__security_cookie                                      ; +0xd, 0x1403d53ad\nxor     rax, rsp                                                       ; +0x14, 0x1403d53b4\nmov     [rsp+0B8h+var_18], rax                                         ; +0x17, 0x1403d53b7\nmov     rdi, rcx                                                       ; +0x1f, 0x1403d53bf\nlea     rax, ??_7KeybindingsLayer@@6B@; const KeybindingsLayer::`vftable' ; +0x22, 0x1403d53c2\nmov     [rcx], rax                                                     ; +0x29, 0x1403d53c9\nlea     rax, ??_7KeybindingsLayer@@6B@_0; const KeybindingsLayer::`vftable' ; +0x2c, 0x1403d53cc\nmov     [rcx+140h], rax                                                ; +0x33, 0x1403d53d3\nlea     rax, ??_7KeybindingsLayer@@6B@_1; const KeybindingsLayer::`vftable' ; +0x3a, 0x1403d53da\nmov     [rcx+148h], rax                                                ; +0x41, 0x1403d53e1\nlea     rax, ??_7KeybindingsLayer@@6B@_2; const KeybindingsLayer::`vftable' ; +0x48, 0x1403d53e8\nmov     [rcx+150h], rax                                                ; +0x4f, 0x1403d53ef\nlea     rax, ??_7KeybindingsLayer@@6B@_3; const KeybindingsLayer::`vftable' ; +0x56, 0x1403d53f6\nmov     [rcx+158h], rax                                                ; +0x5d, 0x1403d53fd\nlea     rax, ??_7KeybindingsLayer@@6B@_4; const KeybindingsLayer::`vftable' ; +0x64, 0x1403d5404\nmov     [rcx+160h], rax                                                ; +0x6b, 0x1403d540b\nlea     rax, ??_7KeybindingsLayer@@6B@_5; const KeybindingsLayer::`vftable' ; +0x72, 0x1403d5412\nmov     [rcx+198h], rax                                                ; +0x79, 0x1403d5419\nlea     rax, ??_7KeybindingsLayer@@6B@_6; const KeybindingsLayer::`vftable' ; +0x80, 0x1403d5420\nmov     [rcx+1B0h], rax                                                ; +0x87, 0x1403d5427\nlea     rax, ??_7KeybindingsLayer@@6B@_7; const KeybindingsLayer::`vftable' ; +0x8e, 0x1403d542e\nmov     [rcx+220h], rax                                                ; +0x95, 0x1403d5435\nlea     rax, ??_7KeybindingsLayer@@6B@_8; const KeybindingsLayer::`vftable' ; +0x9c, 0x1403d543c\nmov     [rcx+298h], rax                                                ; +0xa3, 0x1403d5443\nlea     rax, ??_7KeybindingsLayer@@6B@_9; const KeybindingsLayer::`vftable' ; +0xaa, 0x1403d544a\nmov     [rcx+2A0h], rax                                                ; +0xb1, 0x1403d5451\ncmp     qword ptr [rcx+460h], 0                                        ; +0xb8, 0x1403d5458\njz      loc_1403D5560                                                  ; +0xc0, 0x1403d5460\ncmp     dword ptr [rcx+418h], 0                                        ; +0xc6, 0x1403d5466\njl      loc_1403D5560                                                  ; +0xcd, 0x1403d546d\nmov     [rsp+0B8h+var_70], 0                                           ; +0xd3, 0x1403d5473\nmov     ecx, 20h ; ' '                                                 ; +0xdc, 0x1403d547c\ncall    sub_14003D460                                                  ; +0xe1, 0x1403d5481\nmov     [rsp+0B8h+Block], rax                                          ; +0xe6, 0x1403d5486\nmovdqa  xmm0, cs:xmmword_140836610                                     ; +0xeb, 0x1403d548b\nmovdqu  [rsp+0B8h+var_68], xmm0                                        ; +0xf3, 0x1403d5493\nmovups  xmm0, cs:xmmword_140786890                                     ; +0xf9, 0x1403d5499\nmovups  xmmword ptr [rax], xmm0                                        ; +0x100, 0x1403d54a0\nmov     byte ptr [rax+10h], 0                                          ; +0x103, 0x1403d54a3\nmov     edx, [rdi+418h]                                                ; +0x107, 0x1403d54a7\nlea     rcx, [rsp+0B8h+var_38]                                         ; +0x10d, 0x1403d54ad\ncall    sub_1400D2750                                                  ; +0x115, 0x1403d54b5\nmov     r9, rax                                                        ; +0x11a, 0x1403d54ba\nlea     r8, [rsp+0B8h+Block]                                           ; +0x11d, 0x1403d54bd\nlea     rcx, [rsp+0B8h+var_58]                                         ; +0x122, 0x1403d54c2\ncall    sub_140076160                                                  ; +0x127, 0x1403d54c7\nmov     rbx, [rdi+460h]                                                ; +0x12c, 0x1403d54cc\ncall    sub_140080E00                                                  ; +0x133, 0x1403d54d3\nlea     r8, [rsp+0B8h+var_58]                                          ; +0x138, 0x1403d54d8\nlea     rdx, [rsp+0B8h+var_88]                                         ; +0x13d, 0x1403d54dd\nmov     rcx, rax                                                       ; +0x142, 0x1403d54e2\ncall    sub_1400834C0                                                  ; +0x145, 0x1403d54e5\nmov     rcx, [rax]                                                     ; +0x14a, 0x1403d54ea\nmov     eax, [rbx+1B4h]                                                ; +0x14d, 0x1403d54ed\nmov     [rcx+30h], eax                                                 ; +0x153, 0x1403d54f3\nlea     rcx, [rsp+0B8h+var_58]                                         ; +0x156, 0x1403d54f6\ncall    sub_14003D310                                                  ; +0x15b, 0x1403d54fb\nmov     rdx, qword ptr [rsp+0B8h+var_68+8]                             ; +0x160, 0x1403d5500\ncmp     rdx, 0Fh                                                       ; +0x165, 0x1403d5505\njbe     short loc_1403D5553                                            ; +0x169, 0x1403d5509\ninc     rdx                                                            ; +0x16b, 0x1403d550b\nmov     rcx, [rsp+0B8h+Block]; Block                                   ; +0x16e, 0x1403d550e\nmov     rax, rcx                                                       ; +0x173, 0x1403d5513\ncmp     rdx, 1000h                                                     ; +0x176, 0x1403d5516\njb      short loc_1403D554E                                            ; +0x17d, 0x1403d551d\nadd     rdx, 27h ; '''                                                 ; +0x17f, 0x1403d551f\nmov     rcx, [rcx-8]                                                   ; +0x183, 0x1403d5523\nsub     rax, rcx                                                       ; +0x187, 0x1403d5527\nsub     rax, 8                                                         ; +0x18a, 0x1403d552a\ncmp     rax, 1Fh                                                       ; +0x18e, 0x1403d552e\njbe     short loc_1403D554E                                            ; +0x192, 0x1403d5532\nmov     [rsp+0B8h+Reserved], 0; Reserved                               ; +0x194, 0x1403d5534\nxor     r9d, r9d; LineNo                                               ; +0x19d, 0x1403d553d\nxor     r8d, r8d; FileName                                             ; +0x1a0, 0x1403d5540\nxor     edx, edx; FunctionName                                         ; +0x1a3, 0x1403d5543\nxor     ecx, ecx; Expression                                           ; +0x1a5, 0x1403d5545\ncall    cs:_invoke_watson                                              ; +0x1a7, 0x1403d5547\nalign 2                                                                ; +0x1ad, 0x1403d554d\ncall    j_j_free                                                       ; +0x1ae, 0x1403d554e\nlea     rcx, [rsp+0B8h+var_38]                                         ; +0x1b3, 0x1403d5553\ncall    sub_14003D310                                                  ; +0x1bb, 0x1403d555b\nmov     eax, [rdi+418h]                                                ; +0x1c0, 0x1403d5560\nmov     cs:dword_140909798, eax                                        ; +0x1c6, 0x1403d5566\nlea     rbx, [rdi+478h]                                                ; +0x1cc, 0x1403d556c\nlea     rcx, qword_1408FE4A8; void *                                   ; +0x1d3, 0x1403d5573\ncmp     rcx, rbx                                                       ; +0x1da, 0x1403d557a\njz      short loc_1403D5595                                            ; +0x1dd, 0x1403d557d\nmov     rdx, rbx                                                       ; +0x1df, 0x1403d557f\ncmp     qword ptr [rbx+18h], 0Fh                                       ; +0x1e2, 0x1403d5582\njbe     short loc_1403D558C                                            ; +0x1e7, 0x1403d5587\nmov     rdx, [rbx]; Src                                                ; +0x1e9, 0x1403d5589\nmov     r8, [rbx+10h]; Size                                            ; +0x1ec, 0x1403d558c\ncall    sub_1400405A0                                                  ; +0x1f0, 0x1403d5590\nmov     rcx, [rdi+430h]                                                ; +0x1f5, 0x1403d5595\ntest    rcx, rcx                                                       ; +0x1fc, 0x1403d559c\njz      short loc_1403D55A7                                            ; +0x1ff, 0x1403d559f\ncall    cs:?release@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::release(void) ; +0x201, 0x1403d55a1\ncmp     byte ptr [rdi+440h], 0                                         ; +0x207, 0x1403d55a7\njz      short loc_1403D55C6                                            ; +0x20e, 0x1403d55ae\nmov     rcx, [rdi+438h]                                                ; +0x210, 0x1403d55b0\ntest    rcx, rcx                                                       ; +0x217, 0x1403d55b7\njz      short loc_1403D55C6                                            ; +0x21a, 0x1403d55ba\nmov     rax, [rcx]                                                     ; +0x21c, 0x1403d55bc\nmov     edx, 1                                                         ; +0x21f, 0x1403d55bf\ncall    qword ptr [rax]                                                ; +0x224, 0x1403d55c4\nmov     rcx, rbx                                                       ; +0x226, 0x1403d55c6\ncall    sub_14003D310                                                  ; +0x229, 0x1403d55c9\nlea     rcx, [rdi+400h]                                                ; +0x22e, 0x1403d55ce\ncall    sub_14019EF40                                                  ; +0x235, 0x1403d55d5\nlea     rcx, [rdi+3E8h]                                                ; +0x23a, 0x1403d55da\ncall    sub_14019F010                                                  ; +0x241, 0x1403d55e1\nmov     rcx, rdi                                                       ; +0x246, 0x1403d55e6\ncall    SetupTriggerPopup__dSetupTriggerPopup; Merged with: SetupTriggerPopup::~SetupTriggerPopup, AutoBackupOptionsPopup::~AutoBackupOptionsPopup, ClearPlatformerSavesOptionsPopup::~ClearPlatformerSavesOptionsPopup, ControlSlotsPopup::~ControlSlotsPopup, CustomizeObjectSettingsPopup::~CustomizeObjectSettingsPopup, DeathMarkerSettingsPopup::~DeathMarkerSettingsPopup, DeathTrackerOptionsPopup::~DeathTrackerOptionsPopup, EditorSFXSettingsPopup::~EditorSFXSettingsPopup, MoveStepPopup::~MoveStepPopup, MultiTriggerPopup::~MultiTriggerPopup, NotificationFilterPopup::~NotificationFilterPopup, ReviewChoiceSheet::~ReviewChoiceSheet, SetupAdvFollowEditPhysicsPopup::~SetupAdvFollowEditPhysicsPopup, SetupAdvFollowPopup::~SetupAdvFollowPopup, SetupAdvFollowRetargetPopup::~SetupAdvFollowRetargetPopup, SetupAnimSettingsPopup::~SetupAnimSettingsPopup, SetupArtSwitchPopup::~SetupArtSwitchPopup, SetupAudioLineGuidePopup::~SetupAudioLineGuidePopup, SetupCameraGuidePopup::~SetupCameraGuidePopup, SetupCameraRotatePopup2::~SetupCameraRotatePopup2, SetupCoinLayer::~SetupCoinLay ; +0x249, 0x1403d55e9\nnop                                                                    ; +0x24e, 0x1403d55ee\nmov     rcx, [rsp+0B8h+var_18]                                         ; +0x24f, 0x1403d55ef\nxor     rcx, rsp; StackCookie                                          ; +0x257, 0x1403d55f7\ncall    __security_check_cookie                                        ; +0x25a, 0x1403d55fa\nmov     rbx, [rsp+0B8h+arg_8]                                          ; +0x25f, 0x1403d55ff\nadd     rsp, 0B0h                                                      ; +0x267, 0x1403d5607\npop     rdi                                                            ; +0x26e, 0x1403d560e\nretn                                                                   ; +0x26f, 0x1403d560f", "xrefs": ["sub_1403D5610 @ 0x1403d561f", "sub_14044C6F0 @ 0x14044c6ff", "<???> @ 0x140924998"], "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"}