{"type": "func", "start": 5373286112, "end": 5373286588, "name": "LevelOptionsLayer::onSettings", "pseudocode": "// \n// LevelOptionsLayer::onSettings from 0x14045d6e0 to 0x14045d8bc (476 bytes)\n// \n// 2 xrefs:\n// > LevelOptionsLayer::setupOptions @ 0x14045d61e\n// > <???> @ 0x140927d94\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:32 +0000\n// \n\n// Hidden C++ exception states: #wind=1\n__int64 __fastcall LevelOptionsLayer::onSettings(_QWORD *a1)\n{\n  __int64 v2; // rbx\n  _QWORD *v3; // rsi\n  __int64 v4; // r8\n  int v5; // r9d\n  __int64 v6; // rcx\n  __int64 v7; // rax\n  struct cocos2d::CCLabelBMFont *v8; // rdi\n  __int64 v9; // rbx\n  __int64 v10; // rax\n  __int64 (__fastcall *v11)(__int64); // rdx\n  _QWORD *v13; // [rsp+40h] [rbp+8h] BYREF\n  char v14; // [rsp+50h] [rbp+18h] BYREF\n\n  v2 = a1[142];\n  v3 = operator new(0x478u);\n  v13 = v3;\n  LevelOptionsLayer::LevelOptionsLayer(v3);\n  *v3 = &LevelOptionsLayer2::`vftable';\n  v3[40] = &LevelOptionsLayer2::`vftable';\n  v3[41] = &LevelOptionsLayer2::`vftable';\n  v3[42] = &LevelOptionsLayer2::`vftable';\n  v3[43] = &LevelOptionsLayer2::`vftable';\n  v3[44] = &LevelOptionsLayer2::`vftable';\n  v3[51] = &LevelOptionsLayer2::`vftable';\n  v3[54] = &LevelOptionsLayer2::`vftable';\n  v3[68] = &LevelOptionsLayer2::`vftable';\n  v3[83] = &LevelOptionsLayer2::`vftable';\n  v3[84] = &LevelOptionsLayer2::`vftable';\n  if ( LevelOptionsLayer::init((__int64)v3, v2, v4, v5) )\n  {\n    v7 = cocos2d::CCDirector::sharedDirector(v6);\n    cocos2d::CCDirector::getWinSize(v7, &v13);\n    v8 = cocos2d::CCLabelBMFont::create(\"Legacy Options\", \"goldFont.fnt\");\n    (*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v8 + 160LL))(v8);\n    v9 = *(_QWORD *)v8;\n    cocos2d::CCPoint::CCPoint(\n      (cocos2d::CCPoint *)&v14,\n      *(float *)&v13 * 0.5,\n      (float)((float)(*((float *)v3 + 184) * 0.5) + (float)(*((float *)&v13 + 1) * 0.5)) - 20.0);\n    (*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *, __int64))(v9 + 184))(v8, v10);\n    (*(void (__fastcall **)(_QWORD, struct cocos2d::CCLabelBMFont *, __int64))(*(_QWORD *)v3[73] + 456LL))(\n      v3[73],\n      v8,\n      1);\n    cocos2d::CCObject::autorelease((cocos2d::CCObject *)v3);\n  }\n  else\n  {\n    (*(void (__fastcall **)(_QWORD *, __int64))(*v3 + 8LL))(v3, 1);\n    v3 = nullptr;\n  }\n  v11 = *(__int64 (__fastcall **)(__int64))(*v3 + 1064LL);\n  if ( v11 == SetupTriggerPopup::show )\n    SetupTriggerPopup::show((__int64)v3);\n  else\n    v11((__int64)v3);\n  return (*(__int64 (__fastcall **)(_QWORD *, _QWORD))(*a1 + 1104LL))(a1, 0);\n}", "assembly": "; \n; LevelOptionsLayer::onSettings from 0x14045d6e0 to 0x14045d8bc (476 bytes)\n; \n; 2 xrefs:\n; > LevelOptionsLayer::setupOptions @ 0x14045d61e\n; > <???> @ 0x140927d94\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:32 +0000\n; \nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x14045d6e0\npush    rsi                                                            ; +0x5, 0x14045d6e5\npush    rdi                                                            ; +0x6, 0x14045d6e6\npush    r14                                                            ; +0x7, 0x14045d6e7\nsub     rsp, 20h                                                       ; +0x9, 0x14045d6e9\nmov     r14, rcx                                                       ; +0xd, 0x14045d6ed\nmov     rbx, [rcx+470h]                                                ; +0x10, 0x14045d6f0\nmov     ecx, 478h; Size                                                ; +0x17, 0x14045d6f7\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x1c, 0x14045d6fc\nmov     rsi, rax                                                       ; +0x21, 0x14045d701\nmov     [rsp+38h+arg_0], rax                                           ; +0x24, 0x14045d704\nmov     rcx, rax                                                       ; +0x29, 0x14045d709\ncall    LevelOptionsLayer__LevelOptionsLayer                           ; +0x2c, 0x14045d70c\nlea     rax, ??_7LevelOptionsLayer2@@6B@; const LevelOptionsLayer2::`vftable' ; +0x31, 0x14045d711\nmov     [rsi], rax                                                     ; +0x38, 0x14045d718\nlea     rax, ??_7LevelOptionsLayer2@@6B@_0; const LevelOptionsLayer2::`vftable' ; +0x3b, 0x14045d71b\nmov     [rsi+140h], rax                                                ; +0x42, 0x14045d722\nlea     rax, ??_7LevelOptionsLayer2@@6B@_1; const LevelOptionsLayer2::`vftable' ; +0x49, 0x14045d729\nmov     [rsi+148h], rax                                                ; +0x50, 0x14045d730\nlea     rax, ??_7LevelOptionsLayer2@@6B@_2; const LevelOptionsLayer2::`vftable' ; +0x57, 0x14045d737\nmov     [rsi+150h], rax                                                ; +0x5e, 0x14045d73e\nlea     rax, ??_7LevelOptionsLayer2@@6B@_3; const LevelOptionsLayer2::`vftable' ; +0x65, 0x14045d745\nmov     [rsi+158h], rax                                                ; +0x6c, 0x14045d74c\nlea     rax, ??_7LevelOptionsLayer2@@6B@_4; const LevelOptionsLayer2::`vftable' ; +0x73, 0x14045d753\nmov     [rsi+160h], rax                                                ; +0x7a, 0x14045d75a\nlea     rax, ??_7LevelOptionsLayer2@@6B@_5; const LevelOptionsLayer2::`vftable' ; +0x81, 0x14045d761\nmov     [rsi+198h], rax                                                ; +0x88, 0x14045d768\nlea     rax, ??_7LevelOptionsLayer2@@6B@_6; const LevelOptionsLayer2::`vftable' ; +0x8f, 0x14045d76f\nmov     [rsi+1B0h], rax                                                ; +0x96, 0x14045d776\nlea     rax, ??_7LevelOptionsLayer2@@6B@_7; const LevelOptionsLayer2::`vftable' ; +0x9d, 0x14045d77d\nmov     [rsi+220h], rax                                                ; +0xa4, 0x14045d784\nlea     rax, ??_7LevelOptionsLayer2@@6B@_8; const LevelOptionsLayer2::`vftable' ; +0xab, 0x14045d78b\nmov     [rsi+298h], rax                                                ; +0xb2, 0x14045d792\nlea     rax, ??_7LevelOptionsLayer2@@6B@_9; const LevelOptionsLayer2::`vftable' ; +0xb9, 0x14045d799\nmov     [rsi+2A0h], rax                                                ; +0xc0, 0x14045d7a0\nmov     rdx, rbx                                                       ; +0xc7, 0x14045d7a7\nmov     rcx, rsi                                                       ; +0xca, 0x14045d7aa\ncall    LevelOptionsLayer__init                                        ; +0xcd, 0x14045d7ad\ntest    al, al                                                         ; +0xd2, 0x14045d7b2\njz      loc_14045D86E                                                  ; +0xd4, 0x14045d7b4\ncall    cs:?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0xda, 0x14045d7ba\nmov     rcx, rax                                                       ; +0xe0, 0x14045d7c0\nlea     rdx, [rsp+38h+arg_0]                                           ; +0xe3, 0x14045d7c3\ncall    cs:?getWinSize@CCDirector@cocos2d@@QEAA?AVCCSize@2@XZ; cocos2d::CCDirector::getWinSize(void) ; +0xe8, 0x14045d7c8\nlea     rdx, aGoldfontFnt; \"goldFont.fnt\"                              ; +0xee, 0x14045d7ce\nlea     rcx, aLegacyOptions; \"Legacy Options\"                          ; +0xf5, 0x14045d7d5\ncall    cs:?create@CCLabelBMFont@cocos2d@@SAPEAV12@PEBD0@Z; cocos2d::CCLabelBMFont::create(char const *,char const *) ; +0xfc, 0x14045d7dc\nmov     rdi, rax                                                       ; +0x102, 0x14045d7e2\nmov     rcx, [rax]                                                     ; +0x105, 0x14045d7e5\nmov     rdx, [rcx+0A0h]                                                ; +0x108, 0x14045d7e8\nmovss   xmm1, cs:dword_140834FAC                                       ; +0x10f, 0x14045d7ef\nmov     rcx, rax                                                       ; +0x117, 0x14045d7f7\ncall    rdx                                                            ; +0x11a, 0x14045d7fa\nmov     rbx, [rdi]                                                     ; +0x11c, 0x14045d7fc\nmovss   xmm2, dword ptr [rsi+2E0h]                                     ; +0x11f, 0x14045d7ff\nmovss   xmm3, cs:dword_140834F20                                       ; +0x127, 0x14045d807\nmulss   xmm2, xmm3                                                     ; +0x12f, 0x14045d80f\nmovss   xmm0, dword ptr [rsp+38h+arg_0+4]                              ; +0x133, 0x14045d813\nmulss   xmm0, xmm3                                                     ; +0x139, 0x14045d819\naddss   xmm2, xmm0                                                     ; +0x13d, 0x14045d81d\nsubss   xmm2, cs:dword_1408355B4                                       ; +0x141, 0x14045d821\nmovss   xmm1, dword ptr [rsp+38h+arg_0]                                ; +0x149, 0x14045d829\nmulss   xmm1, xmm3                                                     ; +0x14f, 0x14045d82f\nlea     rcx, [rsp+38h+arg_10]                                          ; +0x153, 0x14045d833\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x158, 0x14045d838\nmov     rdx, rax                                                       ; +0x15e, 0x14045d83e\nmov     rcx, rdi                                                       ; +0x161, 0x14045d841\ncall    qword ptr [rbx+0B8h]                                           ; +0x164, 0x14045d844\nmov     rcx, [rsi+248h]                                                ; +0x16a, 0x14045d84a\nmov     rax, [rcx]                                                     ; +0x171, 0x14045d851\nmov     r8d, 1                                                         ; +0x174, 0x14045d854\nmov     rdx, rdi                                                       ; +0x17a, 0x14045d85a\ncall    qword ptr [rax+1C8h]                                           ; +0x17d, 0x14045d85d\nmov     rcx, rsi                                                       ; +0x183, 0x14045d863\ncall    cs:?autorelease@CCObject@cocos2d@@QEAAPEAV12@XZ; cocos2d::CCObject::autorelease(void) ; +0x186, 0x14045d866\njmp     short loc_14045D87E                                            ; +0x18c, 0x14045d86c\nmov     rax, [rsi]                                                     ; +0x18e, 0x14045d86e\nmov     edx, 1                                                         ; +0x191, 0x14045d871\nmov     rcx, rsi                                                       ; +0x196, 0x14045d876\ncall    qword ptr [rax+8]                                              ; +0x199, 0x14045d879\nxor     esi, esi                                                       ; +0x19c, 0x14045d87c\nmov     rax, [rsi]                                                     ; +0x19e, 0x14045d87e\nmov     rdx, [rax+428h]                                                ; +0x1a1, 0x14045d881\nlea     rax, SetupTriggerPopup__show; Merged with: SetupTriggerPopup::show, SetTextPopup::show ; +0x1a8, 0x14045d888\nmov     rcx, rsi                                                       ; +0x1af, 0x14045d88f\ncmp     rdx, rax                                                       ; +0x1b2, 0x14045d892\njnz     short loc_14045D89E                                            ; +0x1b5, 0x14045d895\ncall    SetupTriggerPopup__show; Merged with: SetupTriggerPopup::show, SetTextPopup::show ; +0x1b7, 0x14045d897\njmp     short loc_14045D8A0                                            ; +0x1bc, 0x14045d89c\ncall    rdx                                                            ; +0x1be, 0x14045d89e\nmov     rax, [r14]                                                     ; +0x1c0, 0x14045d8a0\nxor     edx, edx                                                       ; +0x1c3, 0x14045d8a3\nmov     rcx, r14                                                       ; +0x1c5, 0x14045d8a5\nmov     rbx, [rsp+38h+arg_8]                                           ; +0x1c8, 0x14045d8a8\nadd     rsp, 20h                                                       ; +0x1cd, 0x14045d8ad\npop     r14                                                            ; +0x1d1, 0x14045d8b1\npop     rdi                                                            ; +0x1d3, 0x14045d8b3\npop     rsi                                                            ; +0x1d4, 0x14045d8b4\njmp     qword ptr [rax+450h]                                           ; +0x1d5, 0x14045d8b5", "xrefs": ["LevelOptionsLayer::setupOptions @ 0x14045d61e", "<???> @ 0x140927d94"], "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"}