{"type": "func", "start": 5370099840, "end": 5370100405, "name": "GameLevelManager::updateLevel", "pseudocode": "// \n// GameLevelManager::updateLevel from 0x140153880 to 0x140153ab5 (565 bytes)\n// \n// 3 xrefs:\n// > LevelInfoLayer::init @ 0x1402f8240\n// > LevelInfoLayer::onUpdate @ 0x1402fedf6\n// > <???> @ 0x1406ca8c0\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\n// Hidden C++ exception states: #wind=3\nvoid GameLevelManager::updateLevel(GameLevelManager *a1, GJGameLevel *a2)\n{\n  int v3; // ebx\n  cocos2d::CCString *v4; // rax\n  const char *CString; // rdi\n  __int64 v6; // rcx\n  cocos2d::CCString *v7; // rax\n  const char *v8; // rax\n  cocos2d::CCString *v9; // rax\n  char *v10; // rax\n  size_t v11; // rbx\n  size_t v12; // r8\n  size_t v13; // r8\n  _QWORD *v14; // rdx\n  __int128 v15; // [rsp+40h] [rbp-59h] BYREF\n  __int64 v16; // [rsp+50h] [rbp-49h]\n  __int64 v17; // [rsp+58h] [rbp-41h]\n  __int128 v18; // [rsp+60h] [rbp-39h] BYREF\n  __int64 v19; // [rsp+70h] [rbp-29h]\n  __int64 v20; // [rsp+78h] [rbp-21h]\n  __int128 v21; // [rsp+80h] [rbp-19h] BYREF\n  __int64 v22; // [rsp+90h] [rbp-9h]\n  __int64 v23; // [rsp+98h] [rbp-1h]\n  __int128 *v24; // [rsp+A0h] [rbp+7h]\n  __int128 *v25; // [rsp+A8h] [rbp+Fh]\n  _QWORD Src[4]; // [rsp+B8h] [rbp+1Fh] BYREF\n\n  v3 = a2->m_levelID.random - a2->m_levelID.seed;\n  v4 = cocos2d::CCString::createWithFormat(\n         \"%i_%i_%i\",\n         v3,\n         a2->m_gauntletLevel,\n         a2->m_dailyID.random - a2->m_dailyID.seed);\n  CString = cocos2d::CCString::getCString(v4);\n  if ( !GameLevelManager::isDLActive(a1, CString) )\n  {\n    GameLevelManager::addDLToActive(a1, CString);\n    GameLevelManager::getBasePostString(v6, Src);\n    v7 = cocos2d::CCString::createWithFormat(\"%c%s%s%c%c%s\", 87, \"mfd\", \"2893\", 103, 98, (const char *)&word_140531E88);\n    v8 = cocos2d::CCString::getCString(v7);\n    v9 = cocos2d::CCString::createWithFormat(\"&levelID=%i&gameVersion=%i&secret=%s\", v3, 22, v8);\n    v10 = (char *)cocos2d::CCString::getCString(v9);\n    v11 = -1;\n    v12 = -1;\n    do\n      ++v12;\n    while ( v10[v12] );\n    sub_140041270(Src, v10, v12);\n    v24 = &v18;\n    v25 = &v21;\n    v18 = 0;\n    v19 = 0;\n    v20 = 0;\n    v13 = -1;\n    do\n      ++v13;\n    while ( CString[v13] );\n    sub_14003A930(&v18, CString, v13);\n    v14 = Src;\n    if ( Src[3] > 0xFu )\n      v14 = (_QWORD *)Src[0];\n    v21 = 0;\n    v22 = 0;\n    v23 = 0;\n    do\n      ++v11;\n    while ( *((_BYTE *)v14 + v11) );\n    sub_14003A930(&v21, v14, v11);\n    v15 = 0;\n    *(_QWORD *)&v15 = sub_14003AA10(0x40u);\n    v16 = 56;\n    v17 = 63;\n    strcpy((char *)v15, \"https://www.boomlings.com/database/downloadGJLevel22.php\");\n    GameLevelManager::ProcessHttpRequest(a1, (__int64)&v15, (const char *)&v21, (const char *)&v18, 5);\n    sub_14003A830((__int64)Src);\n  }\n}", "assembly": "; \n; GameLevelManager::updateLevel from 0x140153880 to 0x140153ab5 (565 bytes)\n; \n; 3 xrefs:\n; > LevelInfoLayer::init @ 0x1402f8240\n; > LevelInfoLayer::onUpdate @ 0x1402fedf6\n; > <???> @ 0x1406ca8c0\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\nmov     [rsp-8+arg_10], rbx                                            ; +0x0, 0x140153880\nmov     [rsp-8+arg_18], rsi                                            ; +0x5, 0x140153885\npush    rbp                                                            ; +0xa, 0x14015388a\npush    rdi                                                            ; +0xb, 0x14015388b\npush    r14                                                            ; +0xc, 0x14015388c\nlea     rbp, [rsp-47h]                                                 ; +0xe, 0x14015388e\nsub     rsp, 0E0h                                                      ; +0x13, 0x140153893\nmov     rax, cs:__security_cookie                                      ; +0x1a, 0x14015389a\nxor     rax, rsp                                                       ; +0x21, 0x1401538a1\nmov     [rbp+57h+var_18], rax                                          ; +0x24, 0x1401538a4\nmov     rsi, rcx                                                       ; +0x28, 0x1401538a8\nmov     ebx, [rdx+148h]                                                ; +0x2b, 0x1401538ab\nsub     ebx, [rdx+14Ch]                                                ; +0x31, 0x1401538b1\nmov     r9d, [rdx+36Ch]                                                ; +0x37, 0x1401538b7\nsub     r9d, [rdx+370h]                                                ; +0x3e, 0x1401538be\nmovzx   r8d, byte ptr [rdx+2C9h]                                       ; +0x45, 0x1401538c5\nmov     edx, ebx                                                       ; +0x4d, 0x1401538cd\nlea     rcx, aIII; \"%i_%i_%i\"                                          ; +0x4f, 0x1401538cf\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x56, 0x1401538d6\nmov     rcx, rax                                                       ; +0x5c, 0x1401538dc\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0x5f, 0x1401538df\nmov     rdi, rax                                                       ; +0x65, 0x1401538e5\nmov     rdx, rax                                                       ; +0x68, 0x1401538e8\nmov     rcx, rsi                                                       ; +0x6b, 0x1401538eb\ncall    GameLevelManager__isDLActive                                   ; +0x6e, 0x1401538ee\ntest    al, al                                                         ; +0x73, 0x1401538f3\njnz     loc_140153A91                                                  ; +0x75, 0x1401538f5\nmov     rdx, rdi                                                       ; +0x7b, 0x1401538fb\nmov     rcx, rsi                                                       ; +0x7e, 0x1401538fe\ncall    GameLevelManager__addDLToActive                                ; +0x81, 0x140153901\nlea     rdx, [rbp+57h+Src]                                             ; +0x86, 0x140153906\ncall    GameLevelManager__getBasePostString                            ; +0x8a, 0x14015390a\nnop                                                                    ; +0x8f, 0x14015390f\nlea     rax, word_140531E88                                            ; +0x90, 0x140153910\nmov     [rsp+0F0h+var_C0], rax                                         ; +0x97, 0x140153917\nmov     [rsp+0F0h+var_C8], 62h ; 'b'                                   ; +0x9c, 0x14015391c\nmov     [rsp+0F0h+var_D0], 67h ; 'g'                                   ; +0xa4, 0x140153924\nlea     r9, a2893; \"2893\"                                              ; +0xac, 0x14015392c\nlea     r8, aMfd; \"mfd\"                                                ; +0xb3, 0x140153933\nmov     edx, 57h ; 'W'                                                 ; +0xba, 0x14015393a\nlea     rcx, aCSSCCS; \"%c%s%s%c%c%s\"                                   ; +0xbf, 0x14015393f\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0xc6, 0x140153946\nmov     rcx, rax                                                       ; +0xcc, 0x14015394c\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0xcf, 0x14015394f\nmov     r9, rax                                                        ; +0xd5, 0x140153955\nmov     r8d, 16h                                                       ; +0xd8, 0x140153958\nmov     edx, ebx                                                       ; +0xde, 0x14015395e\nlea     rcx, aLevelidIGameve; \"&levelID=%i&gameVersion=%i&secret=%s\"   ; +0xe0, 0x140153960\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0xe7, 0x140153967\nmov     rcx, rax                                                       ; +0xed, 0x14015396d\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0xf0, 0x140153970\nmov     rbx, 0FFFFFFFFFFFFFFFFh                                        ; +0xf6, 0x140153976\nmov     r8, rbx                                                        ; +0xfd, 0x14015397d\ninc     r8; Size                                                       ; +0x100, 0x140153980\ncmp     byte ptr [rax+r8], 0                                           ; +0x103, 0x140153983\njnz     short loc_140153980                                            ; +0x108, 0x140153988\nmov     rdx, rax; void *                                               ; +0x10a, 0x14015398a\nlea     rcx, [rbp+57h+Src]; Src                                        ; +0x10d, 0x14015398d\ncall    sub_140041270                                                  ; +0x111, 0x140153991\nlea     rax, [rbp+57h+var_90]                                          ; +0x116, 0x140153996\nmov     [rbp+57h+var_50], rax                                          ; +0x11a, 0x14015399a\nlea     rax, [rbp+57h+var_70]                                          ; +0x11e, 0x14015399e\nmov     [rbp+57h+var_48], rax                                          ; +0x122, 0x1401539a2\nxorps   xmm0, xmm0                                                     ; +0x126, 0x1401539a6\nmovups  [rbp+57h+var_90], xmm0                                         ; +0x129, 0x1401539a9\nxor     r14d, r14d                                                     ; +0x12d, 0x1401539ad\nmov     [rbp+57h+var_80], r14                                          ; +0x130, 0x1401539b0\nmov     [rbp+57h+var_78], r14                                          ; +0x134, 0x1401539b4\nmov     r8, rbx                                                        ; +0x138, 0x1401539b8\nnop     dword ptr [rax+rax+00h]                                        ; +0x13b, 0x1401539bb\ninc     r8                                                             ; +0x140, 0x1401539c0\ncmp     [rdi+r8], r14b                                                 ; +0x143, 0x1401539c3\njnz     short loc_1401539C0                                            ; +0x147, 0x1401539c7\nmov     rdx, rdi                                                       ; +0x149, 0x1401539c9\nlea     rcx, [rbp+57h+var_90]                                          ; +0x14c, 0x1401539cc\ncall    sub_14003A930                                                  ; +0x150, 0x1401539d0\nnop                                                                    ; +0x155, 0x1401539d5\nlea     rdx, [rbp+57h+Src]                                             ; +0x156, 0x1401539d6\ncmp     [rbp+57h+var_20], 0Fh                                          ; +0x15a, 0x1401539da\ncmova   rdx, [rbp+57h+Src]                                             ; +0x15f, 0x1401539df\nxorps   xmm0, xmm0                                                     ; +0x164, 0x1401539e4\nmovups  [rbp+57h+var_70], xmm0                                         ; +0x167, 0x1401539e7\nmov     [rbp+57h+var_60], r14                                          ; +0x16b, 0x1401539eb\nmov     [rbp+57h+var_58], r14                                          ; +0x16f, 0x1401539ef\ninc     rbx                                                            ; +0x173, 0x1401539f3\ncmp     byte ptr [rdx+rbx], 0                                          ; +0x176, 0x1401539f6\njnz     short loc_1401539F3                                            ; +0x17a, 0x1401539fa\nmov     r8, rbx                                                        ; +0x17c, 0x1401539fc\nlea     rcx, [rbp+57h+var_70]                                          ; +0x17f, 0x1401539ff\ncall    sub_14003A930                                                  ; +0x183, 0x140153a03\nnop                                                                    ; +0x188, 0x140153a08\nxorps   xmm0, xmm0                                                     ; +0x189, 0x140153a09\nmovups  [rbp+57h+var_B0], xmm0                                         ; +0x18c, 0x140153a0c\nmov     [rbp+57h+var_A0], r14                                          ; +0x190, 0x140153a10\nmov     [rbp+57h+var_98], 0Fh                                          ; +0x194, 0x140153a14\nmov     ecx, 40h ; '@'                                                 ; +0x19c, 0x140153a1c\ncall    sub_14003AA10                                                  ; +0x1a1, 0x140153a21\nmov     qword ptr [rbp+57h+var_B0], rax                                ; +0x1a6, 0x140153a26\nmov     [rbp+57h+var_A0], 38h ; '8'                                    ; +0x1aa, 0x140153a2a\nmov     [rbp+57h+var_98], 3Fh ; '?'                                    ; +0x1b2, 0x140153a32\nmovups  xmm0, cs:xmmword_1405590E0                                     ; +0x1ba, 0x140153a3a\nmovups  xmmword ptr [rax], xmm0                                        ; +0x1c1, 0x140153a41\nmovups  xmm1, cs:xmmword_1405590F0                                     ; +0x1c4, 0x140153a44\nmovups  xmmword ptr [rax+10h], xmm1                                    ; +0x1cb, 0x140153a4b\nmovups  xmm0, cs:xmmword_140559100                                     ; +0x1cf, 0x140153a4f\nmovups  xmmword ptr [rax+20h], xmm0                                    ; +0x1d6, 0x140153a56\nmovsd   xmm0, cs:qword_140559110                                       ; +0x1da, 0x140153a5a\nmovsd   qword ptr [rax+30h], xmm0                                      ; +0x1e2, 0x140153a62\nmov     byte ptr [rax+38h], 0                                          ; +0x1e7, 0x140153a67\nmov     [rsp+0F0h+var_D0], 5                                           ; +0x1eb, 0x140153a6b\nlea     r9, [rbp+57h+var_90]                                           ; +0x1f3, 0x140153a73\nlea     r8, [rbp+57h+var_70]                                           ; +0x1f7, 0x140153a77\nlea     rdx, [rbp+57h+var_B0]                                          ; +0x1fb, 0x140153a7b\nmov     rcx, rsi                                                       ; +0x1ff, 0x140153a7f\ncall    GameLevelManager__ProcessHttpRequest                           ; +0x202, 0x140153a82\nnop                                                                    ; +0x207, 0x140153a87\nlea     rcx, [rbp+57h+Src]                                             ; +0x208, 0x140153a88\ncall    sub_14003A830                                                  ; +0x20c, 0x140153a8c\nmov     rcx, [rbp+57h+var_18]                                          ; +0x211, 0x140153a91\nxor     rcx, rsp; StackCookie                                          ; +0x215, 0x140153a95\ncall    __security_check_cookie                                        ; +0x218, 0x140153a98\nlea     r11, [rsp+0F0h+var_10]                                         ; +0x21d, 0x140153a9d\nmov     rbx, [r11+30h]                                                 ; +0x225, 0x140153aa5\nmov     rsi, [r11+38h]                                                 ; +0x229, 0x140153aa9\nmov     rsp, r11                                                       ; +0x22d, 0x140153aad\npop     r14                                                            ; +0x230, 0x140153ab0\npop     rdi                                                            ; +0x232, 0x140153ab2\npop     rbp                                                            ; +0x233, 0x140153ab3\nretn                                                                   ; +0x234, 0x140153ab4", "xrefs": ["LevelInfoLayer::init @ 0x1402f8240", "LevelInfoLayer::onUpdate @ 0x1402fedf6", "<???> @ 0x1406ca8c0"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}