{"type": "func", "start": 4298278592, "end": 4298278761, "name": "AnimatedShopKeeper::init", "pseudocode": "// \n// AnimatedShopKeeper::init from 0x1003286c0 to 0x100328769 (169 bytes)\n// \n// 0 xrefs:\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 __fastcall AnimatedShopKeeper::init(AnimatedShopKeeper *a1, ShopType a2)\n{\n  unsigned __int32 v2; // esi\n  const char *v3; // rsi\n  bool result; // al\n  bool v5; // r14\n  int v6; // eax\n\n  a1->m_type = a2;\n  v2 = a2 - 1;\n  if ( v2 > 3 )\n    v3 = \"GJShopKeeper\";\n  else\n    v3 = off_1009149A0[v2];\n  result = CCAnimatedSprite::initWithType(a1, v3, nullptr, 0);\n  if ( result )\n  {\n    v5 = result;\n    a1->m_idleInt2 = (int)(float)((float)((float)((float)rand() * 4.6566129e-10) * 5.0) + 10.0);\n    v6 = rand();\n    a1->m_idleInt1 = (int)(float)((float)((float)((float)v6 * 4.6566129e-10) + (float)((float)v6 * 4.6566129e-10)) + 1.0);\n    SpriteAnimationManager::stopAnimations(a1->m_animationManager);\n    return v5;\n  }\n  return result;\n}", "assembly": "; \n; AnimatedShopKeeper::init from 0x1003286c0 to 0x100328769 (169 bytes)\n; \n; 0 xrefs:\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    rbp                                                            ; +0x0, 0x1003286c0\nmov     rbp, rsp                                                       ; +0x1, 0x1003286c1\npush    r14                                                            ; +0x4, 0x1003286c4\npush    rbx                                                            ; +0x6, 0x1003286c6\nmov     rbx, rdi                                                       ; +0x7, 0x1003286c7\nmov     [rdi+2D0h], esi                                                ; +0xa, 0x1003286ca\ndec     esi                                                            ; +0x10, 0x1003286d0\ncmp     esi, 3                                                         ; +0x12, 0x1003286d2\nja      short loc_1003286E6                                            ; +0x15, 0x1003286d5\nmov     eax, esi                                                       ; +0x17, 0x1003286d7\nlea     rcx, off_1009149A0; \"GJShopKeeper2\"                            ; +0x19, 0x1003286d9\nmov     rsi, [rcx+rax*8]                                               ; +0x20, 0x1003286e0\njmp     short loc_1003286ED                                            ; +0x24, 0x1003286e4\nlea     rsi, aGjshopkeeper; \"GJShopKeeper\"                             ; +0x26, 0x1003286e6\nmov     rdi, rbx                                                       ; +0x2d, 0x1003286ed\nxor     edx, edx                                                       ; +0x30, 0x1003286f0\nxor     ecx, ecx                                                       ; +0x32, 0x1003286f2\ncall    CCAnimatedSprite__initWithType                                 ; +0x34, 0x1003286f4\ntest    al, al                                                         ; +0x39, 0x1003286f9\njz      short loc_100328764                                            ; +0x3b, 0x1003286fb\nmov     r14d, eax                                                      ; +0x3d, 0x1003286fd\ncall    _rand                                                          ; +0x40, 0x100328700\ncvtsi2ss xmm0, eax                                                     ; +0x45, 0x100328705\nmulss   xmm0, cs:dword_100815710                                       ; +0x49, 0x100328709\nmulss   xmm0, cs:flt_100815088                                         ; +0x51, 0x100328711\naddss   xmm0, cs:dword_100814FEC                                       ; +0x59, 0x100328719\ncvttss2si eax, xmm0                                                    ; +0x61, 0x100328721\nmov     [rbx+2D8h], eax                                                ; +0x65, 0x100328725\ncall    _rand                                                          ; +0x6b, 0x10032872b\nxorps   xmm0, xmm0                                                     ; +0x70, 0x100328730\ncvtsi2ss xmm0, eax                                                     ; +0x73, 0x100328733\nmulss   xmm0, cs:dword_100815710                                       ; +0x77, 0x100328737\naddss   xmm0, xmm0                                                     ; +0x7f, 0x10032873f\naddss   xmm0, cs:alpha                                                 ; +0x83, 0x100328743\ncvttss2si eax, xmm0                                                    ; +0x8b, 0x10032874b\nmov     [rbx+2D4h], eax                                                ; +0x8f, 0x10032874f\nmov     rdi, [rbx+288h]                                                ; +0x95, 0x100328755\ncall    SpriteAnimationManager__stopAnimations                         ; +0x9c, 0x10032875c\nmov     eax, r14d                                                      ; +0xa1, 0x100328761\npop     rbx                                                            ; +0xa4, 0x100328764\npop     r14                                                            ; +0xa5, 0x100328765\npop     rbp                                                            ; +0xa7, 0x100328767\nretn                                                                   ; +0xa8, 0x100328768", "xrefs": [], "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"}