{"type": "func", "start": 10359208, "end": 10359720, "name": "BrowseSmartKeyLayer::create", "pseudocode": "// \n// BrowseSmartKeyLayer::create from 0x9e11a8 to 0x9e13a8 (512 bytes)\n// \n// 2 xrefs:\n// > BrowseSmartTemplateLayer::onTemplateObject @ 0x9e1454\n// > <???> @ 0xb5200\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\nBrowseSmartTemplateLayer *__fastcall BrowseSmartKeyLayer::create(cocos2d::CCObject *a1)\n{\n  BrowseSmartTemplateLayer *v2; // x19\n  int v3; // w22\n  void *v4; // x0\n  BrowseSmartTemplateLayer_vtbl *v5; // x1\n  BrowseSmartTemplateLayer *v6; // x0\n  unsigned int *v8; // x3\n  int v9; // w1\n  __int64 v10; // [xsp+60h] [xbp+60h] BYREF\n\n  v2 = (BrowseSmartTemplateLayer *)operator new(0x2B8u);\n  cocos2d::CCLayerColor::CCLayerColor(v2);\n  v2->m_controlConnected = -1;\n  v2->m_joystickConnected = -1;\n  v2->m_buttonMenu = nullptr;\n  v2->m_alertProtocol = nullptr;\n  v2->m_scene = nullptr;\n  v2->m_reverseKeyBack = 0;\n  v2->m_mainLayer = nullptr;\n  v2->m_ZOrder = 0;\n  v2->m_noElasticity = 0;\n  v2->m_button1 = nullptr;\n  v2->m_button2 = nullptr;\n  v2->m_scrollingLayer = nullptr;\n  v2->m_containsBorder = 0;\n  v2->m_noAction = 0;\n  v2->m_forcePrioRegistered = 0;\n  v2->m_template = nullptr;\n  v2->m_pages = nullptr;\n  v2->m_page = 0;\n  v2->m_nextPageBtn = nullptr;\n  v2->m_prevPageBtn = nullptr;\n  v2->m_dotsArray = nullptr;\n  v2->FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable = (BrowseSmartTemplateLayer_vtbl *)&off_11CB970;\n  v2->FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCTouchDelegate::__vftable = (cocos2d::CCTouchDelegate_vtbl *)off_11CBE98;\n  v2->FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCAccelerometerDelegate::__vftable = (cocos2d::CCAccelerometerDelegate_vtbl *)&off_11CBF08;\n  v2->FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCKeypadDelegate::__vftable = (cocos2d::CCKeypadDelegate_vtbl *)&off_11CBF20;\n  v2->FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCKeyboardDelegate::__vftable = (cocos2d::CCKeyboardDelegate_vtbl *)&off_11CBF40;\n  v2->FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCMouseDelegate::__vftable = (cocos2d::CCMouseDelegate_vtbl *)off_11CBF60;\n  v2->FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCRGBAProtocol::__vftable = (cocos2d::CCRGBAProtocol_vtbl *)&off_11CBF88;\n  v2->FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCBlendProtocol::__vftable = (cocos2d::CCBlendProtocol_vtbl *)&off_11CC008;\n  v2[1].m_uID = 0;\n  v2[1].FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable = (BrowseSmartTemplateLayer_vtbl *)&byte_124B6C8;\n  sub_D18D28(&v10);\n  v3 = (unsigned __int8)BrowseSmartKeyLayer::init(v2, a1, (__int64)&v10);\n  v4 = (void *)(v10 - 24);\n  if ( (__int64 *)(v10 - 24) != &qword_124B6B0 )\n  {\n    if ( &pthread_create )\n    {\n      v8 = (unsigned int *)(v10 - 8);\n      do\n        v9 = __ldaxr(v8);\n      while ( __stlxr(v9 - 1, v8) );\n    }\n    else\n    {\n      v9 = *(_DWORD *)(v10 - 8);\n      *(_DWORD *)(v10 - 8) = v9 - 1;\n    }\n    if ( v9 <= 0 )\n      operator delete(v4);\n  }\n  if ( v3 )\n  {\n    cocos2d::CCObject::autorelease(v2);\n  }\n  else\n  {\n    v5 = v2->FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;\n    v6 = v2;\n    v2 = nullptr;\n    v5->~BrowseSmartTemplateLayer_0(v6);\n  }\n  return v2;\n}", "assembly": "; \n; BrowseSmartKeyLayer::create from 0x9e11a8 to 0x9e13a8 (512 bytes)\n; \n; 2 xrefs:\n; > BrowseSmartTemplateLayer::onTemplateObject @ 0x9e1454\n; > <???> @ 0xb5200\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\nSTP             X29, X30, [SP,#var_70]!                                ; +0x0, 0x9e11a8\nMOV             X29, SP                                                ; +0x4, 0x9e11ac\nSTP             X21, X22, [SP,#0x70+var_50]                            ; +0x8, 0x9e11b0\nADRP            X21, #__stack_chk_guard_ptr@PAGE                       ; +0xc, 0x9e11b4\nSTR             X23, [SP,#0x70+var_40]                                 ; +0x10, 0x9e11b8\nMOV             X23, X1                                                ; +0x14, 0x9e11bc\nMOV             X22, X0                                                ; +0x18, 0x9e11c0\nMOV             X0, #0x2B8; unsigned __int64                           ; +0x1c, 0x9e11c4\nLDR             X1, [X21,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x20, 0x9e11c8\nSTP             X19, X20, [SP,#0x70+var_60]                            ; +0x24, 0x9e11cc\nLDR             X1, [X1]                                               ; +0x28, 0x9e11d0\nSTR             X1, [X29,#0x70+var_8]                                  ; +0x2c, 0x9e11d4\nBL              _Znwm; operator new(ulong)                             ; +0x30, 0x9e11d8\nMOV             X19, X0                                                ; +0x34, 0x9e11dc\nBL              _ZN7cocos2d12CCLayerColorC1Ev; cocos2d::CCLayerColor::CCLayerColor(void) ; +0x38, 0x9e11e0\nMOV             W3, #0xFFFFFFFF                                        ; +0x3c, 0x9e11e4\nSTR             W3, [X19,#0x268]                                       ; +0x40, 0x9e11e8\nSTR             W3, [X19,#0x270]                                       ; +0x44, 0x9e11ec\nADRP            X3, #_ZTV19BrowseSmartKeyLayer_ptr@PAGE                ; +0x48, 0x9e11f0\nSTR             XZR, [X19,#0x220]                                      ; +0x4c, 0x9e11f4\nADRP            X20, #off_122EFE8@PAGE                                 ; +0x50, 0x9e11f8\nSTR             XZR, [X19,#0x228]                                      ; +0x54, 0x9e11fc\nADD             X2, X29, #0x70+var_10                                  ; +0x58, 0x9e1200\nSTR             XZR, [X19,#0x230]                                      ; +0x5c, 0x9e1204\nMOV             X0, X2                                                 ; +0x60, 0x9e1208\nSTRB            WZR, [X19,#0x238]                                      ; +0x64, 0x9e120c\nMOV             X1, X23                                                ; +0x68, 0x9e1210\nSTR             XZR, [X19,#0x240]                                      ; +0x6c, 0x9e1214\nSTR             WZR, [X19,#0x248]                                      ; +0x70, 0x9e1218\nSTRB            WZR, [X19,#0x24C]                                      ; +0x74, 0x9e121c\nSTR             XZR, [X19,#0x250]                                      ; +0x78, 0x9e1220\nSTR             XZR, [X19,#0x258]                                      ; +0x7c, 0x9e1224\nSTR             XZR, [X19,#0x260]                                      ; +0x80, 0x9e1228\nSTRB            WZR, [X19,#0x26C]                                      ; +0x84, 0x9e122c\nSTRB            WZR, [X19,#0x26D]                                      ; +0x88, 0x9e1230\nSTRB            WZR, [X19,#0x274]                                      ; +0x8c, 0x9e1234\nSTR             XZR, [X19,#0x278]                                      ; +0x90, 0x9e1238\nSTR             XZR, [X19,#0x280]                                      ; +0x94, 0x9e123c\nSTR             WZR, [X19,#0x288]                                      ; +0x98, 0x9e1240\nSTR             XZR, [X19,#0x290]                                      ; +0x9c, 0x9e1244\nSTR             XZR, [X19,#0x298]                                      ; +0xa0, 0x9e1248\nSTR             XZR, [X19,#0x2A0]                                      ; +0xa4, 0x9e124c\nSTR             X2, [X29,#0x70+var_28]                                 ; +0xa8, 0x9e1250\nLDR             X3, [X3,#_ZTV19BrowseSmartKeyLayer_ptr@PAGEOFF]; `vtable for'BrowseSmartKeyLayer ... ; +0xac, 0x9e1254\nADD             X4, X3, #0x10                                          ; +0xb0, 0x9e1258\nADD             X5, X3, #0x538                                         ; +0xb4, 0x9e125c\nSTR             X4, [X19]                                              ; +0xb8, 0x9e1260\nADD             X4, X3, #0x5A8                                         ; +0xbc, 0x9e1264\nSTR             X5, [X19,#0x140]                                       ; +0xc0, 0x9e1268\nADD             X5, X3, #0x5C0                                         ; +0xc4, 0x9e126c\nSTR             X4, [X19,#0x148]                                       ; +0xc8, 0x9e1270\nADD             X4, X3, #0x5E0                                         ; +0xcc, 0x9e1274\nSTR             X5, [X19,#0x150]                                       ; +0xd0, 0x9e1278\nADD             X5, X3, #0x600                                         ; +0xd4, 0x9e127c\nSTR             X4, [X19,#0x158]                                       ; +0xd8, 0x9e1280\nADD             X4, X3, #0x628                                         ; +0xdc, 0x9e1284\nSTR             X5, [X19,#0x160]                                       ; +0xe0, 0x9e1288\nADD             X3, X3, #0x6A8                                         ; +0xe4, 0x9e128c\nSTR             X4, [X19,#0x198]                                       ; +0xe8, 0x9e1290\nSTR             X3, [X19,#0x1B0]                                       ; +0xec, 0x9e1294\nLDR             X3, [X20,#off_122EFE8@PAGEOFF]; qword_124B6B0          ; +0xf0, 0x9e1298\nSTR             WZR, [X19,#0x2B0]                                      ; +0xf4, 0x9e129c\nADD             X3, X3, #0x18                                          ; +0xf8, 0x9e12a0\nSTR             X3, [X19,#0x2A8]                                       ; +0xfc, 0x9e12a4\nBL              sub_D18D28                                             ; +0x100, 0x9e12a8\nLDR             X2, [X29,#0x70+var_28]                                 ; +0x104, 0x9e12ac\nMOV             X0, X19                                                ; +0x108, 0x9e12b0\nMOV             X1, X22                                                ; +0x10c, 0x9e12b4\nBL              _ZN19BrowseSmartKeyLayer4initEP15GJSmartTemplateSs; BrowseSmartKeyLayer::init(GJSmartTemplate *,std::string) ; +0x110, 0x9e12b8\nLDR             X3, [X29,#0x70+var_10]                                 ; +0x114, 0x9e12bc\nUXTB            W22, W0                                                ; +0x118, 0x9e12c0\nLDR             X20, [X20,#off_122EFE8@PAGEOFF]; qword_124B6B0         ; +0x11c, 0x9e12c4\nSUB             X0, X3, #0x18; p                                       ; +0x120, 0x9e12c8\nCMP             X0, X20                                                ; +0x124, 0x9e12cc\nB.NE            loc_9E1324                                             ; +0x128, 0x9e12d0\nCBNZ            W22, loc_9E1318                                        ; +0x12c, 0x9e12d4\nLDR             X1, [X19]                                              ; +0x130, 0x9e12d8\nMOV             X0, X19                                                ; +0x134, 0x9e12dc\nMOV             X19, #0                                                ; +0x138, 0x9e12e0\nLDR             X1, [X1,#0x10]                                         ; +0x13c, 0x9e12e4\nBLR             X1                                                     ; +0x140, 0x9e12e8\nLDR             X21, [X21,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x144, 0x9e12ec\nMOV             X0, X19                                                ; +0x148, 0x9e12f0\nLDR             X2, [X29,#0x70+var_8]                                  ; +0x14c, 0x9e12f4\nLDR             X1, [X21]                                              ; +0x150, 0x9e12f8\nCMP             X2, X1                                                 ; +0x154, 0x9e12fc\nB.NE            loc_9E1368                                             ; +0x158, 0x9e1300\nLDP             X19, X20, [SP,#0x70+var_60]                            ; +0x15c, 0x9e1304\nLDP             X21, X22, [SP,#0x70+var_50]                            ; +0x160, 0x9e1308\nLDR             X23, [SP,#0x70+var_40]                                 ; +0x164, 0x9e130c\nLDP             X29, X30, [SP+0x70+var_70],#0x70                       ; +0x168, 0x9e1310\nRET                                                                    ; +0x16c, 0x9e1314\nMOV             X0, X19; this                                          ; +0x170, 0x9e1318\nBL              _ZN7cocos2d8CCObject11autoreleaseEv; cocos2d::CCObject::autorelease(void) ; +0x174, 0x9e131c\nB               loc_9E12EC                                             ; +0x178, 0x9e1320\nADRP            X1, #pthread_create_ptr_0@PAGE                         ; +0x17c, 0x9e1324\nLDR             X1, [X1,#pthread_create_ptr_0@PAGEOFF]; pthread_create ; +0x180, 0x9e1328\nCBZ             X1, loc_9E1358                                         ; +0x184, 0x9e132c\nSUB             X3, X3, #8                                             ; +0x188, 0x9e1330\nLDAXR           W1, [X3]                                               ; +0x18c, 0x9e1334\nSUB             W2, W1, #1                                             ; +0x190, 0x9e1338\nSTLXR           W4, W2, [X3]                                           ; +0x194, 0x9e133c\nCBNZ            W4, loc_9E1334                                         ; +0x198, 0x9e1340\nCMP             W1, WZR                                                ; +0x19c, 0x9e1344\nB.GT            loc_9E12D4                                             ; +0x1a0, 0x9e1348\nADD             X1, X29, #0x70+var_18                                  ; +0x1a4, 0x9e134c\nBL              j__ZdlPv; operator delete(void *)                      ; +0x1a8, 0x9e1350\nB               loc_9E12D4                                             ; +0x1ac, 0x9e1354\nLDUR            W1, [X3,#-8]                                           ; +0x1b0, 0x9e1358\nSUB             W2, W1, #1                                             ; +0x1b4, 0x9e135c\nSTUR            W2, [X3,#-8]                                           ; +0x1b8, 0x9e1360\nB               loc_9E1344                                             ; +0x1bc, 0x9e1364\nBL              .__stack_chk_fail                                      ; +0x1c0, 0x9e1368\nMOV             X19, X0                                                ; +0x1c4, 0x9e136c\nLDR             X0, [X29,#0x70+var_10]                                 ; +0x1c8, 0x9e1370\nLDR             X20, [X20,#0xFE8]                                      ; +0x1cc, 0x9e1374\nSUB             X0, X0, #0x18                                          ; +0x1d0, 0x9e1378\nCMP             X0, X20                                                ; +0x1d4, 0x9e137c\nB.EQ            loc_9E138C                                             ; +0x1d8, 0x9e1380\nADD             X1, X29, #0x70+var_18                                  ; +0x1dc, 0x9e1384\nBL              sub_4DD5A0                                             ; +0x1e0, 0x9e1388\nMOV             X0, X19                                                ; +0x1e4, 0x9e138c\nBL              _Unwind_Resume                                         ; +0x1e8, 0x9e1390\nMOV             X20, X0                                                ; +0x1ec, 0x9e1394\nMOV             X0, X19; p                                             ; +0x1f0, 0x9e1398\nBL              _ZdlPv; operator delete(void *)                        ; +0x1f4, 0x9e139c\nMOV             X0, X20                                                ; +0x1f8, 0x9e13a0\nBL              _Unwind_Resume                                         ; +0x1fc, 0x9e13a4", "xrefs": ["BrowseSmartTemplateLayer::onTemplateObject @ 0x9e1454", "<???> @ 0xb5200"], "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"}