{"type": "func", "start": 4298076044, "end": 4298076468, "name": "EndLevelLayer::getCoinString", "pseudocode": "// \n// EndLevelLayer::getCoinString from 0x1002f6f8c to 0x1002f7134 (424 bytes)\n// \n// 1 xrefs:\n// > EndLevelLayer::customSetup @ 0x1002f6338\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\nvoid __usercall EndLevelLayer::getCoinString(__int64 a1@<X0>, _QWORD *a2@<X8>)\n{\n  _DWORD *v4; // x8\n  int v5; // w24\n  int v6; // w23\n  int v7; // w22\n  int v8; // w8\n  _BOOL4 v11; // w9\n  char v13; // w8\n  std::string *v14; // x8\n  cocos2d::CCString *v15; // x0\n  char *CString; // x0\n  std::string v17; // [xsp+8h] [xbp-48h] BYREF\n\n  if ( !*(_QWORD *)(a1 + 608) )\n  {\n    sub_100009900(a2, \"\");\n    return;\n  }\n  sub_100009900(&v17, \"<cy>all</c> coins\");\n  v4 = *(_DWORD **)(*(_QWORD *)(a1 + 608) + 1936LL);\n  v5 = v4[223] - v4[224];\n  v6 = v4[226] - v4[227];\n  v7 = v4[229] - v4[230];\n  v8 = v4[212];\n  v11 = v5 == 1 || v6 == 1 || v7 == 1;\n  if ( v8 >= 2 && v11 )\n  {\n    std::string::assign(&v17, \"coin \");\n    if ( v5 == 1 )\n    {\n      if ( v6 == 1 )\n      {\n        v13 = 1;\nLABEL_23:\n        if ( v7 != 1 && *(int *)(*(_QWORD *)(*(_QWORD *)(a1 + 608) + 1936LL) + 848LL) >= 3 )\n        {\n          if ( (v13 & 1) == 0 )\n            std::string::append(&v17, \", \");\n          std::string::append(&v17, \"<cy>3</c>\");\n        }\n        goto LABEL_28;\n      }\n    }\n    else\n    {\n      std::string::append(&v17, \"<cy>1</c>\");\n      if ( v6 == 1 )\n      {\nLABEL_22:\n        v13 = 0;\n        goto LABEL_23;\n      }\n      std::string::append(&v17, \", \");\n    }\n    std::string::append(&v17, \"<cy>2</c>\");\n    goto LABEL_22;\n  }\nLABEL_28:\n  if ( (v17.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL )\n    v14 = &v17;\n  else\n    v14 = (std::string *)v17.__r_.__value_.__r.__words[0];\n  v15 = (cocos2d::CCString *)sub_100268F4C(\"You need to <cg>collect</c> %s to verify the level!\", (const char *)v14);\n  CString = (char *)cocos2d::CCString::getCString(v15);\n  sub_100009900(a2, CString);\n  if ( SHIBYTE(v17.__r_.__value_.__r.__words[2]) < 0 )\n    operator delete(v17.__r_.__value_.__l.__data_);\n}", "assembly": "; \n; EndLevelLayer::getCoinString from 0x1002f6f8c to 0x1002f7134 (424 bytes)\n; \n; 1 xrefs:\n; > EndLevelLayer::customSetup @ 0x1002f6338\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\nSUB             SP, SP, #0x60                                          ; +0x0, 0x1002f6f8c\nSTP             X24, X23, [SP,#0x50+var_30]                            ; +0x4, 0x1002f6f90\nSTP             X22, X21, [SP,#0x50+var_20]                            ; +0x8, 0x1002f6f94\nSTP             X20, X19, [SP,#0x50+var_10]                            ; +0xc, 0x1002f6f98\nSTP             X29, X30, [SP,#0x50+var_s0]                            ; +0x10, 0x1002f6f9c\nADD             X29, SP, #0x50                                         ; +0x14, 0x1002f6fa0\nMOV             X19, X8                                                ; +0x18, 0x1002f6fa4\nLDR             X8, [X0,#0x260]                                        ; +0x1c, 0x1002f6fa8\nCBZ             X8, loc_1002F703C                                      ; +0x20, 0x1002f6fac\nMOV             X20, X0                                                ; +0x24, 0x1002f6fb0\nADRL            X1, aCyAllCCoins; \"<cy>all</c> coins\"                  ; +0x28, 0x1002f6fb4\nADD             X21, SP, #0x50+var_48                                  ; +0x30, 0x1002f6fbc\nADD             X0, SP, #0x50+var_48; int                              ; +0x34, 0x1002f6fc0\nBL              sub_100009900                                          ; +0x38, 0x1002f6fc4\nLDR             X8, [X20,#0x260]                                       ; +0x3c, 0x1002f6fc8\nLDR             X8, [X8,#0x790]                                        ; +0x40, 0x1002f6fcc\nLDR             W9, [X8,#0x37C]                                        ; +0x44, 0x1002f6fd0\nLDR             W10, [X8,#0x380]                                       ; +0x48, 0x1002f6fd4\nSUB             W24, W9, W10                                           ; +0x4c, 0x1002f6fd8\nLDR             W9, [X8,#0x388]                                        ; +0x50, 0x1002f6fdc\nLDR             W10, [X8,#0x38C]                                       ; +0x54, 0x1002f6fe0\nSUB             W23, W9, W10                                           ; +0x58, 0x1002f6fe4\nLDR             W9, [X8,#0x394]                                        ; +0x5c, 0x1002f6fe8\nLDR             W10, [X8,#0x398]                                       ; +0x60, 0x1002f6fec\nSUB             W22, W9, W10                                           ; +0x64, 0x1002f6ff0\nCMP             W24, #1                                                ; +0x68, 0x1002f6ff4\nLDR             W8, [X8,#0x350]                                        ; +0x6c, 0x1002f6ff8\nCCMP            W23, #1, #4, NE                                        ; +0x70, 0x1002f6ffc\nCCMP            W22, #1, #4, NE                                        ; +0x74, 0x1002f7000\nCSET            W9, EQ                                                 ; +0x78, 0x1002f7004\nCMP             W8, #2                                                 ; +0x7c, 0x1002f7008\nCCMP            W9, #0, #4, GE                                         ; +0x80, 0x1002f700c\nB.EQ            loc_1002F70DC                                          ; +0x84, 0x1002f7010\nADRL            X1, aCoin; \"coin \"                                     ; +0x88, 0x1002f7014\nADD             X0, SP, #0x50+var_48; this                             ; +0x90, 0x1002f701c\nBL              __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEPKc; std::string::assign(char const*) ; +0x94, 0x1002f7020\nCMP             W24, #1                                                ; +0x98, 0x1002f7024\nB.NE            loc_1002F7060                                          ; +0x9c, 0x1002f7028\nCMP             W23, #1                                                ; +0xa0, 0x1002f702c\nB.NE            loc_1002F7088                                          ; +0xa4, 0x1002f7030\nMOV             W8, #1                                                 ; +0xa8, 0x1002f7034\nB               loc_1002F709C                                          ; +0xac, 0x1002f7038\nADRL            X1, asc_100746688; \"\"                                  ; +0xb0, 0x1002f703c\nMOV             X0, X19; int                                           ; +0xb8, 0x1002f7044\nLDP             X29, X30, [SP,#0x50+var_s0]                            ; +0xbc, 0x1002f7048\nLDP             X20, X19, [SP,#0x50+var_10]                            ; +0xc0, 0x1002f704c\nLDP             X22, X21, [SP,#0x50+var_20]                            ; +0xc4, 0x1002f7050\nLDP             X24, X23, [SP,#0x50+var_30]                            ; +0xc8, 0x1002f7054\nADD             SP, SP, #0x60 ; '`'                                    ; +0xcc, 0x1002f7058\nB               sub_100009900                                          ; +0xd0, 0x1002f705c\nADRL            X1, aCy1C; \"<cy>1</c>\"                                 ; +0xd4, 0x1002f7060\nADD             X0, SP, #0x50+var_48; this                             ; +0xdc, 0x1002f7068\nBL              __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6appendEPKc; std::string::append(char const*) ; +0xe0, 0x1002f706c\nCMP             W23, #1                                                ; +0xe4, 0x1002f7070\nB.EQ            loc_1002F7098                                          ; +0xe8, 0x1002f7074\nADRL            X1, asc_1006C9A07; \", \"                                ; +0xec, 0x1002f7078\nADD             X0, SP, #0x50+var_48; this                             ; +0xf4, 0x1002f7080\nBL              __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6appendEPKc; std::string::append(char const*) ; +0xf8, 0x1002f7084\nADRL            X1, aCy2C; \"<cy>2</c>\"                                 ; +0xfc, 0x1002f7088\nADD             X0, SP, #0x50+var_48; this                             ; +0x104, 0x1002f7090\nBL              __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6appendEPKc; std::string::append(char const*) ; +0x108, 0x1002f7094\nMOV             W8, #0                                                 ; +0x10c, 0x1002f7098\nCMP             W22, #1                                                ; +0x110, 0x1002f709c\nB.EQ            loc_1002F70DC                                          ; +0x114, 0x1002f70a0\nLDR             X9, [X20,#0x260]                                       ; +0x118, 0x1002f70a4\nLDR             X9, [X9,#0x790]                                        ; +0x11c, 0x1002f70a8\nLDR             W9, [X9,#0x350]                                        ; +0x120, 0x1002f70ac\nCMP             W9, #3                                                 ; +0x124, 0x1002f70b0\nB.LT            loc_1002F70DC                                          ; +0x128, 0x1002f70b4\nTBNZ            W8, #0, loc_1002F70CC                                  ; +0x12c, 0x1002f70b8\nADRL            X1, asc_1006C9A07; \", \"                                ; +0x130, 0x1002f70bc\nADD             X0, SP, #0x50+var_48; this                             ; +0x138, 0x1002f70c4\nBL              __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6appendEPKc; std::string::append(char const*) ; +0x13c, 0x1002f70c8\nADRL            X1, aCy3C; \"<cy>3</c>\"                                 ; +0x140, 0x1002f70cc\nADD             X0, SP, #0x50+var_48; this                             ; +0x148, 0x1002f70d4\nBL              __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6appendEPKc; std::string::append(char const*) ; +0x14c, 0x1002f70d8\nLDRSB           W8, [SP,#0x50+var_48.__r_.__value_+0x17]               ; +0x150, 0x1002f70dc\nLDR             X9, [SP,#0x50+var_48]                                  ; +0x154, 0x1002f70e0\nCMP             W8, #0                                                 ; +0x158, 0x1002f70e4\nCSEL            X8, X9, X21, LT                                        ; +0x15c, 0x1002f70e8\nSTR             X8, [SP,#0x50+var_50]                                  ; +0x160, 0x1002f70ec\nADRL            X0, aYouNeedToCgCol; \"You need to <cg>collect</c> %s to verif\"... ; +0x164, 0x1002f70f0\nBL              sub_100268F4C                                          ; +0x16c, 0x1002f70f8\nBL              cocos2d__CCString__getCString                          ; +0x170, 0x1002f70fc\nMOV             X1, X0; __s                                            ; +0x174, 0x1002f7100\nMOV             X0, X19; int                                           ; +0x178, 0x1002f7104\nBL              sub_100009900                                          ; +0x17c, 0x1002f7108\nLDRSB           W8, [SP,#0x50+var_48.__r_.__value_+0x17]               ; +0x180, 0x1002f710c\nTBZ             W8, #0x1F, loc_1002F711C                               ; +0x184, 0x1002f7110\nLDR             X0, [SP,#0x50+var_48]; __p                             ; +0x188, 0x1002f7114\nBL              __ZdlPv; operator delete(void *)                       ; +0x18c, 0x1002f7118\nLDP             X29, X30, [SP,#0x50+var_s0]                            ; +0x190, 0x1002f711c\nLDP             X20, X19, [SP,#0x50+var_10]                            ; +0x194, 0x1002f7120\nLDP             X22, X21, [SP,#0x50+var_20]                            ; +0x198, 0x1002f7124\nLDP             X24, X23, [SP,#0x50+var_30]                            ; +0x19c, 0x1002f7128\nADD             SP, SP, #0x60 ; '`'                                    ; +0x1a0, 0x1002f712c\nRET                                                                    ; +0x1a4, 0x1002f7130", "xrefs": ["EndLevelLayer::customSetup @ 0x1002f6338"], "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"}