{"type": "func", "start": 5372003632, "end": 5372004105, "name": "LevelOptionsLayer::onSettings", "pseudocode": "// \n// LevelOptionsLayer::onSettings from 0x140324530 to 0x140324709 (473 bytes)\n// \n// 2 xrefs:\n// > LevelOptionsLayer::setupOptions @ 0x140324478\n// > <???> @ 0x1406d4d90\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\nvoid LevelOptionsLayer::onSettings(LevelOptionsLayer *a1, cocos2d::CCObject *a2)\n{\n  LevelSettingsObject *m_settingsObject; // rbx\n  LevelOptionsLayer *v4; // rsi\n  __int64 v5; // rcx\n  cocos2d::CCDirector *v6; // rax\n  struct cocos2d::CCLabelBMFont *v7; // rdi\n  cocos2d::CCLabelBMFont_vtbl *v8; // rbx\n  const cocos2d::CCPoint *v9; // rax\n  void (__fastcall *show)(SetupTriggerPopup *__hidden); // rdx\n\n  m_settingsObject = a1->m_settingsObject;\n  v4 = (LevelOptionsLayer *)operator new(0x3F8u);\n  LevelOptionsLayer::LevelOptionsLayer(v4);\n  v4->GJOptionsLayer::SetupTriggerPopup::FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable = (LevelOptionsLayer_vtbl *)&LevelOptionsLayer2::`vftable';\n  v4->GJOptionsLayer::SetupTriggerPopup::FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCTouchDelegate::__vftable = (cocos2d::CCTouchDelegate_vtbl *)&LevelOptionsLayer2::`vftable';\n  v4->GJOptionsLayer::SetupTriggerPopup::FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCAccelerometerDelegate::__vftable = (cocos2d::CCAccelerometerDelegate_vtbl *)&LevelOptionsLayer2::`vftable';\n  v4->GJOptionsLayer::SetupTriggerPopup::FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCKeypadDelegate::__vftable = (cocos2d::CCKeypadDelegate_vtbl *)&LevelOptionsLayer2::`vftable';\n  v4->GJOptionsLayer::SetupTriggerPopup::FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCKeyboardDelegate::__vftable = (cocos2d::CCKeyboardDelegate_vtbl *)&LevelOptionsLayer2::`vftable';\n  v4->GJOptionsLayer::SetupTriggerPopup::FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCMouseDelegate::__vftable = (cocos2d::CCMouseDelegate_vtbl *)&LevelOptionsLayer2::`vftable';\n  v4->GJOptionsLayer::SetupTriggerPopup::FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCRGBAProtocol::__vftable = (cocos2d::CCRGBAProtocol_vtbl *)&LevelOptionsLayer2::`vftable';\n  v4->GJOptionsLayer::SetupTriggerPopup::FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCBlendProtocol::__vftable = (cocos2d::CCBlendProtocol_vtbl *)&LevelOptionsLayer2::`vftable';\n  v4->GJOptionsLayer::SetupTriggerPopup::TextInputDelegate::__vftable = (TextInputDelegate_vtbl *)&LevelOptionsLayer2::`vftable';\n  v4->GJOptionsLayer::SetupTriggerPopup::ConfigureValuePopupDelegate::__vftable = (ConfigureValuePopupDelegate_vtbl *)&LevelOptionsLayer2::`vftable';\n  v4->GJOptionsLayer::SetupTriggerPopup::SliderDelegate::__vftable = (SliderDelegate_vtbl *)&LevelOptionsLayer2::`vftable';\n  if ( LevelOptionsLayer::init(v4, m_settingsObject) )\n  {\n    v6 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v5);\n    cocos2d::CCDirector::getWinSize(v6);\n    v7 = cocos2d::CCLabelBMFont::create(\"Legacy Options\", \"goldFont.fnt\");\n    ((void (__fastcall *)(struct cocos2d::CCLabelBMFont *))v7->setScale_0)(v7);\n    v8 = v7->cocos2d::CCSpriteBatchNode::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;\n    cocos2d::CCPoint::CCPoint(*((float *)&v4 + 1) * 0.5, *(float *)&v4 * 0.5);\n    v8->setPosition_0(v7, v9);\n    v4->m_mainLayer->addChild_0(v4->m_mainLayer, v7, 1);\n    cocos2d::CCObject::autorelease(v4);\n  }\n  else\n  {\n    ((void (__fastcall *)(LevelOptionsLayer *, __int64))v4->~LevelOptionsLayer)(v4, 1);\n    v4 = nullptr;\n  }\n  show = v4->show;\n  if ( (char *)show == (char *)CollisionBlockPopup::show )\n    CollisionBlockPopup::show((__int64)v4);\n  else\n    show(v4);\n  a1->onClose(a1, nullptr);\n}", "assembly": "; \n; LevelOptionsLayer::onSettings from 0x140324530 to 0x140324709 (473 bytes)\n; \n; 2 xrefs:\n; > LevelOptionsLayer::setupOptions @ 0x140324478\n; > <???> @ 0x1406d4d90\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_8], rbx                                               ; +0x0, 0x140324530\npush    rsi                                                            ; +0x5, 0x140324535\npush    rdi                                                            ; +0x6, 0x140324536\npush    r14                                                            ; +0x7, 0x140324537\nsub     rsp, 20h                                                       ; +0x9, 0x140324539\nmov     r14, rcx                                                       ; +0xd, 0x14032453d\nmov     rbx, [rcx+3F0h]                                                ; +0x10, 0x140324540\nmov     ecx, 3F8h; Size                                                ; +0x17, 0x140324547\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x1c, 0x14032454c\nmov     rsi, rax                                                       ; +0x21, 0x140324551\nmov     [rsp+38h+arg_0], rax                                           ; +0x24, 0x140324554\nmov     rcx, rax                                                       ; +0x29, 0x140324559\ncall    LevelOptionsLayer__LevelOptionsLayer                           ; +0x2c, 0x14032455c\nlea     rax, ??_7LevelOptionsLayer2@@6B@; const LevelOptionsLayer2::`vftable' ; +0x31, 0x140324561\nmov     [rsi], rax                                                     ; +0x38, 0x140324568\nlea     rax, ??_7LevelOptionsLayer2@@6B@_0; const LevelOptionsLayer2::`vftable' ; +0x3b, 0x14032456b\nmov     [rsi+140h], rax                                                ; +0x42, 0x140324572\nlea     rax, ??_7LevelOptionsLayer2@@6B@_1; const LevelOptionsLayer2::`vftable' ; +0x49, 0x140324579\nmov     [rsi+148h], rax                                                ; +0x50, 0x140324580\nlea     rax, ??_7LevelOptionsLayer2@@6B@_2; const LevelOptionsLayer2::`vftable' ; +0x57, 0x140324587\nmov     [rsi+150h], rax                                                ; +0x5e, 0x14032458e\nlea     rax, ??_7LevelOptionsLayer2@@6B@_3; const LevelOptionsLayer2::`vftable' ; +0x65, 0x140324595\nmov     [rsi+158h], rax                                                ; +0x6c, 0x14032459c\nlea     rax, ??_7LevelOptionsLayer2@@6B@_4; const LevelOptionsLayer2::`vftable' ; +0x73, 0x1403245a3\nmov     [rsi+160h], rax                                                ; +0x7a, 0x1403245aa\nlea     rax, ??_7LevelOptionsLayer2@@6B@_5; const LevelOptionsLayer2::`vftable' ; +0x81, 0x1403245b1\nmov     [rsi+198h], rax                                                ; +0x88, 0x1403245b8\nlea     rax, ??_7LevelOptionsLayer2@@6B@_6; const LevelOptionsLayer2::`vftable' ; +0x8f, 0x1403245bf\nmov     [rsi+1B0h], rax                                                ; +0x96, 0x1403245c6\nlea     rax, ??_7LevelOptionsLayer2@@6B@_7; const LevelOptionsLayer2::`vftable' ; +0x9d, 0x1403245cd\nmov     [rsi+278h], rax                                                ; +0xa4, 0x1403245d4\nlea     rax, ??_7LevelOptionsLayer2@@6B@_8; const LevelOptionsLayer2::`vftable' ; +0xab, 0x1403245db\nmov     [rsi+280h], rax                                                ; +0xb2, 0x1403245e2\nlea     rax, ??_7LevelOptionsLayer2@@6B@_9; const LevelOptionsLayer2::`vftable' ; +0xb9, 0x1403245e9\nmov     [rsi+288h], rax                                                ; +0xc0, 0x1403245f0\nmov     rdx, rbx                                                       ; +0xc7, 0x1403245f7\nmov     rcx, rsi                                                       ; +0xca, 0x1403245fa\ncall    LevelOptionsLayer__init                                        ; +0xcd, 0x1403245fd\ntest    al, al                                                         ; +0xd2, 0x140324602\njz      loc_1403246BB                                                  ; +0xd4, 0x140324604\ncall    cs:?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0xda, 0x14032460a\nmov     rcx, rax                                                       ; +0xe0, 0x140324610\nlea     rdx, [rsp+38h+arg_0]                                           ; +0xe3, 0x140324613\ncall    cs:?getWinSize@CCDirector@cocos2d@@QEAA?AVCCSize@2@XZ; cocos2d::CCDirector::getWinSize(void) ; +0xe8, 0x140324618\nlea     rdx, aGoldfontFnt; \"goldFont.fnt\"                              ; +0xee, 0x14032461e\nlea     rcx, aLegacyOptions; \"Legacy Options\"                          ; +0xf5, 0x140324625\ncall    cs:?create@CCLabelBMFont@cocos2d@@SAPEAV12@PEBD0@Z; cocos2d::CCLabelBMFont::create(char const *,char const *) ; +0xfc, 0x14032462c\nmov     rdi, rax                                                       ; +0x102, 0x140324632\nmov     rdx, [rax]                                                     ; +0x105, 0x140324635\nmovss   xmm1, cs:dword_140622B74                                       ; +0x108, 0x140324638\nmov     rcx, rax                                                       ; +0x110, 0x140324640\ncall    qword ptr [rdx+0A0h]                                           ; +0x113, 0x140324643\nmov     rbx, [rdi]                                                     ; +0x119, 0x140324649\nmovss   xmm2, dword ptr [rsi+2C8h]                                     ; +0x11c, 0x14032464c\nmovss   xmm3, cs:dword_140622B08                                       ; +0x124, 0x140324654\nmulss   xmm2, xmm3                                                     ; +0x12c, 0x14032465c\nmovss   xmm0, dword ptr [rsp+38h+arg_0+4]                              ; +0x130, 0x140324660\nmulss   xmm0, xmm3                                                     ; +0x136, 0x140324666\naddss   xmm2, xmm0                                                     ; +0x13a, 0x14032466a\nsubss   xmm2, cs:dword_140623120                                       ; +0x13e, 0x14032466e\nmovss   xmm1, dword ptr [rsp+38h+arg_0]                                ; +0x146, 0x140324676\nmulss   xmm1, xmm3                                                     ; +0x14c, 0x14032467c\nlea     rcx, [rsp+38h+arg_10]                                          ; +0x150, 0x140324680\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x155, 0x140324685\nmov     rdx, rax                                                       ; +0x15b, 0x14032468b\nmov     rcx, rdi                                                       ; +0x15e, 0x14032468e\ncall    qword ptr [rbx+0B8h]                                           ; +0x161, 0x140324691\nmov     rcx, [rsi+240h]                                                ; +0x167, 0x140324697\nmov     rax, [rcx]                                                     ; +0x16e, 0x14032469e\nmov     r8d, 1                                                         ; +0x171, 0x1403246a1\nmov     rdx, rdi                                                       ; +0x177, 0x1403246a7\ncall    qword ptr [rax+1B8h]                                           ; +0x17a, 0x1403246aa\nmov     rcx, rsi                                                       ; +0x180, 0x1403246b0\ncall    cs:?autorelease@CCObject@cocos2d@@QEAAPEAV12@XZ; cocos2d::CCObject::autorelease(void) ; +0x183, 0x1403246b3\njmp     short loc_1403246CB                                            ; +0x189, 0x1403246b9\nmov     rax, [rsi]                                                     ; +0x18b, 0x1403246bb\nmov     edx, 1                                                         ; +0x18e, 0x1403246be\nmov     rcx, rsi                                                       ; +0x193, 0x1403246c3\ncall    qword ptr [rax+8]                                              ; +0x196, 0x1403246c6\nxor     esi, esi                                                       ; +0x199, 0x1403246c9\nmov     rax, [rsi]                                                     ; +0x19b, 0x1403246cb\nmov     rdx, [rax+410h]                                                ; +0x19e, 0x1403246ce\nlea     rax, CollisionBlockPopup__show; Merged with: CollisionBlockPopup::show, ColorSelectLiveOverlay::show, SetupTriggerPopup::show, HSVLiveOverlay::show, SetTextPopup::show, SetupObjectOptionsPopup::show, SetupSmartBlockLayer::show ; +0x1a5, 0x1403246d5\nmov     rcx, rsi                                                       ; +0x1ac, 0x1403246dc\ncmp     rdx, rax                                                       ; +0x1af, 0x1403246df\njnz     short loc_1403246EB                                            ; +0x1b2, 0x1403246e2\ncall    CollisionBlockPopup__show; Merged with: CollisionBlockPopup::show, ColorSelectLiveOverlay::show, SetupTriggerPopup::show, HSVLiveOverlay::show, SetTextPopup::show, SetupObjectOptionsPopup::show, SetupSmartBlockLayer::show ; +0x1b4, 0x1403246e4\njmp     short loc_1403246ED                                            ; +0x1b9, 0x1403246e9\ncall    rdx                                                            ; +0x1bb, 0x1403246eb\nmov     rax, [r14]                                                     ; +0x1bd, 0x1403246ed\nxor     edx, edx                                                       ; +0x1c0, 0x1403246f0\nmov     rcx, r14                                                       ; +0x1c2, 0x1403246f2\nmov     rbx, [rsp+38h+arg_8]                                           ; +0x1c5, 0x1403246f5\nadd     rsp, 20h                                                       ; +0x1ca, 0x1403246fa\npop     r14                                                            ; +0x1ce, 0x1403246fe\npop     rdi                                                            ; +0x1d0, 0x140324700\npop     rsi                                                            ; +0x1d1, 0x140324701\njmp     qword ptr [rax+430h]                                           ; +0x1d2, 0x140324702", "xrefs": ["LevelOptionsLayer::setupOptions @ 0x140324478", "<???> @ 0x1406d4d90"], "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"}