{"type": "func", "start": 4298194464, "end": 4298194633, "name": "AnimatedShopKeeper::init", "pseudocode": "// \n// AnimatedShopKeeper::init from 0x100313e20 to 0x100313ec9 (169 bytes)\n// \n// 0 xrefs:\n// \n// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 12:28:39 +0000\n// \n\n__int64 __fastcall AnimatedShopKeeper::init(__int64 a1, int a2)\n{\n  unsigned int v2; // esi\n  const char *v3; // rsi\n  __int64 result; // rax\n  unsigned int v5; // r14d\n  int v6; // eax\n\n  *(_DWORD *)(a1 + 720) = a2;\n  v2 = a2 - 1;\n  if ( v2 > 3 )\n    v3 = \"GJShopKeeper\";\n  else\n    v3 = off_100B1C7B8[v2];\n  result = CCAnimatedSprite::initWithType(a1, v3, 0, 0);\n  if ( (_BYTE)result )\n  {\n    v5 = result;\n    *(_DWORD *)(a1 + 728) = (int)(float)((float)((float)((float)rand() * 4.6566129e-10) * 5.0) + 10.0);\n    v6 = rand();\n    *(_DWORD *)(a1 + 724) = (int)(float)((float)((float)((float)v6 * 4.6566129e-10) + (float)((float)v6 * 4.6566129e-10))\n                                       + 1.0);\n    SpriteAnimationManager::stopAnimations(*(_QWORD *)(a1 + 648));\n    return v5;\n  }\n  return result;\n}", "assembly": "; \n; AnimatedShopKeeper::init from 0x100313e20 to 0x100313ec9 (169 bytes)\n; \n; 0 xrefs:\n; \n; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 12:28:39 +0000\n; \npush    rbp                                                            ; +0x0, 0x100313e20\nmov     rbp, rsp                                                       ; +0x1, 0x100313e21\npush    r14                                                            ; +0x4, 0x100313e24\npush    rbx                                                            ; +0x6, 0x100313e26\nmov     rbx, rdi                                                       ; +0x7, 0x100313e27\nmov     [rdi+2D0h], esi                                                ; +0xa, 0x100313e2a\ndec     esi                                                            ; +0x10, 0x100313e30\ncmp     esi, 3                                                         ; +0x12, 0x100313e32\nja      short loc_100313E46                                            ; +0x15, 0x100313e35\nmov     eax, esi                                                       ; +0x17, 0x100313e37\nlea     rcx, off_100B1C7B8; \"GJShopKeeper2\"                            ; +0x19, 0x100313e39\nmov     rsi, [rcx+rax*8]                                               ; +0x20, 0x100313e40\njmp     short loc_100313E4D                                            ; +0x24, 0x100313e44\nlea     rsi, aGjshopkeeper; \"GJShopKeeper\"                             ; +0x26, 0x100313e46\nmov     rdi, rbx                                                       ; +0x2d, 0x100313e4d\nxor     edx, edx                                                       ; +0x30, 0x100313e50\nxor     ecx, ecx                                                       ; +0x32, 0x100313e52\ncall    CCAnimatedSprite__initWithType                                 ; +0x34, 0x100313e54\ntest    al, al                                                         ; +0x39, 0x100313e59\njz      short loc_100313EC4                                            ; +0x3b, 0x100313e5b\nmov     r14d, eax                                                      ; +0x3d, 0x100313e5d\ncall    _rand                                                          ; +0x40, 0x100313e60\ncvtsi2ss xmm0, eax                                                     ; +0x45, 0x100313e65\nmulss   xmm0, cs:dword_100A03A50                                       ; +0x49, 0x100313e69\nmulss   xmm0, cs:flt_100A035C0                                         ; +0x51, 0x100313e71\naddss   xmm0, cs:dword_100A035BC                                       ; +0x59, 0x100313e79\ncvttss2si eax, xmm0                                                    ; +0x61, 0x100313e81\nmov     [rbx+2D8h], eax                                                ; +0x65, 0x100313e85\ncall    _rand                                                          ; +0x6b, 0x100313e8b\nxorps   xmm0, xmm0                                                     ; +0x70, 0x100313e90\ncvtsi2ss xmm0, eax                                                     ; +0x73, 0x100313e93\nmulss   xmm0, cs:dword_100A03A50                                       ; +0x77, 0x100313e97\naddss   xmm0, xmm0                                                     ; +0x7f, 0x100313e9f\naddss   xmm0, cs:alpha                                                 ; +0x83, 0x100313ea3\ncvttss2si eax, xmm0                                                    ; +0x8b, 0x100313eab\nmov     [rbx+2D4h], eax                                                ; +0x8f, 0x100313eaf\nmov     rdi, [rbx+288h]                                                ; +0x95, 0x100313eb5\ncall    SpriteAnimationManager__stopAnimations                         ; +0x9c, 0x100313ebc\nmov     eax, r14d                                                      ; +0xa1, 0x100313ec1\npop     rbx                                                            ; +0xa4, 0x100313ec4\npop     r14                                                            ; +0xa5, 0x100313ec5\npop     rbp                                                            ; +0xa7, 0x100313ec7\nretn                                                                   ; +0xa8, 0x100313ec8", "xrefs": [], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}