{"type": "func", "start": 5368978784, "end": 5368979428, "name": "SpriteDescription::initDescription", "pseudocode": "// \n// SpriteDescription::initDescription from 0x140041d60 to 0x140041fe4 (644 bytes)\n// \n// 2 xrefs:\n// > CCAnimateFrameCache::addDict @ 0x1400418e7\n// > <???> @ 0x1406c432c\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=1\nbool SpriteDescription::initDescription(SpriteDescription *a1, DS_Dictionary *a2)\n{\n  struct cocos2d::CCPoint Vec2ForKey; // rax\n  struct cocos2d::CCPoint v5; // rax\n  struct cocos2d::CCPoint v6; // rax\n  __int64 StringForKey; // rax\n  float v8; // xmm1_4\n  __int64 v9; // rax\n  __int64 v10; // rax\n  __int64 v11; // rax\n  void **v12; // rbx\n  cocos2d::CCSpriteFrameCache *v13; // rax\n  cocos2d::CCSpriteFrame *v14; // rax\n  void **v15; // r14\n  unsigned __int64 v16; // rsi\n  __int64 v17; // rbx\n  char v19[8]; // [rsp+20h] [rbp-50h] BYREF\n  __int128 v20; // [rsp+28h] [rbp-48h] BYREF\n  unsigned __int64 v21; // [rsp+38h] [rbp-38h]\n  __int64 v22; // [rsp+40h] [rbp-30h]\n  void *Src[2]; // [rsp+48h] [rbp-28h] BYREF\n  unsigned __int64 v24; // [rsp+58h] [rbp-18h]\n  unsigned __int64 v25; // [rsp+60h] [rbp-10h]\n\n  Vec2ForKey = DS_Dictionary::getVec2ForKey(a2, v19);\n  ((void (__fastcall *)(_QWORD, _QWORD))cocos2d::CCPoint::operator=)(&a1->m_position, Vec2ForKey);\n  v5 = DS_Dictionary::getVec2ForKey(a2, v19);\n  ((void (__fastcall *)(_QWORD, _QWORD))cocos2d::CCPoint::operator=)(&a1->m_flipped, v5);\n  v6 = DS_Dictionary::getVec2ForKey(a2, v19);\n  ((void (__fastcall *)(_QWORD, _QWORD))cocos2d::CCPoint::operator=)(&a1->m_scale, v6);\n  StringForKey = DS_Dictionary::getStringForKey(a2, Src, \"rotation\");\n  if ( *(_QWORD *)(StringForKey + 24) > 0xFu )\n    StringForKey = *(_QWORD *)StringForKey;\n  v8 = atof((const char *)StringForKey);\n  a1->m_rotation = v8;\n  sub_14003A830((__int64)Src);\n  v9 = DS_Dictionary::getStringForKey(a2, Src, \"zValue\");\n  if ( *(_QWORD *)(v9 + 24) > 0xFu )\n    v9 = *(_QWORD *)v9;\n  a1->m_zValue = atoi((const char *)v9);\n  sub_14003A830((__int64)Src);\n  v10 = DS_Dictionary::getStringForKey(a2, Src, &dword_14052CA10);\n  if ( *(_QWORD *)(v10 + 24) > 0xFu )\n    v10 = *(_QWORD *)v10;\n  a1->m_tag = atoi((const char *)v10);\n  sub_14003A830((__int64)Src);\n  v11 = DS_Dictionary::getStringForKey(a2, Src, \"usesCustomTag\");\n  if ( *(_QWORD *)(v11 + 24) > 0xFu )\n    v11 = *(_QWORD *)v11;\n  a1->m_usesCustomTag = atoi((const char *)v11) != 0;\n  sub_14003A830((__int64)Src);\n  if ( a1->m_usesCustomTag )\n  {\n    DS_Dictionary::getStringForKey(a2, Src, &qword_14052CA08);\n    v12 = Src;\n    if ( v25 > 0xF )\n      v12 = (void **)Src[0];\n    v13 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();\n    v14 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v13, (const char *)v12);\n    a1->m_texture = v14;\n    cocos2d::CCObject::retain(v14);\n    v20 = 0;\n    v21 = 0;\n    v22 = 0;\n    v15 = Src;\n    if ( v25 > 0xF )\n      v15 = (void **)Src[0];\n    v16 = v24;\n    v17 = 0x7FFFFFFFFFFFFFFFLL;\n    if ( v24 > 0x7FFFFFFFFFFFFFFFLL )\n      sub_140007B50();\n    v22 = 15;\n    if ( v24 > 0xF )\n    {\n      if ( (v24 | 0xF) <= 0x7FFFFFFFFFFFFFFFLL )\n      {\n        v17 = v24 | 0xF;\n        if ( (v24 | 0xF) < 0x16 )\n          v17 = 22;\n      }\n      *(_QWORD *)&v20 = sub_14003AA10(v17 + 1);\n      v21 = v16;\n      v22 = v17;\n      memcpy((void *)v20, v15, v16 + 1);\n    }\n    else\n    {\n      v21 = v24;\n      v20 = *(_OWORD *)v15;\n    }\n    cocos2d::CCSpriteFrame::setFrameName(a1->m_texture, &v20);\n    sub_14003A830((__int64)Src);\n  }\n  return 1;\n}", "assembly": "; \n; SpriteDescription::initDescription from 0x140041d60 to 0x140041fe4 (644 bytes)\n; \n; 2 xrefs:\n; > CCAnimateFrameCache::addDict @ 0x1400418e7\n; > <???> @ 0x1406c432c\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-18h+arg_10], rbx                                          ; +0x0, 0x140041d60\nmov     [rsp-18h+arg_18], rsi                                          ; +0x5, 0x140041d65\npush    rbp                                                            ; +0xa, 0x140041d6a\npush    rdi                                                            ; +0xb, 0x140041d6b\npush    r14                                                            ; +0xc, 0x140041d6c\nmov     rbp, rsp                                                       ; +0xe, 0x140041d6e\nsub     rsp, 70h                                                       ; +0x11, 0x140041d71\nmov     rax, cs:__security_cookie                                      ; +0x15, 0x140041d75\nxor     rax, rsp                                                       ; +0x1c, 0x140041d7c\nmov     [rbp+var_8], rax                                               ; +0x1f, 0x140041d7f\nmov     rbx, rdx                                                       ; +0x23, 0x140041d83\nmov     rdi, rcx                                                       ; +0x26, 0x140041d86\nlea     r8, aPosition; \"position\"                                      ; +0x29, 0x140041d89\nlea     rdx, [rbp+var_50]                                              ; +0x30, 0x140041d90\nmov     rcx, rbx                                                       ; +0x34, 0x140041d94\ncall    cs:?getVec2ForKey@DS_Dictionary@@QEAA?AVCCPoint@cocos2d@@PEBD@Z; DS_Dictionary::getVec2ForKey(char const *) ; +0x37, 0x140041d97\nmov     rdx, rax                                                       ; +0x3d, 0x140041d9d\nlea     rcx, [rdi+38h]                                                 ; +0x40, 0x140041da0\ncall    cs:??4CCPoint@cocos2d@@QEAAAEAV01@AEBV01@@Z; cocos2d::CCPoint::operator=(cocos2d::CCPoint const &) ; +0x44, 0x140041da4\nlea     r8, aFlipped; \"flipped\"                                        ; +0x4a, 0x140041daa\nlea     rdx, [rbp+var_50]                                              ; +0x51, 0x140041db1\nmov     rcx, rbx                                                       ; +0x55, 0x140041db5\ncall    cs:?getVec2ForKey@DS_Dictionary@@QEAA?AVCCPoint@cocos2d@@PEBD@Z; DS_Dictionary::getVec2ForKey(char const *) ; +0x58, 0x140041db8\nmov     rdx, rax                                                       ; +0x5e, 0x140041dbe\nlea     rcx, [rdi+48h]                                                 ; +0x61, 0x140041dc1\ncall    cs:??4CCPoint@cocos2d@@QEAAAEAV01@AEBV01@@Z; cocos2d::CCPoint::operator=(cocos2d::CCPoint const &) ; +0x65, 0x140041dc5\nlea     r8, aScale; \"scale\"                                            ; +0x6b, 0x140041dcb\nlea     rdx, [rbp+var_50]                                              ; +0x72, 0x140041dd2\nmov     rcx, rbx                                                       ; +0x76, 0x140041dd6\ncall    cs:?getVec2ForKey@DS_Dictionary@@QEAA?AVCCPoint@cocos2d@@PEBD@Z; DS_Dictionary::getVec2ForKey(char const *) ; +0x79, 0x140041dd9\nmov     rdx, rax                                                       ; +0x7f, 0x140041ddf\nlea     rcx, [rdi+40h]                                                 ; +0x82, 0x140041de2\ncall    cs:??4CCPoint@cocos2d@@QEAAAEAV01@AEBV01@@Z; cocos2d::CCPoint::operator=(cocos2d::CCPoint const &) ; +0x86, 0x140041de6\nlea     r8, aRotation; \"rotation\"                                      ; +0x8c, 0x140041dec\nlea     rdx, [rbp+Src]                                                 ; +0x93, 0x140041df3\nmov     rcx, rbx                                                       ; +0x97, 0x140041df7\ncall    cs:?getStringForKey@DS_Dictionary@@QEAA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PEBD@Z; DS_Dictionary::getStringForKey(char const *) ; +0x9a, 0x140041dfa\ncmp     qword ptr [rax+18h], 0Fh                                       ; +0xa0, 0x140041e00\njbe     short loc_140041E0A                                            ; +0xa5, 0x140041e05\nmov     rax, [rax]                                                     ; +0xa7, 0x140041e07\nmov     rcx, rax; String                                               ; +0xaa, 0x140041e0a\ncall    cs:atof                                                        ; +0xad, 0x140041e0d\nxorps   xmm1, xmm1                                                     ; +0xb3, 0x140041e13\ncvtsd2ss xmm1, xmm0                                                    ; +0xb6, 0x140041e16\nmovss   dword ptr [rdi+50h], xmm1                                      ; +0xba, 0x140041e1a\nlea     rcx, [rbp+Src]                                                 ; +0xbf, 0x140041e1f\ncall    sub_14003A830                                                  ; +0xc3, 0x140041e23\nlea     r8, aZvalue; \"zValue\"                                          ; +0xc8, 0x140041e28\nlea     rdx, [rbp+Src]                                                 ; +0xcf, 0x140041e2f\nmov     rcx, rbx                                                       ; +0xd3, 0x140041e33\ncall    cs:?getStringForKey@DS_Dictionary@@QEAA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PEBD@Z; DS_Dictionary::getStringForKey(char const *) ; +0xd6, 0x140041e36\ncmp     qword ptr [rax+18h], 0Fh                                       ; +0xdc, 0x140041e3c\njbe     short loc_140041E46                                            ; +0xe1, 0x140041e41\nmov     rax, [rax]                                                     ; +0xe3, 0x140041e43\nmov     rcx, rax; String                                               ; +0xe6, 0x140041e46\ncall    cs:atoi                                                        ; +0xe9, 0x140041e49\nmov     [rdi+54h], eax                                                 ; +0xef, 0x140041e4f\nlea     rcx, [rbp+Src]                                                 ; +0xf2, 0x140041e52\ncall    sub_14003A830                                                  ; +0xf6, 0x140041e56\nlea     r8, dword_14052CA10                                            ; +0xfb, 0x140041e5b\nlea     rdx, [rbp+Src]                                                 ; +0x102, 0x140041e62\nmov     rcx, rbx                                                       ; +0x106, 0x140041e66\ncall    cs:?getStringForKey@DS_Dictionary@@QEAA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PEBD@Z; DS_Dictionary::getStringForKey(char const *) ; +0x109, 0x140041e69\ncmp     qword ptr [rax+18h], 0Fh                                       ; +0x10f, 0x140041e6f\njbe     short loc_140041E79                                            ; +0x114, 0x140041e74\nmov     rax, [rax]                                                     ; +0x116, 0x140041e76\nmov     rcx, rax; String                                               ; +0x119, 0x140041e79\ncall    cs:atoi                                                        ; +0x11c, 0x140041e7c\nmov     [rdi+58h], eax                                                 ; +0x122, 0x140041e82\nlea     rcx, [rbp+Src]                                                 ; +0x125, 0x140041e85\ncall    sub_14003A830                                                  ; +0x129, 0x140041e89\nlea     r8, aUsescustomtag; \"usesCustomTag\"                            ; +0x12e, 0x140041e8e\nlea     rdx, [rbp+Src]                                                 ; +0x135, 0x140041e95\nmov     rcx, rbx                                                       ; +0x139, 0x140041e99\ncall    cs:?getStringForKey@DS_Dictionary@@QEAA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PEBD@Z; DS_Dictionary::getStringForKey(char const *) ; +0x13c, 0x140041e9c\ncmp     qword ptr [rax+18h], 0Fh                                       ; +0x142, 0x140041ea2\njbe     short loc_140041EAC                                            ; +0x147, 0x140041ea7\nmov     rax, [rax]                                                     ; +0x149, 0x140041ea9\nmov     rcx, rax; String                                               ; +0x14c, 0x140041eac\ncall    cs:atoi                                                        ; +0x14f, 0x140041eaf\ntest    eax, eax                                                       ; +0x155, 0x140041eb5\nsetnz   al                                                             ; +0x157, 0x140041eb7\nmov     [rdi+5Ch], al                                                  ; +0x15a, 0x140041eba\nlea     rcx, [rbp+Src]                                                 ; +0x15d, 0x140041ebd\ncall    sub_14003A830                                                  ; +0x161, 0x140041ec1\ncmp     byte ptr [rdi+5Ch], 0                                          ; +0x166, 0x140041ec6\njz      loc_140041FBB                                                  ; +0x16a, 0x140041eca\nlea     r8, qword_14052CA08                                            ; +0x170, 0x140041ed0\nlea     rdx, [rbp+Src]                                                 ; +0x177, 0x140041ed7\nmov     rcx, rbx                                                       ; +0x17b, 0x140041edb\ncall    cs:?getStringForKey@DS_Dictionary@@QEAA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PEBD@Z; DS_Dictionary::getStringForKey(char const *) ; +0x17e, 0x140041ede\nnop                                                                    ; +0x184, 0x140041ee4\nlea     rbx, [rbp+Src]                                                 ; +0x185, 0x140041ee5\ncmp     [rbp+var_10], 0Fh                                              ; +0x189, 0x140041ee9\ncmova   rbx, [rbp+Src]                                                 ; +0x18e, 0x140041eee\ncall    cs:?sharedSpriteFrameCache@CCSpriteFrameCache@cocos2d@@SAPEAV12@XZ; cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(void) ; +0x193, 0x140041ef3\nmov     rcx, rax                                                       ; +0x199, 0x140041ef9\nmov     rdx, rbx                                                       ; +0x19c, 0x140041efc\ncall    cs:?spriteFrameByName@CCSpriteFrameCache@cocos2d@@QEAAPEAVCCSpriteFrame@2@PEBD@Z; cocos2d::CCSpriteFrameCache::spriteFrameByName(char const *) ; +0x19f, 0x140041eff\nmov     [rdi+60h], rax                                                 ; +0x1a5, 0x140041f05\nmov     rcx, rax                                                       ; +0x1a9, 0x140041f09\ncall    cs:?retain@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::retain(void) ; +0x1ac, 0x140041f0c\nxorps   xmm0, xmm0                                                     ; +0x1b2, 0x140041f12\nmovups  [rbp+var_48], xmm0                                             ; +0x1b5, 0x140041f15\nxor     eax, eax                                                       ; +0x1b9, 0x140041f19\nmov     [rbp+var_38], rax                                              ; +0x1bb, 0x140041f1b\nmov     [rbp+var_30], rax                                              ; +0x1bf, 0x140041f1f\nlea     r14, [rbp+Src]                                                 ; +0x1c3, 0x140041f23\ncmp     [rbp+var_10], 0Fh                                              ; +0x1c7, 0x140041f27\ncmova   r14, [rbp+Src]                                                 ; +0x1cc, 0x140041f2c\nmov     rsi, [rbp+var_18]                                              ; +0x1d1, 0x140041f31\nmov     rbx, 7FFFFFFFFFFFFFFFh                                         ; +0x1d5, 0x140041f35\ncmp     rsi, rbx                                                       ; +0x1df, 0x140041f3f\nja      loc_140041FDE                                                  ; +0x1e2, 0x140041f42\nmov     [rbp+var_30], 0Fh                                              ; +0x1e8, 0x140041f48\ncmp     rsi, 0Fh                                                       ; +0x1f0, 0x140041f50\nja      short loc_140041F64                                            ; +0x1f4, 0x140041f54\nmov     [rbp+var_38], rsi                                              ; +0x1f6, 0x140041f56\nmovups  xmm0, xmmword ptr [r14]                                        ; +0x1fa, 0x140041f5a\nmovups  [rbp+var_48], xmm0                                             ; +0x1fe, 0x140041f5e\njmp     short loc_140041FA3                                            ; +0x202, 0x140041f62\nmov     rax, rsi                                                       ; +0x204, 0x140041f64\nor      rax, 0Fh                                                       ; +0x207, 0x140041f67\ncmp     rax, rbx                                                       ; +0x20b, 0x140041f6b\nja      short loc_140041F7F                                            ; +0x20e, 0x140041f6e\nmov     rbx, rax                                                       ; +0x210, 0x140041f70\nmov     ecx, 16h                                                       ; +0x213, 0x140041f73\ncmp     rax, rcx                                                       ; +0x218, 0x140041f78\ncmovb   rbx, rcx                                                       ; +0x21b, 0x140041f7b\nlea     rcx, [rbx+1]                                                   ; +0x21f, 0x140041f7f\ncall    sub_14003AA10                                                  ; +0x223, 0x140041f83\nmov     qword ptr [rbp+var_48], rax                                    ; +0x228, 0x140041f88\nmov     [rbp+var_38], rsi                                              ; +0x22c, 0x140041f8c\nmov     [rbp+var_30], rbx                                              ; +0x230, 0x140041f90\nlea     r8, [rsi+1]; Size                                              ; +0x234, 0x140041f94\nmov     rdx, r14; Src                                                  ; +0x238, 0x140041f98\nmov     rcx, rax; void *                                               ; +0x23b, 0x140041f9b\ncall    memcpy                                                         ; +0x23e, 0x140041f9e\nlea     rdx, [rbp+var_48]                                              ; +0x243, 0x140041fa3\nmov     rcx, [rdi+60h]                                                 ; +0x247, 0x140041fa7\ncall    cs:?setFrameName@CCSpriteFrame@cocos2d@@QEAAXV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z; cocos2d::CCSpriteFrame::setFrameName(std::string) ; +0x24b, 0x140041fab\nnop                                                                    ; +0x251, 0x140041fb1\nlea     rcx, [rbp+Src]                                                 ; +0x252, 0x140041fb2\ncall    sub_14003A830                                                  ; +0x256, 0x140041fb6\nmov     al, 1                                                          ; +0x25b, 0x140041fbb\nmov     rcx, [rbp+var_8]                                               ; +0x25d, 0x140041fbd\nxor     rcx, rsp; StackCookie                                          ; +0x261, 0x140041fc1\ncall    __security_check_cookie                                        ; +0x264, 0x140041fc4\nlea     r11, [rsp+70h+var_s0]                                          ; +0x269, 0x140041fc9\nmov     rbx, [r11+30h]                                                 ; +0x26e, 0x140041fce\nmov     rsi, [r11+38h]                                                 ; +0x272, 0x140041fd2\nmov     rsp, r11                                                       ; +0x276, 0x140041fd6\npop     r14                                                            ; +0x279, 0x140041fd9\npop     rdi                                                            ; +0x27b, 0x140041fdb\npop     rbp                                                            ; +0x27c, 0x140041fdc\nretn                                                                   ; +0x27d, 0x140041fdd\ncall    sub_140007B50                                                  ; +0x27e, 0x140041fde\nalign 4                                                                ; +0x283, 0x140041fe3", "xrefs": ["CCAnimateFrameCache::addDict @ 0x1400418e7", "<???> @ 0x1406c432c"], "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"}