{"type": "func", "start": 4296426388, "end": 4296426668, "name": "GameSettingsLayer::init", "pseudocode": "// \n// GameSettingsLayer::init from 0x100164394 to 0x1001644ac (280 bytes)\n// \n// 1 xrefs:\n// > GameSettingsLayer::create @ 0x100164344\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:59:47 +0000\n// \n\n__int64 __fastcall GameSettingsLayer::init(__int64 a1, __int64 a2, __int64 a3)\n{\n  __int64 v6; // x21\n  __int64 v7; // x8\n  __int64 v8; // x9\n  _WORD v10[2]; // [xsp+Ch] [xbp-24h] BYREF\n\n  v6 = SetupTriggerPopup::init(a1, 0, 0, 7, 400.0, 280.0, 0.0);\n  if ( (_DWORD)v6 )\n  {\n    *(_QWORD *)(a1 + 1096) = a2;\n    SetupTriggerPopup::preSetup(a1);\n    qmemcpy(v10, \"PWi\", 3);\n    SetupTriggerPopup::setCustomBGColor(a1, v10);\n    *(_BYTE *)(a1 + 596) = 1;\n    SetupTriggerPopup::addCloseButton(a1);\n    GameSettingsLayer::setupTabs(a1);\n    GameSettingsLayer::buildTabContent(a1);\n    GameSettingsLayer::addSpecialContent(a1);\n    SetupTriggerPopup::postSetup(a1);\n    v7 = (unsigned int)dword_1009D3E88;\n    if ( (dword_1009D3E88 & 0x80000000) == 0 )\n    {\n      v8 = *(_QWORD *)(a1 + 1016);\n      if ( dword_1009D3E88 < (int)(954437177 * ((unsigned __int64)(*(_QWORD *)(a1 + 1024) - v8) >> 3)) )\n      {\n        *(_DWORD *)(v8 + 72LL * (unsigned int)dword_1009D3E88 + 52) = dword_1009F4060;\n        a3 = v7;\n      }\n    }\n    (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 1504LL))(a1, a3);\n  }\n  return v6;\n}", "assembly": "; \n; GameSettingsLayer::init from 0x100164394 to 0x1001644ac (280 bytes)\n; \n; 1 xrefs:\n; > GameSettingsLayer::create @ 0x100164344\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:59:47 +0000\n; \nSUB             SP, SP, #0x40                                          ; +0x0, 0x100164394\nSTP             X22, X21, [SP,#0x30+var_20]                            ; +0x4, 0x100164398\nSTP             X20, X19, [SP,#0x30+var_10]                            ; +0x8, 0x10016439c\nSTP             X29, X30, [SP,#0x30+var_s0]                            ; +0xc, 0x1001643a0\nADD             X29, SP, #0x30                                         ; +0x10, 0x1001643a4\nMOV             X20, X2                                                ; +0x14, 0x1001643a8\nMOV             X22, X1                                                ; +0x18, 0x1001643ac\nMOV             X19, X0                                                ; +0x1c, 0x1001643b0\nMOV             W8, #0x43C80000                                        ; +0x20, 0x1001643b4\nFMOV            S0, W8                                                 ; +0x24, 0x1001643b8\nMOV             W8, #0x438C0000                                        ; +0x28, 0x1001643bc\nFMOV            S1, W8                                                 ; +0x2c, 0x1001643c0\nFMOV            S2, WZR                                                ; +0x30, 0x1001643c4\nMOV             X1, #0                                                 ; +0x34, 0x1001643c8\nMOV             X2, #0                                                 ; +0x38, 0x1001643cc\nMOV             W3, #7                                                 ; +0x3c, 0x1001643d0\nBL              SetupTriggerPopup__init                                ; +0x40, 0x1001643d4\nMOV             X21, X0                                                ; +0x44, 0x1001643d8\nCBZ             W0, loc_100164494                                      ; +0x48, 0x1001643dc\nSTR             X22, [X19,#0x448]                                      ; +0x4c, 0x1001643e0\nMOV             X0, X19                                                ; +0x50, 0x1001643e4\nBL              SetupTriggerPopup__preSetup                            ; +0x54, 0x1001643e8\nMOV             W8, #0x69 ; 'i'                                        ; +0x58, 0x1001643ec\nSTRB            W8, [SP,#0x30+var_22]                                  ; +0x5c, 0x1001643f0\nMOV             W8, #0x5750                                            ; +0x60, 0x1001643f4\nSTRH            W8, [SP,#0x30+var_24]                                  ; +0x64, 0x1001643f8\nADD             X1, SP, #0x30+var_24                                   ; +0x68, 0x1001643fc\nMOV             X0, X19                                                ; +0x6c, 0x100164400\nBL              SetupTriggerPopup__setCustomBGColor                    ; +0x70, 0x100164404\nMOV             W8, #1                                                 ; +0x74, 0x100164408\nSTRB            W8, [X19,#0x254]                                       ; +0x78, 0x10016440c\nMOV             X0, X19                                                ; +0x7c, 0x100164410\nBL              SetupTriggerPopup__addCloseButton                      ; +0x80, 0x100164414\nMOV             X0, X19                                                ; +0x84, 0x100164418\nBL              GameSettingsLayer__setupTabs                           ; +0x88, 0x10016441c\nMOV             X0, X19                                                ; +0x8c, 0x100164420\nBL              GameSettingsLayer__buildTabContent                     ; +0x90, 0x100164424\nMOV             X0, X19                                                ; +0x94, 0x100164428\nBL              GameSettingsLayer__addSpecialContent                   ; +0x98, 0x10016442c\nMOV             X0, X19                                                ; +0x9c, 0x100164430\nBL              SetupTriggerPopup__postSetup                           ; +0xa0, 0x100164434\nADRP            X8, #dword_1009D3E88@PAGE                              ; +0xa4, 0x100164438\nLDR             W8, [X8,#dword_1009D3E88@PAGEOFF]                      ; +0xa8, 0x10016443c\nTBNZ            W8, #0x1F, loc_100164480                               ; +0xac, 0x100164440\nLDR             X10, [X19,#0x400]                                      ; +0xb0, 0x100164444\nLDR             X9, [X19,#0x3F8]                                       ; +0xb4, 0x100164448\nSUB             X10, X10, X9                                           ; +0xb8, 0x10016444c\nLSR             X10, X10, #3                                           ; +0xbc, 0x100164450\nMOV             W11, #0x38E38E39                                       ; +0xc0, 0x100164454\nMUL             W10, W10, W11                                          ; +0xc8, 0x10016445c\nCMP             W8, W10                                                ; +0xcc, 0x100164460\nB.GE            loc_100164480                                          ; +0xd0, 0x100164464\nADRP            X10, #dword_1009F4060@PAGE                             ; +0xd4, 0x100164468\nLDR             W10, [X10,#dword_1009F4060@PAGEOFF]                    ; +0xd8, 0x10016446c\nMOV             W11, #0x48 ; 'H'                                       ; +0xdc, 0x100164470\nUMADDL          X9, W8, W11, X9                                        ; +0xe0, 0x100164474\nSTR             W10, [X9,#0x34]                                        ; +0xe4, 0x100164478\nMOV             X20, X8                                                ; +0xe8, 0x10016447c\nLDR             X8, [X19]                                              ; +0xec, 0x100164480\nLDR             X8, [X8,#0x5E0]                                        ; +0xf0, 0x100164484\nMOV             X0, X19                                                ; +0xf4, 0x100164488\nMOV             X1, X20                                                ; +0xf8, 0x10016448c\nBLR             X8                                                     ; +0xfc, 0x100164490\nMOV             X0, X21                                                ; +0x100, 0x100164494\nLDP             X29, X30, [SP,#0x30+var_s0]                            ; +0x104, 0x100164498\nLDP             X20, X19, [SP,#0x30+var_10]                            ; +0x108, 0x10016449c\nLDP             X22, X21, [SP,#0x30+var_20]                            ; +0x10c, 0x1001644a0\nADD             SP, SP, #0x40 ; '@'                                    ; +0x110, 0x1001644a4\nRET                                                                    ; +0x114, 0x1001644a8", "xrefs": ["GameSettingsLayer::create @ 0x100164344"], "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"}