{"type": "func", "start": 5371816624, "end": 5371816985, "name": "GJRateLevelLayer::onRate", "pseudocode": "// \n// GJRateLevelLayer::onRate from 0x1402f6ab0 to 0x1402f6c19 (361 bytes)\n// \n// 2 xrefs:\n// > GJRateLevelLayer::init @ 0x1402f5361\n// > <???> @ 0x1406d4070\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// Hidden C++ exception states: #wind=2\nvoid GJRateLevelLayer::onRate(GJRateLevelLayer *a1, cocos2d::CCObject *a2)\n{\n  int v3; // ebx\n  GameLevelManager *v4; // rcx\n  char v5; // al\n  __int64 v6; // rax\n  UploadActionPopup *m_uploadPopup; // rax\n  UploadActionPopup *v8; // rax\n  __int128 v9; // [rsp+20h] [rbp-28h] BYREF\n  __int64 v10; // [rsp+30h] [rbp-18h]\n  __int64 v11; // [rsp+38h] [rbp-10h]\n  void *v12; // [rsp+50h] [rbp+8h]\n  void *v13; // [rsp+50h] [rbp+8h]\n\n  if ( a1->m_stars != -1 )\n  {\n    v3 = a1->m_level->m_levelID.random - a1->m_level->m_levelID.seed;\n    v4 = (GameLevelManager *)qword_1406C2EC0;\n    if ( !qword_1406C2EC0 )\n    {\n      v12 = operator new(0x3D0u);\n      qword_1406C2EC0 = sub_140141280((__int64)v12);\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);\n      v4 = (GameLevelManager *)qword_1406C2EC0;\n    }\n    GameLevelManager::suggestLevelStars(v4, v3, a1->m_stars, a1->m_difficultySprite->m_featureState);\n    if ( v5 )\n    {\n      v6 = qword_1406C2EC0;\n      if ( !qword_1406C2EC0 )\n      {\n        v13 = operator new(0x3D0u);\n        qword_1406C2EC0 = sub_140141280((__int64)v13);\n        (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);\n        v6 = qword_1406C2EC0;\n      }\n      *(_QWORD *)(v6 + 808) = &a1->UploadActionDelegate;\n      m_uploadPopup = a1->m_uploadPopup;\n      if ( m_uploadPopup )\n        m_uploadPopup->m_delegate = nullptr;\n      v9 = 0;\n      *(_QWORD *)&v9 = sub_14003AA10(0x20u);\n      v10 = 17;\n      v11 = 31;\n      strcpy((char *)v9, \"Sending rating...\");\n      v8 = (UploadActionPopup *)UploadActionPopup::create((__int64)&a1->UploadPopupDelegate, (__int64)&v9);\n      a1->m_uploadPopup = v8;\n      v8->show(v8);\n    }\n  }\n}", "assembly": "; \n; GJRateLevelLayer::onRate from 0x1402f6ab0 to 0x1402f6c19 (361 bytes)\n; \n; 2 xrefs:\n; > GJRateLevelLayer::init @ 0x1402f5361\n; > <???> @ 0x1406d4070\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\nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x1402f6ab0\npush    rdi                                                            ; +0x5, 0x1402f6ab5\nsub     rsp, 40h                                                       ; +0x6, 0x1402f6ab6\nmov     rdi, rcx                                                       ; +0xa, 0x1402f6aba\ncmp     dword ptr [rcx+3E8h], 0FFFFFFFFh                               ; +0xd, 0x1402f6abd\njz      loc_1402F6C0E                                                  ; +0x14, 0x1402f6ac4\nmov     rax, [rcx+3C8h]                                                ; +0x1a, 0x1402f6aca\nmov     ebx, [rax+148h]                                                ; +0x21, 0x1402f6ad1\nsub     ebx, [rax+14Ch]                                                ; +0x27, 0x1402f6ad7\nmov     rcx, cs:qword_1406C2EC0                                        ; +0x2d, 0x1402f6add\ntest    rcx, rcx                                                       ; +0x34, 0x1402f6ae4\njnz     short loc_1402F6B19                                            ; +0x37, 0x1402f6ae7\nmov     ecx, 3D0h; Size                                                ; +0x39, 0x1402f6ae9\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x3e, 0x1402f6aee\nmov     [rsp+48h+arg_0], rax                                           ; +0x43, 0x1402f6af3\nmov     rcx, rax                                                       ; +0x48, 0x1402f6af8\ncall    sub_140141280                                                  ; +0x4b, 0x1402f6afb\nnop                                                                    ; +0x50, 0x1402f6b00\nmov     cs:qword_1406C2EC0, rax                                        ; +0x51, 0x1402f6b01\nmov     r8, [rax]                                                      ; +0x58, 0x1402f6b08\nmov     rcx, rax                                                       ; +0x5b, 0x1402f6b0b\ncall    qword ptr [r8+48h]                                             ; +0x5e, 0x1402f6b0e\nmov     rcx, cs:qword_1406C2EC0                                        ; +0x62, 0x1402f6b12\nmov     r9, [rdi+400h]                                                 ; +0x69, 0x1402f6b19\nmov     r9d, [r9+258h]                                                 ; +0x70, 0x1402f6b20\nmov     r8d, [rdi+3E8h]                                                ; +0x77, 0x1402f6b27\nmov     edx, ebx                                                       ; +0x7e, 0x1402f6b2e\ncall    GameLevelManager__suggestLevelStars                            ; +0x80, 0x1402f6b30\ntest    al, al                                                         ; +0x85, 0x1402f6b35\njz      loc_1402F6C0E                                                  ; +0x87, 0x1402f6b37\nlea     rbx, [rdi+3B0h]                                                ; +0x8d, 0x1402f6b3d\nmov     rax, cs:qword_1406C2EC0                                        ; +0x94, 0x1402f6b44\ntest    rax, rax                                                       ; +0x9b, 0x1402f6b4b\njnz     short loc_1402F6B7F                                            ; +0x9e, 0x1402f6b4e\nmov     ecx, 3D0h; Size                                                ; +0xa0, 0x1402f6b50\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0xa5, 0x1402f6b55\nmov     [rsp+48h+arg_0], rax                                           ; +0xaa, 0x1402f6b5a\nmov     rcx, rax                                                       ; +0xaf, 0x1402f6b5f\ncall    sub_140141280                                                  ; +0xb2, 0x1402f6b62\nnop                                                                    ; +0xb7, 0x1402f6b67\nmov     cs:qword_1406C2EC0, rax                                        ; +0xb8, 0x1402f6b68\nmov     rdx, [rax]                                                     ; +0xbf, 0x1402f6b6f\nmov     rcx, rax                                                       ; +0xc2, 0x1402f6b72\ncall    qword ptr [rdx+48h]                                            ; +0xc5, 0x1402f6b75\nmov     rax, cs:qword_1406C2EC0                                        ; +0xc8, 0x1402f6b78\nmov     [rax+328h], rbx                                                ; +0xcf, 0x1402f6b7f\nmov     rax, [rdi+3F8h]                                                ; +0xd6, 0x1402f6b86\nxor     ecx, ecx                                                       ; +0xdd, 0x1402f6b8d\ntest    rax, rax                                                       ; +0xdf, 0x1402f6b8f\njz      short loc_1402F6B9B                                            ; +0xe2, 0x1402f6b92\nmov     [rax+278h], rcx                                                ; +0xe4, 0x1402f6b94\nxorps   xmm0, xmm0                                                     ; +0xeb, 0x1402f6b9b\nmovups  [rsp+48h+var_28], xmm0                                         ; +0xee, 0x1402f6b9e\nmov     [rsp+48h+var_18], rcx                                          ; +0xf3, 0x1402f6ba3\nmov     [rsp+48h+var_10], 0Fh                                          ; +0xf8, 0x1402f6ba8\nmov     ecx, 20h ; ' '                                                 ; +0x101, 0x1402f6bb1\ncall    sub_14003AA10                                                  ; +0x106, 0x1402f6bb6\nmov     qword ptr [rsp+48h+var_28], rax                                ; +0x10b, 0x1402f6bbb\nmov     [rsp+48h+var_18], 11h                                          ; +0x110, 0x1402f6bc0\nmov     [rsp+48h+var_10], 1Fh                                          ; +0x119, 0x1402f6bc9\nmovups  xmm0, cs:xmmword_140586540                                     ; +0x122, 0x1402f6bd2\nmovups  xmmword ptr [rax], xmm0                                        ; +0x129, 0x1402f6bd9\nmovzx   edx, cs:byte_140586550                                         ; +0x12c, 0x1402f6bdc\nmov     [rax+10h], dl                                                  ; +0x133, 0x1402f6be3\nmov     byte ptr [rax+11h], 0                                          ; +0x136, 0x1402f6be6\nlea     rdx, [rsp+48h+var_28]                                          ; +0x13a, 0x1402f6bea\nlea     rcx, [rdi+3A8h]                                                ; +0x13f, 0x1402f6bef\ncall    UploadActionPopup__create                                      ; +0x146, 0x1402f6bf6\nmov     [rdi+3F8h], rax                                                ; +0x14b, 0x1402f6bfb\nmov     rdx, [rax]                                                     ; +0x152, 0x1402f6c02\nmov     rcx, rax                                                       ; +0x155, 0x1402f6c05\ncall    qword ptr [rdx+410h]                                           ; +0x158, 0x1402f6c08\nmov     rbx, [rsp+48h+arg_8]                                           ; +0x15e, 0x1402f6c0e\nadd     rsp, 40h                                                       ; +0x163, 0x1402f6c13\npop     rdi                                                            ; +0x167, 0x1402f6c17\nretn                                                                   ; +0x168, 0x1402f6c18", "xrefs": ["GJRateLevelLayer::init @ 0x1402f5361", "<???> @ 0x1406d4070"], "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"}