{"type": "func", "start": 5373259696, "end": 5373260059, "name": "ControlSlotsPopup::onLoad", "pseudocode": "// \n// ControlSlotsPopup::onLoad from 0x140456fb0 to 0x14045711b (363 bytes)\n// \n// 2 xrefs:\n// > ControlSlotsPopup::init @ 0x140456c57\n// > <???> @ 0x140927b54\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:32:29 +0000\n// \n\n// Hidden C++ exception states: #wind=2\n__int64 __fastcall ControlSlotsPopup::onLoad(__int64 *a1, __int64 a2)\n{\n  int v3; // esi\n  __int64 v4; // rcx\n  __int64 *v5; // rbx\n  cocos2d::CCString *v6; // rax\n  const char *CString; // rax\n  size_t v8; // r8\n  __int64 v9; // rbx\n  __int64 v10; // rdx\n  __int64 v11; // r8\n  cocos2d::CCNode *v12; // rax\n  __int128 v14; // [rsp+30h] [rbp-48h] BYREF\n  __int64 v15; // [rsp+40h] [rbp-38h]\n  __int64 v16; // [rsp+48h] [rbp-30h]\n  __int128 v17; // [rsp+50h] [rbp-28h] BYREF\n  __int64 v18; // [rsp+60h] [rbp-18h]\n  __int64 v19; // [rsp+68h] [rbp-10h]\n  void *v20; // [rsp+80h] [rbp+8h]\n\n  v3 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 56LL))(a2);\n  v4 = qword_14090BFD0;\n  if ( !qword_14090BFD0 )\n  {\n    v20 = operator new(0x6E8u);\n    qword_14090BFD0 = GameManager::GameManager((__int64)v20);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);\n    v4 = qword_14090BFD0;\n  }\n  GameManager::loadDPadLayout(v4, v3, *((_BYTE *)a1 + 1008));\n  v5 = (__int64 *)a1[125];\n  if ( v5 )\n  {\n    TouchControlEditLayer::clearNodes((_QWORD *)a1[125]);\n    TouchControlEditLayer::buildNodes((__int64)v5);\n    TouchControlEditLayer::updateHandles(v5);\n    TouchControlEditLayer::updateJumpGuide((__int64)v5);\n    TouchControlEditLayer::refreshHud(v5);\n    TouchControlEditLayer::updateHudVisibility((__int64)v5);\n  }\n  v14 = 0;\n  v15 = 0;\n  v16 = 15;\n  LOBYTE(v14) = 0;\n  v6 = cocos2d::CCString::createWithFormat(\"Slot %i loaded\", v3);\n  CString = cocos2d::CCString::getCString(v6);\n  v17 = 0;\n  v18 = 0;\n  v19 = 0;\n  v8 = -1;\n  do\n    ++v8;\n  while ( CString[v8] );\n  sub_14003D230(&v17, CString, v8);\n  v9 = *a1;\n  v12 = TextAlertPopup::create((__int64)&v17, v10, v11, 150, (__int64)&v14);\n  return (*(__int64 (__fastcall **)(__int64 *, cocos2d::CCNode *, __int64))(v9 + 456))(a1, v12, 100);\n}", "assembly": "; \n; ControlSlotsPopup::onLoad from 0x140456fb0 to 0x14045711b (363 bytes)\n; \n; 2 xrefs:\n; > ControlSlotsPopup::init @ 0x140456c57\n; > <???> @ 0x140927b54\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:32:29 +0000\n; \nmov     [rsp+arg_10], rbx                                              ; +0x0, 0x140456fb0\nmov     [rsp+arg_18], rsi                                              ; +0x5, 0x140456fb5\npush    rdi                                                            ; +0xa, 0x140456fba\nsub     rsp, 70h                                                       ; +0xb, 0x140456fbb\nmov     rdi, rcx                                                       ; +0xf, 0x140456fbf\nmov     rax, [rdx]                                                     ; +0x12, 0x140456fc2\nmov     rcx, rdx                                                       ; +0x15, 0x140456fc5\ncall    qword ptr [rax+38h]                                            ; +0x18, 0x140456fc8\nmov     esi, eax                                                       ; +0x1b, 0x140456fcb\nmov     rcx, cs:qword_14090BFD0                                        ; +0x1d, 0x140456fcd\ntest    rcx, rcx                                                       ; +0x24, 0x140456fd4\njnz     short loc_14045700E                                            ; +0x27, 0x140456fd7\nmov     ecx, 6E8h; Size                                                ; +0x29, 0x140456fd9\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x2e, 0x140456fde\nmov     [rsp+78h+arg_0], rax                                           ; +0x33, 0x140456fe3\nmov     rcx, rax                                                       ; +0x3b, 0x140456feb\ncall    GameManager__GameManager                                       ; +0x3e, 0x140456fee\nnop                                                                    ; +0x43, 0x140456ff3\nmov     cs:qword_14090BFD0, rax                                        ; +0x44, 0x140456ff4\nmov     rcx, [rax]                                                     ; +0x4b, 0x140456ffb\nmov     rdx, [rcx+48h]                                                 ; +0x4e, 0x140456ffe\nmov     rcx, rax                                                       ; +0x52, 0x140457002\ncall    rdx                                                            ; +0x55, 0x140457005\nmov     rcx, cs:qword_14090BFD0                                        ; +0x57, 0x140457007\nmovzx   r8d, byte ptr [rdi+3F0h]                                       ; +0x5e, 0x14045700e\nmov     edx, esi                                                       ; +0x66, 0x140457016\ncall    GameManager__loadDPadLayout                                    ; +0x68, 0x140457018\nmov     rbx, [rdi+3E8h]                                                ; +0x6d, 0x14045701d\ntest    rbx, rbx                                                       ; +0x74, 0x140457024\njz      short loc_140457059                                            ; +0x77, 0x140457027\nmov     rcx, rbx                                                       ; +0x79, 0x140457029\ncall    TouchControlEditLayer__clearNodes                              ; +0x7c, 0x14045702c\nmov     rcx, rbx                                                       ; +0x81, 0x140457031\ncall    TouchControlEditLayer__buildNodes                              ; +0x84, 0x140457034\nmov     rcx, rbx                                                       ; +0x89, 0x140457039\ncall    TouchControlEditLayer__updateHandles                           ; +0x8c, 0x14045703c\nmov     rcx, rbx                                                       ; +0x91, 0x140457041\ncall    TouchControlEditLayer__updateJumpGuide                         ; +0x94, 0x140457044\nmov     rcx, rbx                                                       ; +0x99, 0x140457049\ncall    TouchControlEditLayer__refreshHud                              ; +0x9c, 0x14045704c\nmov     rcx, rbx                                                       ; +0xa1, 0x140457051\ncall    TouchControlEditLayer__updateHudVisibility                     ; +0xa4, 0x140457054\nlea     rax, [rsp+78h+var_48]                                          ; +0xa9, 0x140457059\nmov     [rsp+78h+arg_0], rax                                           ; +0xae, 0x14045705e\nxorps   xmm0, xmm0                                                     ; +0xb6, 0x140457066\nmovups  [rsp+78h+var_48], xmm0                                         ; +0xb9, 0x140457069\nxor     ebx, ebx                                                       ; +0xbe, 0x14045706e\nmov     [rsp+78h+var_38], rbx                                          ; +0xc0, 0x140457070\nmov     [rsp+78h+var_30], 0Fh                                          ; +0xc5, 0x140457075\nmov     byte ptr [rsp+78h+var_48], bl                                  ; +0xce, 0x14045707e\nmov     edx, esi                                                       ; +0xd2, 0x140457082\nlea     rcx, aSlotILoaded; \"Slot %i loaded\"                            ; +0xd4, 0x140457084\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0xdb, 0x14045708b\nmov     rcx, rax                                                       ; +0xe1, 0x140457091\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0xe4, 0x140457094\nxorps   xmm0, xmm0                                                     ; +0xea, 0x14045709a\nmovups  [rsp+78h+var_28], xmm0                                         ; +0xed, 0x14045709d\nmov     [rsp+78h+var_18], rbx                                          ; +0xf2, 0x1404570a2\nmov     [rsp+78h+var_10], rbx                                          ; +0xf7, 0x1404570a7\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0xfc, 0x1404570ac\ninc     r8                                                             ; +0x103, 0x1404570b3\ncmp     byte ptr [rax+r8], 0                                           ; +0x106, 0x1404570b6\njnz     short loc_1404570B3                                            ; +0x10b, 0x1404570bb\nmov     rdx, rax                                                       ; +0x10d, 0x1404570bd\nlea     rcx, [rsp+78h+var_28]                                          ; +0x110, 0x1404570c0\ncall    sub_14003D230                                                  ; +0x115, 0x1404570c5\nmov     rbx, [rdi]                                                     ; +0x11a, 0x1404570ca\nlea     rax, [rsp+78h+var_48]                                          ; +0x11d, 0x1404570cd\nmov     [rsp+78h+var_58], rax                                          ; +0x122, 0x1404570d2\nmov     r9d, 96h                                                       ; +0x127, 0x1404570d7\nmovss   xmm2, cs:dword_140834F64                                       ; +0x12d, 0x1404570dd\nmovss   xmm1, cs:dword_140834F20                                       ; +0x135, 0x1404570e5\nlea     rcx, [rsp+78h+var_28]                                          ; +0x13d, 0x1404570ed\ncall    TextAlertPopup__create                                         ; +0x142, 0x1404570f2\nmov     rdx, rax                                                       ; +0x147, 0x1404570f7\nmov     r8d, 64h ; 'd'                                                 ; +0x14a, 0x1404570fa\nmov     rcx, rdi                                                       ; +0x150, 0x140457100\ncall    qword ptr [rbx+1C8h]                                           ; +0x153, 0x140457103\nlea     r11, [rsp+78h+var_8]                                           ; +0x159, 0x140457109\nmov     rbx, [r11+20h]                                                 ; +0x15e, 0x14045710e\nmov     rsi, [r11+28h]                                                 ; +0x162, 0x140457112\nmov     rsp, r11                                                       ; +0x166, 0x140457116\npop     rdi                                                            ; +0x169, 0x140457119\nretn                                                                   ; +0x16a, 0x14045711a", "xrefs": ["ControlSlotsPopup::init @ 0x140456c57", "<???> @ 0x140927b54"], "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"}