{"type": "func", "start": 4295156760, "end": 4295156992, "name": "LevelInfoLayer::onRate", "pseudocode": "// \n// LevelInfoLayer::onRate from 0x10002e418 to 0x10002e500 (232 bytes)\n// \n// 1 xrefs:\n// > LevelInfoLayer::FLAlert_Clicked @ 0x10002e6d8\n// \n// This function is hookable on this platform (idp: arm, 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 10:57:29 +0000\n// \n\n__int64 __fastcall LevelInfoLayer::onRate(__int64 result)\n{\n  __int64 v1; // x19\n  __int64 v2; // x0\n  _QWORD *v3; // x0\n  __int64 v4; // x19\n  void *__p[2]; // [xsp+8h] [xbp-28h] BYREF\n  char v6; // [xsp+1Fh] [xbp-11h]\n\n  if ( (*(_BYTE *)(result + 488) & 1) == 0 )\n  {\n    v1 = result;\n    v2 = GameManager::sharedState(result);\n    if ( (*(_BYTE *)(v2 + 932) & 1) != 0 )\n    {\n      v3 = (_QWORD *)sub_1000671D0((unsigned int)(*(_DWORD *)(*(_QWORD *)(v1 + 504) + 328LL)\n                                                - *(_DWORD *)(*(_QWORD *)(v1 + 504) + 332LL)));\n      v3[86] = v1 + 424;\n      return (*(__int64 (__fastcall **)(_QWORD *))(*v3 + 1312LL))(v3);\n    }\n    else\n    {\n      *(_BYTE *)(GameManager::sharedState(v2) + 932) = 1;\n      sub_100009900(\n        __p,\n        \"Please <cg>rate</c> the <cl>difficulty</c> as fairly as possible. \\n\"\n        \"<cy>(Demon and Auto levels are manually verified before accepted)</c>\");\n      v4 = FLAlertLayer::create_1(v1 + 440, \"Rate Difficulty\", __p, \"OK\", 0, 300.0);\n      if ( v6 < 0 )\n        operator delete(__p[0]);\n      (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v4 + 72LL))(v4, 7);\n      return (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v4 + 1312LL))(v4);\n    }\n  }\n  return result;\n}", "assembly": "; \n; LevelInfoLayer::onRate from 0x10002e418 to 0x10002e500 (232 bytes)\n; \n; 1 xrefs:\n; > LevelInfoLayer::FLAlert_Clicked @ 0x10002e6d8\n; \n; This function is hookable on this platform (idp: arm, 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 10:57:29 +0000\n; \nSUB             SP, SP, #0x40                                          ; +0x0, 0x10002e418\nSTP             X20, X19, [SP,#0x30+var_10]                            ; +0x4, 0x10002e41c\nSTP             X29, X30, [SP,#0x30+var_s0]                            ; +0x8, 0x10002e420\nADD             X29, SP, #0x30                                         ; +0xc, 0x10002e424\nLDRB            W8, [X0,#0x1E8]                                        ; +0x10, 0x10002e428\nTBNZ            W8, #0, loc_10002E4F0                                  ; +0x14, 0x10002e42c\nMOV             X19, X0                                                ; +0x18, 0x10002e430\nBL              GameManager__sharedState                               ; +0x1c, 0x10002e434\nLDRB            W8, [X0,#0x3A4]                                        ; +0x20, 0x10002e438\nTBZ             W8, #0, loc_10002E474                                  ; +0x24, 0x10002e43c\nLDR             X8, [X19,#0x1F8]                                       ; +0x28, 0x10002e440\nLDR             W9, [X8,#0x148]                                        ; +0x2c, 0x10002e444\nLDR             W8, [X8,#0x14C]                                        ; +0x30, 0x10002e448\nSUB             W0, W9, W8                                             ; +0x34, 0x10002e44c\nBL              sub_1000671D0                                          ; +0x38, 0x10002e450\nADD             X8, X19, #0x1A8                                        ; +0x3c, 0x10002e454\nSTR             X8, [X0,#0x2B0]                                        ; +0x40, 0x10002e458\nLDR             X8, [X0]                                               ; +0x44, 0x10002e45c\nLDR             X1, [X8,#0x520]                                        ; +0x48, 0x10002e460\nLDP             X29, X30, [SP,#0x30+var_s0]                            ; +0x4c, 0x10002e464\nLDP             X20, X19, [SP,#0x30+var_10]                            ; +0x50, 0x10002e468\nADD             SP, SP, #0x40 ; '@'                                    ; +0x54, 0x10002e46c\nBR              X1                                                     ; +0x58, 0x10002e470\nBL              GameManager__sharedState                               ; +0x5c, 0x10002e474\nMOV             W8, #1                                                 ; +0x60, 0x10002e478\nSTRB            W8, [X0,#0x3A4]                                        ; +0x64, 0x10002e47c\nADRL            X1, aPleaseCgRateCT; \"Please <cg>rate</c> the <cl>difficulty<\"... ; +0x68, 0x10002e480\nADD             X0, SP, #0x30+__p; int                                 ; +0x70, 0x10002e488\nBL              sub_100009900                                          ; +0x74, 0x10002e48c\nADRL            X1, aRateDifficulty; \"Rate Difficulty\"                 ; +0x78, 0x10002e490\nADRL            X3, aOk; \"OK\"                                          ; +0x80, 0x10002e498\nMOV             W8, #0x43960000                                        ; +0x88, 0x10002e4a0\nFMOV            S0, W8                                                 ; +0x8c, 0x10002e4a4\nADD             X0, X19, #0x1B8                                        ; +0x90, 0x10002e4a8\nADD             X2, SP, #0x30+__p                                      ; +0x94, 0x10002e4ac\nMOV             X4, #0                                                 ; +0x98, 0x10002e4b0\nBL              FLAlertLayer__create_1                                 ; +0x9c, 0x10002e4b4\nMOV             X19, X0                                                ; +0xa0, 0x10002e4b8\nLDRSB           W8, [SP,#0x30+var_11]                                  ; +0xa4, 0x10002e4bc\nTBZ             W8, #0x1F, loc_10002E4CC                               ; +0xa8, 0x10002e4c0\nLDR             X0, [SP,#0x30+__p]; __p                                ; +0xac, 0x10002e4c4\nBL              __ZdlPv; operator delete(void *)                       ; +0xb0, 0x10002e4c8\nLDR             X8, [X19]                                              ; +0xb4, 0x10002e4cc\nLDR             X8, [X8,#0x48]                                         ; +0xb8, 0x10002e4d0\nMOV             X0, X19                                                ; +0xbc, 0x10002e4d4\nMOV             W1, #7                                                 ; +0xc0, 0x10002e4d8\nBLR             X8                                                     ; +0xc4, 0x10002e4dc\nLDR             X8, [X19]                                              ; +0xc8, 0x10002e4e0\nLDR             X8, [X8,#0x520]                                        ; +0xcc, 0x10002e4e4\nMOV             X0, X19                                                ; +0xd0, 0x10002e4e8\nBLR             X8                                                     ; +0xd4, 0x10002e4ec\nLDP             X29, X30, [SP,#0x30+var_s0]                            ; +0xd8, 0x10002e4f0\nLDP             X20, X19, [SP,#0x30+var_10]                            ; +0xdc, 0x10002e4f4\nADD             SP, SP, #0x40 ; '@'                                    ; +0xe0, 0x10002e4f8\nRET                                                                    ; +0xe4, 0x10002e4fc", "xrefs": ["LevelInfoLayer::FLAlert_Clicked @ 0x10002e6d8"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "arm", "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"}