{"type": "func", "start": 5123064, "end": 5123224, "name": "AnimatedShopKeeper::init", "pseudocode": "// \n// AnimatedShopKeeper::init from 0x4e2bf8 to 0x4e2c98 (160 bytes)\n// \n// 1 xrefs:\n// > AnimatedShopKeeper::create @ 0x4e2d2c\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\nbool AnimatedShopKeeper::init(AnimatedShopKeeper *a1, ShopType a2)\n{\n  const char *v3; // r1\n  _BOOL4 v4; // r5\n  int v5; // s15\n  SpriteAnimationManager *m_animationManager; // r0\n\n  a1->m_type = a2;\n  switch ( a2 )\n  {\n    case Secret:\n      v3 = \"GJShopKeeper2\";\n      break;\n    case Community:\n      v3 = \"GJShopKeeper3\";\n      break;\n    case Mechanic:\n      v3 = \"GJShopKeeper4\";\n      break;\n    case Diamond:\n      v3 = \"GJShopKeeper5\";\n      break;\n    default:\n      v3 = \"GJShopKeeper\";\n      break;\n  }\n  v4 = CCAnimatedSprite::initWithType(a1, v3, nullptr, 0);\n  if ( v4 )\n  {\n    a1->m_idleInt2 = (int)(float)((float)((float)((float)rand() * 4.6566e-10) * 5.0) + 10.0);\n    v5 = rand();\n    m_animationManager = a1->m_animationManager;\n    a1->m_idleInt1 = (int)(float)((float)((float)((float)v5 * 4.6566e-10) + (float)((float)v5 * 4.6566e-10)) + 1.0);\n    SpriteAnimationManager::stopAnimations(m_animationManager);\n  }\n  return v4;\n}", "assembly": "; \n; AnimatedShopKeeper::init from 0x4e2bf8 to 0x4e2c98 (160 bytes)\n; \n; 1 xrefs:\n; > AnimatedShopKeeper::create @ 0x4e2d2c\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\nPUSH            {R3-R5,LR}                                             ; +0x0, 0x4e2bf8\nMOV             R4, R0                                                 ; +0x2, 0x4e2bfa\nVPUSH           {D8}                                                   ; +0x4, 0x4e2bfc\nSTR.W           R1, [R0,#0x220]                                        ; +0x8, 0x4e2c00\nSUBS            R1, #1; switch 4 cases                                 ; +0xc, 0x4e2c04\nCMP             R1, #3                                                 ; +0xe, 0x4e2c06\nBHI             def_4E2C0A; jumptable 004E2C0A default case            ; +0x10, 0x4e2c08\nTBB.W           [PC,R1]; switch jump                                   ; +0x12, 0x4e2c0a\nDCB 0xE; jump table for switch statement                               ; +0x16, 0x4e2c0e\nDCB 2                                                                  ; +0x17, 0x4e2c0f\nDCB 5                                                                  ; +0x18, 0x4e2c10\nDCB 8                                                                  ; +0x19, 0x4e2c11\nLDR             R1, =(aGjshopkeeper3 - 0x4E2C18); jumptable 004E2C0A case 2 ; +0x1a, 0x4e2c12\nADD             R1, PC; \"GJShopKeeper3\"                                ; +0x1c, 0x4e2c14\nB               loc_4E2C2E                                             ; +0x1e, 0x4e2c16\nLDR             R1, =(aGjshopkeeper4 - 0x4E2C1E); jumptable 004E2C0A case 3 ; +0x20, 0x4e2c18\nADD             R1, PC; \"GJShopKeeper4\"                                ; +0x22, 0x4e2c1a\nB               loc_4E2C2E                                             ; +0x24, 0x4e2c1c\nLDR             R1, =(aGjshopkeeper5 - 0x4E2C24); jumptable 004E2C0A case 4 ; +0x26, 0x4e2c1e\nADD             R1, PC; \"GJShopKeeper5\"                                ; +0x28, 0x4e2c20\nB               loc_4E2C2E                                             ; +0x2a, 0x4e2c22\nLDR             R1, =(aGjshopkeeper - 0x4E2C2A); jumptable 004E2C0A default case ; +0x2c, 0x4e2c24\nADD             R1, PC; \"GJShopKeeper\"                                 ; +0x2e, 0x4e2c26\nB               loc_4E2C2E                                             ; +0x30, 0x4e2c28\nLDR             R1, =(aGjshopkeeper2 - 0x4E2C30); jumptable 004E2C0A case 1 ; +0x32, 0x4e2c2a\nADD             R1, PC; \"GJShopKeeper2\"                                ; +0x34, 0x4e2c2c\nMOVS            R2, #0; cocos2d::CCTexture2D *                         ; +0x36, 0x4e2c2e\nMOV             R0, R4; this                                           ; +0x38, 0x4e2c30\nMOV             R3, R2; bool                                           ; +0x3a, 0x4e2c32\nBL              _ZN16CCAnimatedSprite12initWithTypeEPKcPN7cocos2d11CCTexture2DEb; CCAnimatedSprite::initWithType(char const*,cocos2d::CCTexture2D *,bool) ; +0x3c, 0x4e2c34\nMOV             R5, R0                                                 ; +0x40, 0x4e2c38\nCBZ             R0, loc_4E2C90                                         ; +0x42, 0x4e2c3a\nBLX             rand                                                   ; +0x44, 0x4e2c3c\nVLDR            S16, =4.6566e-10                                       ; +0x48, 0x4e2c40\nVMOV.F32        S13, #5.0                                              ; +0x4c, 0x4e2c44\nVMOV            S15, R0                                                ; +0x50, 0x4e2c48\nVCVT.F32.S32    S14, S15                                               ; +0x54, 0x4e2c4c\nVMUL.F32        S14, S14, S16                                          ; +0x58, 0x4e2c50\nVMOV.F32        S15, #10.0                                             ; +0x5c, 0x4e2c54\nVMLA.F32        S15, S14, S13                                          ; +0x60, 0x4e2c58\nVCVT.S32.F32    S15, S15                                               ; +0x64, 0x4e2c5c\nVSTR            S15, [R4,#0x228]                                       ; +0x68, 0x4e2c60\nBLX             rand                                                   ; +0x6c, 0x4e2c64\nVMOV.F32        S14, #1.0                                              ; +0x70, 0x4e2c68\nVMOV            S15, R0                                                ; +0x74, 0x4e2c6c\nLDR.W           R0, [R4,#0x204]; this                                  ; +0x78, 0x4e2c70\nVCVT.F32.S32    S15, S15                                               ; +0x7c, 0x4e2c74\nVMUL.F32        S15, S15, S16                                          ; +0x80, 0x4e2c78\nVADD.F32        S15, S15, S15                                          ; +0x84, 0x4e2c7c\nVADD.F32        S15, S15, S14                                          ; +0x88, 0x4e2c80\nVCVT.S32.F32    S15, S15                                               ; +0x8c, 0x4e2c84\nVSTR            S15, [R4,#0x224]                                       ; +0x90, 0x4e2c88\nBL              _ZN22SpriteAnimationManager14stopAnimationsEv; SpriteAnimationManager::stopAnimations(void) ; +0x94, 0x4e2c8c\nVPOP            {D8}                                                   ; +0x98, 0x4e2c90\nMOV             R0, R5                                                 ; +0x9c, 0x4e2c94\nPOP             {R3-R5,PC}                                             ; +0x9e, 0x4e2c96", "xrefs": ["AnimatedShopKeeper::create @ 0x4e2d2c"], "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"}