{"type": "func", "start": 5374346416, "end": 5374346801, "name": "GJRateLevelLayer::onRate", "pseudocode": "// \n// GJRateLevelLayer::onRate from 0x1405604b0 to 0x140560631 (385 bytes)\n// \n// 2 xrefs:\n// > RateStarsModLayer::init @ 0x14055fe70\n// > <???> @ 0x14092c3c0\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 11:34:14 +0000\n// \n\n// Merged with: GJRateLevelLayer::onRate, RateStarsModLayer::onRate\n// Hidden C++ exception states: #wind=2\nchar __fastcall GJRateLevelLayer::onRate(__int64 a1)\n{\n  int v2; // eax\n  int v3; // edi\n  __int64 v4; // rcx\n  __int64 v5; // rax\n  __int64 v6; // rax\n  cocos2d::CCObject *v7; // rax\n  __int128 v9; // [rsp+30h] [rbp-28h] BYREF\n  __int64 v10; // [rsp+40h] [rbp-18h]\n  __int64 v11; // [rsp+48h] [rbp-10h]\n  void *v12; // [rsp+60h] [rbp+8h]\n  void *v13; // [rsp+60h] [rbp+8h]\n\n  v2 = *(_DWORD *)(a1 + 716);\n  if ( v2 != -1 )\n  {\n    if ( v2 == 10 )\n      v3 = *(_DWORD *)(a1 + 756);\n    else\n      v3 = 0;\n    v4 = *(_QWORD *)&qword_14090BFB0;\n    if ( !*(_QWORD *)&qword_14090BFB0 )\n    {\n      v12 = operator new(0x690u);\n      *(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager((__int64)v12);\n      (*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);\n      v4 = *(_QWORD *)&qword_14090BFB0;\n    }\n    LOBYTE(v2) = GameLevelManager::suggestLevelStars(\n                   v4,\n                   *(_DWORD *)(a1 + 712),\n                   *(_DWORD *)(a1 + 716),\n                   *(_DWORD *)(a1 + 752),\n                   *(_BYTE *)(a1 + 720),\n                   v3);\n    if ( (_BYTE)v2 )\n    {\n      v5 = *(_QWORD *)&qword_14090BFB0;\n      if ( !*(_QWORD *)&qword_14090BFB0 )\n      {\n        v13 = operator new(0x690u);\n        *(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager((__int64)v13);\n        (*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);\n        v5 = *(_QWORD *)&qword_14090BFB0;\n      }\n      *(_QWORD *)(v5 + 1488) = a1 + 672;\n      v6 = *(_QWORD *)(a1 + 736);\n      if ( v6 )\n        *(_QWORD *)(v6 + 664) = 0;\n      v9 = 0;\n      *(_QWORD *)&v9 = sub_14003D460(0x20u);\n      v10 = 17;\n      v11 = 31;\n      strcpy((char *)v9, \"Sending rating...\");\n      v7 = UploadActionPopup::create(a1 + 664, (__int64)&v9);\n      *(_QWORD *)(a1 + 736) = v7;\n      LOBYTE(v2) = (*(__int64 (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)v7 + 1064LL))(v7);\n    }\n  }\n  return v2;\n}", "assembly": "; \n; GJRateLevelLayer::onRate from 0x1405604b0 to 0x140560631 (385 bytes)\n; \n; 2 xrefs:\n; > RateStarsModLayer::init @ 0x14055fe70\n; > <???> @ 0x14092c3c0\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 11:34:14 +0000\n; \nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x1405604b0\npush    rdi                                                            ; +0x5, 0x1405604b5\nsub     rsp, 50h                                                       ; +0x6, 0x1405604b6\nmov     rbx, rcx                                                       ; +0xa, 0x1405604ba\nmov     eax, [rcx+2CCh]                                                ; +0xd, 0x1405604bd\ncmp     eax, 0FFFFFFFFh                                                ; +0x13, 0x1405604c3\njz      loc_140560626                                                  ; +0x16, 0x1405604c6\ncmp     eax, 0Ah                                                       ; +0x1c, 0x1405604cc\njnz     short loc_1405604D9                                            ; +0x1f, 0x1405604cf\nmov     edi, [rcx+2F4h]                                                ; +0x21, 0x1405604d1\njmp     short loc_1405604DB                                            ; +0x27, 0x1405604d7\nxor     edi, edi                                                       ; +0x29, 0x1405604d9\nmov     rcx, cs:qword_14090BFB0                                        ; +0x2b, 0x1405604db\ntest    rcx, rcx                                                       ; +0x32, 0x1405604e2\njnz     short loc_140560519                                            ; +0x35, 0x1405604e5\nmov     ecx, 690h; Size                                                ; +0x37, 0x1405604e7\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x3c, 0x1405604ec\nmov     [rsp+58h+arg_0], rax                                           ; +0x41, 0x1405604f1\nmov     rcx, rax                                                       ; +0x46, 0x1405604f6\ncall    GameLevelManager__GameLevelManager                             ; +0x49, 0x1405604f9\nnop                                                                    ; +0x4e, 0x1405604fe\nmov     cs:qword_14090BFB0, rax                                        ; +0x4f, 0x1405604ff\nmov     rcx, [rax]                                                     ; +0x56, 0x140560506\nmov     rdx, [rcx+48h]                                                 ; +0x59, 0x140560509\nmov     rcx, rax                                                       ; +0x5d, 0x14056050d\ncall    rdx                                                            ; +0x60, 0x140560510\nmov     rcx, cs:qword_14090BFB0                                        ; +0x62, 0x140560512\nmov     [rsp+58h+var_30], edi                                          ; +0x69, 0x140560519\nmovzx   eax, byte ptr [rbx+2D0h]                                       ; +0x6d, 0x14056051d\nmov     [rsp+58h+var_38], al                                           ; +0x74, 0x140560524\nmov     r9d, [rbx+2F0h]                                                ; +0x78, 0x140560528\nmov     r8d, [rbx+2CCh]                                                ; +0x7f, 0x14056052f\nmov     edx, [rbx+2C8h]                                                ; +0x86, 0x140560536\ncall    GameLevelManager__suggestLevelStars                            ; +0x8c, 0x14056053c\ntest    al, al                                                         ; +0x91, 0x140560541\njz      loc_140560626                                                  ; +0x93, 0x140560543\nlea     rdi, [rbx+2A0h]                                                ; +0x99, 0x140560549\nmov     rax, cs:qword_14090BFB0                                        ; +0xa0, 0x140560550\ntest    rax, rax                                                       ; +0xa7, 0x140560557\njnz     short loc_14056058E                                            ; +0xaa, 0x14056055a\nmov     ecx, 690h; Size                                                ; +0xac, 0x14056055c\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0xb1, 0x140560561\nmov     [rsp+58h+arg_0], rax                                           ; +0xb6, 0x140560566\nmov     rcx, rax                                                       ; +0xbb, 0x14056056b\ncall    GameLevelManager__GameLevelManager                             ; +0xbe, 0x14056056e\nnop                                                                    ; +0xc3, 0x140560573\nmov     cs:qword_14090BFB0, rax                                        ; +0xc4, 0x140560574\nmov     rcx, [rax]                                                     ; +0xcb, 0x14056057b\nmov     rdx, [rcx+48h]                                                 ; +0xce, 0x14056057e\nmov     rcx, rax                                                       ; +0xd2, 0x140560582\ncall    rdx                                                            ; +0xd5, 0x140560585\nmov     rax, cs:qword_14090BFB0                                        ; +0xd7, 0x140560587\nmov     [rax+5D0h], rdi                                                ; +0xde, 0x14056058e\nmov     rax, [rbx+2E0h]                                                ; +0xe5, 0x140560595\ntest    rax, rax                                                       ; +0xec, 0x14056059c\njz      short loc_1405605AC                                            ; +0xef, 0x14056059f\nmov     qword ptr [rax+298h], 0                                        ; +0xf1, 0x1405605a1\nxorps   xmm0, xmm0                                                     ; +0xfc, 0x1405605ac\nmovups  [rsp+58h+var_28], xmm0                                         ; +0xff, 0x1405605af\nmov     [rsp+58h+var_18], 0                                            ; +0x104, 0x1405605b4\nmov     [rsp+58h+var_10], 0                                            ; +0x10d, 0x1405605bd\nmov     ecx, 20h ; ' '                                                 ; +0x116, 0x1405605c6\ncall    sub_14003D460                                                  ; +0x11b, 0x1405605cb\nmov     qword ptr [rsp+58h+var_28], rax                                ; +0x120, 0x1405605d0\nmov     [rsp+58h+var_18], 11h                                          ; +0x125, 0x1405605d5\nmov     [rsp+58h+var_10], 1Fh                                          ; +0x12e, 0x1405605de\nmovups  xmm0, cs:xmmword_14078B3B0                                     ; +0x137, 0x1405605e7\nmovups  xmmword ptr [rax], xmm0                                        ; +0x13e, 0x1405605ee\nmovzx   ecx, cs:byte_14078B3C0                                         ; +0x141, 0x1405605f1\nmov     [rax+10h], cl                                                  ; +0x148, 0x1405605f8\nmov     byte ptr [rax+11h], 0                                          ; +0x14b, 0x1405605fb\nlea     rcx, [rbx+298h]                                                ; +0x14f, 0x1405605ff\nlea     rdx, [rsp+58h+var_28]                                          ; +0x156, 0x140560606\ncall    UploadActionPopup__create                                      ; +0x15b, 0x14056060b\nmov     [rbx+2E0h], rax                                                ; +0x160, 0x140560610\nmov     rcx, [rax]                                                     ; +0x167, 0x140560617\nmov     rdx, [rcx+428h]                                                ; +0x16a, 0x14056061a\nmov     rcx, rax                                                       ; +0x171, 0x140560621\ncall    rdx                                                            ; +0x174, 0x140560624\nmov     rbx, [rsp+58h+arg_8]                                           ; +0x176, 0x140560626\nadd     rsp, 50h                                                       ; +0x17b, 0x14056062b\npop     rdi                                                            ; +0x17f, 0x14056062f\nretn                                                                   ; +0x180, 0x140560630", "xrefs": ["RateStarsModLayer::init @ 0x14055fe70", "<???> @ 0x14092c3c0"], "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"}