{"type": "func", "start": 5372559344, "end": 5372560078, "name": "PlayLayer::spawnFirework", "pseudocode": "// \n// PlayLayer::spawnFirework from 0x1403abff0 to 0x1403ac2ce (734 bytes)\n// \n// 2 xrefs:\n// > PlayLayer::showCompleteText @ 0x1403a8e37\n// > <???> @ 0x1406d6c38\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\n// Hidden C++ exception states: #wind=4\nvoid PlayLayer::spawnFirework(PlayLayer *a1)\n{\n  __int64 v2; // rcx\n  __int64 v3; // rcx\n  PlayerObject *m_player1; // rcx\n  float v5; // xmm0_4\n  cocos2d::CCDirector *v6; // rax\n  int v7; // eax\n  int v8; // eax\n  CCCircleWave *v9; // rbx\n  struct cocos2d::CCParticleSystemQuad *v10; // rbx\n  _BOOL8 v11; // rdx\n  cocos2d::ccColor3B m_playerColor2; // [rsp+30h] [rbp-68h] BYREF\n  __int16 v13; // [rsp+40h] [rbp-58h] BYREF\n  float v14; // [rsp+50h] [rbp-48h]\n  cocos2d::CCPoint v15; // [rsp+58h] [rbp-40h] BYREF\n  void *v16; // [rsp+60h] [rbp-38h]\n  float v17[4]; // [rsp+68h] [rbp-30h] BYREF\n\n  v2 = qword_1406C2ED8;\n  if ( !qword_1406C2ED8 )\n  {\n    v16 = operator new(0x668u);\n    qword_1406C2ED8 = sub_14017AB00((__int64)v16);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n    v2 = qword_1406C2ED8;\n  }\n  GameManager::colorForIdx(\n    (cocos2d::ccColor3B *)v2,\n    (GameManager *)&m_playerColor2,\n    *(_DWORD *)(v2 + 816) - *(_DWORD *)(v2 + 820));\n  v3 = qword_1406C2ED8;\n  if ( !qword_1406C2ED8 )\n  {\n    v16 = operator new(0x668u);\n    qword_1406C2ED8 = sub_14017AB00((__int64)v16);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n    v3 = qword_1406C2ED8;\n  }\n  GameManager::colorForIdx((cocos2d::ccColor3B *)v3, (GameManager *)&v13, *(_DWORD *)(v3 + 804) - *(_DWORD *)(v3 + 808));\n  m_player1 = a1->m_player1;\n  m_playerColor2 = m_player1->m_playerColor2;\n  v13 = *(_WORD *)&m_player1->m_playerColor1.r;\n  v5 = (float)m_player1->m_playerColor1.b / 255.0;\n  v17[0] = (float)(unsigned __int8)v13 / 255.0;\n  v17[1] = (float)HIBYTE(v13) / 255.0;\n  v17[2] = v5;\n  v17[3] = 1.0;\n  v6 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(m_player1);\n  cocos2d::CCDirector::getWinSize(v6);\n  rand();\n  v7 = rand();\n  cocos2d::CCPoint::CCPoint(50.0, (float)((float)(v14 - 50.0) * (float)((float)v7 / 32767.0)) + 50.0);\n  v8 = rand();\n  v9 = CCCircleWave::create(10.0, (float)((float)((float)v8 / 32767.0) * 15.0) + 35.0, 0.5, 1, 1);\n  v9->m_lineWidth = 4;\n  v9->m_color = m_playerColor2;\n  v9->setPosition_0(v9, &v15);\n  a1->addChild_0(a1, v9, 10);\n  v10 = cocos2d::CCParticleSystemQuad::create(\"firework.plist\", 0);\n  LOBYTE(v11) = 1;\n  v10->setAutoRemoveOnFinish(v10, v11);\n  a1->addChild_0(a1, v10, 13);\n  v10->setPosition_0(v10, &v15);\n  v10->setStartColor(v10, (const cocos2d::ccColor4F *)v17);\n  v10->setEndColor(v10, (const cocos2d::ccColor4F *)v17);\n}", "assembly": "; \n; PlayLayer::spawnFirework from 0x1403abff0 to 0x1403ac2ce (734 bytes)\n; \n; 2 xrefs:\n; > PlayLayer::showCompleteText @ 0x1403a8e37\n; > <???> @ 0x1406d6c38\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\nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x1403abff0\npush    rdi                                                            ; +0x5, 0x1403abff5\nsub     rsp, 90h                                                       ; +0x6, 0x1403abff6\nmovaps  [rsp+98h+var_18], xmm6                                         ; +0xd, 0x1403abffd\nmov     rax, cs:__security_cookie                                      ; +0x15, 0x1403ac005\nxor     rax, rsp                                                       ; +0x1c, 0x1403ac00c\nmov     [rsp+98h+var_20], rax                                          ; +0x1f, 0x1403ac00f\nmov     rdi, rcx                                                       ; +0x24, 0x1403ac014\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x27, 0x1403ac017\ntest    rcx, rcx                                                       ; +0x2e, 0x1403ac01e\njnz     short loc_1403AC052                                            ; +0x31, 0x1403ac021\nmov     ecx, 668h; Size                                                ; +0x33, 0x1403ac023\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x38, 0x1403ac028\nmov     [rsp+98h+var_38], rax                                          ; +0x3d, 0x1403ac02d\nmov     rcx, rax                                                       ; +0x42, 0x1403ac032\ncall    sub_14017AB00                                                  ; +0x45, 0x1403ac035\nnop                                                                    ; +0x4a, 0x1403ac03a\nmov     cs:qword_1406C2ED8, rax                                        ; +0x4b, 0x1403ac03b\nmov     rdx, [rax]                                                     ; +0x52, 0x1403ac042\nmov     rcx, rax                                                       ; +0x55, 0x1403ac045\ncall    qword ptr [rdx+48h]                                            ; +0x58, 0x1403ac048\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x5b, 0x1403ac04b\nmov     r8d, [rcx+330h]                                                ; +0x62, 0x1403ac052\nsub     r8d, [rcx+334h]                                                ; +0x69, 0x1403ac059\nlea     rdx, [rsp+98h+var_68]                                          ; +0x70, 0x1403ac060\ncall    GameManager__colorForIdx                                       ; +0x75, 0x1403ac065\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x7a, 0x1403ac06a\ntest    rcx, rcx                                                       ; +0x81, 0x1403ac071\njnz     short loc_1403AC0A5                                            ; +0x84, 0x1403ac074\nmov     ecx, 668h; Size                                                ; +0x86, 0x1403ac076\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x8b, 0x1403ac07b\nmov     [rsp+98h+var_38], rax                                          ; +0x90, 0x1403ac080\nmov     rcx, rax                                                       ; +0x95, 0x1403ac085\ncall    sub_14017AB00                                                  ; +0x98, 0x1403ac088\nnop                                                                    ; +0x9d, 0x1403ac08d\nmov     cs:qword_1406C2ED8, rax                                        ; +0x9e, 0x1403ac08e\nmov     rdx, [rax]                                                     ; +0xa5, 0x1403ac095\nmov     rcx, rax                                                       ; +0xa8, 0x1403ac098\ncall    qword ptr [rdx+48h]                                            ; +0xab, 0x1403ac09b\nmov     rcx, cs:qword_1406C2ED8                                        ; +0xae, 0x1403ac09e\nmov     r8d, [rcx+324h]                                                ; +0xb5, 0x1403ac0a5\nsub     r8d, [rcx+328h]                                                ; +0xbc, 0x1403ac0ac\nlea     rdx, [rsp+98h+var_58]                                          ; +0xc3, 0x1403ac0b3\ncall    GameManager__colorForIdx                                       ; +0xc8, 0x1403ac0b8\nmov     rcx, [rdi+0DA0h]                                               ; +0xcd, 0x1403ac0bd\nmovzx   eax, word ptr [rcx+0A8Dh]                                      ; +0xd4, 0x1403ac0c4\nmov     [rsp+98h+var_68], ax                                           ; +0xdb, 0x1403ac0cb\nmovzx   eax, byte ptr [rcx+0A8Fh]                                      ; +0xe0, 0x1403ac0d0\nmov     [rsp+98h+var_66], al                                           ; +0xe7, 0x1403ac0d7\nmovzx   eax, word ptr [rcx+0A8Ah]                                      ; +0xeb, 0x1403ac0db\nmov     [rsp+98h+var_58], ax                                           ; +0xf2, 0x1403ac0e2\nmovzx   eax, al                                                        ; +0xf7, 0x1403ac0e7\nmovd    xmm3, eax                                                      ; +0xfa, 0x1403ac0ea\ncvtdq2ps xmm3, xmm3                                                    ; +0xfe, 0x1403ac0ee\nmovss   xmm2, cs:dword_140623418                                       ; +0x101, 0x1403ac0f1\ndivss   xmm3, xmm2                                                     ; +0x109, 0x1403ac0f9\nmovzx   eax, byte ptr [rsp+98h+var_58+1]                               ; +0x10d, 0x1403ac0fd\nmovd    xmm1, eax                                                      ; +0x112, 0x1403ac102\ncvtdq2ps xmm1, xmm1                                                    ; +0x116, 0x1403ac106\ndivss   xmm1, xmm2                                                     ; +0x119, 0x1403ac109\nmovzx   eax, byte ptr [rcx+0A8Ch]                                      ; +0x11d, 0x1403ac10d\nmovd    xmm0, eax                                                      ; +0x124, 0x1403ac114\ncvtdq2ps xmm0, xmm0                                                    ; +0x128, 0x1403ac118\ndivss   xmm0, xmm2                                                     ; +0x12b, 0x1403ac11b\nmovss   [rsp+98h+var_30], xmm3                                         ; +0x12f, 0x1403ac11f\nmovss   [rsp+98h+var_2C], xmm1                                         ; +0x135, 0x1403ac125\nmovss   [rsp+98h+var_28], xmm0                                         ; +0x13b, 0x1403ac12b\nmov     [rsp+98h+var_24], 3F800000h                                    ; +0x141, 0x1403ac131\ncall    cs:?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x149, 0x1403ac139\nmov     rcx, rax                                                       ; +0x14f, 0x1403ac13f\nlea     rdx, [rsp+98h+var_48]                                          ; +0x152, 0x1403ac142\ncall    cs:?getWinSize@CCDirector@cocos2d@@QEAA?AVCCSize@2@XZ; cocos2d::CCDirector::getWinSize(void) ; +0x157, 0x1403ac147\ncall    cs:rand                                                        ; +0x15d, 0x1403ac14d\nmovd    xmm6, eax                                                      ; +0x163, 0x1403ac153\ncvtdq2ps xmm6, xmm6                                                    ; +0x167, 0x1403ac157\ndivss   xmm6, cs:dword_140623644                                       ; +0x16a, 0x1403ac15a\ncall    cs:rand                                                        ; +0x172, 0x1403ac162\nmovd    xmm3, eax                                                      ; +0x178, 0x1403ac168\ncvtdq2ps xmm3, xmm3                                                    ; +0x17c, 0x1403ac16c\ndivss   xmm3, cs:dword_140623644                                       ; +0x17f, 0x1403ac16f\nmovss   xmm2, [rsp+98h+var_44]                                         ; +0x187, 0x1403ac177\nmovss   xmm0, cs:dword_1406231E0                                       ; +0x18d, 0x1403ac17d\nsubss   xmm2, xmm0                                                     ; +0x195, 0x1403ac185\nmulss   xmm2, xmm6                                                     ; +0x199, 0x1403ac189\naddss   xmm2, xmm0                                                     ; +0x19d, 0x1403ac18d\nmovss   xmm1, [rsp+98h+var_48]                                         ; +0x1a1, 0x1403ac191\nsubss   xmm1, xmm0                                                     ; +0x1a7, 0x1403ac197\nmulss   xmm1, xmm3                                                     ; +0x1ab, 0x1403ac19b\naddss   xmm1, xmm0                                                     ; +0x1af, 0x1403ac19f\nlea     rcx, [rsp+98h+var_40]                                          ; +0x1b3, 0x1403ac1a3\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x1b8, 0x1403ac1a8\ncall    cs:rand                                                        ; +0x1be, 0x1403ac1ae\nmovd    xmm1, eax                                                      ; +0x1c4, 0x1403ac1b4\ncvtdq2ps xmm1, xmm1                                                    ; +0x1c8, 0x1403ac1b8\ndivss   xmm1, cs:dword_140623644                                       ; +0x1cb, 0x1403ac1bb\nmulss   xmm1, cs:dword_1406230E0                                       ; +0x1d3, 0x1403ac1c3\naddss   xmm1, cs:dword_140623198                                       ; +0x1db, 0x1403ac1cb\nmov     [rsp+98h+var_78], 1                                            ; +0x1e3, 0x1403ac1d3\nmov     r9b, 1                                                         ; +0x1e8, 0x1403ac1d8\nmovss   xmm2, cs:dword_140622B08                                       ; +0x1eb, 0x1403ac1db\nmovss   xmm0, cs:flt_14062307C                                         ; +0x1f3, 0x1403ac1e3\ncall    CCCircleWave__create                                           ; +0x1fb, 0x1403ac1eb\nmov     rbx, rax                                                       ; +0x200, 0x1403ac1f0\nmov     dword ptr [rax+164h], 4                                        ; +0x203, 0x1403ac1f3\nmovzx   ecx, [rsp+98h+var_68]                                          ; +0x20d, 0x1403ac1fd\nmov     [rax+154h], cx                                                 ; +0x212, 0x1403ac202\nmovzx   ecx, [rsp+98h+var_66]                                          ; +0x219, 0x1403ac209\nmov     [rax+156h], cl                                                 ; +0x21e, 0x1403ac20e\nmov     r8, [rax]                                                      ; +0x224, 0x1403ac214\nlea     rdx, [rsp+98h+var_40]                                          ; +0x227, 0x1403ac217\nmov     rcx, rax                                                       ; +0x22c, 0x1403ac21c\ncall    qword ptr [r8+0B8h]                                            ; +0x22f, 0x1403ac21f\nmov     r9, [rdi]                                                      ; +0x236, 0x1403ac226\nmov     r8d, 0Ah                                                       ; +0x239, 0x1403ac229\nmov     rdx, rbx                                                       ; +0x23f, 0x1403ac22f\nmov     rcx, rdi                                                       ; +0x242, 0x1403ac232\ncall    qword ptr [r9+1B8h]                                            ; +0x245, 0x1403ac235\nxor     edx, edx                                                       ; +0x24c, 0x1403ac23c\nlea     rcx, aFireworkPlist; \"firework.plist\"                          ; +0x24e, 0x1403ac23e\ncall    cs:?create@CCParticleSystemQuad@cocos2d@@SAPEAV12@PEBD_N@Z; cocos2d::CCParticleSystemQuad::create(char const *,bool) ; +0x255, 0x1403ac245\nmov     rbx, rax                                                       ; +0x25b, 0x1403ac24b\nmov     r8, [rax]                                                      ; +0x25e, 0x1403ac24e\nmov     dl, 1                                                          ; +0x261, 0x1403ac251\nmov     rcx, rax                                                       ; +0x263, 0x1403ac253\ncall    qword ptr [r8+5F8h]                                            ; +0x266, 0x1403ac256\nmov     r9, [rdi]                                                      ; +0x26d, 0x1403ac25d\nmov     r8d, 0Dh                                                       ; +0x270, 0x1403ac260\nmov     rdx, rbx                                                       ; +0x276, 0x1403ac266\nmov     rcx, rdi                                                       ; +0x279, 0x1403ac269\ncall    qword ptr [r9+1B8h]                                            ; +0x27c, 0x1403ac26c\nmov     r8, [rbx]                                                      ; +0x283, 0x1403ac273\nlea     rdx, [rsp+98h+var_40]                                          ; +0x286, 0x1403ac276\nmov     rcx, rbx                                                       ; +0x28b, 0x1403ac27b\ncall    qword ptr [r8+0B8h]                                            ; +0x28e, 0x1403ac27e\nmov     r8, [rbx]                                                      ; +0x295, 0x1403ac285\nlea     rdx, [rsp+98h+var_30]                                          ; +0x298, 0x1403ac288\nmov     rcx, rbx                                                       ; +0x29d, 0x1403ac28d\ncall    qword ptr [r8+538h]                                            ; +0x2a0, 0x1403ac290\nmov     rax, [rbx]                                                     ; +0x2a7, 0x1403ac297\nlea     rdx, [rsp+98h+var_30]                                          ; +0x2aa, 0x1403ac29a\nmov     rcx, rbx                                                       ; +0x2af, 0x1403ac29f\ncall    qword ptr [rax+558h]                                           ; +0x2b2, 0x1403ac2a2\nmov     rcx, [rsp+98h+var_20]                                          ; +0x2b8, 0x1403ac2a8\nxor     rcx, rsp; StackCookie                                          ; +0x2bd, 0x1403ac2ad\ncall    __security_check_cookie                                        ; +0x2c0, 0x1403ac2b0\nmov     rbx, [rsp+98h+arg_8]                                           ; +0x2c5, 0x1403ac2b5\nmovaps  xmm6, [rsp+98h+var_18]                                         ; +0x2cd, 0x1403ac2bd\nadd     rsp, 90h                                                       ; +0x2d5, 0x1403ac2c5\npop     rdi                                                            ; +0x2dc, 0x1403ac2cc\nretn                                                                   ; +0x2dd, 0x1403ac2cd", "xrefs": ["PlayLayer::showCompleteText @ 0x1403a8e37", "<???> @ 0x1406d6c38"], "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"}