{"type": "func", "start": 6703248, "end": 6703602, "name": "CreateParticlePopup::applyTexturePage", "pseudocode": "// \n// CreateParticlePopup::applyTexturePage from 0x664890 to 0x6649f2 (354 bytes)\n// \n// 3 xrefs:\n// > CreateParticlePopup::onTexturePage @ 0x664a28\n// > CreateParticlePopup::onSelectParticleTexture @ 0x665778\n// > CreateParticlePopup::onPage @ 0x665b80\n// \n// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\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 11:55:39 +0000\n// \n\nint __fastcall CreateParticlePopup::applyTexturePage(CreateParticlePopup *this)\n{\n  CreateParticlePopup *v1; // r4\n  int v2; // r5\n  int v3; // r2\n  int v4; // r6\n  int v5; // r0\n  int v6; // r5\n  int v7; // r9\n  int (__fastcall *v8)(int, _BYTE *); // r10\n  int result; // r0\n  int v10; // r5\n  int (__fastcall *v11)(int, int); // r6\n  cocos2d::CCString *v12; // r0\n  int CString; // r0\n  float v14[2]; // [sp+4h] [bp-24h] BYREF\n  _BYTE v15[8]; // [sp+Ch] [bp-1Ch] BYREF\n  _BYTE v16[8]; // [sp+14h] [bp-14h] BYREF\n  _BYTE v17[8]; // [sp+1Ch] [bp-Ch] BYREF\n\n  v1 = this;\n  v2 = 0;\n  if ( *((_DWORD *)this + 165) > 4u )\n    *((_DWORD *)this + 165) = 0;\n  while ( 1 )\n  {\n    v3 = *((_DWORD *)v1 + 161);\n    if ( v2 >= (*((_DWORD *)v1 + 162) - v3) >> 2 )\n      break;\n    v4 = *(_DWORD *)(v3 + 4 * v2);\n    v5 = v2 / 88;\n    ++v2;\n    this = (CreateParticlePopup *)(*(int (__fastcall **)(int, bool))(*(_DWORD *)v4 + 172))(\n                                    v4,\n                                    v5 == *((_DWORD *)v1 + 165));\n  }\n  cocos2d::CCDirector::sharedDirector(this);\n  cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)v14);\n  cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v15, (float)(v14[0] * 0.5) - 56.0, (float)(v14[1] * 0.5) + 75.0);\n  v6 = *((_DWORD *)v1 + 174) % 88;\n  (*(void (__fastcall **)(_DWORD, bool))(**((_DWORD **)v1 + 160) + 172))(\n    *((_DWORD *)v1 + 160),\n    *((_DWORD *)v1 + 174) / 88 == *((_DWORD *)v1 + 165));\n  v7 = *((_DWORD *)v1 + 160);\n  v8 = *(int (__fastcall **)(int, _BYTE *))(*(_DWORD *)v7 + 92);\n  cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v16, (float)(v6 % 11) * 24.0, (float)(v6 / 11) * -24.0);\n  cocos2d::CCPoint::operator+(v17, v15, v16);\n  result = v8(v7, v17);\n  v10 = *((_DWORD *)v1 + 164);\n  if ( v10 )\n  {\n    v11 = *(int (__fastcall **)(int, int))(*(_DWORD *)v10 + 464);\n    v12 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(\n                                 (cocos2d::CCString *)\"%i/%i\",\n                                 (const char *)(*((_DWORD *)v1 + 165) + 1),\n                                 5);\n    CString = cocos2d::CCString::getCString(v12);\n    return v11(v10, CString);\n  }\n  return result;\n}", "assembly": "; \n; CreateParticlePopup::applyTexturePage from 0x664890 to 0x6649f2 (354 bytes)\n; \n; 3 xrefs:\n; > CreateParticlePopup::onTexturePage @ 0x664a28\n; > CreateParticlePopup::onSelectParticleTexture @ 0x665778\n; > CreateParticlePopup::onPage @ 0x665b80\n; \n; This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\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 11:55:39 +0000\n; \nPUSH.W          {R4-R10,LR}                                            ; +0x0, 0x664890\nMOV             R4, R0                                                 ; +0x4, 0x664894\nVPUSH           {D8}                                                   ; +0x6, 0x664896\nMOVS            R5, #0                                                 ; +0xa, 0x66489a\nLDR             R3, =(__stack_chk_guard_ptr - 0x6648A2)                ; +0xc, 0x66489c\nADD             R3, PC; __stack_chk_guard_ptr                          ; +0xe, 0x66489e\nLDR             R3, [R3]; __stack_chk_guard                            ; +0x10, 0x6648a0\nSUB             SP, SP, #0x28                                          ; +0x12, 0x6648a2\nLDR             R2, [R3]                                               ; +0x14, 0x6648a4\nMOV             R7, R3                                                 ; +0x16, 0x6648a6\nSTR             R2, [SP,#0x28+var_4]                                   ; +0x18, 0x6648a8\nLDR.W           R2, [R0,#0x294]                                        ; +0x1a, 0x6648aa\nCMP             R2, #4                                                 ; +0x1e, 0x6648ae\nITT HI                                                                 ; +0x20, 0x6648b0\nMOVHI           R3, #0                                                 ; +0x22, 0x6648b2\nSTRHI.W         R3, [R0,#0x294]                                        ; +0x24, 0x6648b4\nLDR.W           R2, [R4,#0x284]                                        ; +0x28, 0x6648b8\nLDR.W           R3, [R4,#0x288]                                        ; +0x2c, 0x6648bc\nSUBS            R3, R3, R2                                             ; +0x30, 0x6648c0\nCMP.W           R5, R3,ASR#2                                           ; +0x32, 0x6648c2\nBGE             loc_6648EE                                             ; +0x36, 0x6648c6\nMOV             R0, R5                                                 ; +0x38, 0x6648c8\nMOVS            R1, #0x58 ; 'X'                                        ; +0x3a, 0x6648ca\nLDR.W           R6, [R2,R5,LSL#2]                                      ; +0x3c, 0x6648cc\nBLX             __aeabi_idiv                                           ; +0x40, 0x6648d0\nLDR.W           R1, [R4,#0x294]                                        ; +0x44, 0x6648d4\nADDS            R5, #1                                                 ; +0x48, 0x6648d8\nLDR.W           R8, [R6]                                               ; +0x4a, 0x6648da\nLDR.W           R3, [R8,#0xAC]                                         ; +0x4e, 0x6648de\nSUBS            R2, R0, R1                                             ; +0x52, 0x6648e2\nMOV             R0, R6                                                 ; +0x54, 0x6648e4\nNEGS            R1, R2                                                 ; +0x56, 0x6648e6\nADCS            R1, R2                                                 ; +0x58, 0x6648e8\nBLX             R3                                                     ; +0x5a, 0x6648ea\nB               loc_6648B8                                             ; +0x5c, 0x6648ec\nBL              _ZN7cocos2d10CCDirector14sharedDirectorEv; cocos2d::CCDirector::sharedDirector(void) ; +0x5e, 0x6648ee\nADD             R6, SP, #0x28+var_1C                                   ; +0x62, 0x6648f2\nVMOV.F32        S16, #24.0                                             ; +0x64, 0x6648f4\nMOV             R1, R0                                                 ; +0x68, 0x6648f8\nADD             R0, SP, #0x28+var_24; this                             ; +0x6a, 0x6648fa\nBL              _ZN7cocos2d10CCDirector10getWinSizeEv; cocos2d::CCDirector::getWinSize(void) ; +0x6c, 0x6648fc\nVMOV.F32        S15, #0.5                                              ; +0x70, 0x664900\nVLDR            S13, [SP,#0x28+var_24]                                 ; +0x74, 0x664904\nMOV             R0, R6; this                                           ; +0x78, 0x664908\nVLDR            S14, =56.0                                             ; +0x7a, 0x66490a\nVNMLS.F32       S14, S13, S15                                          ; +0x7e, 0x66490e\nVLDR            S13, [SP,#0x28+var_20]                                 ; +0x82, 0x664912\nVMOV            R1, S14; float                                         ; +0x86, 0x664916\nVLDR            S14, =75.0                                             ; +0x8a, 0x66491a\nVMLA.F32        S14, S13, S15                                          ; +0x8e, 0x66491e\nVMOV            R2, S14; float                                         ; +0x92, 0x664922\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0x96, 0x664926\nLDR.W           R9, [R4,#0x2B8]                                        ; +0x9a, 0x66492a\nMOVS            R1, #0x58 ; 'X'                                        ; +0x9e, 0x66492e\nMOV             R0, R9                                                 ; +0xa0, 0x664930\nBLX             __aeabi_idivmod                                        ; +0xa2, 0x664932\nMOV             R0, R9                                                 ; +0xa6, 0x664936\nLDR.W           R8, [R4,#0x280]                                        ; +0xa8, 0x664938\nLDR.W           R10, [R8]                                              ; +0xac, 0x66493c\nMOV             R5, R1                                                 ; +0xb0, 0x664940\nMOVS            R1, #0x58 ; 'X'                                        ; +0xb2, 0x664942\nBLX             __aeabi_idiv                                           ; +0xb4, 0x664944\nLDR.W           R1, [R4,#0x294]                                        ; +0xb8, 0x664948\nSUBS            R3, R0, R1                                             ; +0xbc, 0x66494c\nMOV             R0, R8                                                 ; +0xbe, 0x66494e\nNEGS            R1, R3                                                 ; +0xc0, 0x664950\nADD.W           R8, SP, #0x28+var_C                                    ; +0xc2, 0x664952\nADCS            R1, R3                                                 ; +0xc6, 0x664956\nLDR.W           R3, [R10,#0xAC]                                        ; +0xc8, 0x664958\nBLX             R3                                                     ; +0xcc, 0x66495c\nLDR.W           R9, [R4,#0x280]                                        ; +0xce, 0x66495e\nMOV             R0, R5                                                 ; +0xd2, 0x664962\nMOVS            R1, #0xB                                               ; +0xd4, 0x664964\nLDR.W           R3, [R9]                                               ; +0xd6, 0x664966\nLDR.W           R10, [R3,#0x5C]                                        ; +0xda, 0x66496a\nBLX             __aeabi_idivmod                                        ; +0xde, 0x66496e\nMOV             R0, R5                                                 ; +0xe2, 0x664972\nADD             R5, SP, #0x28+var_14                                   ; +0xe4, 0x664974\nVMOV            S15, R1                                                ; +0xe6, 0x664976\nMOVS            R1, #0xB                                               ; +0xea, 0x66497a\nVCVT.F32.S32    S15, S15                                               ; +0xec, 0x66497c\nVMUL.F32        S16, S15, S16                                          ; +0xf0, 0x664980\nBLX             __aeabi_idiv                                           ; +0xf4, 0x664984\nVMOV            R1, S16; float                                         ; +0xf8, 0x664988\nVMOV            S15, R0                                                ; +0xfc, 0x66498c\nMOV             R0, R5; this                                           ; +0x100, 0x664990\nVCVT.F32.S32    S14, S15                                               ; +0x102, 0x664992\nVMOV.F32        S15, #-24.0                                            ; +0x106, 0x664996\nVMUL.F32        S15, S14, S15                                          ; +0x10a, 0x66499a\nVMOV            R2, S15; float                                         ; +0x10e, 0x66499e\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0x112, 0x6649a2\nMOV             R2, R5                                                 ; +0x116, 0x6649a6\nMOV             R0, R8                                                 ; +0x118, 0x6649a8\nMOV             R1, R6                                                 ; +0x11a, 0x6649aa\nBL              _ZNK7cocos2d7CCPointplERKS0_; cocos2d::CCPoint::operator+(cocos2d::CCPoint const&) ; +0x11c, 0x6649ac\nMOV             R0, R9                                                 ; +0x120, 0x6649b0\nMOV             R1, R8                                                 ; +0x122, 0x6649b2\nBLX             R10                                                    ; +0x124, 0x6649b4\nLDR.W           R5, [R4,#0x290]                                        ; +0x126, 0x6649b6\nCBZ             R5, loc_6649DC                                         ; +0x12a, 0x6649ba\nLDR             R3, [R5]                                               ; +0x12c, 0x6649bc\nMOVS            R2, #5                                                 ; +0x12e, 0x6649be\nLDR.W           R1, [R4,#0x294]                                        ; +0x130, 0x6649c0\nLDR             R0, =(aII - 0x6649D0); \"%i/%i\"                         ; +0x134, 0x6649c4\nADDS            R1, #1; char *                                         ; +0x136, 0x6649c6\nLDR.W           R6, [R3,#0x1D0]                                        ; +0x138, 0x6649c8\nADD             R0, PC; \"%i/%i\"                                        ; +0x13c, 0x6649cc\nBL              _ZN7cocos2d8CCString16createWithFormatEPKcz; cocos2d::CCString::createWithFormat(char const*,...) ; +0x13e, 0x6649ce\nBL              _ZNK7cocos2d8CCString10getCStringEv; cocos2d::CCString::getCString(void) ; +0x142, 0x6649d2\nMOV             R1, R0                                                 ; +0x146, 0x6649d6\nMOV             R0, R5                                                 ; +0x148, 0x6649d8\nBLX             R6                                                     ; +0x14a, 0x6649da\nLDR             R2, [SP,#0x28+var_4]                                   ; +0x14c, 0x6649dc\nLDR             R3, [R7]                                               ; +0x14e, 0x6649de\nCMP             R2, R3                                                 ; +0x150, 0x6649e0\nBEQ             loc_6649E8                                             ; +0x152, 0x6649e2\nBLX             __stack_chk_fail                                       ; +0x154, 0x6649e4\nADD             SP, SP, #0x28 ; '('                                    ; +0x158, 0x6649e8\nVPOP            {D8}                                                   ; +0x15a, 0x6649ea\nPOP.W           {R4-R10,PC}                                            ; +0x15e, 0x6649ee", "xrefs": ["CreateParticlePopup::onTexturePage @ 0x664a28", "CreateParticlePopup::onSelectParticleTexture @ 0x665778", "CreateParticlePopup::onPage @ 0x665b80"], "is_objc": false, "is_32_bit": true, "is_64_bit": false, "idp_name": "arm", "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"}