{"type": "func", "start": 9624460, "end": 9624700, "name": "AnimatedShopKeeper::init", "pseudocode": "// \n// AnimatedShopKeeper::init from 0x92db8c to 0x92dc7c (240 bytes)\n// \n// 2 xrefs:\n// > AnimatedShopKeeper::create @ 0x92dd14\n// > <???> @ 0xb49f0\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; // x1\n  bool v4; // w20\n  float v5; // s0\n  SpriteAnimationManager *m_animationManager; // x0\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 = (float)rand();\n    m_animationManager = a1->m_animationManager;\n    a1->m_idleInt1 = (int)(float)((float)((float)(v5 * 4.6566e-10) * 2.0) + 1.0);\n    SpriteAnimationManager::stopAnimations(m_animationManager);\n  }\n  return v4;\n}", "assembly": "; \n; AnimatedShopKeeper::init from 0x92db8c to 0x92dc7c (240 bytes)\n; \n; 2 xrefs:\n; > AnimatedShopKeeper::create @ 0x92dd14\n; > <???> @ 0xb49f0\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_30]!                                ; +0x0, 0x92db8c\nMOV             X29, SP                                                ; +0x4, 0x92db90\nSTP             X19, X20, [SP,#0x30+var_20]                            ; +0x8, 0x92db94\nMOV             X19, X0                                                ; +0xc, 0x92db98\nSUB             W0, W1, #1; switch 4 cases                             ; +0x10, 0x92db9c\nSTR             D8, [SP,#0x30+var_10]                                  ; +0x14, 0x92dba0\nCMP             W0, #3                                                 ; +0x18, 0x92dba4\nSTR             W1, [X19,#0x2A0]                                       ; +0x1c, 0x92dba8\nB.LS            loc_92DC34                                             ; +0x20, 0x92dbac\nADRL            X1, aGjshopkeeper; jumptable 000000000092DC48 default case ; +0x24, 0x92dbb0\nMOV             X0, X19; this                                          ; +0x2c, 0x92dbb8\nMOV             X2, #0; cocos2d::CCTexture2D *                         ; +0x30, 0x92dbbc\nMOV             W3, #0; bool                                           ; +0x34, 0x92dbc0\nBL              _ZN16CCAnimatedSprite12initWithTypeEPKcPN7cocos2d11CCTexture2DEb; CCAnimatedSprite::initWithType(char const*,cocos2d::CCTexture2D *,bool) ; +0x38, 0x92dbc4\nUXTB            W0, W0                                                 ; +0x3c, 0x92dbc8\nMOV             W20, W0                                                ; +0x40, 0x92dbcc\nCBZ             W0, loc_92DC20                                         ; +0x44, 0x92dbd0\nBL              .rand                                                  ; +0x48, 0x92dbd4\nSCVTF           S2, W0                                                 ; +0x4c, 0x92dbd8\nLDR             S8, =0x30000000                                        ; +0x50, 0x92dbdc\nFMOV            S1, #5.0                                               ; +0x54, 0x92dbe0\nFMOV            S0, #10.0                                              ; +0x58, 0x92dbe4\nFMUL            S2, S2, S8                                             ; +0x5c, 0x92dbe8\nFMADD           S0, S2, S1, S0                                         ; +0x60, 0x92dbec\nFCVTZS          W0, S0                                                 ; +0x64, 0x92dbf0\nSTR             W0, [X19,#0x2A8]                                       ; +0x68, 0x92dbf4\nBL              .rand                                                  ; +0x6c, 0x92dbf8\nSCVTF           S0, W0                                                 ; +0x70, 0x92dbfc\nLDR             X0, [X19,#0x268]; this                                 ; +0x74, 0x92dc00\nFMOV            S2, #2.0                                               ; +0x78, 0x92dc04\nFMUL            S1, S0, S8                                             ; +0x7c, 0x92dc08\nFMOV            S0, #1.0                                               ; +0x80, 0x92dc0c\nFMADD           S0, S1, S2, S0                                         ; +0x84, 0x92dc10\nFCVTZS          W1, S0                                                 ; +0x88, 0x92dc14\nSTR             W1, [X19,#0x2A4]                                       ; +0x8c, 0x92dc18\nBL              _ZN22SpriteAnimationManager14stopAnimationsEv; SpriteAnimationManager::stopAnimations(void) ; +0x90, 0x92dc1c\nMOV             W0, W20                                                ; +0x94, 0x92dc20\nLDP             X19, X20, [SP,#0x30+var_20]                            ; +0x98, 0x92dc24\nLDR             D8, [SP,#0x30+var_10]                                  ; +0x9c, 0x92dc28\nLDP             X29, X30, [SP+0x30+var_30],#0x30                       ; +0xa0, 0x92dc2c\nRET                                                                    ; +0xa4, 0x92dc30\nADRL            X1, jpt_92DC48                                         ; +0xa8, 0x92dc34\nLDRB            W0, [X1,W0,UXTW]                                       ; +0xb0, 0x92dc3c\nADR             X1, loc_92DC4C; jumptable 000000000092DC48 case 1      ; +0xb4, 0x92dc40\nADD             X0, X1, W0,SXTB#2                                      ; +0xb8, 0x92dc44\nBR              X0; switch jump                                        ; +0xbc, 0x92dc48\nADRL            X1, aGjshopkeeper2; jumptable 000000000092DC48 case 1  ; +0xc0, 0x92dc4c\nB               loc_92DBB8                                             ; +0xc8, 0x92dc54\nADRL            X1, aGjshopkeeper5; jumptable 000000000092DC48 case 4  ; +0xcc, 0x92dc58\nB               loc_92DBB8                                             ; +0xd4, 0x92dc60\nADRL            X1, aGjshopkeeper4; jumptable 000000000092DC48 case 3  ; +0xd8, 0x92dc64\nB               loc_92DBB8                                             ; +0xe0, 0x92dc6c\nADRL            X1, aGjshopkeeper3; jumptable 000000000092DC48 case 2  ; +0xe4, 0x92dc70\nB               loc_92DBB8                                             ; +0xec, 0x92dc78", "xrefs": ["AnimatedShopKeeper::create @ 0x92dd14", "<???> @ 0xb49f0"], "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"}