{"type": "func", "start": 4300618368, "end": 4300618729, "name": "GJLevelList::frameForListDifficulty", "pseudocode": "// \n// GJLevelList::frameForListDifficulty from 0x100563a80 to 0x100563be9 (361 bytes)\n// \n// 5 xrefs:\n// > LevelListCell::loadFromList @ 0x1002455b5\n// > LevelListLayer::init @ 0x10035c2b0\n// > LevelListLayer::updateStatsArt @ 0x10035e213\n// > SelectListIconLayer::init @ 0x100361649\n// > ShareListLayer::init @ 0x100362c8c\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_QWORD *__fastcall GJLevelList::frameForListDifficulty(_QWORD *a1, unsigned int a2, int a3, double a4)\n{\n  char v4; // al\n  unsigned int v8; // esi\n  unsigned int v9; // eax\n  char *v10; // rdi\n  char *v11; // rax\n  char *v12; // r14\n  cocos2d::CCString *v13; // rax\n  const char *CString; // r12\n  size_t v15; // rax\n  size_t v16; // r15\n  char *v17; // r14\n  size_t v18; // r13\n  char v20; // [rsp-8h] [rbp-30h]\n\n  v20 = v4;\n  if ( a2 )\n  {\n    v8 = 0;\n    if ( a2 < 0xB )\n      v8 = a2;\n    v9 = a2 - 6;\n    if ( v9 <= 2 )\n      v8 = dword_10081E794[v9];\n    if ( a3 == 2 )\n    {\n      v10 = \"diffIcon_%02d_btn_001.png\";\n    }\n    else if ( a3 == 1 && v8 >= 6 )\n    {\n      v10 = \"difficulty_%02d_btn2_001.png\";\n    }\n    else\n    {\n      v10 = \"difficulty_%02d_btn_001.png\";\n    }\n    v13 = (cocos2d::CCString *)sub_1007AB580(v10, v20);\n    CString = cocos2d::CCString::getCString(v13);\n    v15 = strlen(CString);\n    if ( v15 >= 0xFFFFFFFFFFFFFFF8LL )\n      sub_100006BF0(a4);\n    v16 = v15;\n    if ( v15 >= 0x17 )\n    {\n      v18 = 26;\n      if ( (v15 | 7) != 0x17 )\n        v18 = (v15 | 7) + 1;\n      v17 = (char *)operator new(v18);\n      a1[2] = v17;\n      *a1 = v18 + 1;\n      a1[1] = v16;\n    }\n    else\n    {\n      *(_BYTE *)a1 = 2 * v15;\n      v17 = (char *)a1 + 1;\n      if ( !v15 )\n        goto LABEL_23;\n    }\n    memmove(v17, CString, v16);\nLABEL_23:\n    v12 = &v17[v16];\n    goto LABEL_24;\n  }\n  v11 = (char *)operator new(0x20u);\n  a1[2] = v11;\n  *a1 = 33;\n  if ( a3 == 2 )\n  {\n    a1[1] = 25;\n    qmemcpy(v11, \"diffIcon_auto_btn_001.png\", 25);\n    v12 = v11 + 25;\n  }\n  else\n  {\n    a1[1] = 27;\n    qmemcpy(v11, \"difficulty_auto_btn_001.png\", 27);\n    v12 = v11 + 27;\n  }\nLABEL_24:\n  *v12 = 0;\n  return a1;\n}", "assembly": "; \n; GJLevelList::frameForListDifficulty from 0x100563a80 to 0x100563be9 (361 bytes)\n; \n; 5 xrefs:\n; > LevelListCell::loadFromList @ 0x1002455b5\n; > LevelListLayer::init @ 0x10035c2b0\n; > LevelListLayer::updateStatsArt @ 0x10035e213\n; > SelectListIconLayer::init @ 0x100361649\n; > ShareListLayer::init @ 0x100362c8c\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\npush    rbp                                                            ; +0x0, 0x100563a80\nmov     rbp, rsp                                                       ; +0x1, 0x100563a81\npush    r15                                                            ; +0x4, 0x100563a84\npush    r14                                                            ; +0x6, 0x100563a86\npush    r13                                                            ; +0x8, 0x100563a88\npush    r12                                                            ; +0xa, 0x100563a8a\npush    rbx                                                            ; +0xc, 0x100563a8c\npush    rax; char                                                      ; +0xd, 0x100563a8d\nmov     r15d, edx                                                      ; +0xe, 0x100563a8e\nmov     rbx, rdi                                                       ; +0x11, 0x100563a91\ntest    esi, esi                                                       ; +0x14, 0x100563a94\njz      short loc_100563AC8                                            ; +0x16, 0x100563a96\nmov     eax, esi                                                       ; +0x18, 0x100563a98\nxor     esi, esi                                                       ; +0x1a, 0x100563a9a\ncmp     eax, 0Bh                                                       ; +0x1c, 0x100563a9c\ncmovb   esi, eax                                                       ; +0x1f, 0x100563a9f\nadd     eax, 0FFFFFFFAh                                                ; +0x22, 0x100563aa2\ncmp     eax, 2                                                         ; +0x25, 0x100563aa5\nja      short loc_100563AB6                                            ; +0x28, 0x100563aa8\nmov     eax, eax                                                       ; +0x2a, 0x100563aaa\nlea     rcx, dword_10081E794                                           ; +0x2c, 0x100563aac\nmov     esi, [rcx+rax*4]                                               ; +0x33, 0x100563ab3\ncmp     r15d, 2                                                        ; +0x36, 0x100563ab6\njnz     short loc_100563B0E                                            ; +0x3a, 0x100563aba\nlea     rdi, aDifficon02dBtn; \"diffIcon_%02d_btn_001.png\"              ; +0x3c, 0x100563abc\njmp     loc_100563B51                                                  ; +0x43, 0x100563ac3\nmov     edi, 20h ; ' '; __sz                                           ; +0x48, 0x100563ac8\ncall    __Znwm; operator new(ulong)                                    ; +0x4d, 0x100563acd\nmov     r14, rax                                                       ; +0x52, 0x100563ad2\nmov     [rbx+10h], rax                                                 ; +0x55, 0x100563ad5\nmov     qword ptr [rbx], 21h ; '!'                                     ; +0x59, 0x100563ad9\ncmp     r15d, 2                                                        ; +0x60, 0x100563ae0\njnz     short loc_100563B22                                            ; +0x64, 0x100563ae4\nmov     qword ptr [rbx+8], 19h                                         ; +0x66, 0x100563ae6\nmovups  xmm0, xmmword ptr cs:aDifficonAutoBt+9; \"auto_btn_001.png\"     ; +0x6e, 0x100563aee\nmovups  xmmword ptr [r14+9], xmm0                                      ; +0x75, 0x100563af5\nmovups  xmm0, xmmword ptr cs:aDifficonAutoBt; \"diffIcon_auto_btn_001.png\" ; +0x7a, 0x100563afa\nmovups  xmmword ptr [r14], xmm0                                        ; +0x81, 0x100563b01\nadd     r14, 19h                                                       ; +0x85, 0x100563b05\njmp     loc_100563BCE                                                  ; +0x89, 0x100563b09\ncmp     r15d, 1                                                        ; +0x8e, 0x100563b0e\njnz     short loc_100563B4A                                            ; +0x92, 0x100563b12\ncmp     esi, 6                                                         ; +0x94, 0x100563b14\njb      short loc_100563B4A                                            ; +0x97, 0x100563b17\nlea     rdi, aDifficulty02dB_0; \"difficulty_%02d_btn2_001.png\"         ; +0x99, 0x100563b19\njmp     short loc_100563B51                                            ; +0xa0, 0x100563b20\nmov     qword ptr [rbx+8], 1Bh                                         ; +0xa2, 0x100563b22\nmovups  xmm0, xmmword ptr cs:aDifficultyAuto+0Bh; \"auto_btn_001.png\"   ; +0xaa, 0x100563b2a\nmovups  xmmword ptr [r14+0Bh], xmm0                                    ; +0xb1, 0x100563b31\nmovups  xmm0, xmmword ptr cs:aDifficultyAuto; \"difficulty_auto_btn_001.png\" ; +0xb6, 0x100563b36\nmovups  xmmword ptr [r14], xmm0                                        ; +0xbd, 0x100563b3d\nadd     r14, 1Bh                                                       ; +0xc1, 0x100563b41\njmp     loc_100563BCE                                                  ; +0xc5, 0x100563b45\nlea     rdi, aDifficulty02dB; \"difficulty_%02d_btn_001.png\"            ; +0xca, 0x100563b4a\nxor     eax, eax                                                       ; +0xd1, 0x100563b51\ncall    sub_1007AB580                                                  ; +0xd3, 0x100563b53\nmov     rdi, rax                                                       ; +0xd8, 0x100563b58\ncall    cocos2d__CCString__getCString                                  ; +0xdb, 0x100563b5b\nmov     r12, rax                                                       ; +0xe0, 0x100563b60\nmov     rdi, rax; __s                                                  ; +0xe3, 0x100563b63\ncall    _strlen                                                        ; +0xe6, 0x100563b66\ncmp     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0xeb, 0x100563b6b\njnb     short loc_100563BE4                                            ; +0xef, 0x100563b6f\nmov     r15, rax                                                       ; +0xf1, 0x100563b71\ncmp     rax, 17h                                                       ; +0xf4, 0x100563b74\njnb     short loc_100563B8B                                            ; +0xf8, 0x100563b78\nlea     eax, [r15+r15]                                                 ; +0xfa, 0x100563b7a\nmov     [rbx], al                                                      ; +0xfe, 0x100563b7e\nlea     r14, [rbx+1]                                                   ; +0x100, 0x100563b80\ntest    r15, r15                                                       ; +0x104, 0x100563b84\njnz     short loc_100563BBD                                            ; +0x107, 0x100563b87\njmp     short loc_100563BCB                                            ; +0x109, 0x100563b89\nmov     rax, r15                                                       ; +0x10b, 0x100563b8b\nor      rax, 7                                                         ; +0x10e, 0x100563b8e\nlea     rcx, [rax+1]                                                   ; +0x112, 0x100563b92\ncmp     rax, 17h                                                       ; +0x116, 0x100563b96\nmov     r13d, 1Ah                                                      ; +0x11a, 0x100563b9a\ncmovnz  r13, rcx                                                       ; +0x120, 0x100563ba0\nmov     rdi, r13; __sz                                                 ; +0x124, 0x100563ba4\ncall    __Znwm; operator new(ulong)                                    ; +0x127, 0x100563ba7\nmov     r14, rax                                                       ; +0x12c, 0x100563bac\nmov     [rbx+10h], rax                                                 ; +0x12f, 0x100563baf\ninc     r13                                                            ; +0x133, 0x100563bb3\nmov     [rbx], r13                                                     ; +0x136, 0x100563bb6\nmov     [rbx+8], r15                                                   ; +0x139, 0x100563bb9\nmov     rdi, r14; __dst                                                ; +0x13d, 0x100563bbd\nmov     rsi, r12; __src                                                ; +0x140, 0x100563bc0\nmov     rdx, r15; __len                                                ; +0x143, 0x100563bc3\ncall    _memmove                                                       ; +0x146, 0x100563bc6\nadd     r14, r15                                                       ; +0x14b, 0x100563bcb\nmov     byte ptr [r14], 0                                              ; +0x14e, 0x100563bce\nmov     rax, rbx                                                       ; +0x152, 0x100563bd2\nadd     rsp, 8                                                         ; +0x155, 0x100563bd5\npop     rbx                                                            ; +0x159, 0x100563bd9\npop     r12                                                            ; +0x15a, 0x100563bda\npop     r13                                                            ; +0x15c, 0x100563bdc\npop     r14                                                            ; +0x15e, 0x100563bde\npop     r15                                                            ; +0x160, 0x100563be0\npop     rbp                                                            ; +0x162, 0x100563be2\nretn                                                                   ; +0x163, 0x100563be3\ncall    sub_100006BF0                                                  ; +0x164, 0x100563be4", "xrefs": ["LevelListCell::loadFromList @ 0x1002455b5", "LevelListLayer::init @ 0x10035c2b0", "LevelListLayer::updateStatsArt @ 0x10035e213", "SelectListIconLayer::init @ 0x100361649", "ShareListLayer::init @ 0x100362c8c"], "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"}