{"type": "func", "start": 4296633024, "end": 4296633434, "name": "AnimatedGameObject::init", "pseudocode": "// \n// AnimatedGameObject::init from 0x100196ac0 to 0x100196c5a (410 bytes)\n// \n// 1 xrefs:\n// > AnimatedGameObject::create @ 0x100196a81\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:25:55 +0000\n// \n\n__int64 __fastcall AnimatedGameObject::init(__int64 a1, int a2)\n{\n  _BYTE *v3; // r15\n  const char *v4; // rdi\n  __int64 v5; // rax\n  _QWORD *v6; // rdi\n  __int64 v7; // rax\n  __int64 v8; // rax\n  __int64 v9; // r14\n  _BYTE v11[8]; // [rsp+8h] [rbp-28h] BYREF\n  float v12[8]; // [rsp+10h] [rbp-20h] BYREF\n\n  *(_DWORD *)(a1 + 1248) = 2;\n  *(_DWORD *)(a1 + 1028) = a2;\n  LODWORD(v3) = 0;\n  if ( a2 > 1327 )\n  {\n    switch ( a2 )\n    {\n      case 1328:\n        v4 = \"GJBeast03\";\n        break;\n      case 1584:\n        *(_BYTE *)(a1 + 1520) = 1;\n        v4 = \"GJBeast04\";\n        break;\n      case 2012:\n        *(_BYTE *)(a1 + 1520) = 1;\n        v4 = \"GJBeast05\";\n        break;\n      default:\n        return (unsigned int)v3;\n    }\n  }\n  else\n  {\n    switch ( a2 )\n    {\n      case 918:\n        *(_BYTE *)(a1 + 1520) = 1;\n        v4 = \"GJBeast01\";\n        break;\n      case 919:\n        v4 = \"BlackSludge\";\n        break;\n      case 1327:\n        v4 = \"GJBeast02\";\n        break;\n      default:\n        return (unsigned int)v3;\n    }\n  }\n  LODWORD(v3) = 0;\n  v5 = CCAnimatedSprite::createWithType(v4, 0, 0);\n  *(_QWORD *)(a1 + 1464) = v5;\n  SpriteAnimationManager::stopAnimations(*(_QWORD *)(v5 + 648));\n  v6 = *(_QWORD **)(a1 + 1464);\n  v6[89] = a1 + 1448;\n  v7 = (*(__int64 (__fastcall **)(_QWORD *))(*v6 + 1072LL))(v6);\n  if ( (unsigned __int8)GameObject::initWithTexture(a1, v7) )\n  {\n    AnimatedGameObject::setupAnimatedSize(a1, (unsigned int)a2);\n    (*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)a1 + 456LL))(a1, *(_QWORD *)(a1 + 1464));\n    v8 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 328LL))(a1);\n    sub_100278630(v12, v8);\n    v9 = *(_QWORD *)(a1 + 1464);\n    v3 = v11;\n    sub_100278250(v11, v12[0] * 0.5, 0.5 * v12[1]);\n    (*(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v9 + 184LL))(v9, v11);\n    *(_BYTE *)(a1 + 887) = 1;\n    *(_BYTE *)(a1 + 313) = 0;\n    AnimatedGameObject::setupChildSprites(a1);\n    LOBYTE(v3) = 1;\n  }\n  return (unsigned int)v3;\n}", "assembly": "; \n; AnimatedGameObject::init from 0x100196ac0 to 0x100196c5a (410 bytes)\n; \n; 1 xrefs:\n; > AnimatedGameObject::create @ 0x100196a81\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:25:55 +0000\n; \npush    rbp                                                            ; +0x0, 0x100196ac0\nmov     rbp, rsp                                                       ; +0x1, 0x100196ac1\npush    r15                                                            ; +0x4, 0x100196ac4\npush    r14                                                            ; +0x6, 0x100196ac6\npush    rbx                                                            ; +0x8, 0x100196ac8\nsub     rsp, 18h                                                       ; +0x9, 0x100196ac9\nmov     r14d, esi                                                      ; +0xd, 0x100196acd\nmov     rbx, rdi                                                       ; +0x10, 0x100196ad0\nmov     dword ptr [rdi+4E0h], 2                                        ; +0x13, 0x100196ad3\nmov     [rdi+404h], esi                                                ; +0x1d, 0x100196add\nxor     r15d, r15d                                                     ; +0x23, 0x100196ae3\ncmp     esi, 52Fh                                                      ; +0x26, 0x100196ae6\njg      short loc_100196B16                                            ; +0x2c, 0x100196aec\ncmp     r14d, 396h                                                     ; +0x2e, 0x100196aee\njz      short loc_100196B45                                            ; +0x35, 0x100196af5\ncmp     r14d, 397h                                                     ; +0x37, 0x100196af7\njz      short loc_100196B5E                                            ; +0x3e, 0x100196afe\ncmp     r14d, 52Fh                                                     ; +0x40, 0x100196b00\njnz     loc_100196C4C                                                  ; +0x47, 0x100196b07\nlea     rdi, aGjbeast02; \"GJBeast02\"                                   ; +0x4d, 0x100196b0d\njmp     short loc_100196B75                                            ; +0x54, 0x100196b14\ncmp     r14d, 530h                                                     ; +0x56, 0x100196b16\njz      short loc_100196B55                                            ; +0x5d, 0x100196b1d\ncmp     r14d, 630h                                                     ; +0x5f, 0x100196b1f\njz      short loc_100196B67                                            ; +0x66, 0x100196b26\ncmp     r14d, 7DCh                                                     ; +0x68, 0x100196b28\njnz     loc_100196C4C                                                  ; +0x6f, 0x100196b2f\nmov     byte ptr [rbx+5F0h], 1                                         ; +0x75, 0x100196b35\nlea     rdi, aGjbeast05; \"GJBeast05\"                                   ; +0x7c, 0x100196b3c\njmp     short loc_100196B75                                            ; +0x83, 0x100196b43\nmov     byte ptr [rbx+5F0h], 1                                         ; +0x85, 0x100196b45\nlea     rdi, aGjbeast01; \"GJBeast01\"                                   ; +0x8c, 0x100196b4c\njmp     short loc_100196B75                                            ; +0x93, 0x100196b53\nlea     rdi, aGjbeast03; \"GJBeast03\"                                   ; +0x95, 0x100196b55\njmp     short loc_100196B75                                            ; +0x9c, 0x100196b5c\nlea     rdi, aBlacksludge; \"BlackSludge\"                               ; +0x9e, 0x100196b5e\njmp     short loc_100196B75                                            ; +0xa5, 0x100196b65\nmov     byte ptr [rbx+5F0h], 1                                         ; +0xa7, 0x100196b67\nlea     rdi, aGjbeast04; \"GJBeast04\"                                   ; +0xae, 0x100196b6e\nxor     r15d, r15d                                                     ; +0xb5, 0x100196b75\nxor     esi, esi                                                       ; +0xb8, 0x100196b78\nxor     edx, edx                                                       ; +0xba, 0x100196b7a\ncall    CCAnimatedSprite__createWithType                               ; +0xbc, 0x100196b7c\nmov     [rbx+5B8h], rax                                                ; +0xc1, 0x100196b81\nmov     rdi, [rax+288h]                                                ; +0xc8, 0x100196b88\ncall    SpriteAnimationManager__stopAnimations                         ; +0xcf, 0x100196b8f\nmov     rdi, [rbx+5B8h]                                                ; +0xd4, 0x100196b94\nlea     rax, [rbx+5A8h]                                                ; +0xdb, 0x100196b9b\nmov     [rdi+2C8h], rax                                                ; +0xe2, 0x100196ba2\nmov     rax, [rdi]                                                     ; +0xe9, 0x100196ba9\ncall    qword ptr [rax+430h]                                           ; +0xec, 0x100196bac\nmov     rdi, rbx                                                       ; +0xf2, 0x100196bb2\nmov     rsi, rax                                                       ; +0xf5, 0x100196bb5\ncall    GameObject__initWithTexture                                    ; +0xf8, 0x100196bb8\ntest    al, al                                                         ; +0xfd, 0x100196bbd\njz      loc_100196C4C                                                  ; +0xff, 0x100196bbf\nmov     rdi, rbx                                                       ; +0x105, 0x100196bc5\nmov     esi, r14d                                                      ; +0x108, 0x100196bc8\ncall    AnimatedGameObject__setupAnimatedSize                          ; +0x10b, 0x100196bcb\nmov     rsi, [rbx+5B8h]                                                ; +0x110, 0x100196bd0\nmov     rax, [rbx]                                                     ; +0x117, 0x100196bd7\nmov     rdi, rbx                                                       ; +0x11a, 0x100196bda\ncall    qword ptr [rax+1C8h]                                           ; +0x11d, 0x100196bdd\nmov     rax, [rbx]                                                     ; +0x123, 0x100196be3\nmov     rdi, rbx                                                       ; +0x126, 0x100196be6\ncall    qword ptr [rax+148h]                                           ; +0x129, 0x100196be9\nlea     rdi, [rbp+var_20]                                              ; +0x12f, 0x100196bef\nmov     rsi, rax                                                       ; +0x133, 0x100196bf3\ncall    sub_100278630                                                  ; +0x136, 0x100196bf6\nmov     r14, [rbx+5B8h]                                                ; +0x13b, 0x100196bfb\nmovss   xmm1, cs:dword_100A03578                                       ; +0x142, 0x100196c02\nmovss   xmm0, [rbp+var_20]                                             ; +0x14a, 0x100196c0a\nmulss   xmm0, xmm1                                                     ; +0x14f, 0x100196c0f\nmulss   xmm1, [rbp+var_1C]                                             ; +0x153, 0x100196c13\nlea     r15, [rbp+var_28]                                              ; +0x158, 0x100196c18\nmov     rdi, r15                                                       ; +0x15c, 0x100196c1c\ncall    sub_100278250                                                  ; +0x15f, 0x100196c1f\nmov     rax, [r14]                                                     ; +0x164, 0x100196c24\nmov     rdi, r14                                                       ; +0x167, 0x100196c27\nmov     rsi, r15                                                       ; +0x16a, 0x100196c2a\ncall    qword ptr [rax+0B8h]                                           ; +0x16d, 0x100196c2d\nmov     byte ptr [rbx+377h], 1                                         ; +0x173, 0x100196c33\nmov     byte ptr [rbx+139h], 0                                         ; +0x17a, 0x100196c3a\nmov     rdi, rbx                                                       ; +0x181, 0x100196c41\ncall    AnimatedGameObject__setupChildSprites                          ; +0x184, 0x100196c44\nmov     r15b, 1                                                        ; +0x189, 0x100196c49\nmov     eax, r15d                                                      ; +0x18c, 0x100196c4c\nadd     rsp, 18h                                                       ; +0x18f, 0x100196c4f\npop     rbx                                                            ; +0x193, 0x100196c53\npop     r14                                                            ; +0x194, 0x100196c54\npop     r15                                                            ; +0x196, 0x100196c56\npop     rbp                                                            ; +0x198, 0x100196c58\nretn                                                                   ; +0x199, 0x100196c59", "xrefs": ["AnimatedGameObject::create @ 0x100196a81"], "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"}