PageRenderTime 54ms CodeModel.GetById 15ms RepoModel.GetById 0ms app.codeStats 1ms

/src/freebsd/contrib/tcpdump/smbutil.c

https://bitbucket.org/killerpenguinassassins/open_distrib_devel
C | 1590 lines | 1428 code | 94 blank | 68 comment | 143 complexity | 0f3ff0ba870324c43910df3a0dd06333 MD5 | raw file
Possible License(s): CC0-1.0, MIT, LGPL-2.0, LGPL-3.0, WTFPL, GPL-2.0, BSD-2-Clause, AGPL-3.0, CC-BY-SA-3.0, MPL-2.0, JSON, BSD-3-Clause-No-Nuclear-License-2014, LGPL-2.1, CPL-1.0, AGPL-1.0, 0BSD, ISC, Apache-2.0, GPL-3.0, IPL-1.0, MPL-2.0-no-copyleft-exception, BSD-3-Clause
  1. /*
  2. * Copyright (C) Andrew Tridgell 1995-1999
  3. *
  4. * This software may be distributed either under the terms of the
  5. * BSD-style license that accompanies tcpdump or the GNU GPL version 2
  6. * or later
  7. */
  8. #ifdef HAVE_CONFIG_H
  9. #include "config.h"
  10. #endif
  11. #ifndef lint
  12. static const char rcsid[] _U_ =
  13. "@(#) $Header: /tcpdump/master/tcpdump/smbutil.c,v 1.39 2007-07-15 19:07:39 guy Exp $";
  14. #endif
  15. #include <tcpdump-stdinc.h>
  16. #include <stdio.h>
  17. #include <stdlib.h>
  18. #include <string.h>
  19. #include "interface.h"
  20. #include "extract.h"
  21. #include "smb.h"
  22. static u_int32_t stringlen;
  23. extern const u_char *startbuf;
  24. /*
  25. * interpret a 32 bit dos packed date/time to some parameters
  26. */
  27. static void
  28. interpret_dos_date(u_int32_t date, struct tm *tp)
  29. {
  30. u_int32_t p0, p1, p2, p3;
  31. p0 = date & 0xFF;
  32. p1 = ((date & 0xFF00) >> 8) & 0xFF;
  33. p2 = ((date & 0xFF0000) >> 16) & 0xFF;
  34. p3 = ((date & 0xFF000000) >> 24) & 0xFF;
  35. tp->tm_sec = 2 * (p0 & 0x1F);
  36. tp->tm_min = ((p0 >> 5) & 0xFF) + ((p1 & 0x7) << 3);
  37. tp->tm_hour = (p1 >> 3) & 0xFF;
  38. tp->tm_mday = (p2 & 0x1F);
  39. tp->tm_mon = ((p2 >> 5) & 0xFF) + ((p3 & 0x1) << 3) - 1;
  40. tp->tm_year = ((p3 >> 1) & 0xFF) + 80;
  41. }
  42. /*
  43. * common portion:
  44. * create a unix date from a dos date
  45. */
  46. static time_t
  47. int_unix_date(u_int32_t dos_date)
  48. {
  49. struct tm t;
  50. if (dos_date == 0)
  51. return(0);
  52. interpret_dos_date(dos_date, &t);
  53. t.tm_wday = 1;
  54. t.tm_yday = 1;
  55. t.tm_isdst = 0;
  56. return (mktime(&t));
  57. }
  58. /*
  59. * create a unix date from a dos date
  60. * in network byte order
  61. */
  62. static time_t
  63. make_unix_date(const u_char *date_ptr)
  64. {
  65. u_int32_t dos_date = 0;
  66. dos_date = EXTRACT_LE_32BITS(date_ptr);
  67. return int_unix_date(dos_date);
  68. }
  69. /*
  70. * create a unix date from a dos date
  71. * in halfword-swapped network byte order!
  72. */
  73. static time_t
  74. make_unix_date2(const u_char *date_ptr)
  75. {
  76. u_int32_t x, x2;
  77. x = EXTRACT_LE_32BITS(date_ptr);
  78. x2 = ((x & 0xFFFF) << 16) | ((x & 0xFFFF0000) >> 16);
  79. return int_unix_date(x2);
  80. }
  81. /*
  82. * interpret an 8 byte "filetime" structure to a time_t
  83. * It's originally in "100ns units since jan 1st 1601"
  84. */
  85. static time_t
  86. interpret_long_date(const u_char *p)
  87. {
  88. double d;
  89. time_t ret;
  90. /* this gives us seconds since jan 1st 1601 (approx) */
  91. d = (EXTRACT_LE_32BITS(p + 4) * 256.0 + p[3]) * (1.0e-7 * (1 << 24));
  92. /* now adjust by 369 years to make the secs since 1970 */
  93. d -= 369.0 * 365.25 * 24 * 60 * 60;
  94. /* and a fudge factor as we got it wrong by a few days */
  95. d += (3 * 24 * 60 * 60 + 6 * 60 * 60 + 2);
  96. if (d < 0)
  97. return(0);
  98. ret = (time_t)d;
  99. return(ret);
  100. }
  101. /*
  102. * interpret the weird netbios "name". Return the name type, or -1 if
  103. * we run past the end of the buffer
  104. */
  105. static int
  106. name_interpret(const u_char *in, const u_char *maxbuf, char *out)
  107. {
  108. int ret;
  109. int len;
  110. if (in >= maxbuf)
  111. return(-1); /* name goes past the end of the buffer */
  112. TCHECK2(*in, 1);
  113. len = (*in++) / 2;
  114. *out=0;
  115. if (len > 30 || len < 1)
  116. return(0);
  117. while (len--) {
  118. TCHECK2(*in, 2);
  119. if (in + 1 >= maxbuf)
  120. return(-1); /* name goes past the end of the buffer */
  121. if (in[0] < 'A' || in[0] > 'P' || in[1] < 'A' || in[1] > 'P') {
  122. *out = 0;
  123. return(0);
  124. }
  125. *out = ((in[0] - 'A') << 4) + (in[1] - 'A');
  126. in += 2;
  127. out++;
  128. }
  129. *out = 0;
  130. ret = out[-1];
  131. return(ret);
  132. trunc:
  133. return(-1);
  134. }
  135. /*
  136. * find a pointer to a netbios name
  137. */
  138. static const u_char *
  139. name_ptr(const u_char *buf, int ofs, const u_char *maxbuf)
  140. {
  141. const u_char *p;
  142. u_char c;
  143. p = buf + ofs;
  144. if (p >= maxbuf)
  145. return(NULL); /* name goes past the end of the buffer */
  146. TCHECK2(*p, 1);
  147. c = *p;
  148. /* XXX - this should use the same code that the DNS dissector does */
  149. if ((c & 0xC0) == 0xC0) {
  150. u_int16_t l;
  151. TCHECK2(*p, 2);
  152. if ((p + 1) >= maxbuf)
  153. return(NULL); /* name goes past the end of the buffer */
  154. l = EXTRACT_16BITS(p) & 0x3FFF;
  155. if (l == 0) {
  156. /* We have a pointer that points to itself. */
  157. return(NULL);
  158. }
  159. p = buf + l;
  160. if (p >= maxbuf)
  161. return(NULL); /* name goes past the end of the buffer */
  162. TCHECK2(*p, 1);
  163. }
  164. return(p);
  165. trunc:
  166. return(NULL); /* name goes past the end of the buffer */
  167. }
  168. /*
  169. * extract a netbios name from a buf
  170. */
  171. static int
  172. name_extract(const u_char *buf, int ofs, const u_char *maxbuf, char *name)
  173. {
  174. const u_char *p = name_ptr(buf, ofs, maxbuf);
  175. if (p == NULL)
  176. return(-1); /* error (probably name going past end of buffer) */
  177. name[0] = '\0';
  178. return(name_interpret(p, maxbuf, name));
  179. }
  180. /*
  181. * return the total storage length of a mangled name
  182. */
  183. static int
  184. name_len(const unsigned char *s, const unsigned char *maxbuf)
  185. {
  186. const unsigned char *s0 = s;
  187. unsigned char c;
  188. if (s >= maxbuf)
  189. return(-1); /* name goes past the end of the buffer */
  190. TCHECK2(*s, 1);
  191. c = *s;
  192. if ((c & 0xC0) == 0xC0)
  193. return(2);
  194. while (*s) {
  195. if (s >= maxbuf)
  196. return(-1); /* name goes past the end of the buffer */
  197. TCHECK2(*s, 1);
  198. s += (*s) + 1;
  199. }
  200. return(PTR_DIFF(s, s0) + 1);
  201. trunc:
  202. return(-1); /* name goes past the end of the buffer */
  203. }
  204. static void
  205. print_asc(const unsigned char *buf, int len)
  206. {
  207. int i;
  208. for (i = 0; i < len; i++)
  209. safeputchar(buf[i]);
  210. }
  211. static const char *
  212. name_type_str(int name_type)
  213. {
  214. const char *f = NULL;
  215. switch (name_type) {
  216. case 0: f = "Workstation"; break;
  217. case 0x03: f = "Client?"; break;
  218. case 0x20: f = "Server"; break;
  219. case 0x1d: f = "Master Browser"; break;
  220. case 0x1b: f = "Domain Controller"; break;
  221. case 0x1e: f = "Browser Server"; break;
  222. default: f = "Unknown"; break;
  223. }
  224. return(f);
  225. }
  226. void
  227. print_data(const unsigned char *buf, int len)
  228. {
  229. int i = 0;
  230. if (len <= 0)
  231. return;
  232. printf("[%03X] ", i);
  233. for (i = 0; i < len; /*nothing*/) {
  234. TCHECK(buf[i]);
  235. printf("%02X ", buf[i] & 0xff);
  236. i++;
  237. if (i%8 == 0)
  238. printf(" ");
  239. if (i % 16 == 0) {
  240. print_asc(&buf[i - 16], 8);
  241. printf(" ");
  242. print_asc(&buf[i - 8], 8);
  243. printf("\n");
  244. if (i < len)
  245. printf("[%03X] ", i);
  246. }
  247. }
  248. if (i % 16) {
  249. int n;
  250. n = 16 - (i % 16);
  251. printf(" ");
  252. if (n>8)
  253. printf(" ");
  254. while (n--)
  255. printf(" ");
  256. n = SMBMIN(8, i % 16);
  257. print_asc(&buf[i - (i % 16)], n);
  258. printf(" ");
  259. n = (i % 16) - n;
  260. if (n > 0)
  261. print_asc(&buf[i - n], n);
  262. printf("\n");
  263. }
  264. return;
  265. trunc:
  266. printf("\n");
  267. printf("WARNING: Short packet. Try increasing the snap length\n");
  268. }
  269. static void
  270. write_bits(unsigned int val, const char *fmt)
  271. {
  272. const char *p = fmt;
  273. int i = 0;
  274. while ((p = strchr(fmt, '|'))) {
  275. size_t l = PTR_DIFF(p, fmt);
  276. if (l && (val & (1 << i)))
  277. printf("%.*s ", (int)l, fmt);
  278. fmt = p + 1;
  279. i++;
  280. }
  281. }
  282. /* convert a UCS2 string into iso-8859-1 string */
  283. #define MAX_UNISTR_SIZE 1000
  284. static const char *
  285. unistr(const u_char *s, u_int32_t *len, int use_unicode)
  286. {
  287. static char buf[MAX_UNISTR_SIZE+1];
  288. size_t l = 0;
  289. u_int32_t strsize;
  290. const u_char *sp;
  291. if (use_unicode) {
  292. /*
  293. * Skip padding that puts the string on an even boundary.
  294. */
  295. if (((s - startbuf) % 2) != 0) {
  296. TCHECK(s[0]);
  297. s++;
  298. }
  299. }
  300. if (*len == 0) {
  301. /*
  302. * Null-terminated string.
  303. */
  304. strsize = 0;
  305. sp = s;
  306. if (!use_unicode) {
  307. for (;;) {
  308. TCHECK(sp[0]);
  309. *len += 1;
  310. if (sp[0] == 0)
  311. break;
  312. sp++;
  313. }
  314. strsize = *len - 1;
  315. } else {
  316. for (;;) {
  317. TCHECK2(sp[0], 2);
  318. *len += 2;
  319. if (sp[0] == 0 && sp[1] == 0)
  320. break;
  321. sp += 2;
  322. }
  323. strsize = *len - 2;
  324. }
  325. } else {
  326. /*
  327. * Counted string.
  328. */
  329. strsize = *len;
  330. }
  331. if (!use_unicode) {
  332. while (strsize != 0) {
  333. TCHECK(s[0]);
  334. if (l >= MAX_UNISTR_SIZE)
  335. break;
  336. if (isprint(s[0]))
  337. buf[l] = s[0];
  338. else {
  339. if (s[0] == 0)
  340. break;
  341. buf[l] = '.';
  342. }
  343. l++;
  344. s++;
  345. strsize--;
  346. }
  347. } else {
  348. while (strsize != 0) {
  349. TCHECK2(s[0], 2);
  350. if (l >= MAX_UNISTR_SIZE)
  351. break;
  352. if (s[1] == 0 && isprint(s[0])) {
  353. /* It's a printable ASCII character */
  354. buf[l] = s[0];
  355. } else {
  356. /* It's a non-ASCII character or a non-printable ASCII character */
  357. if (s[0] == 0 && s[1] == 0)
  358. break;
  359. buf[l] = '.';
  360. }
  361. l++;
  362. s += 2;
  363. if (strsize == 1)
  364. break;
  365. strsize -= 2;
  366. }
  367. }
  368. buf[l] = 0;
  369. return buf;
  370. trunc:
  371. return NULL;
  372. }
  373. static const u_char *
  374. smb_fdata1(const u_char *buf, const char *fmt, const u_char *maxbuf,
  375. int unicodestr)
  376. {
  377. int reverse = 0;
  378. const char *attrib_fmt = "READONLY|HIDDEN|SYSTEM|VOLUME|DIR|ARCHIVE|";
  379. while (*fmt && buf<maxbuf) {
  380. switch (*fmt) {
  381. case 'a':
  382. TCHECK(buf[0]);
  383. write_bits(buf[0], attrib_fmt);
  384. buf++;
  385. fmt++;
  386. break;
  387. case 'A':
  388. TCHECK2(buf[0], 2);
  389. write_bits(EXTRACT_LE_16BITS(buf), attrib_fmt);
  390. buf += 2;
  391. fmt++;
  392. break;
  393. case '{':
  394. {
  395. char bitfmt[128];
  396. char *p;
  397. int l;
  398. p = strchr(++fmt, '}');
  399. l = PTR_DIFF(p, fmt);
  400. if ((unsigned int)l > sizeof(bitfmt) - 1)
  401. l = sizeof(bitfmt)-1;
  402. strncpy(bitfmt, fmt, l);
  403. bitfmt[l] = '\0';
  404. fmt = p + 1;
  405. TCHECK(buf[0]);
  406. write_bits(buf[0], bitfmt);
  407. buf++;
  408. break;
  409. }
  410. case 'P':
  411. {
  412. int l = atoi(fmt + 1);
  413. TCHECK2(buf[0], l);
  414. buf += l;
  415. fmt++;
  416. while (isdigit((unsigned char)*fmt))
  417. fmt++;
  418. break;
  419. }
  420. case 'r':
  421. reverse = !reverse;
  422. fmt++;
  423. break;
  424. case 'b':
  425. {
  426. unsigned int x;
  427. TCHECK(buf[0]);
  428. x = buf[0];
  429. printf("%u (0x%x)", x, x);
  430. buf += 1;
  431. fmt++;
  432. break;
  433. }
  434. case 'd':
  435. {
  436. unsigned int x;
  437. TCHECK2(buf[0], 2);
  438. x = reverse ? EXTRACT_16BITS(buf) :
  439. EXTRACT_LE_16BITS(buf);
  440. printf("%d (0x%x)", x, x);
  441. buf += 2;
  442. fmt++;
  443. break;
  444. }
  445. case 'D':
  446. {
  447. unsigned int x;
  448. TCHECK2(buf[0], 4);
  449. x = reverse ? EXTRACT_32BITS(buf) :
  450. EXTRACT_LE_32BITS(buf);
  451. printf("%d (0x%x)", x, x);
  452. buf += 4;
  453. fmt++;
  454. break;
  455. }
  456. case 'L':
  457. {
  458. u_int64_t x;
  459. TCHECK2(buf[0], 8);
  460. x = reverse ? EXTRACT_64BITS(buf) :
  461. EXTRACT_LE_64BITS(buf);
  462. printf("%" PRIu64 " (0x%" PRIx64 ")", x, x);
  463. buf += 8;
  464. fmt++;
  465. break;
  466. }
  467. case 'M':
  468. {
  469. /* Weird mixed-endian length values in 64-bit locks */
  470. u_int32_t x1, x2;
  471. u_int64_t x;
  472. TCHECK2(buf[0], 8);
  473. x1 = reverse ? EXTRACT_32BITS(buf) :
  474. EXTRACT_LE_32BITS(buf);
  475. x2 = reverse ? EXTRACT_32BITS(buf + 4) :
  476. EXTRACT_LE_32BITS(buf + 4);
  477. x = (((u_int64_t)x1) << 32) | x2;
  478. printf("%" PRIu64 " (0x%" PRIx64 ")", x, x);
  479. buf += 8;
  480. fmt++;
  481. break;
  482. }
  483. case 'B':
  484. {
  485. unsigned int x;
  486. TCHECK(buf[0]);
  487. x = buf[0];
  488. printf("0x%X", x);
  489. buf += 1;
  490. fmt++;
  491. break;
  492. }
  493. case 'w':
  494. {
  495. unsigned int x;
  496. TCHECK2(buf[0], 2);
  497. x = reverse ? EXTRACT_16BITS(buf) :
  498. EXTRACT_LE_16BITS(buf);
  499. printf("0x%X", x);
  500. buf += 2;
  501. fmt++;
  502. break;
  503. }
  504. case 'W':
  505. {
  506. unsigned int x;
  507. TCHECK2(buf[0], 4);
  508. x = reverse ? EXTRACT_32BITS(buf) :
  509. EXTRACT_LE_32BITS(buf);
  510. printf("0x%X", x);
  511. buf += 4;
  512. fmt++;
  513. break;
  514. }
  515. case 'l':
  516. {
  517. fmt++;
  518. switch (*fmt) {
  519. case 'b':
  520. TCHECK(buf[0]);
  521. stringlen = buf[0];
  522. printf("%u", stringlen);
  523. buf += 1;
  524. break;
  525. case 'd':
  526. TCHECK2(buf[0], 2);
  527. stringlen = reverse ? EXTRACT_16BITS(buf) :
  528. EXTRACT_LE_16BITS(buf);
  529. printf("%u", stringlen);
  530. buf += 2;
  531. break;
  532. case 'D':
  533. TCHECK2(buf[0], 4);
  534. stringlen = reverse ? EXTRACT_32BITS(buf) :
  535. EXTRACT_LE_32BITS(buf);
  536. printf("%u", stringlen);
  537. buf += 4;
  538. break;
  539. }
  540. fmt++;
  541. break;
  542. }
  543. case 'S':
  544. case 'R': /* like 'S', but always ASCII */
  545. {
  546. /*XXX unistr() */
  547. const char *s;
  548. u_int32_t len;
  549. len = 0;
  550. s = unistr(buf, &len, (*fmt == 'R') ? 0 : unicodestr);
  551. if (s == NULL)
  552. goto trunc;
  553. printf("%s", s);
  554. buf += len;
  555. fmt++;
  556. break;
  557. }
  558. case 'Z':
  559. case 'Y': /* like 'Z', but always ASCII */
  560. {
  561. const char *s;
  562. u_int32_t len;
  563. TCHECK(*buf);
  564. if (*buf != 4 && *buf != 2) {
  565. printf("Error! ASCIIZ buffer of type %u", *buf);
  566. return maxbuf; /* give up */
  567. }
  568. len = 0;
  569. s = unistr(buf + 1, &len, (*fmt == 'Y') ? 0 : unicodestr);
  570. if (s == NULL)
  571. goto trunc;
  572. printf("%s", s);
  573. buf += len + 1;
  574. fmt++;
  575. break;
  576. }
  577. case 's':
  578. {
  579. int l = atoi(fmt + 1);
  580. TCHECK2(*buf, l);
  581. printf("%-*.*s", l, l, buf);
  582. buf += l;
  583. fmt++;
  584. while (isdigit((unsigned char)*fmt))
  585. fmt++;
  586. break;
  587. }
  588. case 'c':
  589. {
  590. TCHECK2(*buf, stringlen);
  591. printf("%-*.*s", (int)stringlen, (int)stringlen, buf);
  592. buf += stringlen;
  593. fmt++;
  594. while (isdigit((unsigned char)*fmt))
  595. fmt++;
  596. break;
  597. }
  598. case 'C':
  599. {
  600. const char *s;
  601. s = unistr(buf, &stringlen, unicodestr);
  602. if (s == NULL)
  603. goto trunc;
  604. printf("%s", s);
  605. buf += stringlen;
  606. fmt++;
  607. break;
  608. }
  609. case 'h':
  610. {
  611. int l = atoi(fmt + 1);
  612. TCHECK2(*buf, l);
  613. while (l--)
  614. printf("%02x", *buf++);
  615. fmt++;
  616. while (isdigit((unsigned char)*fmt))
  617. fmt++;
  618. break;
  619. }
  620. case 'n':
  621. {
  622. int t = atoi(fmt+1);
  623. char nbuf[255];
  624. int name_type;
  625. int len;
  626. switch (t) {
  627. case 1:
  628. name_type = name_extract(startbuf, PTR_DIFF(buf, startbuf),
  629. maxbuf, nbuf);
  630. if (name_type < 0)
  631. goto trunc;
  632. len = name_len(buf, maxbuf);
  633. if (len < 0)
  634. goto trunc;
  635. buf += len;
  636. printf("%-15.15s NameType=0x%02X (%s)", nbuf, name_type,
  637. name_type_str(name_type));
  638. break;
  639. case 2:
  640. TCHECK(buf[15]);
  641. name_type = buf[15];
  642. printf("%-15.15s NameType=0x%02X (%s)", buf, name_type,
  643. name_type_str(name_type));
  644. buf += 16;
  645. break;
  646. }
  647. fmt++;
  648. while (isdigit((unsigned char)*fmt))
  649. fmt++;
  650. break;
  651. }
  652. case 'T':
  653. {
  654. time_t t;
  655. struct tm *lt;
  656. const char *tstring;
  657. u_int32_t x;
  658. switch (atoi(fmt + 1)) {
  659. case 1:
  660. TCHECK2(buf[0], 4);
  661. x = EXTRACT_LE_32BITS(buf);
  662. if (x == 0 || x == 0xFFFFFFFF)
  663. t = 0;
  664. else
  665. t = make_unix_date(buf);
  666. buf += 4;
  667. break;
  668. case 2:
  669. TCHECK2(buf[0], 4);
  670. x = EXTRACT_LE_32BITS(buf);
  671. if (x == 0 || x == 0xFFFFFFFF)
  672. t = 0;
  673. else
  674. t = make_unix_date2(buf);
  675. buf += 4;
  676. break;
  677. case 3:
  678. TCHECK2(buf[0], 8);
  679. t = interpret_long_date(buf);
  680. buf += 8;
  681. break;
  682. default:
  683. t = 0;
  684. break;
  685. }
  686. if (t != 0) {
  687. lt = localtime(&t);
  688. if (lt != NULL)
  689. tstring = asctime(lt);
  690. else
  691. tstring = "(Can't convert time)\n";
  692. } else
  693. tstring = "NULL\n";
  694. printf("%s", tstring);
  695. fmt++;
  696. while (isdigit((unsigned char)*fmt))
  697. fmt++;
  698. break;
  699. }
  700. default:
  701. putchar(*fmt);
  702. fmt++;
  703. break;
  704. }
  705. }
  706. if (buf >= maxbuf && *fmt)
  707. printf("END OF BUFFER\n");
  708. return(buf);
  709. trunc:
  710. printf("\n");
  711. printf("WARNING: Short packet. Try increasing the snap length\n");
  712. return(NULL);
  713. }
  714. const u_char *
  715. smb_fdata(const u_char *buf, const char *fmt, const u_char *maxbuf,
  716. int unicodestr)
  717. {
  718. static int depth = 0;
  719. char s[128];
  720. char *p;
  721. while (*fmt) {
  722. switch (*fmt) {
  723. case '*':
  724. fmt++;
  725. while (buf < maxbuf) {
  726. const u_char *buf2;
  727. depth++;
  728. buf2 = smb_fdata(buf, fmt, maxbuf, unicodestr);
  729. depth--;
  730. if (buf2 == NULL)
  731. return(NULL);
  732. if (buf2 == buf)
  733. return(buf);
  734. buf = buf2;
  735. }
  736. return(buf);
  737. case '|':
  738. fmt++;
  739. if (buf >= maxbuf)
  740. return(buf);
  741. break;
  742. case '%':
  743. fmt++;
  744. buf = maxbuf;
  745. break;
  746. case '#':
  747. fmt++;
  748. return(buf);
  749. break;
  750. case '[':
  751. fmt++;
  752. if (buf >= maxbuf)
  753. return(buf);
  754. memset(s, 0, sizeof(s));
  755. p = strchr(fmt, ']');
  756. if ((size_t)(p - fmt + 1) > sizeof(s)) {
  757. /* overrun */
  758. return(buf);
  759. }
  760. strncpy(s, fmt, p - fmt);
  761. s[p - fmt] = '\0';
  762. fmt = p + 1;
  763. buf = smb_fdata1(buf, s, maxbuf, unicodestr);
  764. if (buf == NULL)
  765. return(NULL);
  766. break;
  767. default:
  768. putchar(*fmt);
  769. fmt++;
  770. fflush(stdout);
  771. break;
  772. }
  773. }
  774. if (!depth && buf < maxbuf) {
  775. size_t len = PTR_DIFF(maxbuf, buf);
  776. printf("Data: (%lu bytes)\n", (unsigned long)len);
  777. print_data(buf, len);
  778. return(buf + len);
  779. }
  780. return(buf);
  781. }
  782. typedef struct {
  783. const char *name;
  784. int code;
  785. const char *message;
  786. } err_code_struct;
  787. /* DOS Error Messages */
  788. static const err_code_struct dos_msgs[] = {
  789. { "ERRbadfunc", 1, "Invalid function." },
  790. { "ERRbadfile", 2, "File not found." },
  791. { "ERRbadpath", 3, "Directory invalid." },
  792. { "ERRnofids", 4, "No file descriptors available" },
  793. { "ERRnoaccess", 5, "Access denied." },
  794. { "ERRbadfid", 6, "Invalid file handle." },
  795. { "ERRbadmcb", 7, "Memory control blocks destroyed." },
  796. { "ERRnomem", 8, "Insufficient server memory to perform the requested function." },
  797. { "ERRbadmem", 9, "Invalid memory block address." },
  798. { "ERRbadenv", 10, "Invalid environment." },
  799. { "ERRbadformat", 11, "Invalid format." },
  800. { "ERRbadaccess", 12, "Invalid open mode." },
  801. { "ERRbaddata", 13, "Invalid data." },
  802. { "ERR", 14, "reserved." },
  803. { "ERRbaddrive", 15, "Invalid drive specified." },
  804. { "ERRremcd", 16, "A Delete Directory request attempted to remove the server's current directory." },
  805. { "ERRdiffdevice", 17, "Not same device." },
  806. { "ERRnofiles", 18, "A File Search command can find no more files matching the specified criteria." },
  807. { "ERRbadshare", 32, "The sharing mode specified for an Open conflicts with existing FIDs on the file." },
  808. { "ERRlock", 33, "A Lock request conflicted with an existing lock or specified an invalid mode, or an Unlock requested attempted to remove a lock held by another process." },
  809. { "ERRfilexists", 80, "The file named in a Create Directory, Make New File or Link request already exists." },
  810. { "ERRbadpipe", 230, "Pipe invalid." },
  811. { "ERRpipebusy", 231, "All instances of the requested pipe are busy." },
  812. { "ERRpipeclosing", 232, "Pipe close in progress." },
  813. { "ERRnotconnected", 233, "No process on other end of pipe." },
  814. { "ERRmoredata", 234, "There is more data to be returned." },
  815. { NULL, -1, NULL }
  816. };
  817. /* Server Error Messages */
  818. static const err_code_struct server_msgs[] = {
  819. { "ERRerror", 1, "Non-specific error code." },
  820. { "ERRbadpw", 2, "Bad password - name/password pair in a Tree Connect or Session Setup are invalid." },
  821. { "ERRbadtype", 3, "reserved." },
  822. { "ERRaccess", 4, "The requester does not have the necessary access rights within the specified context for the requested function. The context is defined by the TID or the UID." },
  823. { "ERRinvnid", 5, "The tree ID (TID) specified in a command was invalid." },
  824. { "ERRinvnetname", 6, "Invalid network name in tree connect." },
  825. { "ERRinvdevice", 7, "Invalid device - printer request made to non-printer connection or non-printer request made to printer connection." },
  826. { "ERRqfull", 49, "Print queue full (files) -- returned by open print file." },
  827. { "ERRqtoobig", 50, "Print queue full -- no space." },
  828. { "ERRqeof", 51, "EOF on print queue dump." },
  829. { "ERRinvpfid", 52, "Invalid print file FID." },
  830. { "ERRsmbcmd", 64, "The server did not recognize the command received." },
  831. { "ERRsrverror", 65, "The server encountered an internal error, e.g., system file unavailable." },
  832. { "ERRfilespecs", 67, "The file handle (FID) and pathname parameters contained an invalid combination of values." },
  833. { "ERRreserved", 68, "reserved." },
  834. { "ERRbadpermits", 69, "The access permissions specified for a file or directory are not a valid combination. The server cannot set the requested attribute." },
  835. { "ERRreserved", 70, "reserved." },
  836. { "ERRsetattrmode", 71, "The attribute mode in the Set File Attribute request is invalid." },
  837. { "ERRpaused", 81, "Server is paused." },
  838. { "ERRmsgoff", 82, "Not receiving messages." },
  839. { "ERRnoroom", 83, "No room to buffer message." },
  840. { "ERRrmuns", 87, "Too many remote user names." },
  841. { "ERRtimeout", 88, "Operation timed out." },
  842. { "ERRnoresource", 89, "No resources currently available for request." },
  843. { "ERRtoomanyuids", 90, "Too many UIDs active on this session." },
  844. { "ERRbaduid", 91, "The UID is not known as a valid ID on this session." },
  845. { "ERRusempx", 250, "Temp unable to support Raw, use MPX mode." },
  846. { "ERRusestd", 251, "Temp unable to support Raw, use standard read/write." },
  847. { "ERRcontmpx", 252, "Continue in MPX mode." },
  848. { "ERRreserved", 253, "reserved." },
  849. { "ERRreserved", 254, "reserved." },
  850. { "ERRnosupport", 0xFFFF, "Function not supported." },
  851. { NULL, -1, NULL }
  852. };
  853. /* Hard Error Messages */
  854. static const err_code_struct hard_msgs[] = {
  855. { "ERRnowrite", 19, "Attempt to write on write-protected diskette." },
  856. { "ERRbadunit", 20, "Unknown unit." },
  857. { "ERRnotready", 21, "Drive not ready." },
  858. { "ERRbadcmd", 22, "Unknown command." },
  859. { "ERRdata", 23, "Data error (CRC)." },
  860. { "ERRbadreq", 24, "Bad request structure length." },
  861. { "ERRseek", 25 , "Seek error." },
  862. { "ERRbadmedia", 26, "Unknown media type." },
  863. { "ERRbadsector", 27, "Sector not found." },
  864. { "ERRnopaper", 28, "Printer out of paper." },
  865. { "ERRwrite", 29, "Write fault." },
  866. { "ERRread", 30, "Read fault." },
  867. { "ERRgeneral", 31, "General failure." },
  868. { "ERRbadshare", 32, "A open conflicts with an existing open." },
  869. { "ERRlock", 33, "A Lock request conflicted with an existing lock or specified an invalid mode, or an Unlock requested attempted to remove a lock held by another process." },
  870. { "ERRwrongdisk", 34, "The wrong disk was found in a drive." },
  871. { "ERRFCBUnavail", 35, "No FCBs are available to process request." },
  872. { "ERRsharebufexc", 36, "A sharing buffer has been exceeded." },
  873. { NULL, -1, NULL }
  874. };
  875. static const struct {
  876. int code;
  877. const char *class;
  878. const err_code_struct *err_msgs;
  879. } err_classes[] = {
  880. { 0, "SUCCESS", NULL },
  881. { 0x01, "ERRDOS", dos_msgs },
  882. { 0x02, "ERRSRV", server_msgs },
  883. { 0x03, "ERRHRD", hard_msgs },
  884. { 0x04, "ERRXOS", NULL },
  885. { 0xE1, "ERRRMX1", NULL },
  886. { 0xE2, "ERRRMX2", NULL },
  887. { 0xE3, "ERRRMX3", NULL },
  888. { 0xFF, "ERRCMD", NULL },
  889. { -1, NULL, NULL }
  890. };
  891. /*
  892. * return a SMB error string from a SMB buffer
  893. */
  894. char *
  895. smb_errstr(int class, int num)
  896. {
  897. static char ret[128];
  898. int i, j;
  899. ret[0] = 0;
  900. for (i = 0; err_classes[i].class; i++)
  901. if (err_classes[i].code == class) {
  902. if (err_classes[i].err_msgs) {
  903. const err_code_struct *err = err_classes[i].err_msgs;
  904. for (j = 0; err[j].name; j++)
  905. if (num == err[j].code) {
  906. snprintf(ret, sizeof(ret), "%s - %s (%s)",
  907. err_classes[i].class, err[j].name, err[j].message);
  908. return ret;
  909. }
  910. }
  911. snprintf(ret, sizeof(ret), "%s - %d", err_classes[i].class, num);
  912. return ret;
  913. }
  914. snprintf(ret, sizeof(ret), "ERROR: Unknown error (%d,%d)", class, num);
  915. return(ret);
  916. }
  917. typedef struct {
  918. u_int32_t code;
  919. const char *name;
  920. } nt_err_code_struct;
  921. /*
  922. * NT Error codes
  923. */
  924. static const nt_err_code_struct nt_errors[] = {
  925. { 0x00000000, "STATUS_SUCCESS" },
  926. { 0x00000000, "STATUS_WAIT_0" },
  927. { 0x00000001, "STATUS_WAIT_1" },
  928. { 0x00000002, "STATUS_WAIT_2" },
  929. { 0x00000003, "STATUS_WAIT_3" },
  930. { 0x0000003F, "STATUS_WAIT_63" },
  931. { 0x00000080, "STATUS_ABANDONED" },
  932. { 0x00000080, "STATUS_ABANDONED_WAIT_0" },
  933. { 0x000000BF, "STATUS_ABANDONED_WAIT_63" },
  934. { 0x000000C0, "STATUS_USER_APC" },
  935. { 0x00000100, "STATUS_KERNEL_APC" },
  936. { 0x00000101, "STATUS_ALERTED" },
  937. { 0x00000102, "STATUS_TIMEOUT" },
  938. { 0x00000103, "STATUS_PENDING" },
  939. { 0x00000104, "STATUS_REPARSE" },
  940. { 0x00000105, "STATUS_MORE_ENTRIES" },
  941. { 0x00000106, "STATUS_NOT_ALL_ASSIGNED" },
  942. { 0x00000107, "STATUS_SOME_NOT_MAPPED" },
  943. { 0x00000108, "STATUS_OPLOCK_BREAK_IN_PROGRESS" },
  944. { 0x00000109, "STATUS_VOLUME_MOUNTED" },
  945. { 0x0000010A, "STATUS_RXACT_COMMITTED" },
  946. { 0x0000010B, "STATUS_NOTIFY_CLEANUP" },
  947. { 0x0000010C, "STATUS_NOTIFY_ENUM_DIR" },
  948. { 0x0000010D, "STATUS_NO_QUOTAS_FOR_ACCOUNT" },
  949. { 0x0000010E, "STATUS_PRIMARY_TRANSPORT_CONNECT_FAILED" },
  950. { 0x00000110, "STATUS_PAGE_FAULT_TRANSITION" },
  951. { 0x00000111, "STATUS_PAGE_FAULT_DEMAND_ZERO" },
  952. { 0x00000112, "STATUS_PAGE_FAULT_COPY_ON_WRITE" },
  953. { 0x00000113, "STATUS_PAGE_FAULT_GUARD_PAGE" },
  954. { 0x00000114, "STATUS_PAGE_FAULT_PAGING_FILE" },
  955. { 0x00000115, "STATUS_CACHE_PAGE_LOCKED" },
  956. { 0x00000116, "STATUS_CRASH_DUMP" },
  957. { 0x00000117, "STATUS_BUFFER_ALL_ZEROS" },
  958. { 0x00000118, "STATUS_REPARSE_OBJECT" },
  959. { 0x0000045C, "STATUS_NO_SHUTDOWN_IN_PROGRESS" },
  960. { 0x40000000, "STATUS_OBJECT_NAME_EXISTS" },
  961. { 0x40000001, "STATUS_THREAD_WAS_SUSPENDED" },
  962. { 0x40000002, "STATUS_WORKING_SET_LIMIT_RANGE" },
  963. { 0x40000003, "STATUS_IMAGE_NOT_AT_BASE" },
  964. { 0x40000004, "STATUS_RXACT_STATE_CREATED" },
  965. { 0x40000005, "STATUS_SEGMENT_NOTIFICATION" },
  966. { 0x40000006, "STATUS_LOCAL_USER_SESSION_KEY" },
  967. { 0x40000007, "STATUS_BAD_CURRENT_DIRECTORY" },
  968. { 0x40000008, "STATUS_SERIAL_MORE_WRITES" },
  969. { 0x40000009, "STATUS_REGISTRY_RECOVERED" },
  970. { 0x4000000A, "STATUS_FT_READ_RECOVERY_FROM_BACKUP" },
  971. { 0x4000000B, "STATUS_FT_WRITE_RECOVERY" },
  972. { 0x4000000C, "STATUS_SERIAL_COUNTER_TIMEOUT" },
  973. { 0x4000000D, "STATUS_NULL_LM_PASSWORD" },
  974. { 0x4000000E, "STATUS_IMAGE_MACHINE_TYPE_MISMATCH" },
  975. { 0x4000000F, "STATUS_RECEIVE_PARTIAL" },
  976. { 0x40000010, "STATUS_RECEIVE_EXPEDITED" },
  977. { 0x40000011, "STATUS_RECEIVE_PARTIAL_EXPEDITED" },
  978. { 0x40000012, "STATUS_EVENT_DONE" },
  979. { 0x40000013, "STATUS_EVENT_PENDING" },
  980. { 0x40000014, "STATUS_CHECKING_FILE_SYSTEM" },
  981. { 0x40000015, "STATUS_FATAL_APP_EXIT" },
  982. { 0x40000016, "STATUS_PREDEFINED_HANDLE" },
  983. { 0x40000017, "STATUS_WAS_UNLOCKED" },
  984. { 0x40000018, "STATUS_SERVICE_NOTIFICATION" },
  985. { 0x40000019, "STATUS_WAS_LOCKED" },
  986. { 0x4000001A, "STATUS_LOG_HARD_ERROR" },
  987. { 0x4000001B, "STATUS_ALREADY_WIN32" },
  988. { 0x4000001C, "STATUS_WX86_UNSIMULATE" },
  989. { 0x4000001D, "STATUS_WX86_CONTINUE" },
  990. { 0x4000001E, "STATUS_WX86_SINGLE_STEP" },
  991. { 0x4000001F, "STATUS_WX86_BREAKPOINT" },
  992. { 0x40000020, "STATUS_WX86_EXCEPTION_CONTINUE" },
  993. { 0x40000021, "STATUS_WX86_EXCEPTION_LASTCHANCE" },
  994. { 0x40000022, "STATUS_WX86_EXCEPTION_CHAIN" },
  995. { 0x40000023, "STATUS_IMAGE_MACHINE_TYPE_MISMATCH_EXE" },
  996. { 0x40000024, "STATUS_NO_YIELD_PERFORMED" },
  997. { 0x40000025, "STATUS_TIMER_RESUME_IGNORED" },
  998. { 0x80000001, "STATUS_GUARD_PAGE_VIOLATION" },
  999. { 0x80000002, "STATUS_DATATYPE_MISALIGNMENT" },
  1000. { 0x80000003, "STATUS_BREAKPOINT" },
  1001. { 0x80000004, "STATUS_SINGLE_STEP" },
  1002. { 0x80000005, "STATUS_BUFFER_OVERFLOW" },
  1003. { 0x80000006, "STATUS_NO_MORE_FILES" },
  1004. { 0x80000007, "STATUS_WAKE_SYSTEM_DEBUGGER" },
  1005. { 0x8000000A, "STATUS_HANDLES_CLOSED" },
  1006. { 0x8000000B, "STATUS_NO_INHERITANCE" },
  1007. { 0x8000000C, "STATUS_GUID_SUBSTITUTION_MADE" },
  1008. { 0x8000000D, "STATUS_PARTIAL_COPY" },
  1009. { 0x8000000E, "STATUS_DEVICE_PAPER_EMPTY" },
  1010. { 0x8000000F, "STATUS_DEVICE_POWERED_OFF" },
  1011. { 0x80000010, "STATUS_DEVICE_OFF_LINE" },
  1012. { 0x80000011, "STATUS_DEVICE_BUSY" },
  1013. { 0x80000012, "STATUS_NO_MORE_EAS" },
  1014. { 0x80000013, "STATUS_INVALID_EA_NAME" },
  1015. { 0x80000014, "STATUS_EA_LIST_INCONSISTENT" },
  1016. { 0x80000015, "STATUS_INVALID_EA_FLAG" },
  1017. { 0x80000016, "STATUS_VERIFY_REQUIRED" },
  1018. { 0x80000017, "STATUS_EXTRANEOUS_INFORMATION" },
  1019. { 0x80000018, "STATUS_RXACT_COMMIT_NECESSARY" },
  1020. { 0x8000001A, "STATUS_NO_MORE_ENTRIES" },
  1021. { 0x8000001B, "STATUS_FILEMARK_DETECTED" },
  1022. { 0x8000001C, "STATUS_MEDIA_CHANGED" },
  1023. { 0x8000001D, "STATUS_BUS_RESET" },
  1024. { 0x8000001E, "STATUS_END_OF_MEDIA" },
  1025. { 0x8000001F, "STATUS_BEGINNING_OF_MEDIA" },
  1026. { 0x80000020, "STATUS_MEDIA_CHECK" },
  1027. { 0x80000021, "STATUS_SETMARK_DETECTED" },
  1028. { 0x80000022, "STATUS_NO_DATA_DETECTED" },
  1029. { 0x80000023, "STATUS_REDIRECTOR_HAS_OPEN_HANDLES" },
  1030. { 0x80000024, "STATUS_SERVER_HAS_OPEN_HANDLES" },
  1031. { 0x80000025, "STATUS_ALREADY_DISCONNECTED" },
  1032. { 0x80000026, "STATUS_LONGJUMP" },
  1033. { 0x80040111, "MAPI_E_LOGON_FAILED" },
  1034. { 0x80090300, "SEC_E_INSUFFICIENT_MEMORY" },
  1035. { 0x80090301, "SEC_E_INVALID_HANDLE" },
  1036. { 0x80090302, "SEC_E_UNSUPPORTED_FUNCTION" },
  1037. { 0x8009030B, "SEC_E_NO_IMPERSONATION" },
  1038. { 0x8009030D, "SEC_E_UNKNOWN_CREDENTIALS" },
  1039. { 0x8009030E, "SEC_E_NO_CREDENTIALS" },
  1040. { 0x8009030F, "SEC_E_MESSAGE_ALTERED" },
  1041. { 0x80090310, "SEC_E_OUT_OF_SEQUENCE" },
  1042. { 0x80090311, "SEC_E_NO_AUTHENTICATING_AUTHORITY" },
  1043. { 0xC0000001, "STATUS_UNSUCCESSFUL" },
  1044. { 0xC0000002, "STATUS_NOT_IMPLEMENTED" },
  1045. { 0xC0000003, "STATUS_INVALID_INFO_CLASS" },
  1046. { 0xC0000004, "STATUS_INFO_LENGTH_MISMATCH" },
  1047. { 0xC0000005, "STATUS_ACCESS_VIOLATION" },
  1048. { 0xC0000006, "STATUS_IN_PAGE_ERROR" },
  1049. { 0xC0000007, "STATUS_PAGEFILE_QUOTA" },
  1050. { 0xC0000008, "STATUS_INVALID_HANDLE" },
  1051. { 0xC0000009, "STATUS_BAD_INITIAL_STACK" },
  1052. { 0xC000000A, "STATUS_BAD_INITIAL_PC" },
  1053. { 0xC000000B, "STATUS_INVALID_CID" },
  1054. { 0xC000000C, "STATUS_TIMER_NOT_CANCELED" },
  1055. { 0xC000000D, "STATUS_INVALID_PARAMETER" },
  1056. { 0xC000000E, "STATUS_NO_SUCH_DEVICE" },
  1057. { 0xC000000F, "STATUS_NO_SUCH_FILE" },
  1058. { 0xC0000010, "STATUS_INVALID_DEVICE_REQUEST" },
  1059. { 0xC0000011, "STATUS_END_OF_FILE" },
  1060. { 0xC0000012, "STATUS_WRONG_VOLUME" },
  1061. { 0xC0000013, "STATUS_NO_MEDIA_IN_DEVICE" },
  1062. { 0xC0000014, "STATUS_UNRECOGNIZED_MEDIA" },
  1063. { 0xC0000015, "STATUS_NONEXISTENT_SECTOR" },
  1064. { 0xC0000016, "STATUS_MORE_PROCESSING_REQUIRED" },
  1065. { 0xC0000017, "STATUS_NO_MEMORY" },
  1066. { 0xC0000018, "STATUS_CONFLICTING_ADDRESSES" },
  1067. { 0xC0000019, "STATUS_NOT_MAPPED_VIEW" },
  1068. { 0xC000001A, "STATUS_UNABLE_TO_FREE_VM" },
  1069. { 0xC000001B, "STATUS_UNABLE_TO_DELETE_SECTION" },
  1070. { 0xC000001C, "STATUS_INVALID_SYSTEM_SERVICE" },
  1071. { 0xC000001D, "STATUS_ILLEGAL_INSTRUCTION" },
  1072. { 0xC000001E, "STATUS_INVALID_LOCK_SEQUENCE" },
  1073. { 0xC000001F, "STATUS_INVALID_VIEW_SIZE" },
  1074. { 0xC0000020, "STATUS_INVALID_FILE_FOR_SECTION" },
  1075. { 0xC0000021, "STATUS_ALREADY_COMMITTED" },
  1076. { 0xC0000022, "STATUS_ACCESS_DENIED" },
  1077. { 0xC0000023, "STATUS_BUFFER_TOO_SMALL" },
  1078. { 0xC0000024, "STATUS_OBJECT_TYPE_MISMATCH" },
  1079. { 0xC0000025, "STATUS_NONCONTINUABLE_EXCEPTION" },
  1080. { 0xC0000026, "STATUS_INVALID_DISPOSITION" },
  1081. { 0xC0000027, "STATUS_UNWIND" },
  1082. { 0xC0000028, "STATUS_BAD_STACK" },
  1083. { 0xC0000029, "STATUS_INVALID_UNWIND_TARGET" },
  1084. { 0xC000002A, "STATUS_NOT_LOCKED" },
  1085. { 0xC000002B, "STATUS_PARITY_ERROR" },
  1086. { 0xC000002C, "STATUS_UNABLE_TO_DECOMMIT_VM" },
  1087. { 0xC000002D, "STATUS_NOT_COMMITTED" },
  1088. { 0xC000002E, "STATUS_INVALID_PORT_ATTRIBUTES" },
  1089. { 0xC000002F, "STATUS_PORT_MESSAGE_TOO_LONG" },
  1090. { 0xC0000030, "STATUS_INVALID_PARAMETER_MIX" },
  1091. { 0xC0000031, "STATUS_INVALID_QUOTA_LOWER" },
  1092. { 0xC0000032, "STATUS_DISK_CORRUPT_ERROR" },
  1093. { 0xC0000033, "STATUS_OBJECT_NAME_INVALID" },
  1094. { 0xC0000034, "STATUS_OBJECT_NAME_NOT_FOUND" },
  1095. { 0xC0000035, "STATUS_OBJECT_NAME_COLLISION" },
  1096. { 0xC0000037, "STATUS_PORT_DISCONNECTED" },
  1097. { 0xC0000038, "STATUS_DEVICE_ALREADY_ATTACHED" },
  1098. { 0xC0000039, "STATUS_OBJECT_PATH_INVALID" },
  1099. { 0xC000003A, "STATUS_OBJECT_PATH_NOT_FOUND" },
  1100. { 0xC000003B, "STATUS_OBJECT_PATH_SYNTAX_BAD" },
  1101. { 0xC000003C, "STATUS_DATA_OVERRUN" },
  1102. { 0xC000003D, "STATUS_DATA_LATE_ERROR" },
  1103. { 0xC000003E, "STATUS_DATA_ERROR" },
  1104. { 0xC000003F, "STATUS_CRC_ERROR" },
  1105. { 0xC0000040, "STATUS_SECTION_TOO_BIG" },
  1106. { 0xC0000041, "STATUS_PORT_CONNECTION_REFUSED" },
  1107. { 0xC0000042, "STATUS_INVALID_PORT_HANDLE" },
  1108. { 0xC0000043, "STATUS_SHARING_VIOLATION" },
  1109. { 0xC0000044, "STATUS_QUOTA_EXCEEDED" },
  1110. { 0xC0000045, "STATUS_INVALID_PAGE_PROTECTION" },
  1111. { 0xC0000046, "STATUS_MUTANT_NOT_OWNED" },
  1112. { 0xC0000047, "STATUS_SEMAPHORE_LIMIT_EXCEEDED" },
  1113. { 0xC0000048, "STATUS_PORT_ALREADY_SET" },
  1114. { 0xC0000049, "STATUS_SECTION_NOT_IMAGE" },
  1115. { 0xC000004A, "STATUS_SUSPEND_COUNT_EXCEEDED" },
  1116. { 0xC000004B, "STATUS_THREAD_IS_TERMINATING" },
  1117. { 0xC000004C, "STATUS_BAD_WORKING_SET_LIMIT" },
  1118. { 0xC000004D, "STATUS_INCOMPATIBLE_FILE_MAP" },
  1119. { 0xC000004E, "STATUS_SECTION_PROTECTION" },
  1120. { 0xC000004F, "STATUS_EAS_NOT_SUPPORTED" },
  1121. { 0xC0000050, "STATUS_EA_TOO_LARGE" },
  1122. { 0xC0000051, "STATUS_NONEXISTENT_EA_ENTRY" },
  1123. { 0xC0000052, "STATUS_NO_EAS_ON_FILE" },
  1124. { 0xC0000053, "STATUS_EA_CORRUPT_ERROR" },
  1125. { 0xC0000054, "STATUS_FILE_LOCK_CONFLICT" },
  1126. { 0xC0000055, "STATUS_LOCK_NOT_GRANTED" },
  1127. { 0xC0000056, "STATUS_DELETE_PENDING" },
  1128. { 0xC0000057, "STATUS_CTL_FILE_NOT_SUPPORTED" },
  1129. { 0xC0000058, "STATUS_UNKNOWN_REVISION" },
  1130. { 0xC0000059, "STATUS_REVISION_MISMATCH" },
  1131. { 0xC000005A, "STATUS_INVALID_OWNER" },
  1132. { 0xC000005B, "STATUS_INVALID_PRIMARY_GROUP" },
  1133. { 0xC000005C, "STATUS_NO_IMPERSONATION_TOKEN" },
  1134. { 0xC000005D, "STATUS_CANT_DISABLE_MANDATORY" },
  1135. { 0xC000005E, "STATUS_NO_LOGON_SERVERS" },
  1136. { 0xC000005F, "STATUS_NO_SUCH_LOGON_SESSION" },
  1137. { 0xC0000060, "STATUS_NO_SUCH_PRIVILEGE" },
  1138. { 0xC0000061, "STATUS_PRIVILEGE_NOT_HELD" },
  1139. { 0xC0000062, "STATUS_INVALID_ACCOUNT_NAME" },
  1140. { 0xC0000063, "STATUS_USER_EXISTS" },
  1141. { 0xC0000064, "STATUS_NO_SUCH_USER" },
  1142. { 0xC0000065, "STATUS_GROUP_EXISTS" },
  1143. { 0xC0000066, "STATUS_NO_SUCH_GROUP" },
  1144. { 0xC0000067, "STATUS_MEMBER_IN_GROUP" },
  1145. { 0xC0000068, "STATUS_MEMBER_NOT_IN_GROUP" },
  1146. { 0xC0000069, "STATUS_LAST_ADMIN" },
  1147. { 0xC000006A, "STATUS_WRONG_PASSWORD" },
  1148. { 0xC000006B, "STATUS_ILL_FORMED_PASSWORD" },
  1149. { 0xC000006C, "STATUS_PASSWORD_RESTRICTION" },
  1150. { 0xC000006D, "STATUS_LOGON_FAILURE" },
  1151. { 0xC000006E, "STATUS_ACCOUNT_RESTRICTION" },
  1152. { 0xC000006F, "STATUS_INVALID_LOGON_HOURS" },
  1153. { 0xC0000070, "STATUS_INVALID_WORKSTATION" },
  1154. { 0xC0000071, "STATUS_PASSWORD_EXPIRED" },
  1155. { 0xC0000072, "STATUS_ACCOUNT_DISABLED" },
  1156. { 0xC0000073, "STATUS_NONE_MAPPED" },
  1157. { 0xC0000074, "STATUS_TOO_MANY_LUIDS_REQUESTED" },
  1158. { 0xC0000075, "STATUS_LUIDS_EXHAUSTED" },
  1159. { 0xC0000076, "STATUS_INVALID_SUB_AUTHORITY" },
  1160. { 0xC0000077, "STATUS_INVALID_ACL" },
  1161. { 0xC0000078, "STATUS_INVALID_SID" },
  1162. { 0xC0000079, "STATUS_INVALID_SECURITY_DESCR" },
  1163. { 0xC000007A, "STATUS_PROCEDURE_NOT_FOUND" },
  1164. { 0xC000007B, "STATUS_INVALID_IMAGE_FORMAT" },
  1165. { 0xC000007C, "STATUS_NO_TOKEN" },
  1166. { 0xC000007D, "STATUS_BAD_INHERITANCE_ACL" },
  1167. { 0xC000007E, "STATUS_RANGE_NOT_LOCKED" },
  1168. { 0xC000007F, "STATUS_DISK_FULL" },
  1169. { 0xC0000080, "STATUS_SERVER_DISABLED" },
  1170. { 0xC0000081, "STATUS_SERVER_NOT_DISABLED" },
  1171. { 0xC0000082, "STATUS_TOO_MANY_GUIDS_REQUESTED" },
  1172. { 0xC0000083, "STATUS_GUIDS_EXHAUSTED" },
  1173. { 0xC0000084, "STATUS_INVALID_ID_AUTHORITY" },
  1174. { 0xC0000085, "STATUS_AGENTS_EXHAUSTED" },
  1175. { 0xC0000086, "STATUS_INVALID_VOLUME_LABEL" },
  1176. { 0xC0000087, "STATUS_SECTION_NOT_EXTENDED" },
  1177. { 0xC0000088, "STATUS_NOT_MAPPED_DATA" },
  1178. { 0xC0000089, "STATUS_RESOURCE_DATA_NOT_FOUND" },
  1179. { 0xC000008A, "STATUS_RESOURCE_TYPE_NOT_FOUND" },
  1180. { 0xC000008B, "STATUS_RESOURCE_NAME_NOT_FOUND" },
  1181. { 0xC000008C, "STATUS_ARRAY_BOUNDS_EXCEEDED" },
  1182. { 0xC000008D, "STATUS_FLOAT_DENORMAL_OPERAND" },
  1183. { 0xC000008E, "STATUS_FLOAT_DIVIDE_BY_ZERO" },
  1184. { 0xC000008F, "STATUS_FLOAT_INEXACT_RESULT" },
  1185. { 0xC0000090, "STATUS_FLOAT_INVALID_OPERATION" },
  1186. { 0xC0000091, "STATUS_FLOAT_OVERFLOW" },
  1187. { 0xC0000092, "STATUS_FLOAT_STACK_CHECK" },
  1188. { 0xC0000093, "STATUS_FLOAT_UNDERFLOW" },
  1189. { 0xC0000094, "STATUS_INTEGER_DIVIDE_BY_ZERO" },
  1190. { 0xC0000095, "STATUS_INTEGER_OVERFLOW" },
  1191. { 0xC0000096, "STATUS_PRIVILEGED_INSTRUCTION" },
  1192. { 0xC0000097, "STATUS_TOO_MANY_PAGING_FILES" },
  1193. { 0xC0000098, "STATUS_FILE_INVALID" },
  1194. { 0xC0000099, "STATUS_ALLOTTED_SPACE_EXCEEDED" },
  1195. { 0xC000009A, "STATUS_INSUFFICIENT_RESOURCES" },
  1196. { 0xC000009B, "STATUS_DFS_EXIT_PATH_FOUND" },
  1197. { 0xC000009C, "STATUS_DEVICE_DATA_ERROR" },
  1198. { 0xC000009D, "STATUS_DEVICE_NOT_CONNECTED" },
  1199. { 0xC000009E, "STATUS_DEVICE_POWER_FAILURE" },
  1200. { 0xC000009F, "STATUS_FREE_VM_NOT_AT_BASE" },
  1201. { 0xC00000A0, "STATUS_MEMORY_NOT_ALLOCATED" },
  1202. { 0xC00000A1, "STATUS_WORKING_SET_QUOTA" },
  1203. { 0xC00000A2, "STATUS_MEDIA_WRITE_PROTECTED" },
  1204. { 0xC00000A3, "STATUS_DEVICE_NOT_READY" },
  1205. { 0xC00000A4, "STATUS_INVALID_GROUP_ATTRIBUTES" },
  1206. { 0xC00000A5, "STATUS_BAD_IMPERSONATION_LEVEL" },
  1207. { 0xC00000A6, "STATUS_CANT_OPEN_ANONYMOUS" },
  1208. { 0xC00000A7, "STATUS_BAD_VALIDATION_CLASS" },
  1209. { 0xC00000A8, "STATUS_BAD_TOKEN_TYPE" },
  1210. { 0xC00000A9, "STATUS_BAD_MASTER_BOOT_RECORD" },
  1211. { 0xC00000AA, "STATUS_INSTRUCTION_MISALIGNMENT" },
  1212. { 0xC00000AB, "STATUS_INSTANCE_NOT_AVAILABLE" },
  1213. { 0xC00000AC, "STATUS_PIPE_NOT_AVAILABLE" },
  1214. { 0xC00000AD, "STATUS_INVALID_PIPE_STATE" },
  1215. { 0xC00000AE, "STATUS_PIPE_BUSY" },
  1216. { 0xC00000AF, "STATUS_ILLEGAL_FUNCTION" },
  1217. { 0xC00000B0, "STATUS_PIPE_DISCONNECTED" },
  1218. { 0xC00000B1, "STATUS_PIPE_CLOSING" },
  1219. { 0xC00000B2, "STATUS_PIPE_CONNECTED" },
  1220. { 0xC00000B3, "STATUS_PIPE_LISTENING" },
  1221. { 0xC00000B4, "STATUS_INVALID_READ_MODE" },
  1222. { 0xC00000B5, "STATUS_IO_TIMEOUT" },
  1223. { 0xC00000B6, "STATUS_FILE_FORCED_CLOSED" },
  1224. { 0xC00000B7, "STATUS_PROFILING_NOT_STARTED" },
  1225. { 0xC00000B8, "STATUS_PROFILING_NOT_STOPPED" },
  1226. { 0xC00000B9, "STATUS_COULD_NOT_INTERPRET" },
  1227. { 0xC00000BA, "STATUS_FILE_IS_A_DIRECTORY" },
  1228. { 0xC00000BB, "STATUS_NOT_SUPPORTED" },
  1229. { 0xC00000BC, "STATUS_REMOTE_NOT_LISTENING" },
  1230. { 0xC00000BD, "STATUS_DUPLICATE_NAME" },
  1231. { 0xC00000BE, "STATUS_BAD_NETWORK_PATH" },
  1232. { 0xC00000BF, "STATUS_NETWORK_BUSY" },
  1233. { 0xC00000C0, "STATUS_DEVICE_DOES_NOT_EXIST" },
  1234. { 0xC00000C1, "STATUS_TOO_MANY_COMMANDS" },
  1235. { 0xC00000C2, "STATUS_ADAPTER_HARDWARE_ERROR" },
  1236. { 0xC00000C3, "STATUS_INVALID_NETWORK_RESPONSE" },
  1237. { 0xC00000C4, "STATUS_UNEXPECTED_NETWORK_ERROR" },
  1238. { 0xC00000C5, "STATUS_BAD_REMOTE_ADAPTER" },
  1239. { 0xC00000C6, "STATUS_PRINT_QUEUE_FULL" },
  1240. { 0xC00000C7, "STATUS_NO_SPOOL_SPACE" },
  1241. { 0xC00000C8, "STATUS_PRINT_CANCELLED" },
  1242. { 0xC00000C9, "STATUS_NETWORK_NAME_DELETED" },
  1243. { 0xC00000CA, "STATUS_NETWORK_ACCESS_DENIED" },
  1244. { 0xC00000CB, "STATUS_BAD_DEVICE_TYPE" },
  1245. { 0xC00000CC, "STATUS_BAD_NETWORK_NAME" },
  1246. { 0xC00000CD, "STATUS_TOO_MANY_NAMES" },
  1247. { 0xC00000CE, "STATUS_TOO_MANY_SESSIONS" },
  1248. { 0xC00000CF, "STATUS_SHARING_PAUSED" },
  1249. { 0xC00000D0, "STATUS_REQUEST_NOT_ACCEPTED" },
  1250. { 0xC00000D1, "STATUS_REDIRECTOR_PAUSED" },
  1251. { 0xC00000D2, "STATUS_NET_WRITE_FAULT" },
  1252. { 0xC00000D3, "STATUS_PROFILING_AT_LIMIT" },
  1253. { 0xC00000D4, "STATUS_NOT_SAME_DEVICE" },
  1254. { 0xC00000D5, "STATUS_FILE_RENAMED" },
  1255. { 0xC00000D6, "STATUS_VIRTUAL_CIRCUIT_CLOSED" },
  1256. { 0xC00000D7, "STATUS_NO_SECURITY_ON_OBJECT" },
  1257. { 0xC00000D8, "STATUS_CANT_WAIT" },
  1258. { 0xC00000D9, "STATUS_PIPE_EMPTY" },
  1259. { 0xC00000DA, "STATUS_CANT_ACCESS_DOMAIN_INFO" },
  1260. { 0xC00000DB, "STATUS_CANT_TERMINATE_SELF" },
  1261. { 0xC00000DC, "STATUS_INVALID_SERVER_STATE" },
  1262. { 0xC00000DD, "STATUS_INVALID_DOMAIN_STATE" },
  1263. { 0xC00000DE, "STATUS_INVALID_DOMAIN_ROLE" },
  1264. { 0xC00000DF, "STATUS_NO_SUCH_DOMAIN" },
  1265. { 0xC00000E0, "STATUS_DOMAIN_EXISTS" },
  1266. { 0xC00000E1, "STATUS_DOMAIN_LIMIT_EXCEEDED" },
  1267. { 0xC00000E2, "STATUS_OPLOCK_NOT_GRANTED" },
  1268. { 0xC00000E3, "STATUS_INVALID_OPLOCK_PROTOCOL" },
  1269. { 0xC00000E4, "STATUS_INTERNAL_DB_CORRUPTION" },
  1270. { 0xC00000E5, "STATUS_INTERNAL_ERROR" },
  1271. { 0xC00000E6, "STATUS_GENERIC_NOT_MAPPED" },
  1272. { 0xC00000E7, "STATUS_BAD_DESCRIPTOR_FORMAT" },
  1273. { 0xC00000E8, "STATUS_INVALID_USER_BUFFER" },
  1274. { 0xC00000E9, "STATUS_UNEXPECTED_IO_ERROR" },
  1275. { 0xC00000EA, "STATUS_UNEXPECTED_MM_CREATE_ERR" },
  1276. { 0xC00000EB, "STATUS_UNEXPECTED_MM_MAP_ERROR" },
  1277. { 0xC00000EC, "STATUS_UNEXPECTED_MM_EXTEND_ERR" },
  1278. { 0xC00000ED, "STATUS_NOT_LOGON_PROCESS" },
  1279. { 0xC00000EE, "STATUS_LOGON_SESSION_EXISTS" },
  1280. { 0xC00000EF, "STATUS_INVALID_PARAMETER_1" },
  1281. { 0xC00000F0, "STATUS_INVALID_PARAMETER_2" },
  1282. { 0xC00000F1, "STATUS_INVALID_PARAMETER_3" },
  1283. { 0xC00000F2, "STATUS_INVALID_PARAMETER_4" },
  1284. { 0xC00000F3, "STATUS_INVALID_PARAMETER_5" },
  1285. { 0xC00000F4, "STATUS_INVALID_PARAMETER_6" },
  1286. { 0xC00000F5, "STATUS_INVALID_PARAMETER_7" },
  1287. { 0xC00000F6, "STATUS_INVALID_PARAMETER_8" },
  1288. { 0xC00000F7, "STATUS_INVALID_PARAMETER_9" },
  1289. { 0xC00000F8, "STATUS_INVALID_PARAMETER_10" },
  1290. { 0xC00000F9, "STATUS_INVALID_PARAMETER_11" },
  1291. { 0xC00000FA, "STATUS_INVALID_PARAMETER_12" },
  1292. { 0xC00000FB, "STATUS_REDIRECTOR_NOT_STARTED" },
  1293. { 0xC00000FC, "STATUS_REDIRECTOR_STARTED" },
  1294. { 0xC00000FD, "STATUS_STACK_OVERFLOW" },
  1295. { 0xC00000FE, "STATUS_NO_SUCH_PACKAGE" },
  1296. { 0xC00000FF, "STATUS_BAD_FUNCTION_TABLE" },
  1297. { 0xC0000100, "STATUS_VARIABLE_NOT_FOUND" },
  1298. { 0xC0000101, "STATUS_DIRECTORY_NOT_EMPTY" },
  1299. { 0xC0000102, "STATUS_FILE_CORRUPT_ERROR" },
  1300. { 0xC0000103, "STATUS_NOT_A_DIRECTORY" },
  1301. { 0xC0000104, "STATUS_BAD_LOGON_SESSION_STATE" },
  1302. { 0xC0000105, "STATUS_LOGON_SESSION_COLLISION" },
  1303. { 0xC0000106, "STATUS_NAME_TOO_LONG" },
  1304. { 0xC0000107, "STATUS_FILES_OPEN" },
  1305. { 0xC0000108, "STATUS_CONNECTION_IN_USE" },
  1306. { 0xC0000109, "STATUS_MESSAGE_NOT_FOUND" },
  1307. { 0xC000010A, "STATUS_PROCESS_IS_TERMINATING" },
  1308. { 0xC000010B, "STATUS_INVALID_LOGON_TYPE" },
  1309. { 0xC000010C, "STATUS_NO_GUID_TRANSLATION" },
  1310. { 0xC000010D, "STATUS_CANNOT_IMPERSONATE" },
  1311. { 0xC000010E, "STATUS_IMAGE_ALREADY_LOADED" },
  1312. { 0xC000010F, "STATUS_ABIOS_NOT_PRESENT" },
  1313. { 0xC0000110, "STATUS_ABIOS_LID_NOT_EXIST" },
  1314. { 0xC0000111, "STATUS_ABIOS_LID_ALREADY_OWNED" },
  1315. { 0xC0000112, "STATUS_ABIOS_NOT_LID_OWNER" },
  1316. { 0xC0000113, "STATUS_ABIOS_INVALID_COMMAND" },
  1317. { 0xC0000114, "STATUS_ABIOS_INVALID_LID" },
  1318. { 0xC0000115, "STATUS_ABIOS_SELECTOR_NOT_AVAILABLE" },
  1319. { 0xC0000116, "STATUS_ABIOS_INVALID_SELECTOR" },
  1320. { 0xC0000117, "STATUS_NO_LDT" },
  1321. { 0xC0000118, "STATUS_INVALID_LDT_SIZE" },
  1322. { 0xC0000119, "STATUS_INVALID_LDT_OFFSET" },
  1323. { 0xC000011A, "STATUS_INVALID_LDT_DESCRIPTOR" },
  1324. { 0xC000011B, "STATUS_INVALID_IMAGE_NE_FORMAT" },
  1325. { 0xC000011C, "STATUS_RXACT_INVALID_STATE" },
  1326. { 0xC000011D, "STATUS_RXACT_COMMIT_FAILURE" },
  1327. { 0xC000011E, "STATUS_MAPPED_FILE_SIZE_ZERO" },
  1328. { 0xC000011F, "STATUS_TOO_MANY_OPENED_FILES" },
  1329. { 0xC0000120, "STATUS_CANCELLED" },
  1330. { 0xC0000121, "STATUS_CANNOT_DELETE" },
  1331. { 0xC0000122, "STATUS_INVALID_COMPUTER_NAME" },
  1332. { 0xC0000123, "STATUS_FILE_DELETED" },
  1333. { 0xC0000124, "STATUS_SPECIAL_ACCOUNT" },
  1334. { 0xC0000125, "STATUS_SPECIAL_GROUP" },
  1335. { 0xC0000126, "STATUS_SPECIAL_USER" },
  1336. { 0xC0000127, "STATUS_MEMBERS_PRIMARY_GROUP" },
  1337. { 0xC0000128, "STATUS_FILE_CLOSED" },
  1338. { 0xC0000129, "STATUS_TOO_MANY_THREADS" },
  1339. { 0xC000012A, "STATUS_THREAD_NOT_IN_PROCESS" },
  1340. { 0xC000012B, "STATUS_TOKEN_ALREADY_IN_USE" },
  1341. { 0xC000012C, "STATUS_PAGEFILE_QUOTA_EXCEEDED" },
  1342. { 0xC000012D, "STATUS_COMMITMENT_LIMIT" },
  1343. { 0xC000012E, "STATUS_INVALID_IMAGE_LE_FORMAT" },
  1344. { 0xC000012F, "STATUS_INVALID_IMAGE_NOT_MZ" },
  1345. { 0xC0000130, "STATUS_INVALID_IMAGE_PROTECT" },
  1346. { 0xC0000131, "STATUS_INVALID_IMAGE_WIN_16" },
  1347. { 0xC0000132, "STATUS_LOGON_SERVER_CONFLICT" },
  1348. { 0xC0000133, "STATUS_TIME_DIFFERENCE_AT_DC" },
  1349. { 0xC0000134, "STATUS_SYNCHRONIZATION_REQUIRED" },
  1350. { 0xC0000135, "STATUS_DLL_NOT_FOUND" },
  1351. { 0xC0000136, "STATUS_OPEN_FAILED" },
  1352. { 0xC0000137, "STATUS_IO_PRIVILEGE_FAILED" },
  1353. { 0xC0000138, "STATUS_ORDINAL_NOT_FOUND" },
  1354. { 0xC0000139, "STATUS_ENTRYPOINT_NOT_FOUND" },
  1355. { 0xC000013A, "STATUS_CONTROL_C_EXIT" },
  1356. { 0xC000013B, "STATUS_LOCAL_DISCONNECT" },
  1357. { 0xC000013C, "STATUS_REMOTE_DISCONNECT" },
  1358. { 0xC000013D, "STATUS_REMOTE_RESOURCES" },
  1359. { 0xC000013E, "STATUS_LINK_FAILED" },
  1360. { 0xC000013F, "STATUS_LINK_TIMEOUT" },
  1361. { 0xC0000140, "STATUS_INVALID_CONNECTION" },
  1362. { 0xC0000141, "STATUS_INVALID_ADDRESS" },
  1363. { 0xC0000142, "STATUS_DLL_INIT_FAILED" },
  1364. { 0xC0000143, "STATUS_MISSING_SYSTEMFILE" },
  1365. { 0xC0000144, "STATUS_UNHANDLED_EXCEPTION" },
  1366. { 0xC0000145, "STATUS_APP_INIT_FAILURE" },
  1367. { 0xC0000146, "STATUS_PAGEFILE_CREATE_FAILED" },
  1368. { 0xC0000147, "STATUS_NO_PAGEFILE" },
  1369. { 0xC0000148, "STATUS_INVALID_LEVEL" },
  1370. { 0xC0000149, "STATUS_WRONG_PASSWORD_CORE" },
  1371. { 0xC000014A, "STATUS_ILLEGAL_FLOAT_CONTEXT" },
  1372. { 0xC000014B, "STATUS_PIPE_BROKEN" },
  1373. { 0xC000014C, "STATUS_REGISTRY_CORRUPT" },
  1374. { 0xC000014D, "STATUS_REGISTRY_IO_FAILED" },
  1375. { 0xC000014E, "STATUS_NO_EVENT_PAIR" },
  1376. { 0xC000014F, "STATUS_UNRECOGNIZED_VOLUME" },
  1377. { 0xC0000150, "STATUS_SERIAL_NO_DEVICE_INITED" },
  1378. { 0xC0000151, "STATUS_NO_SUCH_ALIAS" },
  1379. { 0xC0000152, "STATUS_MEMBER_NOT_IN_ALIAS" },
  1380. { 0xC0000153, "STATUS_MEMBER_IN_ALIAS" },
  1381. { 0xC0000154, "STATUS_ALIAS_EXISTS" },
  1382. { 0xC0000155, "STATUS_LOGON_NOT_GRANTED" },
  1383. { 0xC0000156, "STATUS_TOO_MANY_SECRETS" },
  1384. { 0xC0000157, "STATUS_SECRET_TOO_LONG" },
  1385. { 0xC0000158, "STATUS_INTERNAL_DB_ERROR" },
  1386. { 0xC0000159, "STATUS_FULLSCREEN_MODE" },
  1387. { 0xC000015A, "STATUS_TOO_MANY_CONTEXT_IDS" },
  1388. { 0xC000015B, "STATUS_LOGON_TYPE_NOT_GRANTED" },
  1389. { 0xC000015C, "STATUS_NOT_REGISTRY_FILE" },
  1390. { 0xC000015D, "STATUS_NT_CROSS_ENCRYPTION_REQUIRED" },
  1391. { 0xC000015E, "STATUS_DOMAIN_CTRLR_CONFIG_ERROR" },
  1392. { 0xC000015F, "STATUS_FT_MISSING_MEMBER" },
  1393. { 0xC0000160, "STATUS_ILL_FORMED_SERVICE_ENTRY" },
  1394. { 0xC0000161, "STATUS_ILLEGAL_CHARACTER" },
  1395. { 0xC0000162, "STATUS_UNMAPPABLE_CHARACTER" },
  1396. { 0xC0000163, "STATUS_UNDEFINED_CHARACTER" },
  1397. { 0xC0000164, "STATUS_FLOPPY_VOLUME" },
  1398. { 0xC0000165, "STATUS_FLOPPY_ID_MARK_NOT_FOUND" },
  1399. { 0xC0000166, "STATUS_FLOPPY_WRONG_CYLINDER" },
  1400. { 0xC0000167, "STATUS_FLOPPY_UNKNOWN_ERROR" },
  1401. { 0xC0000168, "STATUS_FLOPPY_BAD_REGISTERS" },
  1402. { 0xC0000169, "STATUS_DISK_RECALIBRATE_FAILED" },
  1403. { 0xC000016A, "STATUS_DISK_OPERATION_FAILED" },
  1404. { 0xC000016B, "STATUS_DISK_RESET_FAILED" },
  1405. { 0xC000016C, "STATUS_SHARED_IRQ_BUSY" },
  1406. { 0xC000016D, "STATUS_FT_ORPHANING" },
  1407. { 0xC000016E, "STATUS_BIOS_FAILED_TO_CONNECT_INTERRUPT" },
  1408. { 0xC0000172, "STATUS_PARTITION_FAILURE" },
  1409. { 0xC0000173, "STATUS_INVALID_BLOCK_LENGTH" },
  1410. { 0xC0000174, "STATUS_DEVICE_NOT_PARTITIONED" },
  1411. { 0xC0000175, "STATUS_UNABLE_TO_LOCK_MEDIA" },
  1412. { 0xC0000176, "STATUS_UNABLE_TO_UNLOAD_MEDIA" },
  1413. { 0xC0000177, "STATUS_EOM_OVERFLOW" },
  1414. { 0xC0000178, "STATUS_NO_MEDIA" },
  1415. { 0xC000017A, "STATUS_NO_SUCH_MEMBER" },
  1416. { 0xC000017B, "STATUS_INVALID_MEMBER" },
  1417. { 0xC000017C, "STATUS_KEY_DELETED" },
  1418. { 0xC000017D, "STATUS_NO_LOG_SPACE" },
  1419. { 0xC000017E, "STATUS_TOO_MANY_SIDS" },
  1420. { 0xC000017F, "STATUS_LM_CROSS_ENCRYPTION_REQUIRED" },
  1421. { 0xC0000180, "STATUS_KEY_HAS_CHILDREN" },
  1422. { 0xC0000181, "STATUS_CHILD_MUST_BE_VOLATILE" },
  1423. { 0xC0000182, "STATUS_DEVICE_CONFIGURATION_ERROR" },
  1424. { 0xC0000183, "STATUS_DRIVER_INTERNAL_ERROR" },
  1425. { 0xC0000184, "STATUS_INVALID_DEVICE_STATE" },
  1426. { 0xC0000185, "STATUS_IO_DEVICE_ERROR" },
  1427. { 0xC0000186, "STATUS_DEVICE_PROTOCOL_ERROR" },
  1428. { 0xC0000187, "STATUS_BACKUP_CONTROLLER" },
  1429. { 0xC0000188, "STATUS_LOG_FILE_FULL" },
  1430. { 0xC0000189, "STATUS_TOO_LATE" },
  1431. { 0xC000018A, "STATUS_NO_TRUST_LSA_SECRET" },
  1432. { 0xC000018B, "STATUS_NO_TRUST_SAM_ACCOUNT" },
  1433. { 0xC000018C, "STATUS_TRUSTED_DOMAIN_FAILURE" },
  1434. { 0xC000018D, "STATUS_TRUSTED_RELATIONSHIP_FAILURE" },
  1435. { 0xC000018E, "STATUS_EVENTLOG_FILE_CORRUPT" },
  1436. { 0xC000018F, "STATUS_EVENTLOG_CANT_START" },
  1437. { 0xC0000190, "STATUS_TRUST_FAILURE" },
  1438. { 0xC0000191, "STATUS_MUTANT_LIMIT_EXCEEDED" },
  1439. { 0xC0000192, "STATUS_NETLOGON_NOT_STARTED" },
  1440. { 0xC0000193, "STATUS_ACCOUNT_EXPIRED" },
  1441. { 0xC0000194, "STATUS_POSSIBLE_DEADLOCK" },
  1442. { 0xC0000195, "STATUS_NETWORK_CREDENTIAL_CONFLICT" },
  1443. { 0xC0000196, "STATUS_REMOTE_SESSION_LIMIT" },
  1444. { 0xC0000197, "STATUS_EVENTLOG_FILE_CHANGED" },
  1445. { 0xC0000198, "STATUS_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT" },
  1446. { 0xC0000199, "STATUS_NOLOGON_WORKSTATION_TRUST_ACCOUNT" },
  1447. { 0xC000019A, "STATUS_NOLOGON_SERVER_TRUST_ACCOUNT" },
  1448. { 0xC000019B, "STATUS_DOMAIN_TRUST_INCONSISTENT" },
  1449. { 0xC000019C, "STATUS_FS_DRIVER_REQUIRED" },
  1450. { 0xC0000202, "STATUS_NO_USER_SESSION_KEY" },
  1451. { 0xC0000203, "STATUS_USER_SESSION_DELETED" },
  1452. { 0xC0000204, "STATUS_RESOURCE_LANG_NOT_FOUND" },
  1453. { 0xC0000205, "STATUS_INSUFF_SERVER_RESOURCES" },
  1454. { 0xC0000206, "STATUS_INVALID_BUFFER_SIZE" },
  1455. { 0xC0000207, "STATUS_INVALID_ADDRESS_COMPONENT" },
  1456. { 0xC0000208, "STATUS_INVALID_ADDRESS_WILDCARD" },
  1457. { 0xC0000209, "STATUS_TOO_MANY_ADDRESSES" },
  1458. { 0xC000020A, "STATUS_ADDRESS_ALREADY_EXISTS" },
  1459. { 0xC000020B, "STATUS_ADDRESS_CLOSED" },
  1460. { 0xC000020C, "STATUS_CONNECTION_DISCONNECTED" },
  1461. { 0xC000020D, "STATUS_CONNECTION_RESET" },
  1462. { 0xC000020E, "STATUS_TOO_MANY_NODES" },
  1463. { 0xC000020F, "STATUS_TRANSACTION_ABORTED" },
  1464. { 0xC0000210, "STATUS_TRANSACTION_TIMED_OUT" },
  1465. { 0xC0000211, "STATUS_TRANSACTION_NO_RELEASE" },
  1466. { 0xC0000212, "STATUS_TRANSACTION_NO_MATCH" },
  1467. { 0xC0000213, "STATUS_TRANSACTION_RESPONDED" },
  1468. { 0xC0000214, "STATUS_TRANSACTION_INVALID_ID" },
  1469. { 0xC0000215, "STATUS_TRANSACTION_INVALID_TYPE" },
  1470. { 0xC0000216, "STATUS_NOT_SERVER_SESSION" },
  1471. { 0xC0000217, "STATUS_NOT_CLIENT_SESSION" },
  1472. { 0xC0000218, "STATUS_CANNOT_LOAD_REGISTRY_FILE" },
  1473. { 0xC0000219, "STATUS_DEBUG_ATTACH_FAILED" },
  1474. { 0xC000021A, "STATUS_SYSTEM_PROCESS_TERMINATED" },
  1475. { 0xC000021B, "STATUS_DATA_NOT_ACCEPTED" },
  1476. { 0xC000021C, "STATUS_NO_BROWSER_SERVERS_FOUND" },
  1477. { 0xC000021D, "STATUS_VDM_HARD_ERROR" },
  1478. { 0xC000021E, "STATUS_DRIVER_CANCEL_TIMEOUT" },
  1479. { 0xC000021F, "STATUS_REPLY_MESSAGE_MISMATCH" },
  1480. { 0xC0000220, "STATUS_MAPPED_ALIGNMENT" },
  1481. { 0xC0000221, "STATUS_IMAGE_CHECKSUM_MISMATCH" },
  1482. { 0xC0000222, "STATUS_LOST_WRITEBEHIND_DATA" },
  1483. { 0xC0000223, "STATUS_CLIENT_SERVER_PARAMETERS_INVALID" },
  1484. { 0xC0000224, "STATUS_PASSWORD_MUST_CHANGE" },
  1485. { 0xC0000225, "STATUS_NOT_FOUND" },
  1486. { 0xC0000226, "STATUS_NOT_TINY_STREAM" },
  1487. { 0xC0000227, "STATUS_RECOVERY_FAILURE" },
  1488. { 0xC0000228, "STATUS_STACK_OVERFLOW_READ" },
  1489. { 0xC0000229, "STATUS_FAIL_CHECK" },
  1490. { 0xC000022A, "STATUS_DUPLICATE_OBJECTID" },
  1491. { 0xC000022B, "STATUS_OBJECTID_EXISTS" },
  1492. { 0xC000022C, "STATUS_CONVERT_TO_LARGE" },
  1493. { 0xC000022D, "STATUS_RETRY" },
  1494. { 0xC000022E, "STATUS_FOUND_OUT_OF_SCOPE" },
  1495. { 0xC000022F, "STATUS_ALLOCATE_BUCKET" },
  1496. { 0xC0000230, "STATUS_PROPSET_NOT_FOUND"