; ; EditorUI::createPrefab from 0x1401b7380 to 0x1401b7738 (952 bytes) ; ; 3 xrefs: ; > SetupSmartBlockLayer::onCreateAll @ 0x1405edce1 ; > BrowseSmartTemplateLayer::createPrefab @ 0x1405f0ba7 ; > @ 0x14091a240 ; ; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True! ; ; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA ; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings ; Generated at Fri, 27 Nov 2026 11:27:58 +0000 ; mov rax, rsp ; +0x0, 0x1401b7380 push rbp ; +0x3, 0x1401b7383 push rbx ; +0x4, 0x1401b7384 push rsi ; +0x5, 0x1401b7385 push rdi ; +0x6, 0x1401b7386 push r12 ; +0x7, 0x1401b7387 push r13 ; +0x9, 0x1401b7389 push r14 ; +0xb, 0x1401b738b push r15 ; +0xd, 0x1401b738d lea rbp, [rax-5Fh] ; +0xf, 0x1401b738f sub rsp, 0C8h ; +0x13, 0x1401b7393 movaps xmmword ptr [rax-58h], xmm6 ; +0x1a, 0x1401b739a movaps xmmword ptr [rax-68h], xmm7 ; +0x1e, 0x1401b739e mov rax, cs:__security_cookie ; +0x22, 0x1401b73a2 xor rax, rsp ; +0x29, 0x1401b73a9 mov qword ptr [rbp+57h+var_68], rax ; +0x2c, 0x1401b73ac mov r12d, r9d ; +0x30, 0x1401b73b0 mov rsi, r8 ; +0x33, 0x1401b73b3 mov r14, rdx ; +0x36, 0x1401b73b6 mov [rbp+57h+var_C8], rdx ; +0x39, 0x1401b73b9 mov r13, rcx ; +0x3d, 0x1401b73bd mov [rbp+57h+var_70], r8 ; +0x40, 0x1401b73c0 mov rdx, [rcx+5E8h] ; +0x44, 0x1401b73c4 mov ecx, [rdx+3C90h] ; +0x4b, 0x1401b73cb xor edi, edi ; +0x51, 0x1401b73d1 test ecx, ecx ; +0x53, 0x1401b73d3 js short loc_1401B73FE ; +0x55, 0x1401b73d5 mov eax, [rdx+3C50h] ; +0x57, 0x1401b73d7 sub eax, ecx ; +0x5d, 0x1401b73dd mov ecx, edi ; +0x5f, 0x1401b73df cmp eax, 1 ; +0x61, 0x1401b73e1 jle short loc_1401B73F4 ; +0x64, 0x1401b73e4 cmp ecx, 7 ; +0x66, 0x1401b73e6 jge short loc_1401B73F4 ; +0x69, 0x1401b73e9 shr eax, 1 ; +0x6b, 0x1401b73eb inc ecx ; +0x6d, 0x1401b73ed cmp eax, 1 ; +0x6f, 0x1401b73ef ja short loc_1401B73E6 ; +0x72, 0x1401b73f2 movsxd rax, ecx ; +0x74, 0x1401b73f4 inc dword ptr [rdx+rax*4+3C70h] ; +0x77, 0x1401b73f7 mov eax, [rdx+3C50h] ; +0x7e, 0x1401b73fe mov [rdx+3C90h], eax ; +0x84, 0x1401b7404 call cs:?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x8a, 0x1401b740a mov rcx, rax ; +0x90, 0x1401b7410 lea rdx, [rbp+57h+var_C0] ; +0x93, 0x1401b7413 call cs:?getWinSize@CCDirector@cocos2d@@QEAA?AVCCSize@2@XZ; cocos2d::CCDirector::getWinSize(void) ; +0x97, 0x1401b7417 mov rax, [r13+5E8h] ; +0x9d, 0x1401b741d mov rbx, [rax+10C8h] ; +0xa4, 0x1401b7424 movss xmm2, dword ptr [r13+388h] ; +0xab, 0x1401b742b movss xmm3, cs:dword_140834F20 ; +0xb4, 0x1401b7434 mulss xmm2, xmm3 ; +0xbc, 0x1401b743c movss xmm0, [rbp+57h+var_BC] ; +0xc0, 0x1401b7440 mulss xmm0, xmm3 ; +0xc5, 0x1401b7445 addss xmm2, xmm0 ; +0xc9, 0x1401b7449 movss xmm1, [rbp+57h+var_C0] ; +0xcd, 0x1401b744d mulss xmm1, xmm3 ; +0xd2, 0x1401b7452 lea rcx, [rbp+57h+var_D0] ; +0xd6, 0x1401b7456 call cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0xda, 0x1401b745a mov r8, rax ; +0xe0, 0x1401b7460 lea rdx, [rsp+28h] ; +0xe3, 0x1401b7463 mov rcx, rbx ; +0xe8, 0x1401b7468 call cs:?convertToNodeSpace@CCNode@cocos2d@@QEAA?AVCCPoint@2@AEBV32@@Z; cocos2d::CCNode::convertToNodeSpace(cocos2d::CCPoint const &) ; +0xeb, 0x1401b746b mov eax, [r14+0CCh] ; +0xf1, 0x1401b7471 shl eax, 2 ; +0xf8, 0x1401b7478 movd xmm1, eax ; +0xfb, 0x1401b747b cvtdq2ps xmm1, xmm1 ; +0xff, 0x1401b747f movss xmm6, cs:dword_140835624 ; +0x102, 0x1401b7482 mulss xmm1, xmm6 ; +0x10a, 0x1401b748a movss xmm0, dword ptr [rsp+28h] ; +0x10e, 0x1401b748e addss xmm0, xmm1 ; +0x114, 0x1401b7494 movss dword ptr [rsp+28h], xmm0 ; +0x118, 0x1401b7498 lea rdx, [rsp+28h] ; +0x11e, 0x1401b749e lea rcx, [rbp+57h+var_D0] ; +0x123, 0x1401b74a3 call cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0x127, 0x1401b74a7 mov r8, rax ; +0x12d, 0x1401b74ad lea rdx, [rsp+100h+var_E0] ; +0x130, 0x1401b74b0 mov rcx, r13 ; +0x135, 0x1401b74b5 call EditorUI__getGridSnappedPos ; +0x138, 0x1401b74b8 mov rdx, rax ; +0x13d, 0x1401b74bd lea rcx, [rsp+28h] ; +0x140, 0x1401b74c0 call cs:??4CCPoint@cocos2d@@QEAAAEAV01@AEBV01@@Z; cocos2d::CCPoint::operator=(cocos2d::CCPoint const &) ; +0x145, 0x1401b74c5 inc dword ptr [r14+0CCh] ; +0x14b, 0x1401b74cb lea rdx, dword_14090A6E8 ; +0x152, 0x1401b74d2 lea rcx, [rbp+57h+var_B8] ; +0x159, 0x1401b74d9 call cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0x15d, 0x1401b74dd mov r15, rdi ; +0x163, 0x1401b74e3 lea rbx, cs:140000000h ; +0x166, 0x1401b74e6 movss xmm7, cs:dword_140835E88 ; +0x16d, 0x1401b74ed nop word ptr [rax+rax+00000000h] ; +0x175, 0x1401b74f5 mov eax, edi ; +0x180, 0x1401b7500 cmp [rsi+10h], rax ; +0x182, 0x1401b7502 jbe loc_1401B7704 ; +0x186, 0x1401b7506 mov rax, rsi ; +0x18c, 0x1401b750c cmp qword ptr [rsi+18h], 0Fh ; +0x18f, 0x1401b750f jbe short loc_1401B7519 ; +0x194, 0x1401b7514 mov rax, [rsi] ; +0x196, 0x1401b7516 movsx r14d, byte ptr [rax+r15] ; +0x199, 0x1401b7519 cmp r14d, 30h ; '0' ; +0x19e, 0x1401b751e jz loc_1401B7642 ; +0x1a2, 0x1401b7522 mov edx, r14d ; +0x1a8, 0x1401b7528 lea rcx, [rsp+100h+var_E0] ; +0x1ab, 0x1401b752b call GJSmartTemplate__offsetForType ; +0x1b0, 0x1401b7530 test edi, edi ; +0x1b5, 0x1401b7535 jnz short loc_1401B754A ; +0x1b7, 0x1401b7537 lea rdx, [rsp+100h+var_E0] ; +0x1b9, 0x1401b7539 lea rcx, [rbp+57h+var_B8] ; +0x1be, 0x1401b753e call cs:??4CCPoint@cocos2d@@QEAAAEAV01@AEBV01@@Z; cocos2d::CCPoint::operator=(cocos2d::CCPoint const &) ; +0x1c2, 0x1401b7542 jmp short loc_1401B75C8 ; +0x1c8, 0x1401b7548 lea eax, [rdi-1] ; +0x1ca, 0x1401b754a test eax, 0FFFFFFFAh ; +0x1cd, 0x1401b754d jnz short loc_1401B756B ; +0x1d2, 0x1401b7552 cmp edi, 2 ; +0x1d4, 0x1401b7554 jz short loc_1401B756B ; +0x1d7, 0x1401b7557 movss xmm0, dword ptr [rsp+24h] ; +0x1d9, 0x1401b7559 addss xmm0, xmm6 ; +0x1df, 0x1401b755f movss dword ptr [rsp+24h], xmm0 ; +0x1e3, 0x1401b7563 jmp short loc_1401B7571 ; +0x1e9, 0x1401b7569 movss xmm0, dword ptr [rsp+24h] ; +0x1eb, 0x1401b756b cmp edi, 2 ; +0x1f1, 0x1401b7571 jz short loc_1401B757E ; +0x1f4, 0x1401b7574 lea eax, [rdi-7] ; +0x1f6, 0x1401b7576 cmp eax, 1 ; +0x1f9, 0x1401b7579 ja short loc_1401B7588 ; +0x1fc, 0x1401b757c addss xmm0, xmm7 ; +0x1fe, 0x1401b757e movss dword ptr [rsp+24h], xmm0 ; +0x202, 0x1401b7582 lea eax, [rdi-3] ; +0x208, 0x1401b7588 test eax, 0FFFFFFF9h ; +0x20b, 0x1401b758b jnz short loc_1401B75A9 ; +0x210, 0x1401b7590 cmp edi, 9 ; +0x212, 0x1401b7592 jz short loc_1401B75A9 ; +0x215, 0x1401b7595 movss xmm0, [rsp+100h+var_E0] ; +0x217, 0x1401b7597 addss xmm0, xmm7 ; +0x21d, 0x1401b759d movss [rsp+100h+var_E0], xmm0 ; +0x221, 0x1401b75a1 jmp short loc_1401B75AF ; +0x227, 0x1401b75a7 movss xmm0, [rsp+100h+var_E0] ; +0x229, 0x1401b75a9 lea eax, [rdi-4] ; +0x22f, 0x1401b75af test eax, 0FFFFFFF9h ; +0x232, 0x1401b75b2 jnz short loc_1401B75C8 ; +0x237, 0x1401b75b7 cmp edi, 0Ah ; +0x239, 0x1401b75b9 jz short loc_1401B75C8 ; +0x23c, 0x1401b75bc addss xmm0, xmm6 ; +0x23e, 0x1401b75be movss [rsp+100h+var_E0], xmm0 ; +0x242, 0x1401b75c2 lea r8, [rsp+100h+var_E0] ; +0x248, 0x1401b75c8 lea rdx, [rbp+57h+var_D0] ; +0x24d, 0x1401b75cd lea rcx, [rsp+28h] ; +0x251, 0x1401b75d1 call cs:??HCCPoint@cocos2d@@QEBA?AV01@AEBV01@@Z; cocos2d::CCPoint::operator+(cocos2d::CCPoint const &) ; +0x256, 0x1401b75d6 lea eax, [r14-31h]; switch 28 cases ; +0x25c, 0x1401b75dc cmp eax, 1Bh ; +0x260, 0x1401b75e0 ja short def_1401B75F9; jumptable 00000001401B75F9 default case, cases 49,58-64 ; +0x263, 0x1401b75e3 cdqe ; +0x265, 0x1401b75e5 movzx eax, ds:(byte_1401B771C - 140000000h)[rbx+rax] ; +0x267, 0x1401b75e7 mov ecx, ds:(jpt_1401B75F9 - 140000000h)[rbx+rax*4] ; +0x26f, 0x1401b75ef add rcx, rbx ; +0x276, 0x1401b75f6 jmp rcx; switch jump ; +0x279, 0x1401b75f9 mov edx, 0B50h; jumptable 00000001401B75F9 cases 50-53 ; +0x27b, 0x1401b75fb jmp short loc_1401B760E ; +0x280, 0x1401b7600 mov edx, 0B51h; jumptable 00000001401B75F9 cases 54-57,65-76 ; +0x282, 0x1401b7602 jmp short loc_1401B760E ; +0x287, 0x1401b7607 mov edx, 0B4Fh; jumptable 00000001401B75F9 default case, cases 49,58-64 ; +0x289, 0x1401b7609 lea r8, [rbp+57h+var_D0] ; +0x28e, 0x1401b760e mov rcx, r13 ; +0x292, 0x1401b7612 call EditorUI__createObject ; +0x295, 0x1401b7615 mov rbx, rax ; +0x29a, 0x1401b761a mov rdx, rax ; +0x29d, 0x1401b761d mov ecx, r14d ; +0x2a0, 0x1401b7620 call GJSmartTemplate__applyTransformationsForType ; +0x2a3, 0x1401b7623 test edi, edi ; +0x2a8, 0x1401b7628 jz short loc_1401B763B ; +0x2aa, 0x1401b762a mov byte ptr [rbx+550h], 1 ; +0x2ac, 0x1401b762c mov rcx, rbx ; +0x2b3, 0x1401b7633 call SmartGameObject__updateSmartFrame ; +0x2b6, 0x1401b7636 lea rbx, cs:140000000h ; +0x2bb, 0x1401b763b inc edi ; +0x2c2, 0x1401b7642 inc r15 ; +0x2c4, 0x1401b7644 cmp edi, 9 ; +0x2c7, 0x1401b7647 jl loc_1401B7500 ; +0x2ca, 0x1401b764a test r12d, r12d ; +0x2d0, 0x1401b7650 jle short loc_1401B76CC ; +0x2d3, 0x1401b7653 mov rdx, rsi ; +0x2d5, 0x1401b7655 lea rcx, [rbp+57h+var_B0] ; +0x2d8, 0x1401b7658 call sub_14003F4F0 ; +0x2dc, 0x1401b765c mov r8d, r12d ; +0x2e1, 0x1401b7661 mov rdx, rax ; +0x2e4, 0x1401b7664 mov rcx, [rbp+57h+var_C8] ; +0x2e7, 0x1401b7667 call GJSmartTemplate__getPrefabWithID ; +0x2eb, 0x1401b766b test rax, rax ; +0x2f0, 0x1401b7670 jz short loc_1401B76CC ; +0x2f3, 0x1401b7673 lea rdx, [rax+58h] ; +0x2f5, 0x1401b7675 lea rcx, [rbp+57h+var_90] ; +0x2f9, 0x1401b7679 call sub_14003F4F0 ; +0x2fd, 0x1401b767d xor r9d, r9d ; +0x302, 0x1401b7682 xor r8d, r8d ; +0x305, 0x1401b7685 mov rdx, rax ; +0x308, 0x1401b7688 mov rcx, r13 ; +0x30b, 0x1401b768b call EditorUI__pasteObjects ; +0x30e, 0x1401b768e mov rbx, rax ; +0x313, 0x1401b7693 test rax, rax ; +0x316, 0x1401b7696 jz short loc_1401B76CC ; +0x319, 0x1401b7699 lea r8, [rbp+57h+var_B8] ; +0x31b, 0x1401b769b lea rdx, [rbp+57h+var_C8] ; +0x31f, 0x1401b769f lea rcx, [rsp+28h] ; +0x323, 0x1401b76a3 call cs:??HCCPoint@cocos2d@@QEBA?AV01@AEBV01@@Z; cocos2d::CCPoint::operator+(cocos2d::CCPoint const &) ; +0x328, 0x1401b76a8 xor r9d, r9d ; +0x32e, 0x1401b76ae lea r8, [rbp+57h+var_C8] ; +0x331, 0x1401b76b1 mov rdx, rbx ; +0x335, 0x1401b76b5 mov rcx, r13 ; +0x338, 0x1401b76b8 call EditorUI__repositionObjectsToCenter ; +0x33b, 0x1401b76bb mov rdx, rbx ; +0x340, 0x1401b76c0 mov rcx, r13 ; +0x343, 0x1401b76c3 call EditorUI__deleteSmartBlocksFromObjects ; +0x346, 0x1401b76c6 nop ; +0x34b, 0x1401b76cb mov rcx, rsi ; +0x34c, 0x1401b76cc call sub_14003D310 ; +0x34f, 0x1401b76cf mov rcx, qword ptr [rbp+57h+var_68] ; +0x354, 0x1401b76d4 xor rcx, rsp; StackCookie ; +0x358, 0x1401b76d8 call __security_check_cookie ; +0x35b, 0x1401b76db movaps xmm6, [rsp+100h+var_58+8] ; +0x360, 0x1401b76e0 movaps xmm7, [rsp+100h+var_68+8] ; +0x368, 0x1401b76e8 add rsp, 0C8h ; +0x370, 0x1401b76f0 pop r15 ; +0x377, 0x1401b76f7 pop r14 ; +0x379, 0x1401b76f9 pop r13 ; +0x37b, 0x1401b76fb pop r12 ; +0x37d, 0x1401b76fd pop rdi ; +0x37f, 0x1401b76ff pop rsi ; +0x380, 0x1401b7700 pop rbx ; +0x381, 0x1401b7701 pop rbp ; +0x382, 0x1401b7702 retn ; +0x383, 0x1401b7703 call sub_14003F4D0 ; +0x384, 0x1401b7704 align 4 ; +0x389, 0x1401b7709 dd offset def_1401B75F9 - 140000000h; jump table for switch statement ; +0x38c, 0x1401b770c db 0, 1, 1, 1; indirect table for switch statement ; +0x39c, 0x1401b771c