{"type": "func", "start": 6443669056, "end": 6443669155, "name": "get_drive_number_from_path", "pseudocode": "// \n// get_drive_number_from_path from 0x180129640 to 0x1801296a3 (99 bytes)\n// \n// 3 xrefs:\n// > common_stat<_stat64i32> @ 0x1801291cd\n// > common_stat_handle_file_opened<_stat64i32> @ 0x180129277\n// > <???> @ 0x180202aa4\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\nchar __fastcall get_drive_number_from_path(const wchar_t *const a1, int *a2)\n{\n  int v3; // r8d\n  int v5; // ecx\n  int v6; // ecx\n\n  *a2 = 0;\n  v3 = *a1;\n  if ( ((unsigned int)(v3 - 65) <= 0x19 || (unsigned int)(v3 - 97) <= 0x19) && a1[1] == 58 )\n  {\n    if ( !a1[2] )\n    {\n      _acrt_errno_map_os_error(2);\n      return 0;\n    }\n    v5 = v3 + 32;\n    if ( (unsigned int)(v3 - 65) > 0x19 )\n      v5 = v3;\n    v6 = v5 - 96;\n  }\n  else\n  {\n    v6 = getdrive();\n  }\n  *a2 = v6;\n  return 1;\n}", "assembly": "; \n; get_drive_number_from_path from 0x180129640 to 0x1801296a3 (99 bytes)\n; \n; 3 xrefs:\n; > common_stat<_stat64i32> @ 0x1801291cd\n; > common_stat_handle_file_opened<_stat64i32> @ 0x180129277\n; > <???> @ 0x180202aa4\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, 0x180129640\nsub     rsp, 20h                                                       ; +0x2, 0x180129642\nmov     rbx, rdx                                                       ; +0x6, 0x180129646\nxor     edx, edx                                                       ; +0x9, 0x180129649\nmov     [rbx], edx                                                     ; +0xb, 0x18012964b\nmovzx   r8d, word ptr [rcx]                                            ; +0xd, 0x18012964d\nlea     eax, [r8-41h]                                                  ; +0x11, 0x180129651\ncmp     eax, 19h                                                       ; +0x15, 0x180129655\njbe     short loc_180129663                                            ; +0x18, 0x180129658\nlea     eax, [r8-61h]                                                  ; +0x1a, 0x18012965a\ncmp     eax, 19h                                                       ; +0x1e, 0x18012965e\nja      short loc_180129692                                            ; +0x21, 0x180129661\ncmp     word ptr [rcx+2], 3Ah ; ':'                                    ; +0x23, 0x180129663\njnz     short loc_180129692                                            ; +0x28, 0x180129668\ncmp     [rcx+4], dx                                                    ; +0x2a, 0x18012966a\njnz     short loc_18012967E                                            ; +0x2e, 0x18012966e\nmov     ecx, 2                                                         ; +0x30, 0x180129670\ncall    __acrt_errno_map_os_error                                      ; +0x35, 0x180129675\nxor     al, al                                                         ; +0x3a, 0x18012967a\njmp     short loc_18012969D                                            ; +0x3c, 0x18012967c\nlea     eax, [r8-41h]                                                  ; +0x3e, 0x18012967e\ncmp     eax, 19h                                                       ; +0x42, 0x180129682\nlea     ecx, [r8+20h]                                                  ; +0x45, 0x180129685\ncmova   ecx, r8d                                                       ; +0x49, 0x180129689\nsub     ecx, 60h ; '`'                                                 ; +0x4d, 0x18012968d\njmp     short loc_180129699                                            ; +0x50, 0x180129690\ncall    _getdrive                                                      ; +0x52, 0x180129692\nmov     ecx, eax                                                       ; +0x57, 0x180129697\nmov     [rbx], ecx                                                     ; +0x59, 0x180129699\nmov     al, 1                                                          ; +0x5b, 0x18012969b\nadd     rsp, 20h                                                       ; +0x5d, 0x18012969d\npop     rbx                                                            ; +0x61, 0x1801296a1\nretn                                                                   ; +0x62, 0x1801296a2", "xrefs": ["common_stat<_stat64i32> @ 0x1801291cd", "common_stat_handle_file_opened<_stat64i32> @ 0x180129277", "<???> @ 0x180202aa4"], "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"}