{"type": "func", "start": 5373216560, "end": 5373216944, "name": "LevelBindingsLayer::setupTabs", "pseudocode": "// \n// LevelBindingsLayer::setupTabs from 0x14044c730 to 0x14044c8b0 (384 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x140793c50\n// > <???> @ 0x140927500\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:25 +0000\n// \n\n// Hidden C++ exception states: #wind=1\n__int64 __fastcall LevelBindingsLayer::setupTabs(__int64 a1)\n{\n  __int64 v2; // rcx\n  void *v3; // rcx\n  __int64 v4; // rax\n  const char *v5; // rcx\n  struct cocos2d::CCLabelBMFont *v6; // rdi\n  __int64 v7; // rbx\n  __int64 v8; // rax\n  float v10[2]; // [rsp+30h] [rbp-48h] BYREF\n  _BYTE v11[8]; // [rsp+38h] [rbp-40h] BYREF\n  void *Block[2]; // [rsp+40h] [rbp-38h] BYREF\n  __m128i si128; // [rsp+50h] [rbp-28h]\n\n  Block[1] = nullptr;\n  si128 = _mm_load_si128((const __m128i *)&xmmword_140836590);\n  Block[0] = (void *)0x73676E69646E6942LL;\n  TabbedPopupLayer::addTab(a1, Block, 0);\n  if ( si128.m128i_i64[1] > 0xFuLL )\n  {\n    v3 = Block[0];\n    if ( (unsigned __int64)(si128.m128i_i64[1] + 1) >= 0x1000 )\n    {\n      v3 = *((void **)Block[0] - 1);\n      if ( (unsigned __int64)((char *)Block[0] - (char *)v3 - 8) > 0x1F )\n        invoke_watson(nullptr, nullptr, nullptr, 0, 0);\n    }\n    j_j_free(v3);\n  }\n  v4 = cocos2d::CCDirector::sharedDirector(v2);\n  cocos2d::CCDirector::getWinSize(v4, v10);\n  v5 = \"Custom Keyboard Controls\";\n  if ( *(_BYTE *)(a1 + 1192) )\n    v5 = \"Custom Controller Controls\";\n  v6 = cocos2d::CCLabelBMFont::create(v5, \"goldFont.fnt\");\n  (*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v6 + 160LL))(v6);\n  v7 = *(_QWORD *)v6;\n  cocos2d::CCPoint::CCPoint(\n    (cocos2d::CCPoint *)v11,\n    v10[0] * 0.5,\n    (float)((float)(*(float *)(a1 + 736) * 0.5) + (float)(v10[1] * 0.5)) - 22.0);\n  (*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *, __int64))(v7 + 184))(v6, v8);\n  return (*(__int64 (__fastcall **)(_QWORD, struct cocos2d::CCLabelBMFont *))(**(_QWORD **)(a1 + 584) + 464LL))(\n           *(_QWORD *)(a1 + 584),\n           v6);\n}", "assembly": "; \n; LevelBindingsLayer::setupTabs from 0x14044c730 to 0x14044c8b0 (384 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x140793c50\n; > <???> @ 0x140927500\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:25 +0000\n; \nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x14044c730\nmov     [rsp+arg_10], rsi                                              ; +0x5, 0x14044c735\npush    rdi                                                            ; +0xa, 0x14044c73a\nsub     rsp, 70h                                                       ; +0xb, 0x14044c73b\nmov     rax, cs:__security_cookie                                      ; +0xf, 0x14044c73f\nxor     rax, rsp                                                       ; +0x16, 0x14044c746\nmov     [rsp+78h+var_18], rax                                          ; +0x19, 0x14044c749\nmov     rsi, rcx                                                       ; +0x1e, 0x14044c74e\nxorps   xmm0, xmm0                                                     ; +0x21, 0x14044c751\nmovups  xmmword ptr [rsp+78h+Block], xmm0                              ; +0x24, 0x14044c754\nmovdqa  xmm1, cs:xmmword_140836590                                     ; +0x29, 0x14044c759\nmovdqu  [rsp+78h+var_28], xmm1                                         ; +0x31, 0x14044c761\nmov     rax, 73676E69646E6942h                                         ; +0x37, 0x14044c767\nmov     [rsp+78h+Block], rax                                           ; +0x41, 0x14044c771\nmov     byte ptr [rsp+78h+Block+8], 0                                  ; +0x46, 0x14044c776\nxor     r8d, r8d                                                       ; +0x4b, 0x14044c77b\nlea     rdx, [rsp+78h+Block]                                           ; +0x4e, 0x14044c77e\ncall    TabbedPopupLayer__addTab                                       ; +0x53, 0x14044c783\nnop                                                                    ; +0x58, 0x14044c788\nmov     rdx, qword ptr [rsp+78h+var_28+8]                              ; +0x59, 0x14044c789\ncmp     rdx, 0Fh                                                       ; +0x5e, 0x14044c78e\njbe     short loc_14044C7DC                                            ; +0x62, 0x14044c792\ninc     rdx                                                            ; +0x64, 0x14044c794\nmov     rcx, [rsp+78h+Block]; Block                                    ; +0x67, 0x14044c797\nmov     rax, rcx                                                       ; +0x6c, 0x14044c79c\ncmp     rdx, 1000h                                                     ; +0x6f, 0x14044c79f\njb      short loc_14044C7D7                                            ; +0x76, 0x14044c7a6\nadd     rdx, 27h ; '''                                                 ; +0x78, 0x14044c7a8\nmov     rcx, [rcx-8]                                                   ; +0x7c, 0x14044c7ac\nsub     rax, rcx                                                       ; +0x80, 0x14044c7b0\nsub     rax, 8                                                         ; +0x83, 0x14044c7b3\ncmp     rax, 1Fh                                                       ; +0x87, 0x14044c7b7\njbe     short loc_14044C7D7                                            ; +0x8b, 0x14044c7bb\nmov     [rsp+78h+Reserved], 0; Reserved                                ; +0x8d, 0x14044c7bd\nxor     r9d, r9d; LineNo                                               ; +0x96, 0x14044c7c6\nxor     r8d, r8d; FileName                                             ; +0x99, 0x14044c7c9\nxor     edx, edx; FunctionName                                         ; +0x9c, 0x14044c7cc\nxor     ecx, ecx; Expression                                           ; +0x9e, 0x14044c7ce\ncall    cs:_invoke_watson                                              ; +0xa0, 0x14044c7d0\ndb 0CCh                                                                ; +0xa6, 0x14044c7d6\ncall    j_j_free                                                       ; +0xa7, 0x14044c7d7\ncall    cs:?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0xac, 0x14044c7dc\nmov     rcx, rax                                                       ; +0xb2, 0x14044c7e2\nlea     rdx, [rsp+78h+var_48]                                          ; +0xb5, 0x14044c7e5\ncall    cs:?getWinSize@CCDirector@cocos2d@@QEAA?AVCCSize@2@XZ; cocos2d::CCDirector::getWinSize(void) ; +0xba, 0x14044c7ea\nlea     rax, aCustomControll; \"Custom Controller Controls\"             ; +0xc0, 0x14044c7f0\nlea     rcx, aCustomKeyboard; \"Custom Keyboard Controls\"               ; +0xc7, 0x14044c7f7\ncmp     byte ptr [rsi+4A8h], 0                                         ; +0xce, 0x14044c7fe\ncmovnz  rcx, rax                                                       ; +0xd5, 0x14044c805\nlea     rdx, aGoldfontFnt; \"goldFont.fnt\"                              ; +0xd9, 0x14044c809\ncall    cs:?create@CCLabelBMFont@cocos2d@@SAPEAV12@PEBD0@Z; cocos2d::CCLabelBMFont::create(char const *,char const *) ; +0xe0, 0x14044c810\nmov     rdi, rax                                                       ; +0xe6, 0x14044c816\nmov     rcx, [rax]                                                     ; +0xe9, 0x14044c819\nmov     rdx, [rcx+0A0h]                                                ; +0xec, 0x14044c81c\nmovss   xmm1, cs:dword_140834F64                                       ; +0xf3, 0x14044c823\nmov     rcx, rax                                                       ; +0xfb, 0x14044c82b\ncall    rdx                                                            ; +0xfe, 0x14044c82e\nmov     rbx, [rdi]                                                     ; +0x100, 0x14044c830\nmovss   xmm2, dword ptr [rsi+2E0h]                                     ; +0x103, 0x14044c833\nmovss   xmm3, cs:dword_140834F20                                       ; +0x10b, 0x14044c83b\nmulss   xmm2, xmm3                                                     ; +0x113, 0x14044c843\nmovss   xmm0, [rsp+78h+var_44]                                         ; +0x117, 0x14044c847\nmulss   xmm0, xmm3                                                     ; +0x11d, 0x14044c84d\naddss   xmm2, xmm0                                                     ; +0x121, 0x14044c851\nsubss   xmm2, cs:dword_1408355D0                                       ; +0x125, 0x14044c855\nmovss   xmm1, [rsp+78h+var_48]                                         ; +0x12d, 0x14044c85d\nmulss   xmm1, xmm3                                                     ; +0x133, 0x14044c863\nlea     rcx, [rsp+78h+var_40]                                          ; +0x137, 0x14044c867\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x13c, 0x14044c86c\nmov     rdx, rax                                                       ; +0x142, 0x14044c872\nmov     rcx, rdi                                                       ; +0x145, 0x14044c875\ncall    qword ptr [rbx+0B8h]                                           ; +0x148, 0x14044c878\nmov     rcx, [rsi+248h]                                                ; +0x14e, 0x14044c87e\nmov     rax, [rcx]                                                     ; +0x155, 0x14044c885\nmov     rdx, rdi                                                       ; +0x158, 0x14044c888\ncall    qword ptr [rax+1D0h]                                           ; +0x15b, 0x14044c88b\nmov     rcx, [rsp+78h+var_18]                                          ; +0x161, 0x14044c891\nxor     rcx, rsp; StackCookie                                          ; +0x166, 0x14044c896\ncall    __security_check_cookie                                        ; +0x169, 0x14044c899\nlea     r11, [rsp+78h+var_8]                                           ; +0x16e, 0x14044c89e\nmov     rbx, [r11+18h]                                                 ; +0x173, 0x14044c8a3\nmov     rsi, [r11+20h]                                                 ; +0x177, 0x14044c8a7\nmov     rsp, r11                                                       ; +0x17b, 0x14044c8ab\npop     rdi                                                            ; +0x17e, 0x14044c8ae\nretn                                                                   ; +0x17f, 0x14044c8af", "xrefs": ["<???> @ 0x140793c50", "<???> @ 0x140927500"], "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"}