{"type": "func", "start": 4300236560, "end": 4300236767, "name": "GJRateLevelLayer::onRate", "pseudocode": "// \n// GJRateLevelLayer::onRate from 0x100506710 to 0x1005067df (207 bytes)\n// \n// 1 xrefs:\n// > GJRateLevelLayer::init @ 0x10050630c\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 __fastcall GJRateLevelLayer::onRate(GJRateLevelLayer *a1, cocos2d::CCObject *a2)\n{\n  GameLevelManager *v2; // rax\n  char v3; // al\n  UploadActionPopup *m_uploadPopup; // rax\n  UploadActionPopup *v5; // rax\n  __int128 v6[2]; // [rsp+0h] [rbp-20h] BYREF\n\n  if ( a1->m_stars != -1 )\n  {\n    v2 = GameLevelManager::sharedState();\n    GameLevelManager::suggestLevelStars(\n      v2,\n      a1->m_level->m_levelID.random - a1->m_level->m_levelID.seed,\n      a1->m_stars,\n      a1->m_difficultySprite->m_featureState);\n    if ( v3 )\n    {\n      GameLevelManager::sharedState()->m_uploadActionDelegate = &a1->UploadActionDelegate;\n      m_uploadPopup = a1->m_uploadPopup;\n      if ( m_uploadPopup )\n        m_uploadPopup->m_delegate = nullptr;\n      strcpy((char *)v6, \"\\\"Sending rating...\");\n      v5 = (UploadActionPopup *)UploadActionPopup::create((__int64)&a1->UploadPopupDelegate, v6);\n      a1->m_uploadPopup = v5;\n      if ( (v6[0] & 1) != 0 )\n      {\n        operator delete(*(void **)&v6[1]);\n        v5 = a1->m_uploadPopup;\n      }\n      ((void (__fastcall *)(UploadActionPopup *))v5->show)(v5);\n    }\n  }\n}", "assembly": "; \n; GJRateLevelLayer::onRate from 0x100506710 to 0x1005067df (207 bytes)\n; \n; 1 xrefs:\n; > GJRateLevelLayer::init @ 0x10050630c\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, 0x100506710\nmov     rbp, rsp                                                       ; +0x1, 0x100506711\npush    rbx                                                            ; +0x4, 0x100506714\nsub     rsp, 18h                                                       ; +0x5, 0x100506715\ncmp     dword ptr [rdi+3F0h], 0FFFFFFFFh                               ; +0x9, 0x100506719\njz      loc_1005067D8                                                  ; +0x10, 0x100506720\nmov     rbx, rdi                                                       ; +0x16, 0x100506726\ncall    GameLevelManager__sharedState                                  ; +0x19, 0x100506729\nmov     rcx, [rbx+3D0h]                                                ; +0x1e, 0x10050672e\nmov     esi, [rcx+148h]                                                ; +0x25, 0x100506735\nsub     esi, [rcx+14Ch]                                                ; +0x2b, 0x10050673b\nmov     edx, [rbx+3F0h]                                                ; +0x31, 0x100506741\nmov     rcx, [rbx+408h]                                                ; +0x37, 0x100506747\nmov     ecx, [rcx+254h]                                                ; +0x3e, 0x10050674e\nmov     rdi, rax                                                       ; +0x44, 0x100506754\ncall    GameLevelManager__suggestLevelStars                            ; +0x47, 0x100506757\ntest    al, al                                                         ; +0x4c, 0x10050675c\njz      short loc_1005067D8                                            ; +0x4e, 0x10050675e\ncall    GameLevelManager__sharedState                                  ; +0x50, 0x100506760\nlea     rcx, [rbx+3B8h]                                                ; +0x55, 0x100506765\nmov     [rax+328h], rcx                                                ; +0x5c, 0x10050676c\nmov     rax, [rbx+400h]                                                ; +0x63, 0x100506773\ntest    rax, rax                                                       ; +0x6a, 0x10050677a\njz      short loc_10050678A                                            ; +0x6d, 0x10050677d\nmov     qword ptr [rax+278h], 0                                        ; +0x6f, 0x10050677f\nlea     rdi, [rbx+3B0h]                                                ; +0x7a, 0x10050678a\nmov     [rbp+var_20], 22h ; '\"'                                        ; +0x81, 0x100506791\nmovups  xmm0, xmmword ptr cs:aSendingRating; \"Sending rating...\"       ; +0x85, 0x100506795\nmovups  xmmword ptr [rbp+var_20+1], xmm0                               ; +0x8c, 0x10050679c\nmov     word ptr [rbp+var_20+11h], 2Eh ; '.'                           ; +0x90, 0x1005067a0\nlea     rsi, [rbp+var_20]                                              ; +0x96, 0x1005067a6\ncall    UploadActionPopup__create                                      ; +0x9a, 0x1005067aa\nmov     [rbx+400h], rax                                                ; +0x9f, 0x1005067af\ntest    [rbp+var_20], 1                                                ; +0xa6, 0x1005067b6\njz      short loc_1005067CC                                            ; +0xaa, 0x1005067ba\nmov     rdi, qword ptr [rbp+var_20+10h]; __p                           ; +0xac, 0x1005067bc\ncall    __ZdlPv; operator delete(void *)                               ; +0xb0, 0x1005067c0\nmov     rax, [rbx+400h]                                                ; +0xb5, 0x1005067c5\nmov     rcx, [rax]                                                     ; +0xbc, 0x1005067cc\nmov     rdi, rax                                                       ; +0xbf, 0x1005067cf\ncall    qword ptr [rcx+508h]                                           ; +0xc2, 0x1005067d2\nadd     rsp, 18h                                                       ; +0xc8, 0x1005067d8\npop     rbx                                                            ; +0xcc, 0x1005067dc\npop     rbp                                                            ; +0xcd, 0x1005067dd\nretn                                                                   ; +0xce, 0x1005067de", "xrefs": ["GJRateLevelLayer::init @ 0x10050630c"], "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"}