{"type": "func", "start": 4297739264, "end": 4297739537, "name": "GJDifficultySprite::getDifficultyFrame", "pseudocode": "// \n// GJDifficultySprite::getDifficultyFrame from 0x1002a4c00 to 0x1002a4d11 (273 bytes)\n// \n// 3 xrefs:\n// > GJDifficultySprite::create @ 0x1002a4b15\n// > GJDifficultySprite::init @ 0x1002a4ba0\n// > GJDifficultySprite::updateDifficultyFrame @ 0x1002a4d5a\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 12:27:55 +0000\n// \n\nstd::string *__fastcall GJDifficultySprite::getDifficultyFrame(std::string *this, int a2, int a3)\n{\n  int v4; // r14d\n  __int64 v5; // rax\n  const char *CString; // r13\n  size_t v7; // rax\n  std::string::size_type v8; // r12\n  char *data; // r15\n  size_t v10; // r14\n  char v12; // [rsp+0h] [rbp-40h]\n  int v13; // [rsp+14h] [rbp-2Ch]\n\n  v4 = a2;\n  v5 = sub_10088E820(\"difficulty_%02d_\", v12);\n  CString = (const char *)cocos2d::CCString::getCString(v5);\n  v7 = strlen(CString);\n  if ( v7 >= 0xFFFFFFFFFFFFFFF8LL )\n    sub_100003630();\n  v8 = v7;\n  v13 = a3;\n  if ( v7 >= 0x17 )\n  {\n    v10 = 26;\n    if ( (v7 | 7) != 0x17 )\n      v10 = (v7 | 7) + 1;\n    data = (char *)operator new(v10);\n    this->__r_.__value_.__r.__words[2] = (std::string::size_type)data;\n    this->__r_.__value_.__r.__words[0] = v10 + 1;\n    v4 = a2;\n    this->__r_.__value_.__l.__size_ = v8;\n    goto LABEL_8;\n  }\n  this->__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(2 * v7);\n  data = this->__r_.__value_.__s.__data_;\n  if ( v7 )\nLABEL_8:\n    memmove(data, CString, v8);\n  data[v8] = 0;\n  if ( v13 != 1 || (unsigned int)(v4 - 6) >= 5 )\n  {\n    std::string::append(this, \"btn_001.png\");\n    if ( v4 == -1 )\n      std::string::assign(this, \"difficulty_auto_btn_001.png\");\n  }\n  else\n  {\n    std::string::append(this, \"btn2_001.png\");\n  }\n  return this;\n}", "assembly": "; \n; GJDifficultySprite::getDifficultyFrame from 0x1002a4c00 to 0x1002a4d11 (273 bytes)\n; \n; 3 xrefs:\n; > GJDifficultySprite::create @ 0x1002a4b15\n; > GJDifficultySprite::init @ 0x1002a4ba0\n; > GJDifficultySprite::updateDifficultyFrame @ 0x1002a4d5a\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 12:27:55 +0000\n; \npush    rbp                                                            ; +0x0, 0x1002a4c00\nmov     rbp, rsp                                                       ; +0x1, 0x1002a4c01\npush    r15                                                            ; +0x4, 0x1002a4c04\npush    r14                                                            ; +0x6, 0x1002a4c06\npush    r13                                                            ; +0x8, 0x1002a4c08\npush    r12                                                            ; +0xa, 0x1002a4c0a\npush    rbx                                                            ; +0xc, 0x1002a4c0c\nsub     rsp, 18h                                                       ; +0xd, 0x1002a4c0d\nmov     r15d, edx                                                      ; +0x11, 0x1002a4c11\nmov     r14d, esi                                                      ; +0x14, 0x1002a4c14\nmov     rbx, rdi                                                       ; +0x17, 0x1002a4c17\nlea     rdi, aDifficulty02d; \"difficulty_%02d_\"                        ; +0x1a, 0x1002a4c1a\nxor     eax, eax                                                       ; +0x21, 0x1002a4c21\ncall    sub_10088E820                                                  ; +0x23, 0x1002a4c23\nmov     rdi, rax                                                       ; +0x28, 0x1002a4c28\ncall    cocos2d__CCString__getCString                                  ; +0x2b, 0x1002a4c2b\nmov     r13, rax                                                       ; +0x30, 0x1002a4c30\nmov     rdi, rax; __s                                                  ; +0x33, 0x1002a4c33\ncall    _strlen                                                        ; +0x36, 0x1002a4c36\ncmp     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0x3b, 0x1002a4c3b\njnb     loc_1002A4D0C                                                  ; +0x3f, 0x1002a4c3f\nmov     r12, rax                                                       ; +0x45, 0x1002a4c45\nmov     [rbp+var_2C], r15d                                             ; +0x48, 0x1002a4c48\ncmp     rax, 17h                                                       ; +0x4c, 0x1002a4c4c\njnb     short loc_1002A4C63                                            ; +0x50, 0x1002a4c50\nlea     eax, [r12+r12]                                                 ; +0x52, 0x1002a4c52\nmov     [rbx], al                                                      ; +0x56, 0x1002a4c56\nlea     r15, [rbx+1]                                                   ; +0x58, 0x1002a4c58\ntest    r12, r12                                                       ; +0x5c, 0x1002a4c5c\njnz     short loc_1002A4C9D                                            ; +0x5f, 0x1002a4c5f\njmp     short loc_1002A4CAB                                            ; +0x61, 0x1002a4c61\nmov     rax, r12                                                       ; +0x63, 0x1002a4c63\nor      rax, 7                                                         ; +0x66, 0x1002a4c66\nlea     rcx, [rax+1]                                                   ; +0x6a, 0x1002a4c6a\ncmp     rax, 17h                                                       ; +0x6e, 0x1002a4c6e\nmov     [rbp+var_38], r14                                              ; +0x72, 0x1002a4c72\nmov     r14d, 1Ah                                                      ; +0x76, 0x1002a4c76\ncmovnz  r14, rcx                                                       ; +0x7c, 0x1002a4c7c\nmov     rdi, r14; __sz                                                 ; +0x80, 0x1002a4c80\ncall    __Znwm; operator new(ulong)                                    ; +0x83, 0x1002a4c83\nmov     r15, rax                                                       ; +0x88, 0x1002a4c88\nmov     [rbx+10h], rax                                                 ; +0x8b, 0x1002a4c8b\ninc     r14                                                            ; +0x8f, 0x1002a4c8f\nmov     [rbx], r14                                                     ; +0x92, 0x1002a4c92\nmov     r14, [rbp+var_38]                                              ; +0x95, 0x1002a4c95\nmov     [rbx+8], r12                                                   ; +0x99, 0x1002a4c99\nmov     rdi, r15; __dst                                                ; +0x9d, 0x1002a4c9d\nmov     rsi, r13; __src                                                ; +0xa0, 0x1002a4ca0\nmov     rdx, r12; __len                                                ; +0xa3, 0x1002a4ca3\ncall    _memmove                                                       ; +0xa6, 0x1002a4ca6\nmov     byte ptr [r15+r12], 0                                          ; +0xab, 0x1002a4cab\ncmp     [rbp+var_2C], 1                                                ; +0xb0, 0x1002a4cb0\nsetnz   al                                                             ; +0xb4, 0x1002a4cb4\nlea     ecx, [r14-6]                                                   ; +0xb7, 0x1002a4cb7\ncmp     ecx, 5                                                         ; +0xbb, 0x1002a4cbb\nsetnb   cl                                                             ; +0xbe, 0x1002a4cbe\nor      cl, al                                                         ; +0xc1, 0x1002a4cc1\njnz     short loc_1002A4CD6                                            ; +0xc3, 0x1002a4cc3\nlea     rsi, aBtn2001Png; \"btn2_001.png\"                               ; +0xc5, 0x1002a4cc5\nmov     rdi, rbx; this                                                 ; +0xcc, 0x1002a4ccc\ncall    __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6appendEPKc; std::string::append(char const*) ; +0xcf, 0x1002a4ccf\njmp     short loc_1002A4CFA                                            ; +0xd4, 0x1002a4cd4\nlea     rsi, aBtn001Png; \"btn_001.png\"                                 ; +0xd6, 0x1002a4cd6\nmov     rdi, rbx; this                                                 ; +0xdd, 0x1002a4cdd\ncall    __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6appendEPKc; std::string::append(char const*) ; +0xe0, 0x1002a4ce0\ncmp     r14d, 0FFFFFFFFh                                               ; +0xe5, 0x1002a4ce5\njnz     short loc_1002A4CFA                                            ; +0xe9, 0x1002a4ce9\nlea     rsi, aDifficultyAuto; \"difficulty_auto_btn_001.png\"            ; +0xeb, 0x1002a4ceb\nmov     rdi, rbx; this                                                 ; +0xf2, 0x1002a4cf2\ncall    __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEPKc; std::string::assign(char const*) ; +0xf5, 0x1002a4cf5\nmov     rax, rbx                                                       ; +0xfa, 0x1002a4cfa\nadd     rsp, 18h                                                       ; +0xfd, 0x1002a4cfd\npop     rbx                                                            ; +0x101, 0x1002a4d01\npop     r12                                                            ; +0x102, 0x1002a4d02\npop     r13                                                            ; +0x104, 0x1002a4d04\npop     r14                                                            ; +0x106, 0x1002a4d06\npop     r15                                                            ; +0x108, 0x1002a4d08\npop     rbp                                                            ; +0x10a, 0x1002a4d0a\nretn                                                                   ; +0x10b, 0x1002a4d0b\ncall    sub_100003630                                                  ; +0x10c, 0x1002a4d0c", "xrefs": ["GJDifficultySprite::create @ 0x1002a4b15", "GJDifficultySprite::init @ 0x1002a4ba0", "GJDifficultySprite::updateDifficultyFrame @ 0x1002a4d5a"], "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"}