{"type": "func", "start": 5374770320, "end": 5374770760, "name": "CreateParticlePopup::applyTexturePage", "pseudocode": "// \n// CreateParticlePopup::applyTexturePage from 0x1405c7c90 to 0x1405c7e48 (440 bytes)\n// \n// 4 xrefs:\n// > CreateParticlePopup::onSelectParticleTexture @ 0x1405c7976\n// > CreateParticlePopup::onPage @ 0x1405c7c5f\n// > CreateParticlePopup::onTexturePage @ 0x1405c7e96\n// > <???> @ 0x14092e310\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 11:34:51 +0000\n// \n\n__int64 __fastcall CreateParticlePopup::applyTexturePage(__int64 a1)\n{\n  int v1; // ebx\n  __int64 v3; // rcx\n  __int64 v4; // rdi\n  __int64 v5; // rdx\n  __int64 v6; // rax\n  int v7; // ebx\n  __int64 v8; // rdx\n  __int64 v9; // rax\n  __int64 result; // rax\n  __int64 v11; // rdi\n  __int64 (__fastcall **v12)(__int64, const char *); // rbx\n  cocos2d::CCString *v13; // rax\n  const char *CString; // rax\n  float v15; // [rsp+40h] [rbp+8h] BYREF\n  float v16; // [rsp+44h] [rbp+Ch]\n  char v17; // [rsp+48h] [rbp+10h] BYREF\n  char v18; // [rsp+50h] [rbp+18h] BYREF\n  char v19; // [rsp+58h] [rbp+20h] BYREF\n\n  v1 = 0;\n  if ( *(_DWORD *)(a1 + 928) > 4u )\n    *(_DWORD *)(a1 + 928) = 0;\n  v3 = *(_QWORD *)(a1 + 896);\n  if ( (int)((*(_QWORD *)(a1 + 904) - v3) >> 3) > 0 )\n  {\n    v4 = 0;\n    do\n    {\n      v5 = (unsigned int)(v1 / 88);\n      LOBYTE(v5) = (_DWORD)v5 == *(_DWORD *)(a1 + 928);\n      (*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(v4 + v3) + 336LL))(*(_QWORD *)(v4 + v3), v5);\n      v3 = *(_QWORD *)(a1 + 896);\n      v4 += 8;\n      ++v1;\n    }\n    while ( v1 < (int)((*(_QWORD *)(a1 + 904) - v3) >> 3) );\n  }\n  v6 = cocos2d::CCDirector::sharedDirector(v3);\n  cocos2d::CCDirector::getWinSize(v6, &v15);\n  cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v17, (float)(v15 * 0.5) - 56.0, (float)(v16 * 0.5) + 75.0);\n  v7 = *(_DWORD *)(a1 + 992);\n  v8 = (unsigned int)(v7 / 88);\n  LOBYTE(v8) = (_DWORD)v8 == *(_DWORD *)(a1 + 928);\n  (*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 888) + 336LL))(*(_QWORD *)(a1 + 888), v8);\n  cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v19, (float)(v7 % 88 % 11) * 24.0, (float)(v7 % 88 / 11) * -24.0);\n  cocos2d::CCPoint::operator+(&v17, &v18, v9);\n  result = (*(__int64 (__fastcall **)(_QWORD, char *))(**(_QWORD **)(a1 + 888) + 184LL))(*(_QWORD *)(a1 + 888), &v18);\n  v11 = *(_QWORD *)(a1 + 920);\n  if ( v11 )\n  {\n    v12 = *(__int64 (__fastcall ***)(__int64, const char *))(v11 + 360);\n    v13 = cocos2d::CCString::createWithFormat(\"%i/%i\", *(_DWORD *)(a1 + 928) + 1, 5);\n    CString = cocos2d::CCString::getCString(v13);\n    return (*v12)(v11 + 360, CString);\n  }\n  return result;\n}", "assembly": "; \n; CreateParticlePopup::applyTexturePage from 0x1405c7c90 to 0x1405c7e48 (440 bytes)\n; \n; 4 xrefs:\n; > CreateParticlePopup::onSelectParticleTexture @ 0x1405c7976\n; > CreateParticlePopup::onPage @ 0x1405c7c5f\n; > CreateParticlePopup::onTexturePage @ 0x1405c7e96\n; > <???> @ 0x14092e310\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 11:34:51 +0000\n; \npush    rbx                                                            ; +0x0, 0x1405c7c90\npush    rsi                                                            ; +0x2, 0x1405c7c92\npush    rdi                                                            ; +0x3, 0x1405c7c93\nsub     rsp, 20h                                                       ; +0x4, 0x1405c7c94\nxor     ebx, ebx                                                       ; +0x8, 0x1405c7c98\nmov     rsi, rcx                                                       ; +0xa, 0x1405c7c9a\ncmp     dword ptr [rcx+3A0h], 4                                        ; +0xd, 0x1405c7c9d\njbe     short loc_1405C7CAC                                            ; +0x14, 0x1405c7ca4\nmov     [rcx+3A0h], ebx                                                ; +0x16, 0x1405c7ca6\nmov     rcx, [rcx+380h]                                                ; +0x1c, 0x1405c7cac\nmov     rax, [rsi+388h]                                                ; +0x23, 0x1405c7cb3\nsub     rax, rcx                                                       ; +0x2a, 0x1405c7cba\nsar     rax, 3                                                         ; +0x2d, 0x1405c7cbd\ntest    eax, eax                                                       ; +0x31, 0x1405c7cc1\njle     short loc_1405C7D16                                            ; +0x33, 0x1405c7cc3\nmov     rdi, rbx                                                       ; +0x35, 0x1405c7cc5\nnop     dword ptr [rax+rax+00000000h]                                  ; +0x38, 0x1405c7cc8\nmov     rcx, [rdi+rcx]                                                 ; +0x40, 0x1405c7cd0\nmov     eax, 2E8BA2E9h                                                 ; +0x44, 0x1405c7cd4\nimul    ebx                                                            ; +0x49, 0x1405c7cd9\nsar     edx, 4                                                         ; +0x4b, 0x1405c7cdb\nmov     eax, edx                                                       ; +0x4e, 0x1405c7cde\nshr     eax, 1Fh                                                       ; +0x50, 0x1405c7ce0\nadd     edx, eax                                                       ; +0x53, 0x1405c7ce3\nmov     rax, [rcx]                                                     ; +0x55, 0x1405c7ce5\ncmp     edx, [rsi+3A0h]                                                ; +0x58, 0x1405c7ce8\nsetz    dl                                                             ; +0x5e, 0x1405c7cee\ncall    qword ptr [rax+150h]                                           ; +0x61, 0x1405c7cf1\nmov     rcx, [rsi+380h]                                                ; +0x67, 0x1405c7cf7\nlea     rdi, [rdi+8]                                                   ; +0x6e, 0x1405c7cfe\nmov     rax, [rsi+388h]                                                ; +0x72, 0x1405c7d02\ninc     ebx                                                            ; +0x79, 0x1405c7d09\nsub     rax, rcx                                                       ; +0x7b, 0x1405c7d0b\nsar     rax, 3                                                         ; +0x7e, 0x1405c7d0e\ncmp     ebx, eax                                                       ; +0x82, 0x1405c7d12\njl      short loc_1405C7CD0                                            ; +0x84, 0x1405c7d14\ncall    cs:?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x86, 0x1405c7d16\nmov     rcx, rax                                                       ; +0x8c, 0x1405c7d1c\nlea     rdx, [rsp+38h+arg_0]                                           ; +0x8f, 0x1405c7d1f\ncall    cs:?getWinSize@CCDirector@cocos2d@@QEAA?AVCCSize@2@XZ; cocos2d::CCDirector::getWinSize(void) ; +0x94, 0x1405c7d24\nmovss   xmm2, [rsp+38h+arg_4]                                          ; +0x9a, 0x1405c7d2a\nlea     rcx, [rsp+38h+arg_8]                                           ; +0xa0, 0x1405c7d30\nmovss   xmm1, [rsp+38h+arg_0]                                          ; +0xa5, 0x1405c7d35\nmulss   xmm2, cs:dword_140834F20                                       ; +0xab, 0x1405c7d3b\nmulss   xmm1, cs:dword_140834F20                                       ; +0xb3, 0x1405c7d43\naddss   xmm2, cs:dword_140835730                                       ; +0xbb, 0x1405c7d4b\nsubss   xmm1, cs:dword_1408356CC                                       ; +0xc3, 0x1405c7d53\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0xcb, 0x1405c7d5b\nmov     ebx, [rsi+3E0h]                                                ; +0xd1, 0x1405c7d61\nmov     eax, 2E8BA2E9h                                                 ; +0xd7, 0x1405c7d67\nimul    ebx                                                            ; +0xdc, 0x1405c7d6c\nsar     edx, 4                                                         ; +0xde, 0x1405c7d6e\nmov     eax, edx                                                       ; +0xe1, 0x1405c7d71\nshr     eax, 1Fh                                                       ; +0xe3, 0x1405c7d73\nadd     edx, eax                                                       ; +0xe6, 0x1405c7d76\nimul    ecx, edx, 58h ; 'X'                                            ; +0xe8, 0x1405c7d78\nsub     ebx, ecx                                                       ; +0xeb, 0x1405c7d7b\nmov     rcx, [rsi+378h]                                                ; +0xed, 0x1405c7d7d\ncmp     edx, [rsi+3A0h]                                                ; +0xf4, 0x1405c7d84\nsetz    dl                                                             ; +0xfa, 0x1405c7d8a\nmov     r8, [rcx]                                                      ; +0xfd, 0x1405c7d8d\ncall    qword ptr [r8+150h]                                            ; +0x100, 0x1405c7d90\nmov     eax, 2E8BA2E9h                                                 ; +0x107, 0x1405c7d97\nlea     rcx, [rsp+38h+arg_18]                                          ; +0x10c, 0x1405c7d9c\nimul    ebx                                                            ; +0x111, 0x1405c7da1\nsar     edx, 1                                                         ; +0x113, 0x1405c7da3\nmov     eax, edx                                                       ; +0x115, 0x1405c7da5\nshr     eax, 1Fh                                                       ; +0x117, 0x1405c7da7\nadd     edx, eax                                                       ; +0x11a, 0x1405c7daa\nimul    eax, edx, 0Bh                                                  ; +0x11c, 0x1405c7dac\nmovd    xmm2, edx                                                      ; +0x11f, 0x1405c7daf\ncvtdq2ps xmm2, xmm2                                                    ; +0x123, 0x1405c7db3\nsub     ebx, eax                                                       ; +0x126, 0x1405c7db6\nmovd    xmm1, ebx                                                      ; +0x128, 0x1405c7db8\nmulss   xmm2, cs:dword_140835E60                                       ; +0x12c, 0x1405c7dbc\ncvtdq2ps xmm1, xmm1                                                    ; +0x134, 0x1405c7dc4\nmulss   xmm1, cs:dword_1408355E4                                       ; +0x137, 0x1405c7dc7\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x13f, 0x1405c7dcf\nmov     r8, rax                                                        ; +0x145, 0x1405c7dd5\nlea     rdx, [rsp+38h+arg_10]                                          ; +0x148, 0x1405c7dd8\nlea     rcx, [rsp+38h+arg_8]                                           ; +0x14d, 0x1405c7ddd\ncall    cs:??HCCPoint@cocos2d@@QEBA?AV01@AEBV01@@Z; cocos2d::CCPoint::operator+(cocos2d::CCPoint const &) ; +0x152, 0x1405c7de2\nmov     rcx, [rsi+378h]                                                ; +0x158, 0x1405c7de8\nlea     rdx, [rsp+38h+arg_10]                                          ; +0x15f, 0x1405c7def\nmov     rax, [rcx]                                                     ; +0x164, 0x1405c7df4\ncall    qword ptr [rax+0B8h]                                           ; +0x167, 0x1405c7df7\nmov     rdi, [rsi+398h]                                                ; +0x16d, 0x1405c7dfd\ntest    rdi, rdi                                                       ; +0x174, 0x1405c7e04\njz      short loc_1405C7E40                                            ; +0x177, 0x1405c7e07\nmov     edx, [rsi+3A0h]                                                ; +0x179, 0x1405c7e09\nlea     rcx, aII_0; \"%i/%i\"                                            ; +0x17f, 0x1405c7e0f\nmov     rbx, [rdi+168h]                                                ; +0x186, 0x1405c7e16\ninc     edx                                                            ; +0x18d, 0x1405c7e1d\nmov     r8d, 5                                                         ; +0x18f, 0x1405c7e1f\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x195, 0x1405c7e25\nmov     rcx, rax                                                       ; +0x19b, 0x1405c7e2b\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0x19e, 0x1405c7e2e\nmov     rdx, rax                                                       ; +0x1a4, 0x1405c7e34\nlea     rcx, [rdi+168h]                                                ; +0x1a7, 0x1405c7e37\ncall    qword ptr [rbx]                                                ; +0x1ae, 0x1405c7e3e\nadd     rsp, 20h                                                       ; +0x1b0, 0x1405c7e40\npop     rdi                                                            ; +0x1b4, 0x1405c7e44\npop     rsi                                                            ; +0x1b5, 0x1405c7e45\npop     rbx                                                            ; +0x1b6, 0x1405c7e46\nretn                                                                   ; +0x1b7, 0x1405c7e47", "xrefs": ["CreateParticlePopup::onSelectParticleTexture @ 0x1405c7976", "CreateParticlePopup::onPage @ 0x1405c7c5f", "CreateParticlePopup::onTexturePage @ 0x1405c7e96", "<???> @ 0x14092e310"], "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"}