{"type": "func", "start": 5373072928, "end": 5373073519, "name": "LevelLeaderboard::getSpriteButton", "pseudocode": "// \n// LevelLeaderboard::getSpriteButton from 0x140429620 to 0x14042986f (591 bytes)\n// \n// 4 xrefs:\n// > LevelLeaderboard::init @ 0x140428963\n// > LevelLeaderboard::init @ 0x140428a39\n// > LevelLeaderboard::init @ 0x140428bf5\n// > <???> @ 0x140926a38\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:32:12 +0000\n// \n\n// Hidden C++ exception states: #wind=3\ncocos2d::CCObject *__fastcall LevelLeaderboard::getSpriteButton(\n        int a1,\n        const char *a2,\n        __int64 a3,\n        __int64 a4,\n        int a5,\n        const struct cocos2d::CCPoint *a6,\n        int a7)\n{\n  cocos2d::CCString *v11; // rax\n  const char *CString; // rax\n  size_t v13; // r8\n  const char *v14; // rcx\n  struct cocos2d::CCSprite *v15; // rbp\n  void **v16; // rsi\n  __int64 *v17; // rax\n  __int64 v18; // r9\n  cocos2d::CCObject *v19; // rbx\n  __int64 v20; // rax\n  cocos2d::CCObject *v21; // rbx\n  void *v22; // rcx\n  __int64 v24; // [rsp+30h] [rbp-B8h]\n  __int64 v25[2]; // [rsp+50h] [rbp-98h] BYREF\n  void *Block[2]; // [rsp+60h] [rbp-88h] BYREF\n  __int64 v27; // [rsp+70h] [rbp-78h]\n  unsigned __int64 v28; // [rsp+78h] [rbp-70h]\n\n  v25[1] = (__int64)a2;\n  v11 = cocos2d::CCString::createWithFormat(\"GJ_button_%02d.png\", a7);\n  CString = cocos2d::CCString::getCString(v11);\n  *(_OWORD *)Block = 0;\n  v27 = 0;\n  v28 = 0;\n  v13 = -1;\n  do\n    ++v13;\n  while ( CString[v13] );\n  sub_14003D230(Block, CString, v13);\n  v14 = a2;\n  if ( *((_QWORD *)a2 + 3) > 0xFu )\n    v14 = *(const char **)a2;\n  v15 = cocos2d::CCSprite::createWithSpriteFrameName(v14);\n  v16 = Block;\n  if ( v28 > 0xF )\n    v16 = (void **)Block[0];\n  v25[0] = (__int64)operator new(0x2C8u);\n  v17 = (__int64 *)ButtonSprite::ButtonSprite(v25[0]);\n  v19 = (cocos2d::CCObject *)v17;\n  if ( v17 )\n  {\n    if ( ButtonSprite::init(v17, (__int64)v15, 32, v18, 32.0, 1065353216, v24, (const char *)v16, 0, 0) )\n    {\n      cocos2d::CCObject::autorelease(v19);\n    }\n    else\n    {\n      (*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v19 + 8LL))(v19, 1);\n      v19 = nullptr;\n    }\n  }\n  cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v25, a6);\n  cocos2d::CCPoint::operator=((char *)v19 + 672, v20);\n  ButtonSprite::updateSpriteBGSize((__int64 *)v19);\n  v21 = CCMenuItemSpriteExtra::create((int)v19, 0, a1, a3);\n  (*(void (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)v21 + 160LL))(v21);\n  *((_DWORD *)v21 + 101) = a5;\n  if ( a4 )\n    (*(void (__fastcall **)(__int64, cocos2d::CCObject *))(*(_QWORD *)a4 + 464LL))(a4, v21);\n  if ( v28 > 0xF )\n  {\n    v22 = Block[0];\n    if ( v28 + 1 >= 0x1000 )\n    {\n      v22 = *((void **)Block[0] - 1);\n      if ( (unsigned __int64)((char *)Block[0] - (char *)v22 - 8) > 0x1F )\n        invoke_watson(nullptr, nullptr, nullptr, 0, 0);\n    }\n    j_j_free(v22);\n  }\n  v27 = 0;\n  v28 = 15;\n  LOBYTE(Block[0]) = 0;\n  sub_14003D310((__int64)a2);\n  return v21;\n}", "assembly": "; \n; LevelLeaderboard::getSpriteButton from 0x140429620 to 0x14042986f (591 bytes)\n; \n; 4 xrefs:\n; > LevelLeaderboard::init @ 0x140428963\n; > LevelLeaderboard::init @ 0x140428a39\n; > LevelLeaderboard::init @ 0x140428bf5\n; > <???> @ 0x140926a38\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:32:12 +0000\n; \npush    rbx                                                            ; +0x0, 0x140429620\npush    rbp                                                            ; +0x2, 0x140429622\npush    rsi                                                            ; +0x3, 0x140429623\npush    rdi                                                            ; +0x4, 0x140429624\npush    r12                                                            ; +0x5, 0x140429625\npush    r13                                                            ; +0x7, 0x140429627\npush    r14                                                            ; +0x9, 0x140429629\npush    r15                                                            ; +0xb, 0x14042962b\nsub     rsp, 0A8h                                                      ; +0xd, 0x14042962d\nmovaps  [rsp+0E8h+var_58], xmm6                                        ; +0x14, 0x140429634\nmov     rax, cs:__security_cookie                                      ; +0x1c, 0x14042963c\nxor     rax, rsp                                                       ; +0x23, 0x140429643\nmov     [rsp+0E8h+var_68], rax                                         ; +0x26, 0x140429646\nmov     r14, r9                                                        ; +0x2e, 0x14042964e\nmov     r12, r8                                                        ; +0x31, 0x140429651\nmov     rdi, rdx                                                       ; +0x34, 0x140429654\nmov     r15, rcx                                                       ; +0x37, 0x140429657\nmov     [rsp+0E8h+var_90], rdx                                         ; +0x3a, 0x14042965a\nmov     r13, [rsp+0E8h+arg_28]                                         ; +0x3f, 0x14042965f\nmov     edx, [rsp+0E8h+arg_30]                                         ; +0x47, 0x140429667\nlea     rcx, aGjButton02dPng; \"GJ_button_%02d.png\"                     ; +0x4e, 0x14042966e\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x55, 0x140429675\nmov     rcx, rax                                                       ; +0x5b, 0x14042967b\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0x5e, 0x14042967e\nxorps   xmm0, xmm0                                                     ; +0x64, 0x140429684\nmovups  xmmword ptr [rsp+0E8h+Block], xmm0                             ; +0x67, 0x140429687\nxor     ecx, ecx                                                       ; +0x6c, 0x14042968c\nmov     [rsp+0E8h+var_78], rcx                                         ; +0x6e, 0x14042968e\nmov     [rsp+0E8h+var_70], rcx                                         ; +0x73, 0x140429693\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0x78, 0x140429698\nnop                                                                    ; +0x7f, 0x14042969f\ninc     r8                                                             ; +0x80, 0x1404296a0\ncmp     [rax+r8], cl                                                   ; +0x83, 0x1404296a3\njnz     short loc_1404296A0                                            ; +0x87, 0x1404296a7\nmov     rdx, rax                                                       ; +0x89, 0x1404296a9\nlea     rcx, [rsp+0E8h+Block]                                          ; +0x8c, 0x1404296ac\ncall    sub_14003D230                                                  ; +0x91, 0x1404296b1\nnop                                                                    ; +0x96, 0x1404296b6\nmov     rcx, rdi                                                       ; +0x97, 0x1404296b7\ncmp     qword ptr [rdi+18h], 0Fh                                       ; +0x9a, 0x1404296ba\njbe     short loc_1404296C4                                            ; +0x9f, 0x1404296bf\nmov     rcx, [rdi]                                                     ; +0xa1, 0x1404296c1\ncall    cs:?createWithSpriteFrameName@CCSprite@cocos2d@@SAPEAV12@PEBD@Z; cocos2d::CCSprite::createWithSpriteFrameName(char const *) ; +0xa4, 0x1404296c4\nmov     rbp, rax                                                       ; +0xaa, 0x1404296ca\nlea     rsi, [rsp+0E8h+Block]                                          ; +0xad, 0x1404296cd\ncmp     [rsp+0E8h+var_70], 0Fh                                         ; +0xb2, 0x1404296d2\ncmova   rsi, [rsp+0E8h+Block]                                          ; +0xb8, 0x1404296d8\nmov     ecx, 2C8h; Size                                                ; +0xbe, 0x1404296de\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0xc3, 0x1404296e3\nmov     [rsp+0E8h+var_98], rax                                         ; +0xc8, 0x1404296e8\nmov     rcx, rax                                                       ; +0xcd, 0x1404296ed\ncall    ButtonSprite__ButtonSprite                                     ; +0xd0, 0x1404296f0\nmov     rbx, rax                                                       ; +0xd5, 0x1404296f5\ntest    rax, rax                                                       ; +0xd8, 0x1404296f8\njz      short loc_140429759                                            ; +0xdb, 0x1404296fb\nxorps   xmm0, xmm0                                                     ; +0xdd, 0x1404296fd\nmovss   [rsp+0E8h+var_A0], xmm0                                        ; +0xe0, 0x140429700\nmov     [rsp+0E8h+var_A8], 0                                           ; +0xe6, 0x140429706\nmov     [rsp+0E8h+var_B0], rsi                                         ; +0xeb, 0x14042970b\nmovss   xmm0, cs:flt_140835080                                         ; +0xf0, 0x140429710\nmovss   [rsp+0E8h+var_C0], xmm0                                        ; +0xf8, 0x140429718\nmovss   xmm1, cs:dword_140835640                                       ; +0xfe, 0x14042971e\nmovss   dword ptr [rsp+0E8h+Reserved], xmm1                            ; +0x106, 0x140429726\nmov     r8d, 20h ; ' '                                                 ; +0x10c, 0x14042972c\nmov     rdx, rbp                                                       ; +0x112, 0x140429732\nmov     rcx, rax                                                       ; +0x115, 0x140429735\ncall    ButtonSprite__init                                             ; +0x118, 0x140429738\nmov     rcx, rbx                                                       ; +0x11d, 0x14042973d\ntest    al, al                                                         ; +0x120, 0x140429740\njz      short loc_14042974C                                            ; +0x122, 0x140429742\ncall    cs:?autorelease@CCObject@cocos2d@@QEAAPEAV12@XZ; cocos2d::CCObject::autorelease(void) ; +0x124, 0x140429744\njmp     short loc_140429759                                            ; +0x12a, 0x14042974a\nmov     rax, [rbx]                                                     ; +0x12c, 0x14042974c\nmov     edx, 1                                                         ; +0x12f, 0x14042974f\ncall    qword ptr [rax+8]                                              ; +0x134, 0x140429754\nxor     ebx, ebx                                                       ; +0x137, 0x140429757\nmov     rdx, r13                                                       ; +0x139, 0x140429759\nlea     rcx, [rsp+0E8h+var_98]                                         ; +0x13c, 0x14042975c\ncall    cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0x141, 0x140429761\nlea     rcx, [rbx+2A0h]                                                ; +0x147, 0x140429767\nmov     rdx, rax                                                       ; +0x14e, 0x14042976e\ncall    cs:??4CCPoint@cocos2d@@QEAAAEAV01@AEBV01@@Z; cocos2d::CCPoint::operator=(cocos2d::CCPoint const &) ; +0x151, 0x140429771\nmov     rcx, rbx                                                       ; +0x157, 0x140429777\ncall    ButtonSprite__updateSpriteBGSize                               ; +0x15a, 0x14042977a\nmov     r9, r12                                                        ; +0x15f, 0x14042977f\nmov     r8, r15                                                        ; +0x162, 0x140429782\nxor     edx, edx                                                       ; +0x165, 0x140429785\nmov     rcx, rbx                                                       ; +0x167, 0x140429787\ncall    CCMenuItemSpriteExtra__create                                  ; +0x16a, 0x14042978a\nmov     rbx, rax                                                       ; +0x16f, 0x14042978f\nmov     rcx, [rax]                                                     ; +0x172, 0x140429792\nmov     rdx, [rcx+0A0h]                                                ; +0x175, 0x140429795\nmovss   xmm6, [rsp+0E8h+arg_20]                                        ; +0x17c, 0x14042979c\nmovaps  xmm1, xmm6                                                     ; +0x185, 0x1404297a5\nmov     rcx, rax                                                       ; +0x188, 0x1404297a8\ncall    rdx                                                            ; +0x18b, 0x1404297ab\nmovss   dword ptr [rbx+194h], xmm6                                     ; +0x18d, 0x1404297ad\ntest    r14, r14                                                       ; +0x195, 0x1404297b5\njz      short loc_1404297CE                                            ; +0x198, 0x1404297b8\nmov     rcx, [r14]                                                     ; +0x19a, 0x1404297ba\nmov     r8, [rcx+1D0h]                                                 ; +0x19d, 0x1404297bd\nmov     rdx, rbx                                                       ; +0x1a4, 0x1404297c4\nmov     rcx, r14                                                       ; +0x1a7, 0x1404297c7\ncall    r8                                                             ; +0x1aa, 0x1404297ca\nnop                                                                    ; +0x1ad, 0x1404297cd\nmov     rdx, [rsp+0E8h+var_70]                                         ; +0x1ae, 0x1404297ce\ncmp     rdx, 0Fh                                                       ; +0x1b3, 0x1404297d3\njbe     short loc_140429821                                            ; +0x1b7, 0x1404297d7\ninc     rdx                                                            ; +0x1b9, 0x1404297d9\nmov     rcx, [rsp+0E8h+Block]; Block                                   ; +0x1bc, 0x1404297dc\nmov     rax, rcx                                                       ; +0x1c1, 0x1404297e1\ncmp     rdx, 1000h                                                     ; +0x1c4, 0x1404297e4\njb      short loc_14042981C                                            ; +0x1cb, 0x1404297eb\nadd     rdx, 27h ; '''                                                 ; +0x1cd, 0x1404297ed\nmov     rcx, [rcx-8]                                                   ; +0x1d1, 0x1404297f1\nsub     rax, rcx                                                       ; +0x1d5, 0x1404297f5\nsub     rax, 8                                                         ; +0x1d8, 0x1404297f8\ncmp     rax, 1Fh                                                       ; +0x1dc, 0x1404297fc\njbe     short loc_14042981C                                            ; +0x1e0, 0x140429800\nmov     [rsp+0E8h+Reserved], 0; Reserved                               ; +0x1e2, 0x140429802\nxor     r9d, r9d; LineNo                                               ; +0x1eb, 0x14042980b\nxor     r8d, r8d; FileName                                             ; +0x1ee, 0x14042980e\nxor     edx, edx; FunctionName                                         ; +0x1f1, 0x140429811\nxor     ecx, ecx; Expression                                           ; +0x1f3, 0x140429813\ncall    cs:_invoke_watson                                              ; +0x1f5, 0x140429815\nalign 4                                                                ; +0x1fb, 0x14042981b\ncall    j_j_free                                                       ; +0x1fc, 0x14042981c\nmov     [rsp+0E8h+var_78], 0                                           ; +0x201, 0x140429821\nmov     [rsp+0E8h+var_70], 0Fh                                         ; +0x20a, 0x14042982a\nmov     byte ptr [rsp+0E8h+Block], 0                                   ; +0x213, 0x140429833\nmov     rcx, rdi                                                       ; +0x218, 0x140429838\ncall    sub_14003D310                                                  ; +0x21b, 0x14042983b\nmov     rax, rbx                                                       ; +0x220, 0x140429840\nmov     rcx, [rsp+0E8h+var_68]                                         ; +0x223, 0x140429843\nxor     rcx, rsp; StackCookie                                          ; +0x22b, 0x14042984b\ncall    __security_check_cookie                                        ; +0x22e, 0x14042984e\nmovaps  xmm6, [rsp+0E8h+var_58]                                        ; +0x233, 0x140429853\nadd     rsp, 0A8h                                                      ; +0x23b, 0x14042985b\npop     r15                                                            ; +0x242, 0x140429862\npop     r14                                                            ; +0x244, 0x140429864\npop     r13                                                            ; +0x246, 0x140429866\npop     r12                                                            ; +0x248, 0x140429868\npop     rdi                                                            ; +0x24a, 0x14042986a\npop     rsi                                                            ; +0x24b, 0x14042986b\npop     rbp                                                            ; +0x24c, 0x14042986c\npop     rbx                                                            ; +0x24d, 0x14042986d\nretn                                                                   ; +0x24e, 0x14042986e", "xrefs": ["LevelLeaderboard::init @ 0x140428963", "LevelLeaderboard::init @ 0x140428a39", "LevelLeaderboard::init @ 0x140428bf5", "<???> @ 0x140926a38"], "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"}