{"type": "func", "start": 5369650896, "end": 5369651475, "name": "LevelBadgePopup::init", "pseudocode": "// \n// LevelBadgePopup::init from 0x1400e5ed0 to 0x1400e6113 (579 bytes)\n// \n// 2 xrefs:\n// > LevelBadgePopup::create @ 0x1400e5e80\n// > <???> @ 0x140914ca8\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:26:32 +0000\n// \n\n// Hidden C++ exception states: #wind=3\nchar __fastcall LevelBadgePopup::init(__int64 a1, int a2, char a3)\n{\n  __int64 v6; // rdx\n  __int64 v7; // rdx\n  __int64 v8; // rax\n  __int64 v9; // rax\n  size_t v10; // rbx\n  cocos2d::CCLayerColor *v11; // rax\n  cocos2d::CCString *v12; // rax\n  const char *CString; // rax\n  size_t v14; // r8\n  __int64 v15; // rax\n  __int64 v16; // rsi\n  _BYTE *Key; // rax\n  __int64 v18; // rcx\n  __int128 v20; // [rsp+20h] [rbp-28h] BYREF\n  __int64 v21; // [rsp+30h] [rbp-18h]\n  __int64 v22; // [rsp+38h] [rbp-10h]\n  int v23; // [rsp+58h] [rbp+10h] BYREF\n  void *v24; // [rsp+68h] [rbp+20h]\n\n  if ( a2 <= 0 )\n    return 0;\n  v23 = 0;\n  if ( !cocos2d::CCLayerColor::initWithColor((cocos2d::CCLayerColor *)a1, (const struct cocos2d::_ccColor4B *)&v23) )\n    return 0;\n  *(_DWORD *)(a1 + 672) = a2;\n  *(_BYTE *)(a1 + 676) = a3;\n  FLAlertLayer::incrementForcePrio((struct cocos2d::CCObject *)a1);\n  *(_BYTE *)(a1 + 596) = 1;\n  LOBYTE(v6) = 1;\n  (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 920LL))(a1, v6);\n  LOBYTE(v7) = 1;\n  (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 992LL))(a1, v7);\n  v8 = cocos2d::CCLayer::create();\n  *(_QWORD *)(a1 + 584) = v8;\n  (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 464LL))(a1, v8);\n  v9 = cocos2d::CCMenu::create();\n  *(_QWORD *)(a1 + 552) = v9;\n  (*(void (__fastcall **)(_QWORD, __int64, __int64))(**(_QWORD **)(a1 + 584) + 456LL))(*(_QWORD *)(a1 + 584), v9, 10);\n  (*(void (__fastcall **)(_QWORD, void *))(**(_QWORD **)(a1 + 552) + 184LL))(*(_QWORD *)(a1 + 552), &unk_14090A188);\n  v10 = -1;\n  *(_DWORD *)(a1 + 640) = -1;\n  v11 = LoadingCircle::create();\n  *(_QWORD *)(a1 + 728) = v11;\n  *((_QWORD *)v11 + 69) = *(_QWORD *)(a1 + 584);\n  *(_BYTE *)(*(_QWORD *)(a1 + 728) + 560LL) = 0;\n  LoadingCircle::show(*(_QWORD *)(a1 + 728));\n  v12 = cocos2d::CCString::createWithFormat((const char *)&word_1406ED6F8, *(unsigned int *)(a1 + 672));\n  CString = cocos2d::CCString::getCString(v12);\n  v20 = 0;\n  v21 = 0;\n  v22 = 0;\n  v14 = -1;\n  do\n    ++v14;\n  while ( CString[v14] );\n  sub_14003D230(&v20, CString, v14);\n  v15 = GJSearchObject::create_1(0, &v20);\n  v16 = v15;\n  if ( *(_BYTE *)(a1 + 676) )\n    *(_DWORD *)(v15 + 464) = 1;\n  Key = (_BYTE *)GJSearchObject::getKey(v15);\n  do\n    ++v10;\n  while ( Key[v10] );\n  sub_1400405A0((void **)(a1 + 696), Key, v10);\n  v18 = *(_QWORD *)&qword_14090BFB0;\n  if ( !*(_QWORD *)&qword_14090BFB0 )\n  {\n    v24 = operator new(0x690u);\n    *(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager(v24);\n    (*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);\n    v18 = *(_QWORD *)&qword_14090BFB0;\n  }\n  *(_QWORD *)(v18 + 1352) = a1 + 664;\n  if ( *(_BYTE *)(a1 + 676) )\n    GameLevelManager::getLevelLists(v18, v16);\n  else\n    GameLevelManager::getOnlineLevels(v18, v16);\n  return 1;\n}", "assembly": "; \n; LevelBadgePopup::init from 0x1400e5ed0 to 0x1400e6113 (579 bytes)\n; \n; 2 xrefs:\n; > LevelBadgePopup::create @ 0x1400e5e80\n; > <???> @ 0x140914ca8\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:26:32 +0000\n; \nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x1400e5ed0\nmov     [rsp+arg_10], rsi                                              ; +0x5, 0x1400e5ed5\npush    rdi                                                            ; +0xa, 0x1400e5eda\nsub     rsp, 40h                                                       ; +0xb, 0x1400e5edb\nmovzx   esi, r8b                                                       ; +0xf, 0x1400e5edf\nmov     ebx, edx                                                       ; +0x13, 0x1400e5ee3\nmov     rdi, rcx                                                       ; +0x15, 0x1400e5ee5\ntest    edx, edx                                                       ; +0x18, 0x1400e5ee8\njle     loc_1400E6101                                                  ; +0x1a, 0x1400e5eea\nmov     [rsp+48h+arg_8], 0                                             ; +0x20, 0x1400e5ef0\nmov     eax, [rsp+48h+arg_8]                                           ; +0x28, 0x1400e5ef8\nmov     [rsp+48h+arg_8], eax                                           ; +0x2c, 0x1400e5efc\nlea     rdx, [rsp+48h+arg_8]                                           ; +0x30, 0x1400e5f00\ncall    cs:__imp_?initWithColor@CCLayerColor@cocos2d@@UEAA_NAEBU_ccColor4B@2@@Z; cocos2d::CCLayerColor::initWithColor(cocos2d::_ccColor4B const &) ; +0x35, 0x1400e5f05\ntest    al, al                                                         ; +0x3b, 0x1400e5f0b\njz      loc_1400E6101                                                  ; +0x3d, 0x1400e5f0d\nmov     [rdi+2A0h], ebx                                                ; +0x43, 0x1400e5f13\nmov     [rdi+2A4h], sil                                                ; +0x49, 0x1400e5f19\nmov     rcx, rdi                                                       ; +0x50, 0x1400e5f20\ncall    FLAlertLayer__incrementForcePrio                               ; +0x53, 0x1400e5f23\nmov     byte ptr [rdi+254h], 1                                         ; +0x58, 0x1400e5f28\nmov     rax, [rdi]                                                     ; +0x5f, 0x1400e5f2f\nmov     dl, 1                                                          ; +0x62, 0x1400e5f32\nmov     rcx, rdi                                                       ; +0x64, 0x1400e5f34\ncall    qword ptr [rax+398h]                                           ; +0x67, 0x1400e5f37\nmov     rax, [rdi]                                                     ; +0x6d, 0x1400e5f3d\nmov     dl, 1                                                          ; +0x70, 0x1400e5f40\nmov     rcx, rdi                                                       ; +0x72, 0x1400e5f42\ncall    qword ptr [rax+3E0h]                                           ; +0x75, 0x1400e5f45\ncall    cs:?create@CCLayer@cocos2d@@SAPEAV12@XZ; cocos2d::CCLayer::create(void) ; +0x7b, 0x1400e5f4b\nmov     [rdi+248h], rax                                                ; +0x81, 0x1400e5f51\nmov     rcx, [rdi]                                                     ; +0x88, 0x1400e5f58\nmov     r8, [rcx+1D0h]                                                 ; +0x8b, 0x1400e5f5b\nmov     rdx, rax                                                       ; +0x92, 0x1400e5f62\nmov     rcx, rdi                                                       ; +0x95, 0x1400e5f65\ncall    r8                                                             ; +0x98, 0x1400e5f68\ncall    cs:?create@CCMenu@cocos2d@@SAPEAV12@XZ; cocos2d::CCMenu::create(void) ; +0x9b, 0x1400e5f6b\nmov     [rdi+228h], rax                                                ; +0xa1, 0x1400e5f71\nmov     rcx, [rdi+248h]                                                ; +0xa8, 0x1400e5f78\nmov     rdx, [rcx]                                                     ; +0xaf, 0x1400e5f7f\nmov     r9, [rdx+1C8h]                                                 ; +0xb2, 0x1400e5f82\nmov     r8d, 0Ah                                                       ; +0xb9, 0x1400e5f89\nmov     rdx, rax                                                       ; +0xbf, 0x1400e5f8f\ncall    r9                                                             ; +0xc2, 0x1400e5f92\nmov     rcx, [rdi+228h]                                                ; +0xc5, 0x1400e5f95\nmov     rax, [rcx]                                                     ; +0xcc, 0x1400e5f9c\nlea     rdx, unk_14090A188                                             ; +0xcf, 0x1400e5f9f\ncall    qword ptr [rax+0B8h]                                           ; +0xd6, 0x1400e5fa6\nmov     rbx, 0FFFFFFFFFFFFFFFFh                                        ; +0xdc, 0x1400e5fac\nmov     [rdi+280h], ebx                                                ; +0xe3, 0x1400e5fb3\ncall    LoadingCircle__create                                          ; +0xe9, 0x1400e5fb9\nmov     [rdi+2D8h], rax                                                ; +0xee, 0x1400e5fbe\nmov     rcx, [rdi+248h]                                                ; +0xf5, 0x1400e5fc5\nmov     [rax+228h], rcx                                                ; +0xfc, 0x1400e5fcc\nmov     rax, [rdi+2D8h]                                                ; +0x103, 0x1400e5fd3\nmov     byte ptr [rax+230h], 0                                         ; +0x10a, 0x1400e5fda\nmov     rcx, [rdi+2D8h]                                                ; +0x111, 0x1400e5fe1\ncall    LoadingCircle__show                                            ; +0x118, 0x1400e5fe8\nmov     edx, [rdi+2A0h]                                                ; +0x11d, 0x1400e5fed\nlea     rcx, word_1406ED6F8                                            ; +0x123, 0x1400e5ff3\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x12a, 0x1400e5ffa\nmov     rcx, rax                                                       ; +0x130, 0x1400e6000\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0x133, 0x1400e6003\nxorps   xmm0, xmm0                                                     ; +0x139, 0x1400e6009\nmovups  [rsp+48h+var_28], xmm0                                         ; +0x13c, 0x1400e600c\nxor     ecx, ecx                                                       ; +0x141, 0x1400e6011\nmov     [rsp+48h+var_18], rcx                                          ; +0x143, 0x1400e6013\nmov     [rsp+48h+var_10], rcx                                          ; +0x148, 0x1400e6018\nmov     r8, rbx                                                        ; +0x14d, 0x1400e601d\ninc     r8                                                             ; +0x150, 0x1400e6020\ncmp     [rax+r8], cl                                                   ; +0x153, 0x1400e6023\njnz     short loc_1400E6020                                            ; +0x157, 0x1400e6027\nmov     rdx, rax                                                       ; +0x159, 0x1400e6029\nlea     rcx, [rsp+48h+var_28]                                          ; +0x15c, 0x1400e602c\ncall    sub_14003D230                                                  ; +0x161, 0x1400e6031\nlea     rdx, [rsp+48h+var_28]                                          ; +0x166, 0x1400e6036\nxor     ecx, ecx                                                       ; +0x16b, 0x1400e603b\ncall    GJSearchObject__create_1                                       ; +0x16d, 0x1400e603d\nmov     rsi, rax                                                       ; +0x172, 0x1400e6042\ncmp     byte ptr [rdi+2A4h], 0                                         ; +0x175, 0x1400e6045\njz      short loc_1400E6058                                            ; +0x17c, 0x1400e604c\nmov     dword ptr [rax+1D0h], 1                                        ; +0x17e, 0x1400e604e\nmov     rcx, rsi                                                       ; +0x188, 0x1400e6058\ncall    GJSearchObject__getKey                                         ; +0x18b, 0x1400e605b\ninc     rbx                                                            ; +0x190, 0x1400e6060\ncmp     byte ptr [rax+rbx], 0                                          ; +0x193, 0x1400e6063\njnz     short loc_1400E6060                                            ; +0x197, 0x1400e6067\nlea     rcx, [rdi+2B8h]; void *                                        ; +0x199, 0x1400e6069\nmov     r8, rbx; Size                                                  ; +0x1a0, 0x1400e6070\nmov     rdx, rax; Src                                                  ; +0x1a3, 0x1400e6073\ncall    sub_1400405A0                                                  ; +0x1a6, 0x1400e6076\nlea     rbx, [rdi+298h]                                                ; +0x1ab, 0x1400e607b\nmov     rcx, cs:qword_14090BFB0                                        ; +0x1b2, 0x1400e6082\ntest    rcx, rcx                                                       ; +0x1b9, 0x1400e6089\njnz     short loc_1400E60C0                                            ; +0x1bc, 0x1400e608c\nmov     ecx, 690h; Size                                                ; +0x1be, 0x1400e608e\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x1c3, 0x1400e6093\nmov     [rsp+48h+arg_18], rax                                          ; +0x1c8, 0x1400e6098\nmov     rcx, rax                                                       ; +0x1cd, 0x1400e609d\ncall    GameLevelManager__GameLevelManager                             ; +0x1d0, 0x1400e60a0\nnop                                                                    ; +0x1d5, 0x1400e60a5\nmov     cs:qword_14090BFB0, rax                                        ; +0x1d6, 0x1400e60a6\nmov     rcx, [rax]                                                     ; +0x1dd, 0x1400e60ad\nmov     rdx, [rcx+48h]                                                 ; +0x1e0, 0x1400e60b0\nmov     rcx, rax                                                       ; +0x1e4, 0x1400e60b4\ncall    rdx                                                            ; +0x1e7, 0x1400e60b7\nmov     rcx, cs:qword_14090BFB0                                        ; +0x1e9, 0x1400e60b9\nmov     [rcx+548h], rbx                                                ; +0x1f0, 0x1400e60c0\nmov     rdx, rsi                                                       ; +0x1f7, 0x1400e60c7\ncmp     byte ptr [rdi+2A4h], 0                                         ; +0x1fa, 0x1400e60ca\njz      short loc_1400E60EA                                            ; +0x201, 0x1400e60d1\ncall    GameLevelManager__getLevelLists                                ; +0x203, 0x1400e60d3\nmov     al, 1                                                          ; +0x208, 0x1400e60d8\nmov     rbx, [rsp+48h+arg_0]                                           ; +0x20a, 0x1400e60da\nmov     rsi, [rsp+48h+arg_10]                                          ; +0x20f, 0x1400e60df\nadd     rsp, 40h                                                       ; +0x214, 0x1400e60e4\npop     rdi                                                            ; +0x218, 0x1400e60e8\nretn                                                                   ; +0x219, 0x1400e60e9\ncall    GameLevelManager__getOnlineLevels                              ; +0x21a, 0x1400e60ea\nmov     al, 1                                                          ; +0x21f, 0x1400e60ef\nmov     rbx, [rsp+48h+arg_0]                                           ; +0x221, 0x1400e60f1\nmov     rsi, [rsp+48h+arg_10]                                          ; +0x226, 0x1400e60f6\nadd     rsp, 40h                                                       ; +0x22b, 0x1400e60fb\npop     rdi                                                            ; +0x22f, 0x1400e60ff\nretn                                                                   ; +0x230, 0x1400e6100\nxor     al, al                                                         ; +0x231, 0x1400e6101\nmov     rbx, [rsp+48h+arg_0]                                           ; +0x233, 0x1400e6103\nmov     rsi, [rsp+48h+arg_10]                                          ; +0x238, 0x1400e6108\nadd     rsp, 40h                                                       ; +0x23d, 0x1400e610d\npop     rdi                                                            ; +0x241, 0x1400e6111\nretn                                                                   ; +0x242, 0x1400e6112", "xrefs": ["LevelBadgePopup::create @ 0x1400e5e80", "<???> @ 0x140914ca8"], "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"}