{"type": "func", "start": 5371602496, "end": 5371603228, "name": "GameSettingsLayer::create", "pseudocode": "// \n// GameSettingsLayer::create from 0x1402c2640 to 0x1402c291c (732 bytes)\n// \n// 4 xrefs:\n// > EditorPauseLayer::onOptions @ 0x1401822d0\n// > OptionsLayer::onOptions @ 0x1404cbc38\n// > PauseLayer::onSideButtonPressed @ 0x1404d95a2\n// > <???> @ 0x14091db88\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:29:20 +0000\n// \n\n// Hidden C++ exception states: #wind=4\nunsigned __int64 *__fastcall GameSettingsLayer::create(unsigned __int64 a1, unsigned int a2)\n{\n  unsigned __int64 *v4; // rdi\n  _QWORD *v5; // rax\n  int v6; // r9d\n  __int64 v7; // rax\n  unsigned __int64 v8; // r9\n  char *v10; // [rsp+78h] [rbp+20h] BYREF\n\n  v4 = (unsigned __int64 *)operator new(0x4A8u);\n  memset(v4, 0, 0x4A8u);\n  sub_14019CC00((__int64)v4);\n  *v4 = (unsigned __int64)&GameSettingsLayer::`vftable';\n  v4[40] = (unsigned __int64)&GameSettingsLayer::`vftable';\n  v4[41] = (unsigned __int64)&GameSettingsLayer::`vftable';\n  v4[42] = (unsigned __int64)&GameSettingsLayer::`vftable';\n  v4[43] = (unsigned __int64)&GameSettingsLayer::`vftable';\n  v4[44] = (unsigned __int64)&GameSettingsLayer::`vftable';\n  v4[51] = (unsigned __int64)&GameSettingsLayer::`vftable';\n  v4[54] = (unsigned __int64)&GameSettingsLayer::`vftable';\n  v4[68] = (unsigned __int64)&GameSettingsLayer::`vftable';\n  v4[83] = (unsigned __int64)&GameSettingsLayer::`vftable';\n  v4[84] = (unsigned __int64)&GameSettingsLayer::`vftable';\n  v4[134] = (unsigned __int64)&GameSettingsLayer::`vftable';\n  v4[135] = 0;\n  v10 = (char *)(v4 + 136);\n  *((_DWORD *)v4 + 272) = 0;\n  v4[137] = 0;\n  v4[138] = 0;\n  v5 = operator new(0x20u);\n  *v5 = v5;\n  v5[1] = v5;\n  v4[137] = (unsigned __int64)v5;\n  v4[139] = 0;\n  v4[140] = 0;\n  v4[141] = 0;\n  v4[142] = 7;\n  v4[143] = 8;\n  *((_DWORD *)v4 + 272) = 1065353216;\n  sub_14003F200((__int64)(v4 + 139), 0x10u, v4[137]);\n  v4[144] = 0;\n  *((_DWORD *)v4 + 290) = 0;\n  v4[146] = 0;\n  v4[147] = 0;\n  *((_WORD *)v4 + 592) = 0;\n  if ( (unsigned __int8)SetupTriggerPopup::init((_DWORD)v4, 0, 0, v6, 1133248512, 7, 0) )\n  {\n    v4[135] = a1;\n    *((_BYTE *)v4 + 744) = 1;\n    (*(void (__fastcall **)(unsigned __int64 *))(*v4 + 1096))(v4);\n    qmemcpy(&v10, \"PWi\", 3);\n    v7 = (*(__int64 (__fastcall **)(unsigned __int64, __int64))(*(_QWORD *)v4[73] + 472LL))(v4[73], 3);\n    if ( v7 )\n      (**(void (__fastcall ***)(__int64, char **))(v7 + 320))(v7 + 320, &v10);\n    *((_BYTE *)v4 + 596) = 1;\n    TabbedPopupLayer::addCloseButton(v4);\n    GameSettingsLayer::setupTabs(v4);\n    GameSettingsLayer::buildTabContent(v4);\n    GameSettingsLayer::addSpecialContent(v4);\n    (*(void (__fastcall **)(unsigned __int64 *))(*v4 + 1136))(v4);\n    *((_BYTE *)v4 + 744) = 0;\n    if ( dword_1408FE478 >= 0 )\n    {\n      v8 = v4[125];\n      if ( dword_1408FE478 < (int)((__int64)(v4[126] - v8) / 88) )\n      {\n        a2 = dword_1408FE478;\n        *(_DWORD *)(88LL * dword_1408FE478 + v8 + 68) = dword_14090BFC4;\n      }\n    }\n    (*(void (__fastcall **)(unsigned __int64 *, _QWORD))(*v4 + 1200))(v4, a2);\n    cocos2d::CCObject::autorelease((cocos2d::CCObject *)v4);\n    return v4;\n  }\n  else\n  {\n    (*(void (__fastcall **)(unsigned __int64 *, __int64))(*v4 + 8))(v4, 1);\n    return nullptr;\n  }\n}", "assembly": "; \n; GameSettingsLayer::create from 0x1402c2640 to 0x1402c291c (732 bytes)\n; \n; 4 xrefs:\n; > EditorPauseLayer::onOptions @ 0x1401822d0\n; > OptionsLayer::onOptions @ 0x1404cbc38\n; > PauseLayer::onSideButtonPressed @ 0x1404d95a2\n; > <???> @ 0x14091db88\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:29:20 +0000\n; \nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x1402c2640\nmov     [rsp+arg_8], rbp                                               ; +0x5, 0x1402c2645\npush    rsi                                                            ; +0xa, 0x1402c264a\npush    rdi                                                            ; +0xb, 0x1402c264b\npush    r14                                                            ; +0xc, 0x1402c264c\nsub     rsp, 40h                                                       ; +0xe, 0x1402c264e\nmov     esi, edx                                                       ; +0x12, 0x1402c2652\nmov     rbp, rcx                                                       ; +0x14, 0x1402c2654\nmov     ecx, 4A8h; Size                                                ; +0x17, 0x1402c2657\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x1c, 0x1402c265c\nmov     rdi, rax                                                       ; +0x21, 0x1402c2661\nmov     [rsp+58h+arg_10], rax                                          ; +0x24, 0x1402c2664\nxor     edx, edx; Val                                                  ; +0x29, 0x1402c2669\nmov     r8d, 4A8h; Size                                                ; +0x2b, 0x1402c266b\nmov     rcx, rax; void *                                               ; +0x31, 0x1402c2671\ncall    memset                                                         ; +0x34, 0x1402c2674\nmov     rcx, rdi                                                       ; +0x39, 0x1402c2679\ncall    sub_14019CC00                                                  ; +0x3c, 0x1402c267c\nnop                                                                    ; +0x41, 0x1402c2681\nlea     rax, ??_7GameSettingsLayer@@6B@; const GameSettingsLayer::`vftable' ; +0x42, 0x1402c2682\nmov     [rdi], rax                                                     ; +0x49, 0x1402c2689\nlea     rax, ??_7GameSettingsLayer@@6B@_0; const GameSettingsLayer::`vftable' ; +0x4c, 0x1402c268c\nmov     [rdi+140h], rax                                                ; +0x53, 0x1402c2693\nlea     rax, ??_7GameSettingsLayer@@6B@_1; const GameSettingsLayer::`vftable' ; +0x5a, 0x1402c269a\nmov     [rdi+148h], rax                                                ; +0x61, 0x1402c26a1\nlea     rax, ??_7GameSettingsLayer@@6B@_2; const GameSettingsLayer::`vftable' ; +0x68, 0x1402c26a8\nmov     [rdi+150h], rax                                                ; +0x6f, 0x1402c26af\nlea     rax, ??_7GameSettingsLayer@@6B@_3; const GameSettingsLayer::`vftable' ; +0x76, 0x1402c26b6\nmov     [rdi+158h], rax                                                ; +0x7d, 0x1402c26bd\nlea     rax, ??_7GameSettingsLayer@@6B@_4; const GameSettingsLayer::`vftable' ; +0x84, 0x1402c26c4\nmov     [rdi+160h], rax                                                ; +0x8b, 0x1402c26cb\nlea     rax, ??_7GameSettingsLayer@@6B@_5; const GameSettingsLayer::`vftable' ; +0x92, 0x1402c26d2\nmov     [rdi+198h], rax                                                ; +0x99, 0x1402c26d9\nlea     rax, ??_7GameSettingsLayer@@6B@_6; const GameSettingsLayer::`vftable' ; +0xa0, 0x1402c26e0\nmov     [rdi+1B0h], rax                                                ; +0xa7, 0x1402c26e7\nlea     rax, ??_7GameSettingsLayer@@6B@_7; const GameSettingsLayer::`vftable' ; +0xae, 0x1402c26ee\nmov     [rdi+220h], rax                                                ; +0xb5, 0x1402c26f5\nlea     rax, ??_7GameSettingsLayer@@6B@_8; const GameSettingsLayer::`vftable' ; +0xbc, 0x1402c26fc\nmov     [rdi+298h], rax                                                ; +0xc3, 0x1402c2703\nlea     rax, ??_7GameSettingsLayer@@6B@_9; const GameSettingsLayer::`vftable' ; +0xca, 0x1402c270a\nmov     [rdi+2A0h], rax                                                ; +0xd1, 0x1402c2711\nlea     rax, ??_7GameSettingsLayer@@6B@_10; const GameSettingsLayer::`vftable' ; +0xd8, 0x1402c2718\nmov     [rdi+430h], rax                                                ; +0xdf, 0x1402c271f\nxor     r14d, r14d                                                     ; +0xe6, 0x1402c2726\nmov     [rdi+438h], r14                                                ; +0xe9, 0x1402c2729\nlea     rbx, [rdi+440h]                                                ; +0xf0, 0x1402c2730\nmov     [rsp+58h+arg_18], rbx                                          ; +0xf7, 0x1402c2737\nmov     [rbx], r14d                                                    ; +0xfc, 0x1402c273c\nmov     [rbx+8], r14                                                   ; +0xff, 0x1402c273f\nmov     [rbx+10h], r14                                                 ; +0x103, 0x1402c2743\nmov     ecx, 20h ; ' '; Size                                           ; +0x107, 0x1402c2747\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x10c, 0x1402c274c\nmov     [rax], rax                                                     ; +0x111, 0x1402c2751\nmov     [rax+8], rax                                                   ; +0x114, 0x1402c2754\nmov     [rbx+8], rax                                                   ; +0x118, 0x1402c2758\nlea     rcx, [rbx+18h]                                                 ; +0x11c, 0x1402c275c\nmov     [rcx], r14                                                     ; +0x120, 0x1402c2760\nmov     [rcx+8], r14                                                   ; +0x123, 0x1402c2763\nmov     [rcx+10h], r14                                                 ; +0x127, 0x1402c2767\nmov     qword ptr [rbx+30h], 7                                         ; +0x12b, 0x1402c276b\nmov     qword ptr [rbx+38h], 8                                         ; +0x133, 0x1402c2773\nmov     dword ptr [rbx], 3F800000h                                     ; +0x13b, 0x1402c277b\nmov     r8, [rbx+8]                                                    ; +0x141, 0x1402c2781\nmov     edx, 10h                                                       ; +0x145, 0x1402c2785\ncall    sub_14003F200                                                  ; +0x14a, 0x1402c278a\nnop                                                                    ; +0x14f, 0x1402c278f\nmov     [rdi+480h], r14                                                ; +0x150, 0x1402c2790\nmov     [rdi+488h], r14d                                               ; +0x157, 0x1402c2797\nmov     [rdi+490h], r14                                                ; +0x15e, 0x1402c279e\nmov     [rdi+498h], r14                                                ; +0x165, 0x1402c27a5\nmov     [rdi+4A0h], r14w                                               ; +0x16c, 0x1402c27ac\nxorps   xmm0, xmm0                                                     ; +0x174, 0x1402c27b4\nmovss   [rsp+58h+var_28], xmm0                                         ; +0x177, 0x1402c27b7\nmov     [rsp+58h+var_30], 7                                            ; +0x17d, 0x1402c27bd\nmovss   xmm1, cs:dword_140835988                                       ; +0x185, 0x1402c27c5\nmovss   [rsp+58h+var_38], xmm1                                         ; +0x18d, 0x1402c27cd\nmovss   xmm3, cs:dword_140835A18                                       ; +0x193, 0x1402c27d3\nxor     r8d, r8d                                                       ; +0x19b, 0x1402c27db\nxor     edx, edx                                                       ; +0x19e, 0x1402c27de\nmov     rcx, rdi                                                       ; +0x1a0, 0x1402c27e0\ncall    SetupTriggerPopup__init                                        ; +0x1a3, 0x1402c27e3\ntest    al, al                                                         ; +0x1a8, 0x1402c27e8\njz      loc_1402C28F4                                                  ; +0x1aa, 0x1402c27ea\nmov     [rdi+438h], rbp                                                ; +0x1b0, 0x1402c27f0\nmov     byte ptr [rdi+2E8h], 1                                         ; +0x1b7, 0x1402c27f7\nmov     rax, [rdi]                                                     ; +0x1be, 0x1402c27fe\nmov     rcx, rdi                                                       ; +0x1c1, 0x1402c2801\ncall    qword ptr [rax+448h]                                           ; +0x1c4, 0x1402c2804\nmov     word ptr [rsp+58h+arg_10], 5750h                               ; +0x1ca, 0x1402c280a\nmovzx   eax, word ptr [rsp+58h+arg_10]                                 ; +0x1d1, 0x1402c2811\nmov     word ptr [rsp+58h+arg_18], ax                                  ; +0x1d6, 0x1402c2816\nmov     byte ptr [rsp+58h+arg_18+2], 69h ; 'i'                         ; +0x1db, 0x1402c281b\nmov     rcx, [rdi+248h]                                                ; +0x1e0, 0x1402c2820\nmov     rax, [rcx]                                                     ; +0x1e7, 0x1402c2827\nmov     edx, 3                                                         ; +0x1ea, 0x1402c282a\ncall    qword ptr [rax+1D8h]                                           ; +0x1ef, 0x1402c282f\ntest    rax, rax                                                       ; +0x1f5, 0x1402c2835\njz      short loc_1402C284B                                            ; +0x1f8, 0x1402c2838\nlea     rcx, [rax+140h]                                                ; +0x1fa, 0x1402c283a\nmov     rax, [rcx]                                                     ; +0x201, 0x1402c2841\nlea     rdx, [rsp+58h+arg_18]                                          ; +0x204, 0x1402c2844\ncall    qword ptr [rax]                                                ; +0x209, 0x1402c2849\nmov     byte ptr [rdi+254h], 1                                         ; +0x20b, 0x1402c284b\nmov     rcx, rdi                                                       ; +0x212, 0x1402c2852\ncall    TabbedPopupLayer__addCloseButton                               ; +0x215, 0x1402c2855\nmov     rcx, rdi                                                       ; +0x21a, 0x1402c285a\ncall    GameSettingsLayer__setupTabs                                   ; +0x21d, 0x1402c285d\nmov     rcx, rdi                                                       ; +0x222, 0x1402c2862\ncall    GameSettingsLayer__buildTabContent                             ; +0x225, 0x1402c2865\nmov     rcx, rdi                                                       ; +0x22a, 0x1402c286a\ncall    GameSettingsLayer__addSpecialContent                           ; +0x22d, 0x1402c286d\nmov     rax, [rdi]                                                     ; +0x232, 0x1402c2872\nmov     rcx, rdi                                                       ; +0x235, 0x1402c2875\ncall    qword ptr [rax+470h]                                           ; +0x238, 0x1402c2878\nmov     byte ptr [rdi+2E8h], 0                                         ; +0x23e, 0x1402c287e\nmovsxd  r8, cs:dword_1408FE478                                         ; +0x245, 0x1402c2885\ntest    r8d, r8d                                                       ; +0x24c, 0x1402c288c\njs      short loc_1402C28D4                                            ; +0x24f, 0x1402c288f\nmov     r9, [rdi+3E8h]                                                 ; +0x251, 0x1402c2891\nmov     rcx, [rdi+3F0h]                                                ; +0x258, 0x1402c2898\nsub     rcx, r9                                                        ; +0x25f, 0x1402c289f\nmov     rax, 2E8BA2E8BA2E8BA3h                                         ; +0x262, 0x1402c28a2\nimul    rcx                                                            ; +0x26c, 0x1402c28ac\nsar     rdx, 4                                                         ; +0x26f, 0x1402c28af\nmov     rax, rdx                                                       ; +0x273, 0x1402c28b3\nshr     rax, 3Fh                                                       ; +0x276, 0x1402c28b6\nadd     rdx, rax                                                       ; +0x27a, 0x1402c28ba\ncmp     r8d, edx                                                       ; +0x27d, 0x1402c28bd\njge     short loc_1402C28D4                                            ; +0x280, 0x1402c28c0\nmov     rsi, r8                                                        ; +0x282, 0x1402c28c2\nimul    r8, 58h ; 'X'                                                  ; +0x285, 0x1402c28c5\nmov     ecx, cs:dword_14090BFC4                                        ; +0x289, 0x1402c28c9\nmov     [r8+r9+44h], ecx                                               ; +0x28f, 0x1402c28cf\nmov     rcx, [rdi]                                                     ; +0x294, 0x1402c28d4\nmov     r8, [rcx+4B0h]                                                 ; +0x297, 0x1402c28d7\nmov     edx, esi                                                       ; +0x29e, 0x1402c28de\nmov     rcx, rdi                                                       ; +0x2a0, 0x1402c28e0\ncall    r8                                                             ; +0x2a3, 0x1402c28e3\nmov     rcx, rdi                                                       ; +0x2a6, 0x1402c28e6\ncall    cs:?autorelease@CCObject@cocos2d@@QEAAPEAV12@XZ; cocos2d::CCObject::autorelease(void) ; +0x2a9, 0x1402c28e9\nmov     rax, rdi                                                       ; +0x2af, 0x1402c28ef\njmp     short loc_1402C2909                                            ; +0x2b2, 0x1402c28f2\nmov     rcx, [rdi]                                                     ; +0x2b4, 0x1402c28f4\nmov     r8, [rcx+8]                                                    ; +0x2b7, 0x1402c28f7\nmov     edx, 1                                                         ; +0x2bb, 0x1402c28fb\nmov     rcx, rdi                                                       ; +0x2c0, 0x1402c2900\ncall    r8                                                             ; +0x2c3, 0x1402c2903\nmov     rax, r14                                                       ; +0x2c6, 0x1402c2906\nmov     rbx, [rsp+58h+arg_0]                                           ; +0x2c9, 0x1402c2909\nmov     rbp, [rsp+58h+arg_8]                                           ; +0x2ce, 0x1402c290e\nadd     rsp, 40h                                                       ; +0x2d3, 0x1402c2913\npop     r14                                                            ; +0x2d7, 0x1402c2917\npop     rdi                                                            ; +0x2d9, 0x1402c2919\npop     rsi                                                            ; +0x2da, 0x1402c291a\nretn                                                                   ; +0x2db, 0x1402c291b", "xrefs": ["EditorPauseLayer::onOptions @ 0x1401822d0", "OptionsLayer::onOptions @ 0x1404cbc38", "PauseLayer::onSideButtonPressed @ 0x1404d95a2", "<???> @ 0x14091db88"], "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"}