; ; BrowseSmartTemplateLayer::init from 0x53fdd0 to 0x540066 (662 bytes) ; ; 1 xrefs: ; > BrowseSmartTemplateLayer::create @ 0x540100 ; ; This function is hookable on this platform! ; ; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA ; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings ; PUSH.W {R4-R11,LR} ; +0x0, 0x53fdd0 SUB SP, SP, #0x74 ; +0x4, 0x53fdd4 LDR R4, =(__stack_chk_guard_ptr - 0x53FDE2) ; +0x6, 0x53fdd6 MOV R9, R1 ; +0x8, 0x53fdd8 MOVS R1, #0x96; int ; +0xa, 0x53fdda MOV R5, R0 ; +0xc, 0x53fddc ADD R4, PC; __stack_chk_guard_ptr ; +0xe, 0x53fdde LDR R4, [R4]; __stack_chk_guard ; +0x10, 0x53fde0 STR R2, [SP,#0x74+var_58] ; +0x12, 0x53fde2 LDR R3, [R4] ; +0x14, 0x53fde4 STR R3, [SP,#0x74+var_8] ; +0x16, 0x53fde6 BL _ZN12FLAlertLayer4initEi; FLAlertLayer::init(int) ; +0x18, 0x53fde8 STR R4, [SP,#0x74+var_64] ; +0x1c, 0x53fdec STR R0, [SP,#0x74+var_70] ; +0x1e, 0x53fdee CMP R0, #0 ; +0x20, 0x53fdf0 BEQ.W loc_540012 ; +0x22, 0x53fdf2 MOV R0, R5; this ; +0x26, 0x53fdf6 BL _ZN24BrowseSmartTemplateLayer9baseSetupEv; BrowseSmartTemplateLayer::baseSetup(void) ; +0x28, 0x53fdf8 BL _ZN7cocos2d10CCDirector14sharedDirectorEv; cocos2d::CCDirector::sharedDirector(void) ; +0x2c, 0x53fdfc MOV R1, R0 ; +0x30, 0x53fe00 ADD R0, SP, #0x74+var_48; this ; +0x32, 0x53fe02 BL _ZN7cocos2d10CCDirector10getWinSizeEv; cocos2d::CCDirector::getWinSize(void) ; +0x34, 0x53fe04 CMP.W R9, #0 ; +0x38, 0x53fe08 BEQ loc_53FE18 ; +0x3c, 0x53fe0c STR.W R9, [R5,#0x1F0] ; +0x3e, 0x53fe0e MOV R0, R9; this ; +0x42, 0x53fe12 BL _ZN7cocos2d8CCObject6retainEv; cocos2d::CCObject::retain(void) ; +0x44, 0x53fe14 ADD R4, SP, #0x74+var_40 ; +0x48, 0x53fe18 LDR R1, =(aHelp - 0x53FE24); "Help" ; +0x4a, 0x53fe1a ADD R2, SP, #0x74+var_50 ; +0x4c, 0x53fe1c ADD R6, SP, #0x74+var_24 ; +0x4e, 0x53fe1e ADD R1, PC; "Help" ; +0x50, 0x53fe20 MOV R0, R4; int ; +0x52, 0x53fe22 BL sub_776584 ; +0x54, 0x53fe24 LDR R1, =(aShowsTheCgAuto - 0x53FE32); "Shows the auto-build designs in"... ; +0x58, 0x53fe28 MOV R0, R6; int ; +0x5a, 0x53fe2a ADD R2, SP, #0x74+var_4C ; +0x5c, 0x53fe2c ADD R1, PC; "Shows the auto-build designs in"... ; +0x5e, 0x53fe2e BL sub_776584 ; +0x60, 0x53fe30 MOV R0, R4 ; +0x64, 0x53fe34 MOV R1, R6 ; +0x66, 0x53fe36 MOV.W R2, #0x3F800000 ; +0x68, 0x53fe38 BL _ZN15InfoAlertButton6createESsSsf; InfoAlertButton::create(std::string,std::string,float) ; +0x6c, 0x53fe3c MOV R7, R0 ; +0x70, 0x53fe40 MOV R0, R6 ; +0x72, 0x53fe42 BL sub_774008 ; +0x74, 0x53fe44 MOV R0, R4 ; +0x78, 0x53fe48 BL sub_774008 ; +0x7a, 0x53fe4a LDR.W R0, [R5,#0x1B8] ; +0x7e, 0x53fe4e MOV R1, R7 ; +0x82, 0x53fe52 LDR R3, [R0] ; +0x84, 0x53fe54 LDR.W R3, [R3,#0xDC] ; +0x86, 0x53fe56 BLX R3 ; +0x8a, 0x53fe5a VMOV.F32 S12, #0.5 ; +0x8c, 0x53fe5c VLDR S15, [SP,#0x74+var_48] ; +0x90, 0x53fe60 MOV R0, R4; this ; +0x94, 0x53fe64 LDR R3, [R7] ; +0x96, 0x53fe66 LDR.W R10, [R5,#0x1B8] ; +0x98, 0x53fe68 VLDR S14, =225.0 ; +0x9c, 0x53fe6c LDR.W R8, [R3,#0x5C] ; +0xa0, 0x53fe70 VLDR S11, [SP,#0x74+var_44] ; +0xa4, 0x53fe74 VMLA.F32 S14, S15, S12 ; +0xa8, 0x53fe78 VLDR S15, =140.0 ; +0xac, 0x53fe7c VMLA.F32 S15, S11, S12 ; +0xb0, 0x53fe80 VMOV.F32 S13, #18.0 ; +0xb4, 0x53fe84 VSUB.F32 S14, S14, S13 ; +0xb8, 0x53fe88 VSUB.F32 S15, S15, S13 ; +0xbc, 0x53fe8c VMOV R1, S14; float ; +0xc0, 0x53fe90 VMOV R2, S15; float ; +0xc4, 0x53fe94 BL _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0xc8, 0x53fe98 MOV R0, R6; this ; +0xcc, 0x53fe9c MOV R1, R10; cocos2d::CCPoint * ; +0xce, 0x53fe9e MOV R2, R4 ; +0xd0, 0x53fea0 BL _ZN7cocos2d6CCNode18convertToNodeSpaceERKNS_7CCPointE; cocos2d::CCNode::convertToNodeSpace(cocos2d::CCPoint const&) ; +0xd2, 0x53fea2 MOV R0, R7 ; +0xd6, 0x53fea6 MOV R1, R6 ; +0xd8, 0x53fea8 BLX R8 ; +0xda, 0x53feaa LDR.W R3, [R5,#0x1F0] ; +0xdc, 0x53feac CMP R3, #0 ; +0xe0, 0x53feb0 BEQ.W loc_540012 ; +0xe2, 0x53feb2 LDR.W R3, [R9,#0x34] ; +0xe6, 0x53feb6 MOV.W R8, #0 ; +0xea, 0x53feba ADD R7, SP, #0x74+var_50 ; +0xee, 0x53febe MOV R6, R8 ; +0xf0, 0x53fec0 MOV R0, R3; this ; +0xf2, 0x53fec2 STR R3, [SP,#0x74+var_6C] ; +0xf4, 0x53fec4 BL _ZN7cocos2d12CCDictionary7allKeysEv; cocos2d::CCDictionary::allKeys(void) ; +0xf6, 0x53fec6 LDR R3, =(unk_939830 - 0x53FED0) ; +0xfa, 0x53feca ADD R3, PC; unk_939830 ; +0xfc, 0x53fecc STR R3, [SP,#0x74+var_60] ; +0xfe, 0x53fece LDR R3, =(unk_939830 - 0x53FED6) ; +0x100, 0x53fed0 ADD R3, PC; unk_939830 ; +0x102, 0x53fed2 STR R3, [SP,#0x74+var_5C] ; +0x104, 0x53fed4 MOV R11, R0 ; +0x106, 0x53fed6 MOV R0, R11; this ; +0x108, 0x53fed8 BL _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x10a, 0x53feda CMP R8, R0 ; +0x10e, 0x53fede BCS loc_53FFAC ; +0x110, 0x53fee0 MOV R1, R8; unsigned int ; +0x112, 0x53fee2 MOV R0, R11; this ; +0x114, 0x53fee4 BL _ZN7cocos2d7CCArray13stringAtIndexEj; cocos2d::CCArray::stringAtIndex(uint) ; +0x116, 0x53fee6 BL _ZNK7cocos2d8CCString10getCStringEv; cocos2d::CCString::getCString(void) ; +0x11a, 0x53feea ADD R2, SP, #0x74+var_24 ; +0x11e, 0x53feee MOV R1, R0; char * ; +0x120, 0x53fef0 MOV R0, R7; int ; +0x122, 0x53fef2 BL sub_776584 ; +0x124, 0x53fef4 LDR R0, [SP,#0x74+var_6C] ; +0x128, 0x53fef8 MOV R1, R7 ; +0x12a, 0x53fefa BL _ZN7cocos2d12CCDictionary12objectForKeyERKSs; cocos2d::CCDictionary::objectForKey(std::string const&) ; +0x12c, 0x53fefc STR R0, [SP,#0x74+var_68] ; +0x130, 0x53ff00 BL _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x132, 0x53ff02 CMP R0, #0 ; +0x136, 0x53ff06 BEQ loc_53FFA0 ; +0x138, 0x53ff08 ADD.W R10, SP, #0x74+var_3C ; +0x13a, 0x53ff0a LDR R1, [SP,#0x74+var_60]; char * ; +0x13e, 0x53ff0e ADD R2, SP, #0x74+var_54 ; +0x140, 0x53ff10 MOVS R3, #0 ; +0x142, 0x53ff12 MOV R0, R10; int ; +0x144, 0x53ff14 STR R3, [SP,#0x74+var_40] ; +0x146, 0x53ff16 BL sub_776584 ; +0x148, 0x53ff18 ADD R0, SP, #0x74+var_38; int ; +0x14c, 0x53ff1c LDR R1, [SP,#0x74+var_5C]; char * ; +0x14e, 0x53ff1e ADD R2, SP, #0x74+var_24 ; +0x150, 0x53ff20 BL sub_776584 ; +0x152, 0x53ff22 MOV R0, R10 ; +0x156, 0x53ff26 MOV R1, R7 ; +0x158, 0x53ff28 MOVS R3, #0 ; +0x15a, 0x53ff2a STR R3, [SP,#0x74+var_34] ; +0x15c, 0x53ff2c STRB.W R3, [SP,#0x74+var_30] ; +0x15e, 0x53ff2e STR R3, [SP,#0x74+var_2C] ; +0x162, 0x53ff32 STRB.W R3, [SP,#0x74+var_28] ; +0x164, 0x53ff34 STRB.W R3, [SP,#0x74+var_27] ; +0x168, 0x53ff38 STRB.W R3, [SP,#0x74+var_26] ; +0x16c, 0x53ff3c BL sub_775D40 ; +0x170, 0x53ff40 B loc_53FF4E ; +0x174, 0x53ff44 ADD R0, SP, #0x74+var_3C ; +0x176, 0x53ff46 BL sub_774008 ; +0x178, 0x53ff48 B loc_540046 ; +0x17c, 0x53ff4c ADD R0, SP, #0x74+var_38 ; +0x17e, 0x53ff4e MOV R1, R7 ; +0x180, 0x53ff50 BL sub_775D40 ; +0x182, 0x53ff52 LDR R0, [SP,#0x74+var_68]; this ; +0x186, 0x53ff56 BL _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x188, 0x53ff58 ADD.W R10, SP, #0x74+var_4C ; +0x18c, 0x53ff5c STR R0, [SP,#0x74+var_34] ; +0x190, 0x53ff60 MOV R1, R7 ; +0x192, 0x53ff62 MOV R0, R10 ; +0x194, 0x53ff64 BL sub_775C20 ; +0x196, 0x53ff66 MOV R0, R9 ; +0x19a, 0x53ff6a MOV R1, R10 ; +0x19c, 0x53ff6c BL _ZN15GJSmartTemplate12isUnrequiredESs; GJSmartTemplate::isUnrequired(std::string) ; +0x19e, 0x53ff6e STRB.W R0, [SP,#0x74+var_30] ; +0x1a2, 0x53ff72 MOV R0, R10 ; +0x1a6, 0x53ff76 ADD.W R10, SP, #0x74+var_24 ; +0x1a8, 0x53ff78 BL sub_774008 ; +0x1ac, 0x53ff7c MOV R1, R4; SmartPrefabResult * ; +0x1b0, 0x53ff80 MOV R0, R10; this ; +0x1b2, 0x53ff82 BL _ZN17SmartPrefabResultC2ERKS_; SmartPrefabResult::SmartPrefabResult(SmartPrefabResult const&) ; +0x1b4, 0x53ff84 MOV R0, R5 ; +0x1b8, 0x53ff88 MOV R1, R10 ; +0x1ba, 0x53ff8a MOV R2, R6 ; +0x1bc, 0x53ff8c BL _ZN24BrowseSmartTemplateLayer17addPrefabMenuItemE17SmartPrefabResulti; BrowseSmartTemplateLayer::addPrefabMenuItem(SmartPrefabResult,int) ; +0x1be, 0x53ff8e MOV R0, R10; this ; +0x1c2, 0x53ff92 ADDS R6, #1 ; +0x1c4, 0x53ff94 BL _ZN17SmartPrefabResultD2Ev; SmartPrefabResult::~SmartPrefabResult() ; +0x1c6, 0x53ff96 MOV R0, R4; this ; +0x1ca, 0x53ff9a BL _ZN17SmartPrefabResultD2Ev; SmartPrefabResult::~SmartPrefabResult() ; +0x1cc, 0x53ff9c MOV R0, R7 ; +0x1d0, 0x53ffa0 ADD.W R8, R8, #1 ; +0x1d2, 0x53ffa2 BL sub_774008 ; +0x1d6, 0x53ffa6 B loc_53FED8 ; +0x1da, 0x53ffaa LDR.W R0, [R5,#0x1F0] ; +0x1dc, 0x53ffac MOV R1, R4 ; +0x1e0, 0x53ffb0 MOVS R3, #0 ; +0x1e2, 0x53ffb2 STR R3, [SP,#0x74+var_40] ; +0x1e4, 0x53ffb4 STR R3, [SP,#0x74+var_3C] ; +0x1e6, 0x53ffb6 STR R3, [SP,#0x74+var_38] ; +0x1e8, 0x53ffb8 BL _ZN15GJSmartTemplate16getTemplateStateERSt6vectorI17SmartPrefabResultSaIS1_EE; GJSmartTemplate::getTemplateState(std::vector &) ; +0x1ea, 0x53ffba LDR.W R9, =0xB6DB6DB7 ; +0x1ee, 0x53ffbe ADD.W R8, SP, #0x74+var_24 ; +0x1f2, 0x53ffc2 MOVS R7, #0 ; +0x1f6, 0x53ffc6 MOV.W R10, #0x1C ; +0x1f8, 0x53ffc8 LDR R1, [SP,#0x74+var_40] ; +0x1fc, 0x53ffcc LDR R3, [SP,#0x74+var_3C] ; +0x1fe, 0x53ffce SUBS R3, R3, R1 ; +0x200, 0x53ffd0 ASRS R3, R3, #2 ; +0x202, 0x53ffd2 MUL R3, R9, R3 ; +0x204, 0x53ffd4 CMP R7, R3 ; +0x208, 0x53ffd8 BCS loc_540004 ; +0x20a, 0x53ffda MLA R1, R10, R7, R1; SmartPrefabResult * ; +0x20c, 0x53ffdc LDR R3, [R1,#0xC] ; +0x210, 0x53ffe0 CBNZ R3, loc_540000 ; +0x212, 0x53ffe2 LDRB R3, [R1,#0x10] ; +0x214, 0x53ffe4 CBNZ R3, loc_540000 ; +0x216, 0x53ffe6 MOV R0, R8; this ; +0x218, 0x53ffe8 BL _ZN17SmartPrefabResultC2ERKS_; SmartPrefabResult::SmartPrefabResult(SmartPrefabResult const&) ; +0x21a, 0x53ffea MOV R0, R5 ; +0x21e, 0x53ffee MOV R1, R8 ; +0x220, 0x53fff0 MOV R2, R6 ; +0x222, 0x53fff2 BL _ZN24BrowseSmartTemplateLayer17addPrefabMenuItemE17SmartPrefabResulti; BrowseSmartTemplateLayer::addPrefabMenuItem(SmartPrefabResult,int) ; +0x224, 0x53fff4 MOV R0, R8; this ; +0x228, 0x53fff8 ADDS R6, #1 ; +0x22a, 0x53fffa BL _ZN17SmartPrefabResultD2Ev; SmartPrefabResult::~SmartPrefabResult() ; +0x22c, 0x53fffc ADDS R7, #1 ; +0x230, 0x540000 B loc_53FFCC ; +0x232, 0x540002 MOV R0, R5; this ; +0x234, 0x540004 MOVS R1, #0; int ; +0x236, 0x540006 BL _ZN24BrowseSmartTemplateLayer8goToPageEi; BrowseSmartTemplateLayer::goToPage(int) ; +0x238, 0x540008 MOV R0, R4 ; +0x23c, 0x54000c BL _ZNSt6vectorI17SmartPrefabResultSaIS0_EED2Ev; std::vector::~vector() ; +0x23e, 0x54000e LDR R3, [SP,#0x74+var_64] ; +0x242, 0x540012 LDR R2, [SP,#0x74+var_8] ; +0x244, 0x540014 LDR R0, [SP,#0x74+var_70] ; +0x246, 0x540016 LDR R3, [R3] ; +0x248, 0x540018 CMP R2, R3 ; +0x24a, 0x54001a BEQ loc_540060 ; +0x24c, 0x54001c BLX __stack_chk_fail ; +0x24e, 0x54001e MOV R0, R6 ; +0x252, 0x540022 BL sub_774008 ; +0x254, 0x540024 B loc_54002A ; +0x258, 0x540028 MOV R0, R4 ; +0x25a, 0x54002a B loc_540048 ; +0x25c, 0x54002c MOV R0, R10 ; +0x25e, 0x54002e BL sub_774008 ; +0x260, 0x540030 B loc_54003E ; +0x264, 0x540034 MOV R0, R10; this ; +0x266, 0x540036 BL _ZN17SmartPrefabResultD2Ev; SmartPrefabResult::~SmartPrefabResult() ; +0x268, 0x540038 B loc_54003E ; +0x26c, 0x54003c MOV R0, R4; this ; +0x26e, 0x54003e BL _ZN17SmartPrefabResultD2Ev; SmartPrefabResult::~SmartPrefabResult() ; +0x270, 0x540040 B loc_540046 ; +0x274, 0x540044 ADD R0, SP, #0x74+var_50 ; +0x276, 0x540046 BL sub_774008 ; +0x278, 0x540048 BL __cxa_end_cleanup ; +0x27c, 0x54004c MOV R0, R4 ; +0x280, 0x540050 BL _ZNSt6vectorI17SmartPrefabResultSaIS0_EED2Ev; std::vector::~vector() ; +0x282, 0x540052 B loc_54004C ; +0x286, 0x540056 MOV R0, R8; this ; +0x288, 0x540058 BL _ZN17SmartPrefabResultD2Ev; SmartPrefabResult::~SmartPrefabResult() ; +0x28a, 0x54005a B loc_540050 ; +0x28e, 0x54005e ADD SP, SP, #0x74 ; 't' ; +0x290, 0x540060 POP.W {R4-R11,PC} ; +0x292, 0x540062