{"type": "func", "start": 5373266368, "end": 5373266478, "name": "SetupSmartBlockLayer::onSelectPremade", "pseudocode": "// \n// SetupSmartBlockLayer::onSelectPremade from 0x1404589c0 to 0x140458a2e (110 bytes)\n// \n// 2 xrefs:\n// > SetupSmartBlockLayer::init @ 0x140456f54\n// > <???> @ 0x1406daa6c\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\nvoid SetupSmartBlockLayer::onSelectPremade(SetupSmartBlockLayer *a1, cocos2d::CCObject *a2)\n{\n  SelectArtLayer *v3; // rax\n  __int64 *v4; // rbx\n  __int64 v5; // rax\n  SelectArtDelegate *v6; // rcx\n\n  v3 = SelectArtLayer::create(Premade, -1);\n  v4 = (__int64 *)v3;\n  if ( v3->m_lineSprites )\n  {\n    v3->m_line = 0;\n    SelectArtLayer::onSelectCustom(v3, nullptr);\n  }\n  v5 = *v4;\n  v6 = &a1->SelectArtDelegate;\n  if ( !a1 )\n    v6 = nullptr;\n  v4[83] = (__int64)v6;\n  (*(void (__fastcall **)(__int64 *))(v5 + 1040))(v4);\n}", "assembly": "; \n; SetupSmartBlockLayer::onSelectPremade from 0x1404589c0 to 0x140458a2e (110 bytes)\n; \n; 2 xrefs:\n; > SetupSmartBlockLayer::init @ 0x140456f54\n; > <???> @ 0x1406daa6c\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_0], rbx                                               ; +0x0, 0x1404589c0\nmov     [rsp+arg_8], rsi                                               ; +0x5, 0x1404589c5\npush    rdi                                                            ; +0xa, 0x1404589ca\nsub     rsp, 20h                                                       ; +0xb, 0x1404589cb\nmov     edx, 0FFFFFFFFh                                                ; +0xf, 0x1404589cf\nmov     rdi, rcx                                                       ; +0x14, 0x1404589d4\nlea     ecx, [rdx+4]                                                   ; +0x17, 0x1404589d7\ncall    SelectArtLayer__create                                         ; +0x1a, 0x1404589da\nxor     esi, esi                                                       ; +0x1f, 0x1404589df\nmov     rbx, rax                                                       ; +0x21, 0x1404589e1\ncmp     [rax+280h], rsi                                                ; +0x24, 0x1404589e4\njz      short loc_1404589FD                                            ; +0x2b, 0x1404589eb\nxor     edx, edx                                                       ; +0x2d, 0x1404589ed\nmov     [rax+28Ch], esi                                                ; +0x2f, 0x1404589ef\nmov     rcx, rax                                                       ; +0x35, 0x1404589f5\ncall    SelectArtLayer__onSelectCustom                                 ; +0x38, 0x1404589f8\nmov     rax, [rbx]                                                     ; +0x3d, 0x1404589fd\nlea     rcx, [rdi+280h]                                                ; +0x40, 0x140458a00\ntest    rdi, rdi                                                       ; +0x47, 0x140458a07\ncmovz   rcx, rsi                                                       ; +0x4a, 0x140458a0a\nmov     [rbx+298h], rcx                                                ; +0x4e, 0x140458a0e\nmov     rcx, rbx                                                       ; +0x55, 0x140458a15\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x58, 0x140458a18\nmov     rsi, [rsp+28h+arg_8]                                           ; +0x5d, 0x140458a1d\nadd     rsp, 20h                                                       ; +0x62, 0x140458a22\npop     rdi                                                            ; +0x66, 0x140458a26\njmp     qword ptr [rax+410h]                                           ; +0x67, 0x140458a27", "xrefs": ["SetupSmartBlockLayer::init @ 0x140456f54", "<???> @ 0x1406daa6c"], "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"}