{"type": "func", "start": 4300138432, "end": 4300138711, "name": "GameToolbox::doWeHaveInternet", "pseudocode": "// \n// GameToolbox::doWeHaveInternet from 0x1004ee7c0 to 0x1004ee8d7 (279 bytes)\n// \n// 9 xrefs:\n// > GameManager::rateGame @ 0x100380759\n// > GameManager::likeFacebook @ 0x10038078c\n// > GameManager::followTwitter @ 0x1003807fc\n// > GameManager::subYouTube @ 0x10038086c\n// > GameManager::followTwitch @ 0x1003808dc\n// > GameManager::joinDiscord @ 0x10038094c\n// > GameManager::joinReddit @ 0x1003809bc\n// > MenuLayer::onTrailer @ 0x100392070\n// > SupportLayer::onEmail @ 0x100399c49\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\nbool __fastcall GameToolbox::doWeHaveInternet()\n{\n  bool result; // al\n  char *v1; // rbx\n  size_t v2; // rax\n  size_t v3; // r14\n  char *v4; // r15\n  size_t v5; // r12\n  __int64 v6; // r14\n  __int128 __dst; // [rsp+0h] [rbp-40h] BYREF\n  void *__p; // [rsp+10h] [rbp-30h]\n\n  result = PlatformToolbox::isNetworkAvailable();\n  if ( result )\n    return result;\n  v1 = (char *)operator new(0x1Au);\n  strcpy(v1, \"No Internet Connection.\");\n  v2 = strlen(v1);\n  if ( v2 >= 0xFFFFFFFFFFFFFFF8LL )\n    sub_100006BF0(1.144487745880128e243);\n  v3 = v2;\n  if ( v2 >= 0x17 )\n  {\n    v5 = 26;\n    if ( (v2 | 7) != 0x17 )\n      v5 = (v2 | 7) + 1;\n    v4 = (char *)operator new(v5);\n    __p = v4;\n    *(_QWORD *)&__dst = v5 | 1;\n    *((_QWORD *)&__dst + 1) = v3;\n  }\n  else\n  {\n    LOBYTE(__dst) = 2 * v2;\n    v4 = (char *)&__dst + 1;\n    if ( !v2 )\n      goto LABEL_10;\n  }\n  memcpy(v4, v1, v3);\nLABEL_10:\n  v4[v3] = 0;\n  v6 = sub_10049B0F0(0, (__int64)\"Error\", &__dst, (__int64)\"OK\", 0, 1.144487745880128e243);\n  if ( (__dst & 1) != 0 )\n    operator delete(__p);\n  (*(void (__fastcall **)(__int64))(*(_QWORD *)v6 + 1288LL))(v6);\n  operator delete(v1);\n  return 0;\n}", "assembly": "; \n; GameToolbox::doWeHaveInternet from 0x1004ee7c0 to 0x1004ee8d7 (279 bytes)\n; \n; 9 xrefs:\n; > GameManager::rateGame @ 0x100380759\n; > GameManager::likeFacebook @ 0x10038078c\n; > GameManager::followTwitter @ 0x1003807fc\n; > GameManager::subYouTube @ 0x10038086c\n; > GameManager::followTwitch @ 0x1003808dc\n; > GameManager::joinDiscord @ 0x10038094c\n; > GameManager::joinReddit @ 0x1003809bc\n; > MenuLayer::onTrailer @ 0x100392070\n; > SupportLayer::onEmail @ 0x100399c49\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\npush    rbp                                                            ; +0x0, 0x1004ee7c0\nmov     rbp, rsp                                                       ; +0x1, 0x1004ee7c1\npush    r15                                                            ; +0x4, 0x1004ee7c4\npush    r14                                                            ; +0x6, 0x1004ee7c6\npush    r13                                                            ; +0x8, 0x1004ee7c8\npush    r12                                                            ; +0xa, 0x1004ee7ca\npush    rbx                                                            ; +0xc, 0x1004ee7cc\nsub     rsp, 18h                                                       ; +0xd, 0x1004ee7cd\ncall    PlatformToolbox__isNetworkAvailable                            ; +0x11, 0x1004ee7d1\ntest    al, al                                                         ; +0x16, 0x1004ee7d6\njnz     loc_1004EE8C3                                                  ; +0x18, 0x1004ee7d8\nmov     r13d, eax                                                      ; +0x1e, 0x1004ee7de\nmov     edi, 1Ah; __sz                                                 ; +0x21, 0x1004ee7e1\ncall    __Znwm; operator new(ulong)                                    ; +0x26, 0x1004ee7e6\nmov     rbx, rax                                                       ; +0x2b, 0x1004ee7eb\nmov     rax, 2E6E6F697463656Eh                                         ; +0x2e, 0x1004ee7ee\nmov     [rbx+0Fh], rax                                                 ; +0x38, 0x1004ee7f8\nmovups  xmm0, xmmword ptr cs:aNoInternetConn; \"No Internet Connection.\" ; +0x3c, 0x1004ee7fc\nmovups  xmmword ptr [rbx], xmm0                                        ; +0x43, 0x1004ee803\nmov     byte ptr [rbx+17h], 0                                          ; +0x46, 0x1004ee806\nmov     rdi, rbx; __s                                                  ; +0x4a, 0x1004ee80a\ncall    _strlen                                                        ; +0x4d, 0x1004ee80d\ncmp     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0x52, 0x1004ee812\njnb     loc_1004EE8D2                                                  ; +0x56, 0x1004ee816\nmov     r14, rax                                                       ; +0x5c, 0x1004ee81c\ncmp     rax, 17h                                                       ; +0x5f, 0x1004ee81f\njnb     short loc_1004EE837                                            ; +0x63, 0x1004ee823\nlea     eax, [r14+r14]                                                 ; +0x65, 0x1004ee825\nmov     byte ptr [rbp+__dst], al                                       ; +0x69, 0x1004ee829\nlea     r15, [rbp+__dst+1]                                             ; +0x6c, 0x1004ee82c\ntest    r14, r14                                                       ; +0x70, 0x1004ee830\njnz     short loc_1004EE86B                                            ; +0x73, 0x1004ee833\njmp     short loc_1004EE879                                            ; +0x75, 0x1004ee835\nmov     rax, r14                                                       ; +0x77, 0x1004ee837\nor      rax, 7                                                         ; +0x7a, 0x1004ee83a\nlea     rcx, [rax+1]                                                   ; +0x7e, 0x1004ee83e\ncmp     rax, 17h                                                       ; +0x82, 0x1004ee842\nmov     r12d, 1Ah                                                      ; +0x86, 0x1004ee846\ncmovnz  r12, rcx                                                       ; +0x8c, 0x1004ee84c\nmov     rdi, r12; __sz                                                 ; +0x90, 0x1004ee850\ncall    __Znwm; operator new(ulong)                                    ; +0x93, 0x1004ee853\nmov     r15, rax                                                       ; +0x98, 0x1004ee858\nmov     [rbp+__p], rax                                                 ; +0x9b, 0x1004ee85b\nor      r12, 1                                                         ; +0x9f, 0x1004ee85f\nmov     [rbp+__dst], r12                                               ; +0xa3, 0x1004ee863\nmov     [rbp+var_38], r14                                              ; +0xa7, 0x1004ee867\nmov     rdi, r15; __dst                                                ; +0xab, 0x1004ee86b\nmov     rsi, rbx; __src                                                ; +0xae, 0x1004ee86e\nmov     rdx, r14; __n                                                  ; +0xb1, 0x1004ee871\ncall    _memcpy                                                        ; +0xb4, 0x1004ee874\nmov     byte ptr [r15+r14], 0                                          ; +0xb9, 0x1004ee879\nlea     rsi, aError; \"Error\"                                           ; +0xbe, 0x1004ee87e\nlea     rcx, aOk; \"OK\"                                                 ; +0xc5, 0x1004ee885\nlea     rdx, [rbp+__dst]                                               ; +0xcc, 0x1004ee88c\nxor     edi, edi                                                       ; +0xd0, 0x1004ee890\nxor     r8d, r8d                                                       ; +0xd2, 0x1004ee892\ncall    sub_10049B0F0                                                  ; +0xd5, 0x1004ee895\nmov     r14, rax                                                       ; +0xda, 0x1004ee89a\ntest    byte ptr [rbp+__dst], 1                                        ; +0xdd, 0x1004ee89d\njz      short loc_1004EE8AC                                            ; +0xe1, 0x1004ee8a1\nmov     rdi, [rbp+__p]; __p                                            ; +0xe3, 0x1004ee8a3\ncall    __ZdlPv; operator delete(void *)                               ; +0xe7, 0x1004ee8a7\nmov     rax, [r14]                                                     ; +0xec, 0x1004ee8ac\nmov     rdi, r14                                                       ; +0xef, 0x1004ee8af\ncall    qword ptr [rax+508h]                                           ; +0xf2, 0x1004ee8b2\nmov     rdi, rbx; __p                                                  ; +0xf8, 0x1004ee8b8\ncall    __ZdlPv; operator delete(void *)                               ; +0xfb, 0x1004ee8bb\nmov     eax, r13d                                                      ; +0x100, 0x1004ee8c0\nadd     rsp, 18h                                                       ; +0x103, 0x1004ee8c3\npop     rbx                                                            ; +0x107, 0x1004ee8c7\npop     r12                                                            ; +0x108, 0x1004ee8c8\npop     r13                                                            ; +0x10a, 0x1004ee8ca\npop     r14                                                            ; +0x10c, 0x1004ee8cc\npop     r15                                                            ; +0x10e, 0x1004ee8ce\npop     rbp                                                            ; +0x110, 0x1004ee8d0\nretn                                                                   ; +0x111, 0x1004ee8d1\ncall    sub_100006BF0                                                  ; +0x112, 0x1004ee8d2", "xrefs": ["GameManager::rateGame @ 0x100380759", "GameManager::likeFacebook @ 0x10038078c", "GameManager::followTwitter @ 0x1003807fc", "GameManager::subYouTube @ 0x10038086c", "GameManager::followTwitch @ 0x1003808dc", "GameManager::joinDiscord @ 0x10038094c", "GameManager::joinReddit @ 0x1003809bc", "MenuLayer::onTrailer @ 0x100392070", "SupportLayer::onEmail @ 0x100399c49"], "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"}