{"type": "func", "start": 6443745332, "end": 6443745460, "name": "_validdrive", "pseudocode": "// \n// _validdrive from 0x18013c034 to 0x18013c0b4 (128 bytes)\n// \n// 2 xrefs:\n// > common_getdcwd<wchar_t> @ 0x18013bf25\n// > <???> @ 0x180203998\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__int64 __fastcall validdrive(unsigned int a1)\n{\n  unsigned int v2; // ebx\n  WCHAR RootPathName; // [rsp+20h] [rbp-18h] BYREF\n  int v4; // [rsp+22h] [rbp-16h]\n  __int16 v5; // [rsp+26h] [rbp-12h]\n\n  if ( a1 <= 0x1A )\n  {\n    v2 = 0;\n    if ( a1 )\n    {\n      v4 = 6029370;\n      RootPathName = a1 + 64;\n      v5 = 0;\n      LOBYTE(v2) = GetDriveTypeW(&RootPathName) >= 2;\n      return v2;\n    }\n    else\n    {\n      return 1;\n    }\n  }\n  else\n  {\n    *_doserrno() = 15;\n    *errno() = 13;\n    invalid_parameter_noinfo();\n    return 0;\n  }\n}", "assembly": "; \n; _validdrive from 0x18013c034 to 0x18013c0b4 (128 bytes)\n; \n; 2 xrefs:\n; > common_getdcwd<wchar_t> @ 0x18013bf25\n; > <???> @ 0x180203998\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    rbx                                                            ; +0x0, 0x18013c034\nsub     rsp, 30h                                                       ; +0x2, 0x18013c036\nmov     rax, cs:__security_cookie                                      ; +0x6, 0x18013c03a\nxor     rax, rsp                                                       ; +0xd, 0x18013c041\nmov     [rsp+38h+var_10], rax                                          ; +0x10, 0x18013c044\ncmp     ecx, 1Ah                                                       ; +0x15, 0x18013c049\njbe     short loc_18013C06D                                            ; +0x18, 0x18013c04c\ncall    __doserrno                                                     ; +0x1a, 0x18013c04e\nmov     dword ptr [rax], 0Fh                                           ; +0x1f, 0x18013c053\ncall    _errno                                                         ; +0x25, 0x18013c059\nmov     dword ptr [rax], 0Dh                                           ; +0x2a, 0x18013c05e\ncall    _invalid_parameter_noinfo                                      ; +0x30, 0x18013c064\nxor     eax, eax                                                       ; +0x35, 0x18013c069\njmp     short loc_18013C0A1                                            ; +0x37, 0x18013c06b\nxor     ebx, ebx                                                       ; +0x39, 0x18013c06d\ntest    ecx, ecx                                                       ; +0x3b, 0x18013c06f\njnz     short loc_18013C078                                            ; +0x3d, 0x18013c071\nlea     eax, [rbx+1]                                                   ; +0x3f, 0x18013c073\njmp     short loc_18013C0A1                                            ; +0x42, 0x18013c076\nadd     cx, 40h ; '@'                                                  ; +0x44, 0x18013c078\nmov     [rsp+38h+var_16], 5C003Ah                                      ; +0x48, 0x18013c07c\nmov     [rsp+38h+RootPathName], cx                                     ; +0x50, 0x18013c084\nlea     rcx, [rsp+38h+RootPathName]; lpRootPathName                    ; +0x55, 0x18013c089\nmov     [rsp+38h+var_12], bx                                           ; +0x5a, 0x18013c08e\ncall    cs:GetDriveTypeW                                               ; +0x5f, 0x18013c093\ncmp     eax, 2                                                         ; +0x65, 0x18013c099\nsetnb   bl                                                             ; +0x68, 0x18013c09c\nmov     eax, ebx                                                       ; +0x6b, 0x18013c09f\nmov     rcx, [rsp+38h+var_10]                                          ; +0x6d, 0x18013c0a1\nxor     rcx, rsp; StackCookie                                          ; +0x72, 0x18013c0a6\ncall    __security_check_cookie                                        ; +0x75, 0x18013c0a9\nadd     rsp, 30h                                                       ; +0x7a, 0x18013c0ae\npop     rbx                                                            ; +0x7e, 0x18013c0b2\nretn                                                                   ; +0x7f, 0x18013c0b3", "xrefs": ["common_getdcwd<wchar_t> @ 0x18013bf25", "<???> @ 0x180203998"], "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"}