{"type": "func", "start": 5371829872, "end": 5371830172, "name": "LevelInfoLayer::shouldDownloadLevel", "pseudocode": "// \n// LevelInfoLayer::shouldDownloadLevel from 0x1402f9e70 to 0x1402f9f9c (300 bytes)\n// \n// 4 xrefs:\n// > LevelInfoLayer::onPlay @ 0x1402fc47f\n// > LevelInfoLayer::onUpdate @ 0x1402fecef\n// > LevelInfoLayer::FLAlert_Clicked @ 0x1403003be\n// > <???> @ 0x1406d4148\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=1\nbool LevelInfoLayer::shouldDownloadLevel(LevelInfoLayer *a1)\n{\n  char v1; // bl\n  GJGameLevel *m_level; // rdx\n  unsigned __int64 v3; // rdi\n  void **v4; // rcx\n  size_t v5; // rsi\n  size_t v6; // r8\n  bool v7; // si\n  void *v8; // rcx\n  __int128 Buf2; // [rsp+28h] [rbp-50h] BYREF\n  __int64 v11; // [rsp+38h] [rbp-40h]\n  __int64 v12; // [rsp+40h] [rbp-38h]\n  void *Buf1[2]; // [rsp+48h] [rbp-30h] BYREF\n  size_t v14; // [rsp+58h] [rbp-20h]\n  unsigned __int64 v15; // [rsp+60h] [rbp-18h]\n\n  v1 = 0;\n  m_level = a1->m_level;\n  if ( m_level->m_levelType == SearchResult )\n  {\n    v3 = v12;\n  }\n  else\n  {\n    Buf2 = 0;\n    v11 = 0;\n    v3 = 15;\n    v12 = 15;\n    LOBYTE(Buf2) = 0;\n    sub_14003BDB0((__int64)Buf1, (__int64)&m_level->m_levelString);\n    v1 = 7;\n    v4 = Buf1;\n    if ( v15 > 0xF )\n      v4 = (void **)Buf1[0];\n    v5 = v14;\n    v6 = v14;\n    if ( v14 )\n      v6 = 0;\n    if ( memcmp(v4, &Buf2, v6) || v5 )\n    {\n      v7 = 0;\n      goto LABEL_11;\n    }\n  }\n  v7 = 1;\nLABEL_11:\n  if ( (v1 & 2) != 0 )\n  {\n    v1 &= ~2u;\n    sub_14003A830((__int64)Buf1);\n  }\n  if ( (v1 & 1) != 0 && v3 > 0xF )\n  {\n    v8 = (void *)Buf2;\n    if ( v3 + 1 >= 0x1000 )\n    {\n      v8 = *(void **)(Buf2 - 8);\n      if ( (unsigned __int64)(Buf2 - (_QWORD)v8 - 8) > 0x1F )\n        invalid_parameter_noinfo_noreturn();\n    }\n    j_j_free(v8);\n  }\n  return v7;\n}", "assembly": "; \n; LevelInfoLayer::shouldDownloadLevel from 0x1402f9e70 to 0x1402f9f9c (300 bytes)\n; \n; 4 xrefs:\n; > LevelInfoLayer::onPlay @ 0x1402fc47f\n; > LevelInfoLayer::onUpdate @ 0x1402fecef\n; > LevelInfoLayer::FLAlert_Clicked @ 0x1403003be\n; > <???> @ 0x1406d4148\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+arg_8], rbx                                               ; +0x0, 0x1402f9e70\nmov     [rsp+arg_10], rbp                                              ; +0x5, 0x1402f9e75\nmov     [rsp+arg_18], rsi                                              ; +0xa, 0x1402f9e7a\npush    rdi                                                            ; +0xf, 0x1402f9e7f\nsub     rsp, 70h                                                       ; +0x10, 0x1402f9e80\nmov     rax, cs:__security_cookie                                      ; +0x14, 0x1402f9e84\nxor     rax, rsp                                                       ; +0x1b, 0x1402f9e8b\nmov     [rsp+78h+var_10], rax                                          ; +0x1e, 0x1402f9e8e\nxor     ebp, ebp                                                       ; +0x23, 0x1402f9e93\nmov     ebx, ebp                                                       ; +0x25, 0x1402f9e95\nmov     [rsp+78h+var_58], ebx                                          ; +0x27, 0x1402f9e97\nmov     rdx, [rcx+1F0h]                                                ; +0x2b, 0x1402f9e9b\ncmp     dword ptr [rdx+454h], 4                                        ; +0x32, 0x1402f9ea2\njz      short loc_1402F9F19                                            ; +0x39, 0x1402f9ea9\nxorps   xmm0, xmm0                                                     ; +0x3b, 0x1402f9eab\nmovups  [rsp+78h+Buf2], xmm0                                           ; +0x3e, 0x1402f9eae\nmov     [rsp+78h+var_40], rbp                                          ; +0x43, 0x1402f9eb3\nmov     edi, 0Fh                                                       ; +0x48, 0x1402f9eb8\nmov     [rsp+78h+var_38], rdi                                          ; +0x4d, 0x1402f9ebd\nmov     byte ptr [rsp+78h+Buf2], bl                                    ; +0x52, 0x1402f9ec2\nmov     [rsp+78h+var_58], 1                                            ; +0x56, 0x1402f9ec6\nadd     rdx, 198h                                                      ; +0x5e, 0x1402f9ece\nlea     rcx, [rsp+78h+Buf1]                                            ; +0x65, 0x1402f9ed5\ncall    sub_14003BDB0                                                  ; +0x6a, 0x1402f9eda\nlea     ebx, [rbp+7]                                                   ; +0x6f, 0x1402f9edf\nlea     rcx, [rsp+78h+Buf1]                                            ; +0x72, 0x1402f9ee2\ncmp     [rsp+78h+var_18], rdi                                          ; +0x77, 0x1402f9ee7\ncmova   rcx, [rsp+78h+Buf1]; Buf1                                      ; +0x7c, 0x1402f9eec\nmov     rsi, [rsp+78h+var_20]                                          ; +0x82, 0x1402f9ef2\nmov     r8, rsi                                                        ; +0x87, 0x1402f9ef7\ntest    rsi, rsi                                                       ; +0x8a, 0x1402f9efa\ncmovnz  r8, rbp; Size                                                  ; +0x8d, 0x1402f9efd\nlea     rdx, [rsp+78h+Buf2]; Buf2                                      ; +0x91, 0x1402f9f01\ncall    memcmp                                                         ; +0x96, 0x1402f9f06\ntest    eax, eax                                                       ; +0x9b, 0x1402f9f0b\njnz     short loc_1402F9F14                                            ; +0x9d, 0x1402f9f0d\ntest    rsi, rsi                                                       ; +0x9f, 0x1402f9f0f\njz      short loc_1402F9F1E                                            ; +0xa2, 0x1402f9f12\nxor     sil, sil                                                       ; +0xa4, 0x1402f9f14\njmp     short loc_1402F9F21                                            ; +0xa7, 0x1402f9f17\nmov     rdi, [rsp+78h+var_38]                                          ; +0xa9, 0x1402f9f19\nmov     sil, 1                                                         ; +0xae, 0x1402f9f1e\ntest    bl, 2                                                          ; +0xb1, 0x1402f9f21\njz      short loc_1402F9F34                                            ; +0xb4, 0x1402f9f24\nand     ebx, 0FFFFFFFDh                                                ; +0xb6, 0x1402f9f26\nlea     rcx, [rsp+78h+Buf1]                                            ; +0xb9, 0x1402f9f29\ncall    sub_14003A830                                                  ; +0xbe, 0x1402f9f2e\nnop                                                                    ; +0xc3, 0x1402f9f33\ntest    bl, 1                                                          ; +0xc4, 0x1402f9f34\njz      short loc_1402F9F75                                            ; +0xc7, 0x1402f9f37\ncmp     rdi, 0Fh                                                       ; +0xc9, 0x1402f9f39\njbe     short loc_1402F9F75                                            ; +0xcd, 0x1402f9f3d\nlea     rdx, [rdi+1]                                                   ; +0xcf, 0x1402f9f3f\nmov     rcx, qword ptr [rsp+78h+Buf2]; Block                           ; +0xd3, 0x1402f9f43\nmov     rax, rcx                                                       ; +0xd8, 0x1402f9f48\ncmp     rdx, 1000h                                                     ; +0xdb, 0x1402f9f4b\njb      short loc_1402F9F70                                            ; +0xe2, 0x1402f9f52\nadd     rdx, 27h ; '''                                                 ; +0xe4, 0x1402f9f54\nmov     rcx, [rcx-8]                                                   ; +0xe8, 0x1402f9f58\nsub     rax, rcx                                                       ; +0xec, 0x1402f9f5c\nadd     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0xef, 0x1402f9f5f\ncmp     rax, 1Fh                                                       ; +0xf3, 0x1402f9f63\njbe     short loc_1402F9F70                                            ; +0xf7, 0x1402f9f67\ncall    cs:_invalid_parameter_noinfo_noreturn                          ; +0xf9, 0x1402f9f69\nalign 10h                                                              ; +0xff, 0x1402f9f6f\ncall    j_j_free                                                       ; +0x100, 0x1402f9f70\nmovzx   eax, sil                                                       ; +0x105, 0x1402f9f75\nmov     rcx, [rsp+78h+var_10]                                          ; +0x109, 0x1402f9f79\nxor     rcx, rsp; StackCookie                                          ; +0x10e, 0x1402f9f7e\ncall    __security_check_cookie                                        ; +0x111, 0x1402f9f81\nlea     r11, [rsp+78h+var_8]                                           ; +0x116, 0x1402f9f86\nmov     rbx, [r11+18h]                                                 ; +0x11b, 0x1402f9f8b\nmov     rbp, [r11+20h]                                                 ; +0x11f, 0x1402f9f8f\nmov     rsi, [r11+28h]                                                 ; +0x123, 0x1402f9f93\nmov     rsp, r11                                                       ; +0x127, 0x1402f9f97\npop     rdi                                                            ; +0x12a, 0x1402f9f9a\nretn                                                                   ; +0x12b, 0x1402f9f9b", "xrefs": ["LevelInfoLayer::onPlay @ 0x1402fc47f", "LevelInfoLayer::onUpdate @ 0x1402fecef", "LevelInfoLayer::FLAlert_Clicked @ 0x1403003be", "<???> @ 0x1406d4148"], "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"}