{"type": "func", "start": 4301251776, "end": 4301252019, "name": "GameSettingsLayer::init", "pseudocode": "// \n// GameSettingsLayer::init from 0x1005fe4c0 to 0x1005fe5b3 (243 bytes)\n// \n// 1 xrefs:\n// > GameSettingsLayer::create @ 0x1005fe477\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 12:34:29 +0000\n// \n\n__int64 __fastcall GameSettingsLayer::init(__int64 a1, __int64 a2, unsigned int a3)\n{\n  __int64 result; // rax\n  unsigned int v5; // r12d\n  int v6; // eax\n  __int64 v7; // rcx\n  _WORD v8[18]; // [rsp+Ch] [rbp-24h] BYREF\n\n  result = SetupTriggerPopup::init(a1, 0, 0, 7, 400.0, 280.0, 0.0);\n  if ( (_BYTE)result )\n  {\n    v5 = result;\n    *(_QWORD *)(a1 + 1096) = a2;\n    SetupTriggerPopup::preSetup((_BYTE *)a1);\n    qmemcpy(v8, \"PWi\", 3);\n    SetupTriggerPopup::setCustomBGColor(a1, (__int64)v8);\n    *(_BYTE *)(a1 + 596) = 1;\n    TabbedPopupLayer::addCloseButton(a1);\n    GameSettingsLayer::setupTabs(a1);\n    GameSettingsLayer::buildTabContent(a1);\n    GameSettingsLayer::addSpecialContent(a1);\n    SetupTriggerPopup::postSetup((_BYTE *)a1);\n    v6 = dword_100BE072C;\n    if ( dword_100BE072C >= 0LL )\n    {\n      v7 = *(_QWORD *)(a1 + 1016);\n      if ( dword_100BE072C < (int)(954437177 * ((unsigned __int64)(*(_QWORD *)(a1 + 1024) - v7) >> 3)) )\n      {\n        *(_DWORD *)(v7 + 72LL * dword_100BE072C + 52) = dword_100BE5990;\n        a3 = v6;\n      }\n    }\n    (*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)a1 + 1504LL))(a1, a3);\n    return v5;\n  }\n  return result;\n}", "assembly": "; \n; GameSettingsLayer::init from 0x1005fe4c0 to 0x1005fe5b3 (243 bytes)\n; \n; 1 xrefs:\n; > GameSettingsLayer::create @ 0x1005fe477\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 12:34:29 +0000\n; \npush    rbp                                                            ; +0x0, 0x1005fe4c0\nmov     rbp, rsp                                                       ; +0x1, 0x1005fe4c1\npush    r15                                                            ; +0x4, 0x1005fe4c4\npush    r14                                                            ; +0x6, 0x1005fe4c6\npush    r12                                                            ; +0x8, 0x1005fe4c8\npush    rbx                                                            ; +0xa, 0x1005fe4ca\nsub     rsp, 10h                                                       ; +0xb, 0x1005fe4cb\nmov     r14d, edx                                                      ; +0xf, 0x1005fe4cf\nmov     r15, rsi                                                       ; +0x12, 0x1005fe4d2\nmov     rbx, rdi                                                       ; +0x15, 0x1005fe4d5\nmovss   xmm0, cs:dword_100A03B08                                       ; +0x18, 0x1005fe4d8\nmovss   xmm1, cs:dword_100A059F4                                       ; +0x20, 0x1005fe4e0\nxorps   xmm2, xmm2                                                     ; +0x28, 0x1005fe4e8\nxor     esi, esi                                                       ; +0x2b, 0x1005fe4eb\nxor     edx, edx                                                       ; +0x2d, 0x1005fe4ed\nmov     ecx, 7                                                         ; +0x2f, 0x1005fe4ef\ncall    SetupTriggerPopup__init                                        ; +0x34, 0x1005fe4f4\ntest    al, al                                                         ; +0x39, 0x1005fe4f9\njz      loc_1005FE5A6                                                  ; +0x3b, 0x1005fe4fb\nmov     r12d, eax                                                      ; +0x41, 0x1005fe501\nmov     [rbx+448h], r15                                                ; +0x44, 0x1005fe504\nmov     rdi, rbx                                                       ; +0x4b, 0x1005fe50b\ncall    SetupTriggerPopup__preSetup                                    ; +0x4e, 0x1005fe50e\nmov     [rbp+var_22], 69h ; 'i'                                        ; +0x53, 0x1005fe513\nmov     [rbp+var_24], 5750h                                            ; +0x57, 0x1005fe517\nlea     rsi, [rbp+var_24]                                              ; +0x5d, 0x1005fe51d\nmov     rdi, rbx                                                       ; +0x61, 0x1005fe521\ncall    SetupTriggerPopup__setCustomBGColor                            ; +0x64, 0x1005fe524\nmov     byte ptr [rbx+254h], 1                                         ; +0x69, 0x1005fe529\nmov     rdi, rbx                                                       ; +0x70, 0x1005fe530\ncall    TabbedPopupLayer__addCloseButton                               ; +0x73, 0x1005fe533\nmov     rdi, rbx                                                       ; +0x78, 0x1005fe538\ncall    GameSettingsLayer__setupTabs                                   ; +0x7b, 0x1005fe53b\nmov     rdi, rbx                                                       ; +0x80, 0x1005fe540\ncall    GameSettingsLayer__buildTabContent                             ; +0x83, 0x1005fe543\nmov     rdi, rbx                                                       ; +0x88, 0x1005fe548\ncall    GameSettingsLayer__addSpecialContent                           ; +0x8b, 0x1005fe54b\nmov     rdi, rbx                                                       ; +0x90, 0x1005fe550\ncall    SetupTriggerPopup__postSetup                                   ; +0x93, 0x1005fe553\nmovsxd  rax, cs:dword_100BE072C                                        ; +0x98, 0x1005fe558\ntest    rax, rax                                                       ; +0x9f, 0x1005fe55f\njs      short loc_1005FE594                                            ; +0xa2, 0x1005fe562\nmov     rcx, [rbx+3F8h]                                                ; +0xa4, 0x1005fe564\nmov     rdx, [rbx+400h]                                                ; +0xab, 0x1005fe56b\nsub     rdx, rcx                                                       ; +0xb2, 0x1005fe572\nshr     rdx, 3                                                         ; +0xb5, 0x1005fe575\nimul    edx, 38E38E39h                                                 ; +0xb9, 0x1005fe579\ncmp     eax, edx                                                       ; +0xbf, 0x1005fe57f\njge     short loc_1005FE594                                            ; +0xc1, 0x1005fe581\nmov     edx, cs:dword_100BE5990                                        ; +0xc3, 0x1005fe583\nlea     rsi, [rax+rax*8]                                               ; +0xc9, 0x1005fe589\nmov     [rcx+rsi*8+34h], edx                                           ; +0xcd, 0x1005fe58d\nmov     r14d, eax                                                      ; +0xd1, 0x1005fe591\nmov     rax, [rbx]                                                     ; +0xd4, 0x1005fe594\nmov     rdi, rbx                                                       ; +0xd7, 0x1005fe597\nmov     esi, r14d                                                      ; +0xda, 0x1005fe59a\ncall    qword ptr [rax+5E0h]                                           ; +0xdd, 0x1005fe59d\nmov     eax, r12d                                                      ; +0xe3, 0x1005fe5a3\nadd     rsp, 10h                                                       ; +0xe6, 0x1005fe5a6\npop     rbx                                                            ; +0xea, 0x1005fe5aa\npop     r12                                                            ; +0xeb, 0x1005fe5ab\npop     r14                                                            ; +0xed, 0x1005fe5ad\npop     r15                                                            ; +0xef, 0x1005fe5af\npop     rbp                                                            ; +0xf1, 0x1005fe5b1\nretn                                                                   ; +0xf2, 0x1005fe5b2", "xrefs": ["GameSettingsLayer::create @ 0x1005fe477"], "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"}