debugpy 1.8.5__zip → 1.8.7__zip

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (340) hide show
  1. {debugpy-1.8.5/src/debugpy.egg-info → debugpy-1.8.7}/PKG-INFO +1 -1
  2. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_bundle/_pydev_calltip_util.py +19 -21
  3. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_bundle/_pydev_completer.py +30 -30
  4. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_bundle/_pydev_execfile.py +3 -1
  5. debugpy-1.8.7/src/debugpy/_vendored/pydevd/_pydev_bundle/_pydev_filesystem_encoding.py +43 -0
  6. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_bundle/_pydev_getopt.py +35 -32
  7. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_bundle/_pydev_imports_tipper.py +83 -84
  8. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_bundle/_pydev_jy_imports_tipper.py +92 -99
  9. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_bundle/_pydev_log.py +2 -3
  10. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_bundle/_pydev_saved_modules.py +51 -27
  11. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_bundle/_pydev_sys_patch.py +11 -7
  12. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_bundle/_pydev_tipper_common.py +6 -5
  13. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_bundle/fsnotify/__init__.py +34 -38
  14. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_bundle/pydev_console_utils.py +71 -69
  15. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_bundle/pydev_import_hook.py +1 -3
  16. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_bundle/pydev_imports.py +0 -1
  17. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_bundle/pydev_ipython_console.py +14 -16
  18. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_bundle/pydev_ipython_console_011.py +81 -93
  19. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_bundle/pydev_is_thread_alive.py +3 -3
  20. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_bundle/pydev_localhost.py +9 -8
  21. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_bundle/pydev_log.py +33 -25
  22. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_bundle/pydev_monkey.py +183 -170
  23. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_bundle/pydev_monkey_qt.py +33 -29
  24. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_bundle/pydev_override.py +6 -4
  25. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_bundle/pydev_umd.py +19 -18
  26. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_bundle/pydev_versioncheck.py +3 -3
  27. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_runfiles/pydev_runfiles.py +165 -138
  28. debugpy-1.8.7/src/debugpy/_vendored/pydevd/_pydev_runfiles/pydev_runfiles_coverage.py +77 -0
  29. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_runfiles/pydev_runfiles_nose.py +35 -36
  30. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_runfiles/pydev_runfiles_parallel.py +22 -23
  31. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_runfiles/pydev_runfiles_parallel_client.py +37 -57
  32. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_runfiles/pydev_runfiles_pytest2.py +54 -52
  33. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_runfiles/pydev_runfiles_unittest.py +28 -37
  34. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_runfiles/pydev_runfiles_xml_rpc.py +56 -53
  35. debugpy-1.8.7/src/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/__main__pydevd_gen_debug_adapter_protocol.py +604 -0
  36. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/debugProtocol.json +551 -445
  37. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/pydevd_base_schema.py +25 -29
  38. debugpy-1.8.7/src/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/pydevd_schema.py +17458 -0
  39. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/pydevd_schema_log.py +11 -12
  40. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevconsole_code.py +18 -19
  41. debugpy-1.8.7/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_additional_thread_info.py +41 -0
  42. debugpy-1.8.7/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_additional_thread_info_regular.py +328 -0
  43. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_api.py +263 -214
  44. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_breakpoints.py +7 -10
  45. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_bytecode_utils.py +187 -92
  46. debugpy-1.8.7/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_bytecode_utils_py311.py +105 -0
  47. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_code_to_source.py +46 -51
  48. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_collect_bytecode_info.py +239 -176
  49. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_comm.py +370 -297
  50. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_comm_constants.py +78 -86
  51. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_command_line_handling.py +55 -59
  52. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_concurrency_analyser/pydevd_concurrency_logger.py +194 -58
  53. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_concurrency_analyser/pydevd_thread_wrappers.py +2 -3
  54. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_console.py +18 -23
  55. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_constants.py +159 -127
  56. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_custom_frames.py +10 -12
  57. debugpy-1.8.7/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_cython.c +55527 -0
  58. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_cython.pxd +15 -0
  59. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_cython.pyx +803 -511
  60. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_cython_wrapper.py +18 -7
  61. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_daemon_thread.py +32 -24
  62. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_defaults.py +11 -13
  63. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_dont_trace.py +16 -16
  64. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_dont_trace_files.py +27 -2
  65. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_exec2.py +1 -1
  66. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_extension_api.py +4 -5
  67. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_extension_utils.py +8 -10
  68. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_filtering.py +50 -45
  69. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_frame.py +462 -407
  70. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_frame_utils.py +69 -61
  71. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_gevent_integration.py +14 -16
  72. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_import_class.py +27 -25
  73. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_io.py +40 -42
  74. debugpy-1.8.7/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_json_debug_options.py +200 -0
  75. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_net_command.py +20 -19
  76. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_net_command_factory_json.py +199 -108
  77. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_net_command_factory_xml.py +121 -73
  78. debugpy-1.8.7/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_plugin_utils.py +208 -0
  79. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_process_net_command.py +206 -159
  80. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_process_net_command_json.py +346 -334
  81. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_referrers.py +75 -80
  82. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_reload.py +35 -35
  83. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_resolver.py +116 -124
  84. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py +44 -58
  85. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_safe_repr.py +51 -55
  86. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_save_locals.py +4 -2
  87. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_signature.py +24 -24
  88. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_source_mapping.py +19 -20
  89. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_stackless.py +45 -49
  90. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_suspended_frames.py +61 -58
  91. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_thread_lifecycle.py +23 -13
  92. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_timeout.py +29 -31
  93. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_trace_dispatch.py +41 -11
  94. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_trace_dispatch_regular.py +117 -55
  95. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_traceproperty.py +11 -14
  96. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_utils.py +90 -89
  97. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_vars.py +106 -97
  98. debugpy-1.8.7/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_vm_type.py +40 -0
  99. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_xml.py +56 -46
  100. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/pydevd_frame_eval_cython_wrapper.py +5 -5
  101. debugpy-1.8.7/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/pydevd_frame_eval_main.py +71 -0
  102. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/pydevd_frame_evaluator.c +11165 -5326
  103. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/pydevd_frame_tracing.py +5 -6
  104. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/pydevd_modify_bytecode.py +53 -56
  105. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/__init__.py +1 -0
  106. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/bytecode.py +4 -6
  107. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/cfg.py +6 -26
  108. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/concrete.py +7 -21
  109. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/flags.py +5 -24
  110. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/instr.py +10 -34
  111. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/peephole_opt.py +1 -4
  112. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/__init__.py +2 -6
  113. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/test_bytecode.py +3 -5
  114. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/test_cfg.py +11 -31
  115. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/test_code.py +2 -2
  116. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/test_concrete.py +14 -41
  117. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/test_flags.py +2 -4
  118. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/test_instr.py +7 -18
  119. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/test_misc.py +6 -18
  120. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/test_peephole_opt.py +7 -18
  121. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/util_annotation.py +1 -3
  122. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/pydevd_fix_code.py +14 -19
  123. debugpy-1.8.7/src/debugpy/_vendored/pydevd/_pydevd_sys_monitoring/_pydevd_sys_monitoring.py +1929 -0
  124. debugpy-1.8.7/src/debugpy/_vendored/pydevd/_pydevd_sys_monitoring/_pydevd_sys_monitoring_cython.c +43253 -0
  125. debugpy-1.8.7/src/debugpy/_vendored/pydevd/_pydevd_sys_monitoring/_pydevd_sys_monitoring_cython.pxd +46 -0
  126. debugpy-1.8.7/src/debugpy/_vendored/pydevd/_pydevd_sys_monitoring/_pydevd_sys_monitoring_cython.pyx +1935 -0
  127. debugpy-1.8.7/src/debugpy/_vendored/pydevd/_pydevd_sys_monitoring/pydevd_sys_monitoring.py +16 -0
  128. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydev_app_engine_debug_startup.py +12 -11
  129. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydev_coverage.py +30 -32
  130. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydev_ipython/inputhook.py +58 -54
  131. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydev_ipython/inputhookglut.py +20 -24
  132. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydev_ipython/inputhookgtk.py +8 -7
  133. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydev_ipython/inputhookgtk3.py +8 -6
  134. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydev_ipython/inputhookpyglet.py +11 -8
  135. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydev_ipython/inputhookqt4.py +21 -18
  136. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydev_ipython/inputhookqt5.py +17 -15
  137. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydev_ipython/inputhookqt6.py +17 -15
  138. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydev_ipython/inputhooktk.py +6 -4
  139. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydev_ipython/inputhookwx.py +14 -10
  140. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydev_ipython/matplotlibtools.py +30 -26
  141. debugpy-1.8.7/src/debugpy/_vendored/pydevd/pydev_ipython/qt.py +24 -0
  142. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydev_ipython/qt_for_kernel.py +37 -34
  143. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydev_ipython/qt_loaders.py +86 -73
  144. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydev_ipython/version.py +7 -7
  145. debugpy-1.8.7/src/debugpy/_vendored/pydevd/pydev_pysrc.py +1 -0
  146. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydev_run_in_console.py +23 -24
  147. debugpy-1.8.7/src/debugpy/_vendored/pydevd/pydev_sitecustomize/sitecustomize.py +267 -0
  148. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevconsole.py +55 -47
  149. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd.py +732 -508
  150. debugpy-1.8.7/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/_always_live_program.py +40 -0
  151. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/_check.py +1 -0
  152. debugpy-1.8.7/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/_test_attach_to_process.py +11 -0
  153. debugpy-1.8.7/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/_test_attach_to_process_linux.py +75 -0
  154. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/add_code_to_python_process.py +130 -125
  155. debugpy-1.8.7/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/attach_amd64.dll +0 -0
  156. debugpy-1.8.7/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/attach_amd64.pdb +0 -0
  157. debugpy-1.8.7/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/attach_pydevd.py +89 -0
  158. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/attach_script.py +41 -32
  159. debugpy-1.8.7/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/attach_x86.dll +0 -0
  160. debugpy-1.8.7/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/attach_x86.pdb +0 -0
  161. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/common/py_utils.hpp +1 -0
  162. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/common/py_version.hpp +9 -1
  163. debugpy-1.8.7/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/inject_dll_amd64.exe +0 -0
  164. debugpy-1.8.7/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/inject_dll_amd64.pdb +0 -0
  165. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/inject_dll_x86.exe +0 -0
  166. debugpy-1.8.7/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/inject_dll_x86.pdb +0 -0
  167. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/linux_and_mac/lldb_prepare.py +10 -9
  168. debugpy-1.8.7/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/run_code_on_dllmain_amd64.dll +0 -0
  169. debugpy-1.8.7/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/run_code_on_dllmain_amd64.pdb +0 -0
  170. debugpy-1.8.7/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/run_code_on_dllmain_x86.dll +0 -0
  171. debugpy-1.8.7/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/run_code_on_dllmain_x86.pdb +0 -0
  172. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/__init__.py +103 -119
  173. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/breakpoint.py +457 -516
  174. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/compat.py +33 -15
  175. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/crash.py +336 -281
  176. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/debug.py +101 -131
  177. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/disasm.py +148 -153
  178. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/event.py +310 -302
  179. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/interactive.py +235 -208
  180. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/module.py +185 -218
  181. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/process.py +428 -564
  182. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/registry.py +54 -53
  183. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/search.py +69 -73
  184. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/sql.py +158 -170
  185. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/system.py +143 -213
  186. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/textio.py +302 -333
  187. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/thread.py +220 -239
  188. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/util.py +198 -177
  189. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/__init__.py +11 -11
  190. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/advapi32.py +1191 -713
  191. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/context_amd64.py +248 -194
  192. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/context_i386.py +132 -120
  193. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/dbghelp.py +450 -346
  194. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/defines.py +305 -286
  195. debugpy-1.8.7/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/gdi32.py +526 -0
  196. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/kernel32.py +1479 -1097
  197. debugpy-1.8.7/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/ntdll.py +579 -0
  198. debugpy-1.8.7/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/peb_teb.py +3517 -0
  199. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/psapi.py +54 -31
  200. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/shell32.py +170 -149
  201. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/shlwapi.py +190 -108
  202. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/user32.py +542 -437
  203. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/version.py +489 -442
  204. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/wtsapi32.py +83 -65
  205. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/window.py +70 -76
  206. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/windows/attach.cpp +17 -9
  207. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/windows/compile_windows.bat +1 -1
  208. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_file_utils.py +141 -120
  209. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_plugins/__init__.py +1 -0
  210. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_plugins/django_debug.py +175 -149
  211. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_plugins/extensions/__init__.py +1 -0
  212. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_plugins/extensions/types/__init__.py +1 -0
  213. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_plugins/extensions/types/pydevd_helpers.py +5 -5
  214. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_plugins/extensions/types/pydevd_plugin_numpy_types.py +28 -28
  215. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_plugins/extensions/types/pydevd_plugin_pandas_types.py +22 -30
  216. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_plugins/extensions/types/pydevd_plugins_django_form_str.py +3 -2
  217. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_plugins/jinja2_debug.py +130 -108
  218. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_plugins/pydevd_line_validation.py +27 -14
  219. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_tracing.py +85 -66
  220. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/setup_pydevd_cython.py +96 -59
  221. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_version.py +3 -3
  222. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/common/messaging.py +2 -1
  223. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/server/cli.py +32 -17
  224. {debugpy-1.8.5 → debugpy-1.8.7/src/debugpy.egg-info}/PKG-INFO +1 -1
  225. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy.egg-info/SOURCES.txt +6 -1
  226. debugpy-1.8.5/src/debugpy/_vendored/pydevd/_pydev_bundle/_pydev_filesystem_encoding.py +0 -41
  227. debugpy-1.8.5/src/debugpy/_vendored/pydevd/_pydev_runfiles/pydev_runfiles_coverage.py +0 -76
  228. debugpy-1.8.5/src/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/__main__pydevd_gen_debug_adapter_protocol.py +0 -592
  229. debugpy-1.8.5/src/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/pydevd_schema.py +0 -19514
  230. debugpy-1.8.5/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_additional_thread_info.py +0 -19
  231. debugpy-1.8.5/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_additional_thread_info_regular.py +0 -153
  232. debugpy-1.8.5/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_cython.c +0 -43377
  233. debugpy-1.8.5/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_json_debug_options.py +0 -204
  234. debugpy-1.8.5/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_plugin_utils.py +0 -91
  235. debugpy-1.8.5/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_trace_api.py +0 -62
  236. debugpy-1.8.5/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_vm_type.py +0 -41
  237. debugpy-1.8.5/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/pydevd_frame_eval_main.py +0 -48
  238. debugpy-1.8.5/src/debugpy/_vendored/pydevd/pydev_ipython/qt.py +0 -23
  239. debugpy-1.8.5/src/debugpy/_vendored/pydevd/pydev_pysrc.py +0 -1
  240. debugpy-1.8.5/src/debugpy/_vendored/pydevd/pydev_sitecustomize/sitecustomize.py +0 -237
  241. debugpy-1.8.5/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/_always_live_program.py +0 -32
  242. debugpy-1.8.5/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/_test_attach_to_process.py +0 -9
  243. debugpy-1.8.5/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/_test_attach_to_process_linux.py +0 -74
  244. debugpy-1.8.5/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/attach_amd64.dll +0 -0
  245. debugpy-1.8.5/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/attach_amd64.pdb +0 -0
  246. debugpy-1.8.5/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/attach_pydevd.py +0 -79
  247. debugpy-1.8.5/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/attach_x86.dll +0 -0
  248. debugpy-1.8.5/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/attach_x86.pdb +0 -0
  249. debugpy-1.8.5/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/inject_dll_amd64.exe +0 -0
  250. debugpy-1.8.5/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/inject_dll_amd64.pdb +0 -0
  251. debugpy-1.8.5/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/inject_dll_x86.pdb +0 -0
  252. debugpy-1.8.5/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/run_code_on_dllmain_amd64.dll +0 -0
  253. debugpy-1.8.5/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/run_code_on_dllmain_amd64.pdb +0 -0
  254. debugpy-1.8.5/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/run_code_on_dllmain_x86.dll +0 -0
  255. debugpy-1.8.5/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/run_code_on_dllmain_x86.pdb +0 -0
  256. debugpy-1.8.5/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/gdi32.py +0 -507
  257. debugpy-1.8.5/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/ntdll.py +0 -539
  258. debugpy-1.8.5/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/peb_teb.py +0 -3435
  259. {debugpy-1.8.5 → debugpy-1.8.7}/DESCRIPTION.md +0 -0
  260. {debugpy-1.8.5 → debugpy-1.8.7}/LICENSE +0 -0
  261. {debugpy-1.8.5 → debugpy-1.8.7}/MANIFEST.in +0 -0
  262. {debugpy-1.8.5 → debugpy-1.8.7}/README.md +0 -0
  263. {debugpy-1.8.5 → debugpy-1.8.7}/pyproject.toml +0 -0
  264. {debugpy-1.8.5 → debugpy-1.8.7}/setup.cfg +0 -0
  265. {debugpy-1.8.5 → debugpy-1.8.7}/setup.py +0 -0
  266. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/ThirdPartyNotices.txt +0 -0
  267. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/__init__.py +0 -0
  268. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/__main__.py +0 -0
  269. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/__init__.py +0 -0
  270. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/_pydevd_packaging.py +0 -0
  271. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/_util.py +0 -0
  272. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/force_pydevd.py +0 -0
  273. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_bundle/__init__.py +0 -0
  274. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_runfiles/__init__.py +0 -0
  275. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/__init__.py +0 -0
  276. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/__init__.py +0 -0
  277. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/debugProtocolCustom.json +0 -0
  278. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_concurrency_analyser/__init__.py +0 -0
  279. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/.gitignore +0 -0
  280. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/__init__.py +0 -0
  281. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/pydevd_frame_evaluator.pxd +0 -0
  282. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/pydevd_frame_evaluator.pyx +0 -0
  283. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/pydevd_frame_evaluator.template.pyx +0 -0
  284. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/release_mem.h +0 -0
  285. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/README.txt +0 -0
  286. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/__init__.py +0 -0
  287. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydev_ipython/README +0 -0
  288. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydev_ipython/__init__.py +0 -0
  289. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydev_sitecustomize/__not_in_default_pythonpath.txt +0 -0
  290. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/README.txt +0 -0
  291. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/common/py_custom_pyeval_settrace.hpp +0 -0
  292. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/common/py_custom_pyeval_settrace_310.hpp +0 -0
  293. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/common/py_custom_pyeval_settrace_311.hpp +0 -0
  294. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/common/py_custom_pyeval_settrace_common.hpp +0 -0
  295. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/common/py_settrace.hpp +0 -0
  296. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/common/python.h +0 -0
  297. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/common/ref_utils.hpp +0 -0
  298. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/linux_and_mac/.gitignore +0 -0
  299. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/linux_and_mac/attach.cpp +0 -0
  300. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/linux_and_mac/compile_linux.sh +0 -0
  301. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/linux_and_mac/compile_mac.sh +0 -0
  302. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/linux_and_mac/compile_manylinux.cmd +0 -0
  303. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/windows/attach.h +0 -0
  304. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/windows/inject_dll.cpp +0 -0
  305. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/windows/py_win_helpers.hpp +0 -0
  306. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/windows/run_code_in_memory.hpp +0 -0
  307. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/windows/run_code_on_dllmain.cpp +0 -0
  308. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/windows/stdafx.cpp +0 -0
  309. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/windows/stdafx.h +0 -0
  310. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/windows/targetver.h +0 -0
  311. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_plugins/extensions/README.md +0 -0
  312. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/adapter/__init__.py +0 -0
  313. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/adapter/__main__.py +0 -0
  314. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/adapter/clients.py +0 -0
  315. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/adapter/components.py +0 -0
  316. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/adapter/launchers.py +0 -0
  317. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/adapter/servers.py +0 -0
  318. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/adapter/sessions.py +0 -0
  319. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/common/__init__.py +0 -0
  320. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/common/json.py +0 -0
  321. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/common/log.py +0 -0
  322. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/common/singleton.py +0 -0
  323. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/common/sockets.py +0 -0
  324. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/common/stacks.py +0 -0
  325. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/common/timestamp.py +0 -0
  326. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/common/util.py +0 -0
  327. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/launcher/__init__.py +0 -0
  328. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/launcher/__main__.py +0 -0
  329. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/launcher/debuggee.py +0 -0
  330. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/launcher/handlers.py +0 -0
  331. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/launcher/output.py +0 -0
  332. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/launcher/winapi.py +0 -0
  333. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/public_api.py +0 -0
  334. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/server/__init__.py +0 -0
  335. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/server/api.py +0 -0
  336. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/server/attach_pid_injected.py +0 -0
  337. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy.egg-info/dependency_links.txt +0 -0
  338. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy.egg-info/entry_points.txt +0 -0
  339. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy.egg-info/top_level.txt +0 -0
  340. {debugpy-1.8.5 → debugpy-1.8.7}/versioneer.py +0 -0
@@ -0,0 +1,3517 @@
1
+ #!/usr/bin/env python
2
+ # -*- coding: utf-8 -*-
3
+
4
+ # Copyright (c) 2009-2014, Mario Vilas
5
+ # All rights reserved.
6
+ #
7
+ # Redistribution and use in source and binary forms, with or without
8
+ # modification, are permitted provided that the following conditions are met:
9
+ #
10
+ # * Redistributions of source code must retain the above copyright notice,
11
+ # this list of conditions and the following disclaimer.
12
+ # * Redistributions in binary form must reproduce the above copyright
13
+ # notice,this list of conditions and the following disclaimer in the
14
+ # documentation and/or other materials provided with the distribution.
15
+ # * Neither the name of the copyright holder nor the names of its
16
+ # contributors may be used to endorse or promote products derived from
17
+ # this software without specific prior written permission.
18
+ #
19
+ # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20
+ # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21
+ # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22
+ # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
23
+ # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24
+ # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25
+ # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26
+ # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27
+ # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28
+ # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29
+ # POSSIBILITY OF SUCH DAMAGE.
30
+
31
+ """
32
+ PEB and TEB structures, constants and data types.
33
+ """
34
+
35
+ __revision__ = "$Id$"
36
+
37
+ from winappdbg.win32.defines import *
38
+ from winappdbg.win32.version import os
39
+
40
+ # ==============================================================================
41
+ # This is used later on to calculate the list of exported symbols.
42
+ _all = None
43
+ _all = set(vars().keys())
44
+ # ==============================================================================
45
+
46
+ # --- PEB and TEB structures, constants and data types -------------------------
47
+
48
+
49
+ # From http://www.nirsoft.net/kernel_struct/vista/CLIENT_ID.html
50
+ #
51
+ # typedef struct _CLIENT_ID
52
+ # {
53
+ # PVOID UniqueProcess;
54
+ # PVOID UniqueThread;
55
+ # } CLIENT_ID, *PCLIENT_ID;
56
+ class CLIENT_ID(Structure):
57
+ _fields_ = [
58
+ ("UniqueProcess", PVOID),
59
+ ("UniqueThread", PVOID),
60
+ ]
61
+
62
+
63
+ # From MSDN:
64
+ #
65
+ # typedef struct _LDR_DATA_TABLE_ENTRY {
66
+ # BYTE Reserved1[2];
67
+ # LIST_ENTRY InMemoryOrderLinks;
68
+ # PVOID Reserved2[2];
69
+ # PVOID DllBase;
70
+ # PVOID EntryPoint;
71
+ # PVOID Reserved3;
72
+ # UNICODE_STRING FullDllName;
73
+ # BYTE Reserved4[8];
74
+ # PVOID Reserved5[3];
75
+ # union {
76
+ # ULONG CheckSum;
77
+ # PVOID Reserved6;
78
+ # };
79
+ # ULONG TimeDateStamp;
80
+ # } LDR_DATA_TABLE_ENTRY, *PLDR_DATA_TABLE_ENTRY;
81
+ ##class LDR_DATA_TABLE_ENTRY(Structure):
82
+ ## _fields_ = [
83
+ ## ("Reserved1", BYTE * 2),
84
+ ## ("InMemoryOrderLinks", LIST_ENTRY),
85
+ ## ("Reserved2", PVOID * 2),
86
+ ## ("DllBase", PVOID),
87
+ ## ("EntryPoint", PVOID),
88
+ ## ("Reserved3", PVOID),
89
+ ## ("FullDllName", UNICODE_STRING),
90
+ ## ("Reserved4", BYTE * 8),
91
+ ## ("Reserved5", PVOID * 3),
92
+ ## ("CheckSum", ULONG),
93
+ ## ("TimeDateStamp", ULONG),
94
+ ##]
95
+
96
+ # From MSDN:
97
+ #
98
+ # typedef struct _PEB_LDR_DATA {
99
+ # BYTE Reserved1[8];
100
+ # PVOID Reserved2[3];
101
+ # LIST_ENTRY InMemoryOrderModuleList;
102
+ # } PEB_LDR_DATA,
103
+ # *PPEB_LDR_DATA;
104
+ ##class PEB_LDR_DATA(Structure):
105
+ ## _fields_ = [
106
+ ## ("Reserved1", BYTE),
107
+ ## ("Reserved2", PVOID),
108
+ ## ("InMemoryOrderModuleList", LIST_ENTRY),
109
+ ##]
110
+
111
+ # From http://undocumented.ntinternals.net/UserMode/Structures/RTL_USER_PROCESS_PARAMETERS.html
112
+ # typedef struct _RTL_USER_PROCESS_PARAMETERS {
113
+ # ULONG MaximumLength;
114
+ # ULONG Length;
115
+ # ULONG Flags;
116
+ # ULONG DebugFlags;
117
+ # PVOID ConsoleHandle;
118
+ # ULONG ConsoleFlags;
119
+ # HANDLE StdInputHandle;
120
+ # HANDLE StdOutputHandle;
121
+ # HANDLE StdErrorHandle;
122
+ # UNICODE_STRING CurrentDirectoryPath;
123
+ # HANDLE CurrentDirectoryHandle;
124
+ # UNICODE_STRING DllPath;
125
+ # UNICODE_STRING ImagePathName;
126
+ # UNICODE_STRING CommandLine;
127
+ # PVOID Environment;
128
+ # ULONG StartingPositionLeft;
129
+ # ULONG StartingPositionTop;
130
+ # ULONG Width;
131
+ # ULONG Height;
132
+ # ULONG CharWidth;
133
+ # ULONG CharHeight;
134
+ # ULONG ConsoleTextAttributes;
135
+ # ULONG WindowFlags;
136
+ # ULONG ShowWindowFlags;
137
+ # UNICODE_STRING WindowTitle;
138
+ # UNICODE_STRING DesktopName;
139
+ # UNICODE_STRING ShellInfo;
140
+ # UNICODE_STRING RuntimeData;
141
+ # RTL_DRIVE_LETTER_CURDIR DLCurrentDirectory[0x20];
142
+ # } RTL_USER_PROCESS_PARAMETERS, *PRTL_USER_PROCESS_PARAMETERS;
143
+
144
+ # kd> dt _RTL_USER_PROCESS_PARAMETERS
145
+ # ntdll!_RTL_USER_PROCESS_PARAMETERS
146
+ # +0x000 MaximumLength : Uint4B
147
+ # +0x004 Length : Uint4B
148
+ # +0x008 Flags : Uint4B
149
+ # +0x00c DebugFlags : Uint4B
150
+ # +0x010 ConsoleHandle : Ptr32 Void
151
+ # +0x014 ConsoleFlags : Uint4B
152
+ # +0x018 StandardInput : Ptr32 Void
153
+ # +0x01c StandardOutput : Ptr32 Void
154
+ # +0x020 StandardError : Ptr32 Void
155
+ # +0x024 CurrentDirectory : _CURDIR
156
+ # +0x030 DllPath : _UNICODE_STRING
157
+ # +0x038 ImagePathName : _UNICODE_STRING
158
+ # +0x040 CommandLine : _UNICODE_STRING
159
+ # +0x048 Environment : Ptr32 Void
160
+ # +0x04c StartingX : Uint4B
161
+ # +0x050 StartingY : Uint4B
162
+ # +0x054 CountX : Uint4B
163
+ # +0x058 CountY : Uint4B
164
+ # +0x05c CountCharsX : Uint4B
165
+ # +0x060 CountCharsY : Uint4B
166
+ # +0x064 FillAttribute : Uint4B
167
+ # +0x068 WindowFlags : Uint4B
168
+ # +0x06c ShowWindowFlags : Uint4B
169
+ # +0x070 WindowTitle : _UNICODE_STRING
170
+ # +0x078 DesktopInfo : _UNICODE_STRING
171
+ # +0x080 ShellInfo : _UNICODE_STRING
172
+ # +0x088 RuntimeData : _UNICODE_STRING
173
+ # +0x090 CurrentDirectores : [32] _RTL_DRIVE_LETTER_CURDIR
174
+ # +0x290 EnvironmentSize : Uint4B
175
+ ##class RTL_USER_PROCESS_PARAMETERS(Structure):
176
+ ## _fields_ = [
177
+ ## ("MaximumLength", ULONG),
178
+ ## ("Length", ULONG),
179
+ ## ("Flags", ULONG),
180
+ ## ("DebugFlags", ULONG),
181
+ ## ("ConsoleHandle", PVOID),
182
+ ## ("ConsoleFlags", ULONG),
183
+ ## ("StandardInput", HANDLE),
184
+ ## ("StandardOutput", HANDLE),
185
+ ## ("StandardError", HANDLE),
186
+ ## ("CurrentDirectory", CURDIR),
187
+ ## ("DllPath", UNICODE_STRING),
188
+ ## ("ImagePathName", UNICODE_STRING),
189
+ ## ("CommandLine", UNICODE_STRING),
190
+ ## ("Environment", PVOID),
191
+ ## ("StartingX", ULONG),
192
+ ## ("StartingY", ULONG),
193
+ ## ("CountX", ULONG),
194
+ ## ("CountY", ULONG),
195
+ ## ("CountCharsX", ULONG),
196
+ ## ("CountCharsY", ULONG),
197
+ ## ("FillAttribute", ULONG),
198
+ ## ("WindowFlags", ULONG),
199
+ ## ("ShowWindowFlags", ULONG),
200
+ ## ("WindowTitle", UNICODE_STRING),
201
+ ## ("DesktopInfo", UNICODE_STRING),
202
+ ## ("ShellInfo", UNICODE_STRING),
203
+ ## ("RuntimeData", UNICODE_STRING),
204
+ ## ("CurrentDirectores", RTL_DRIVE_LETTER_CURDIR * 32), # typo here?
205
+ ##
206
+ ## # Windows 2008 and Vista
207
+ ## ("EnvironmentSize", ULONG),
208
+ ##]
209
+ ## @property
210
+ ## def CurrentDirectories(self):
211
+ ## return self.CurrentDirectores
212
+
213
+
214
+ # From MSDN:
215
+ #
216
+ # typedef struct _RTL_USER_PROCESS_PARAMETERS {
217
+ # BYTE Reserved1[16];
218
+ # PVOID Reserved2[10];
219
+ # UNICODE_STRING ImagePathName;
220
+ # UNICODE_STRING CommandLine;
221
+ # } RTL_USER_PROCESS_PARAMETERS,
222
+ # *PRTL_USER_PROCESS_PARAMETERS;
223
+ class RTL_USER_PROCESS_PARAMETERS(Structure):
224
+ _fields_ = [
225
+ ("Reserved1", BYTE * 16),
226
+ ("Reserved2", PVOID * 10),
227
+ ("ImagePathName", UNICODE_STRING),
228
+ ("CommandLine", UNICODE_STRING),
229
+ ("Environment", PVOID), # undocumented!
230
+ #
231
+ # XXX TODO
232
+ # This structure should be defined with all undocumented fields for
233
+ # each version of Windows, just like it's being done for PEB and TEB.
234
+ #
235
+ ]
236
+
237
+
238
+ PPS_POST_PROCESS_INIT_ROUTINE = PVOID
239
+
240
+ # from MSDN:
241
+ #
242
+ # typedef struct _PEB {
243
+ # BYTE Reserved1[2];
244
+ # BYTE BeingDebugged;
245
+ # BYTE Reserved2[21];
246
+ # PPEB_LDR_DATA LoaderData;
247
+ # PRTL_USER_PROCESS_PARAMETERS ProcessParameters;
248
+ # BYTE Reserved3[520];
249
+ # PPS_POST_PROCESS_INIT_ROUTINE PostProcessInitRoutine;
250
+ # BYTE Reserved4[136];
251
+ # ULONG SessionId;
252
+ # } PEB;
253
+ ##class PEB(Structure):
254
+ ## _fields_ = [
255
+ ## ("Reserved1", BYTE * 2),
256
+ ## ("BeingDebugged", BYTE),
257
+ ## ("Reserved2", BYTE * 21),
258
+ ## ("LoaderData", PVOID, # PPEB_LDR_DATA
259
+ ## ("ProcessParameters", PVOID, # PRTL_USER_PROCESS_PARAMETERS
260
+ ## ("Reserved3", BYTE * 520),
261
+ ## ("PostProcessInitRoutine", PPS_POST_PROCESS_INIT_ROUTINE),
262
+ ## ("Reserved4", BYTE),
263
+ ## ("SessionId", ULONG),
264
+ ##]
265
+
266
+ # from MSDN:
267
+ #
268
+ # typedef struct _TEB {
269
+ # BYTE Reserved1[1952];
270
+ # PVOID Reserved2[412];
271
+ # PVOID TlsSlots[64];
272
+ # BYTE Reserved3[8];
273
+ # PVOID Reserved4[26];
274
+ # PVOID ReservedForOle;
275
+ # PVOID Reserved5[4];
276
+ # PVOID TlsExpansionSlots;
277
+ # } TEB,
278
+ # *PTEB;
279
+ ##class TEB(Structure):
280
+ ## _fields_ = [
281
+ ## ("Reserved1", PVOID * 1952),
282
+ ## ("Reserved2", PVOID * 412),
283
+ ## ("TlsSlots", PVOID * 64),
284
+ ## ("Reserved3", BYTE * 8),
285
+ ## ("Reserved4", PVOID * 26),
286
+ ## ("ReservedForOle", PVOID),
287
+ ## ("Reserved5", PVOID * 4),
288
+ ## ("TlsExpansionSlots", PVOID),
289
+ ##]
290
+
291
+
292
+ # from http://undocumented.ntinternals.net/UserMode/Structures/LDR_MODULE.html
293
+ #
294
+ # typedef struct _LDR_MODULE {
295
+ # LIST_ENTRY InLoadOrderModuleList;
296
+ # LIST_ENTRY InMemoryOrderModuleList;
297
+ # LIST_ENTRY InInitializationOrderModuleList;
298
+ # PVOID BaseAddress;
299
+ # PVOID EntryPoint;
300
+ # ULONG SizeOfImage;
301
+ # UNICODE_STRING FullDllName;
302
+ # UNICODE_STRING BaseDllName;
303
+ # ULONG Flags;
304
+ # SHORT LoadCount;
305
+ # SHORT TlsIndex;
306
+ # LIST_ENTRY HashTableEntry;
307
+ # ULONG TimeDateStamp;
308
+ # } LDR_MODULE, *PLDR_MODULE;
309
+ class LDR_MODULE(Structure):
310
+ _fields_ = [
311
+ ("InLoadOrderModuleList", LIST_ENTRY),
312
+ ("InMemoryOrderModuleList", LIST_ENTRY),
313
+ ("InInitializationOrderModuleList", LIST_ENTRY),
314
+ ("BaseAddress", PVOID),
315
+ ("EntryPoint", PVOID),
316
+ ("SizeOfImage", ULONG),
317
+ ("FullDllName", UNICODE_STRING),
318
+ ("BaseDllName", UNICODE_STRING),
319
+ ("Flags", ULONG),
320
+ ("LoadCount", SHORT),
321
+ ("TlsIndex", SHORT),
322
+ ("HashTableEntry", LIST_ENTRY),
323
+ ("TimeDateStamp", ULONG),
324
+ ]
325
+
326
+
327
+ # from http://undocumented.ntinternals.net/UserMode/Structures/PEB_LDR_DATA.html
328
+ #
329
+ # typedef struct _PEB_LDR_DATA {
330
+ # ULONG Length;
331
+ # BOOLEAN Initialized;
332
+ # PVOID SsHandle;
333
+ # LIST_ENTRY InLoadOrderModuleList;
334
+ # LIST_ENTRY InMemoryOrderModuleList;
335
+ # LIST_ENTRY InInitializationOrderModuleList;
336
+ # } PEB_LDR_DATA, *PPEB_LDR_DATA;
337
+ class PEB_LDR_DATA(Structure):
338
+ _fields_ = [
339
+ ("Length", ULONG),
340
+ ("Initialized", BOOLEAN),
341
+ ("SsHandle", PVOID),
342
+ ("InLoadOrderModuleList", LIST_ENTRY),
343
+ ("InMemoryOrderModuleList", LIST_ENTRY),
344
+ ("InInitializationOrderModuleList", LIST_ENTRY),
345
+ ]
346
+
347
+
348
+ # From http://undocumented.ntinternals.net/UserMode/Undocumented%20Functions/NT%20Objects/Process/PEB_FREE_BLOCK.html
349
+ #
350
+ # typedef struct _PEB_FREE_BLOCK {
351
+ # PEB_FREE_BLOCK *Next;
352
+ # ULONG Size;
353
+ # } PEB_FREE_BLOCK, *PPEB_FREE_BLOCK;
354
+ class PEB_FREE_BLOCK(Structure):
355
+ pass
356
+
357
+
358
+ ##PPEB_FREE_BLOCK = POINTER(PEB_FREE_BLOCK)
359
+ PPEB_FREE_BLOCK = PVOID
360
+
361
+ PEB_FREE_BLOCK._fields_ = [
362
+ ("Next", PPEB_FREE_BLOCK),
363
+ ("Size", ULONG),
364
+ ]
365
+
366
+
367
+ # From http://undocumented.ntinternals.net/UserMode/Structures/RTL_DRIVE_LETTER_CURDIR.html
368
+ #
369
+ # typedef struct _RTL_DRIVE_LETTER_CURDIR {
370
+ # USHORT Flags;
371
+ # USHORT Length;
372
+ # ULONG TimeStamp;
373
+ # UNICODE_STRING DosPath;
374
+ # } RTL_DRIVE_LETTER_CURDIR, *PRTL_DRIVE_LETTER_CURDIR;
375
+ class RTL_DRIVE_LETTER_CURDIR(Structure):
376
+ _fields_ = [
377
+ ("Flags", USHORT),
378
+ ("Length", USHORT),
379
+ ("TimeStamp", ULONG),
380
+ ("DosPath", UNICODE_STRING),
381
+ ]
382
+
383
+
384
+ # From http://www.nirsoft.net/kernel_struct/vista/CURDIR.html
385
+ #
386
+ # typedef struct _CURDIR
387
+ # {
388
+ # UNICODE_STRING DosPath;
389
+ # PVOID Handle;
390
+ # } CURDIR, *PCURDIR;
391
+ class CURDIR(Structure):
392
+ _fields_ = [
393
+ ("DosPath", UNICODE_STRING),
394
+ ("Handle", PVOID),
395
+ ]
396
+
397
+
398
+ # From http://www.nirsoft.net/kernel_struct/vista/RTL_CRITICAL_SECTION_DEBUG.html
399
+ #
400
+ # typedef struct _RTL_CRITICAL_SECTION_DEBUG
401
+ # {
402
+ # WORD Type;
403
+ # WORD CreatorBackTraceIndex;
404
+ # PRTL_CRITICAL_SECTION CriticalSection;
405
+ # LIST_ENTRY ProcessLocksList;
406
+ # ULONG EntryCount;
407
+ # ULONG ContentionCount;
408
+ # ULONG Flags;
409
+ # WORD CreatorBackTraceIndexHigh;
410
+ # WORD SpareUSHORT;
411
+ # } RTL_CRITICAL_SECTION_DEBUG, *PRTL_CRITICAL_SECTION_DEBUG;
412
+ #
413
+ # From http://www.nirsoft.net/kernel_struct/vista/RTL_CRITICAL_SECTION.html
414
+ #
415
+ # typedef struct _RTL_CRITICAL_SECTION
416
+ # {
417
+ # PRTL_CRITICAL_SECTION_DEBUG DebugInfo;
418
+ # LONG LockCount;
419
+ # LONG RecursionCount;
420
+ # PVOID OwningThread;
421
+ # PVOID LockSemaphore;
422
+ # ULONG SpinCount;
423
+ # } RTL_CRITICAL_SECTION, *PRTL_CRITICAL_SECTION;
424
+ #
425
+ class RTL_CRITICAL_SECTION(Structure):
426
+ _fields_ = [
427
+ ("DebugInfo", PVOID), # PRTL_CRITICAL_SECTION_DEBUG
428
+ ("LockCount", LONG),
429
+ ("RecursionCount", LONG),
430
+ ("OwningThread", PVOID),
431
+ ("LockSemaphore", PVOID),
432
+ ("SpinCount", ULONG),
433
+ ]
434
+
435
+
436
+ class RTL_CRITICAL_SECTION_DEBUG(Structure):
437
+ _fields_ = [
438
+ ("Type", WORD),
439
+ ("CreatorBackTraceIndex", WORD),
440
+ ("CriticalSection", PVOID), # PRTL_CRITICAL_SECTION
441
+ ("ProcessLocksList", LIST_ENTRY),
442
+ ("EntryCount", ULONG),
443
+ ("ContentionCount", ULONG),
444
+ ("Flags", ULONG),
445
+ ("CreatorBackTraceIndexHigh", WORD),
446
+ ("SpareUSHORT", WORD),
447
+ ]
448
+
449
+
450
+ PRTL_CRITICAL_SECTION = POINTER(RTL_CRITICAL_SECTION)
451
+ PRTL_CRITICAL_SECTION_DEBUG = POINTER(RTL_CRITICAL_SECTION_DEBUG)
452
+
453
+ PPEB_LDR_DATA = POINTER(PEB_LDR_DATA)
454
+ PRTL_USER_PROCESS_PARAMETERS = POINTER(RTL_USER_PROCESS_PARAMETERS)
455
+
456
+ PPEBLOCKROUTINE = PVOID
457
+
458
+ # BitField
459
+ ImageUsesLargePages = 1 << 0
460
+ IsProtectedProcess = 1 << 1
461
+ IsLegacyProcess = 1 << 2
462
+ IsImageDynamicallyRelocated = 1 << 3
463
+ SkipPatchingUser32Forwarders = 1 << 4
464
+
465
+ # CrossProcessFlags
466
+ ProcessInJob = 1 << 0
467
+ ProcessInitializing = 1 << 1
468
+ ProcessUsingVEH = 1 << 2
469
+ ProcessUsingVCH = 1 << 3
470
+ ProcessUsingFTH = 1 << 4
471
+
472
+ # TracingFlags
473
+ HeapTracingEnabled = 1 << 0
474
+ CritSecTracingEnabled = 1 << 1
475
+
476
+ # NtGlobalFlags
477
+ FLG_VALID_BITS = 0x003FFFFF # not a flag
478
+ FLG_STOP_ON_EXCEPTION = 0x00000001
479
+ FLG_SHOW_LDR_SNAPS = 0x00000002
480
+ FLG_DEBUG_INITIAL_COMMAND = 0x00000004
481
+ FLG_STOP_ON_HUNG_GUI = 0x00000008
482
+ FLG_HEAP_ENABLE_TAIL_CHECK = 0x00000010
483
+ FLG_HEAP_ENABLE_FREE_CHECK = 0x00000020
484
+ FLG_HEAP_VALIDATE_PARAMETERS = 0x00000040
485
+ FLG_HEAP_VALIDATE_ALL = 0x00000080
486
+ FLG_POOL_ENABLE_TAIL_CHECK = 0x00000100
487
+ FLG_POOL_ENABLE_FREE_CHECK = 0x00000200
488
+ FLG_POOL_ENABLE_TAGGING = 0x00000400
489
+ FLG_HEAP_ENABLE_TAGGING = 0x00000800
490
+ FLG_USER_STACK_TRACE_DB = 0x00001000
491
+ FLG_KERNEL_STACK_TRACE_DB = 0x00002000
492
+ FLG_MAINTAIN_OBJECT_TYPELIST = 0x00004000
493
+ FLG_HEAP_ENABLE_TAG_BY_DLL = 0x00008000
494
+ FLG_IGNORE_DEBUG_PRIV = 0x00010000
495
+ FLG_ENABLE_CSRDEBUG = 0x00020000
496
+ FLG_ENABLE_KDEBUG_SYMBOL_LOAD = 0x00040000
497
+ FLG_DISABLE_PAGE_KERNEL_STACKS = 0x00080000
498
+ FLG_HEAP_ENABLE_CALL_TRACING = 0x00100000
499
+ FLG_HEAP_DISABLE_COALESCING = 0x00200000
500
+ FLG_ENABLE_CLOSE_EXCEPTION = 0x00400000
501
+ FLG_ENABLE_EXCEPTION_LOGGING = 0x00800000
502
+ FLG_ENABLE_HANDLE_TYPE_TAGGING = 0x01000000
503
+ FLG_HEAP_PAGE_ALLOCS = 0x02000000
504
+ FLG_DEBUG_WINLOGON = 0x04000000
505
+ FLG_ENABLE_DBGPRINT_BUFFERING = 0x08000000
506
+ FLG_EARLY_CRITICAL_SECTION_EVT = 0x10000000
507
+ FLG_DISABLE_DLL_VERIFICATION = 0x80000000
508
+
509
+
510
+ class _PEB_NT(Structure):
511
+ _pack_ = 4
512
+ _fields_ = [
513
+ ("InheritedAddressSpace", BOOLEAN),
514
+ ("ReadImageFileExecOptions", UCHAR),
515
+ ("BeingDebugged", BOOLEAN),
516
+ ("BitField", UCHAR),
517
+ ("Mutant", HANDLE),
518
+ ("ImageBaseAddress", PVOID),
519
+ ("Ldr", PVOID), # PPEB_LDR_DATA
520
+ ("ProcessParameters", PVOID), # PRTL_USER_PROCESS_PARAMETERS
521
+ ("SubSystemData", PVOID),
522
+ ("ProcessHeap", PVOID),
523
+ ("FastPebLock", PVOID),
524
+ ("FastPebLockRoutine", PVOID), # PPEBLOCKROUTINE
525
+ ("FastPebUnlockRoutine", PVOID), # PPEBLOCKROUTINE
526
+ ("EnvironmentUpdateCount", ULONG),
527
+ ("KernelCallbackTable", PVOID), # Ptr32 Ptr32 Void
528
+ ("EventLogSection", PVOID),
529
+ ("EventLog", PVOID),
530
+ ("FreeList", PVOID), # PPEB_FREE_BLOCK
531
+ ("TlsExpansionCounter", ULONG),
532
+ ("TlsBitmap", PVOID),
533
+ ("TlsBitmapBits", ULONG * 2),
534
+ ("ReadOnlySharedMemoryBase", PVOID),
535
+ ("ReadOnlySharedMemoryHeap", PVOID),
536
+ ("ReadOnlyStaticServerData", PVOID), # Ptr32 Ptr32 Void
537
+ ("AnsiCodePageData", PVOID),
538
+ ("OemCodePageData", PVOID),
539
+ ("UnicodeCaseTableData", PVOID),
540
+ ("NumberOfProcessors", ULONG),
541
+ ("NtGlobalFlag", ULONG),
542
+ ("Spare2", BYTE * 4),
543
+ ("CriticalSectionTimeout", LONGLONG), # LARGE_INTEGER
544
+ ("HeapSegmentReserve", ULONG),
545
+ ("HeapSegmentCommit", ULONG),
546
+ ("HeapDeCommitTotalFreeThreshold", ULONG),
547
+ ("HeapDeCommitFreeBlockThreshold", ULONG),
548
+ ("NumberOfHeaps", ULONG),
549
+ ("MaximumNumberOfHeaps", ULONG),
550
+ ("ProcessHeaps", PVOID), # Ptr32 Ptr32 Void
551
+ ("GdiSharedHandleTable", PVOID),
552
+ ("ProcessStarterHelper", PVOID),
553
+ ("GdiDCAttributeList", PVOID),
554
+ ("LoaderLock", PVOID), # PRTL_CRITICAL_SECTION
555
+ ("OSMajorVersion", ULONG),
556
+ ("OSMinorVersion", ULONG),
557
+ ("OSBuildNumber", ULONG),
558
+ ("OSPlatformId", ULONG),
559
+ ("ImageSubSystem", ULONG),
560
+ ("ImageSubSystemMajorVersion", ULONG),
561
+ ("ImageSubSystemMinorVersion", ULONG),
562
+ ("ImageProcessAffinityMask", ULONG),
563
+ ("GdiHandleBuffer", ULONG * 34),
564
+ ("PostProcessInitRoutine", PPS_POST_PROCESS_INIT_ROUTINE),
565
+ ("TlsExpansionBitmap", ULONG),
566
+ ("TlsExpansionBitmapBits", BYTE * 128),
567
+ ("SessionId", ULONG),
568
+ ]
569
+
570
+
571
+ # not really, but "dt _PEB" in w2k isn't working for me :(
572
+ _PEB_2000 = _PEB_NT
573
+
574
+
575
+ # +0x000 InheritedAddressSpace : UChar
576
+ # +0x001 ReadImageFileExecOptions : UChar
577
+ # +0x002 BeingDebugged : UChar
578
+ # +0x003 SpareBool : UChar
579
+ # +0x004 Mutant : Ptr32 Void
580
+ # +0x008 ImageBaseAddress : Ptr32 Void
581
+ # +0x00c Ldr : Ptr32 _PEB_LDR_DATA
582
+ # +0x010 ProcessParameters : Ptr32 _RTL_USER_PROCESS_PARAMETERS
583
+ # +0x014 SubSystemData : Ptr32 Void
584
+ # +0x018 ProcessHeap : Ptr32 Void
585
+ # +0x01c FastPebLock : Ptr32 _RTL_CRITICAL_SECTION
586
+ # +0x020 FastPebLockRoutine : Ptr32 Void
587
+ # +0x024 FastPebUnlockRoutine : Ptr32 Void
588
+ # +0x028 EnvironmentUpdateCount : Uint4B
589
+ # +0x02c KernelCallbackTable : Ptr32 Void
590
+ # +0x030 SystemReserved : [1] Uint4B
591
+ # +0x034 AtlThunkSListPtr32 : Uint4B
592
+ # +0x038 FreeList : Ptr32 _PEB_FREE_BLOCK
593
+ # +0x03c TlsExpansionCounter : Uint4B
594
+ # +0x040 TlsBitmap : Ptr32 Void
595
+ # +0x044 TlsBitmapBits : [2] Uint4B
596
+ # +0x04c ReadOnlySharedMemoryBase : Ptr32 Void
597
+ # +0x050 ReadOnlySharedMemoryHeap : Ptr32 Void
598
+ # +0x054 ReadOnlyStaticServerData : Ptr32 Ptr32 Void
599
+ # +0x058 AnsiCodePageData : Ptr32 Void
600
+ # +0x05c OemCodePageData : Ptr32 Void
601
+ # +0x060 UnicodeCaseTableData : Ptr32 Void
602
+ # +0x064 NumberOfProcessors : Uint4B
603
+ # +0x068 NtGlobalFlag : Uint4B
604
+ # +0x070 CriticalSectionTimeout : _LARGE_INTEGER
605
+ # +0x078 HeapSegmentReserve : Uint4B
606
+ # +0x07c HeapSegmentCommit : Uint4B
607
+ # +0x080 HeapDeCommitTotalFreeThreshold : Uint4B
608
+ # +0x084 HeapDeCommitFreeBlockThreshold : Uint4B
609
+ # +0x088 NumberOfHeaps : Uint4B
610
+ # +0x08c MaximumNumberOfHeaps : Uint4B
611
+ # +0x090 ProcessHeaps : Ptr32 Ptr32 Void
612
+ # +0x094 GdiSharedHandleTable : Ptr32 Void
613
+ # +0x098 ProcessStarterHelper : Ptr32 Void
614
+ # +0x09c GdiDCAttributeList : Uint4B
615
+ # +0x0a0 LoaderLock : Ptr32 Void
616
+ # +0x0a4 OSMajorVersion : Uint4B
617
+ # +0x0a8 OSMinorVersion : Uint4B
618
+ # +0x0ac OSBuildNumber : Uint2B
619
+ # +0x0ae OSCSDVersion : Uint2B
620
+ # +0x0b0 OSPlatformId : Uint4B
621
+ # +0x0b4 ImageSubsystem : Uint4B
622
+ # +0x0b8 ImageSubsystemMajorVersion : Uint4B
623
+ # +0x0bc ImageSubsystemMinorVersion : Uint4B
624
+ # +0x0c0 ImageProcessAffinityMask : Uint4B
625
+ # +0x0c4 GdiHandleBuffer : [34] Uint4B
626
+ # +0x14c PostProcessInitRoutine : Ptr32 void
627
+ # +0x150 TlsExpansionBitmap : Ptr32 Void
628
+ # +0x154 TlsExpansionBitmapBits : [32] Uint4B
629
+ # +0x1d4 SessionId : Uint4B
630
+ # +0x1d8 AppCompatFlags : _ULARGE_INTEGER
631
+ # +0x1e0 AppCompatFlagsUser : _ULARGE_INTEGER
632
+ # +0x1e8 pShimData : Ptr32 Void
633
+ # +0x1ec AppCompatInfo : Ptr32 Void
634
+ # +0x1f0 CSDVersion : _UNICODE_STRING
635
+ # +0x1f8 ActivationContextData : Ptr32 Void
636
+ # +0x1fc ProcessAssemblyStorageMap : Ptr32 Void
637
+ # +0x200 SystemDefaultActivationContextData : Ptr32 Void
638
+ # +0x204 SystemAssemblyStorageMap : Ptr32 Void
639
+ # +0x208 MinimumStackCommit : Uint4B
640
+ class _PEB_XP(Structure):
641
+ _pack_ = 8
642
+ _fields_ = [
643
+ ("InheritedAddressSpace", BOOLEAN),
644
+ ("ReadImageFileExecOptions", UCHAR),
645
+ ("BeingDebugged", BOOLEAN),
646
+ ("SpareBool", UCHAR),
647
+ ("Mutant", HANDLE),
648
+ ("ImageBaseAddress", PVOID),
649
+ ("Ldr", PVOID), # PPEB_LDR_DATA
650
+ ("ProcessParameters", PVOID), # PRTL_USER_PROCESS_PARAMETERS
651
+ ("SubSystemData", PVOID),
652
+ ("ProcessHeap", PVOID),
653
+ ("FastPebLock", PVOID),
654
+ ("FastPebLockRoutine", PVOID),
655
+ ("FastPebUnlockRoutine", PVOID),
656
+ ("EnvironmentUpdateCount", DWORD),
657
+ ("KernelCallbackTable", PVOID),
658
+ ("SystemReserved", DWORD),
659
+ ("AtlThunkSListPtr32", DWORD),
660
+ ("FreeList", PVOID), # PPEB_FREE_BLOCK
661
+ ("TlsExpansionCounter", DWORD),
662
+ ("TlsBitmap", PVOID),
663
+ ("TlsBitmapBits", DWORD * 2),
664
+ ("ReadOnlySharedMemoryBase", PVOID),
665
+ ("ReadOnlySharedMemoryHeap", PVOID),
666
+ ("ReadOnlyStaticServerData", PVOID), # Ptr32 Ptr32 Void
667
+ ("AnsiCodePageData", PVOID),
668
+ ("OemCodePageData", PVOID),
669
+ ("UnicodeCaseTableData", PVOID),
670
+ ("NumberOfProcessors", DWORD),
671
+ ("NtGlobalFlag", DWORD),
672
+ ("CriticalSectionTimeout", LONGLONG), # LARGE_INTEGER
673
+ ("HeapSegmentReserve", DWORD),
674
+ ("HeapSegmentCommit", DWORD),
675
+ ("HeapDeCommitTotalFreeThreshold", DWORD),
676
+ ("HeapDeCommitFreeBlockThreshold", DWORD),
677
+ ("NumberOfHeaps", DWORD),
678
+ ("MaximumNumberOfHeaps", DWORD),
679
+ ("ProcessHeaps", PVOID), # Ptr32 Ptr32 Void
680
+ ("GdiSharedHandleTable", PVOID),
681
+ ("ProcessStarterHelper", PVOID),
682
+ ("GdiDCAttributeList", DWORD),
683
+ ("LoaderLock", PVOID), # PRTL_CRITICAL_SECTION
684
+ ("OSMajorVersion", DWORD),
685
+ ("OSMinorVersion", DWORD),
686
+ ("OSBuildNumber", WORD),
687
+ ("OSCSDVersion", WORD),
688
+ ("OSPlatformId", DWORD),
689
+ ("ImageSubsystem", DWORD),
690
+ ("ImageSubsystemMajorVersion", DWORD),
691
+ ("ImageSubsystemMinorVersion", DWORD),
692
+ ("ImageProcessAffinityMask", DWORD),
693
+ ("GdiHandleBuffer", DWORD * 34),
694
+ ("PostProcessInitRoutine", PPS_POST_PROCESS_INIT_ROUTINE),
695
+ ("TlsExpansionBitmap", PVOID),
696
+ ("TlsExpansionBitmapBits", DWORD * 32),
697
+ ("SessionId", DWORD),
698
+ ("AppCompatFlags", ULONGLONG), # ULARGE_INTEGER
699
+ ("AppCompatFlagsUser", ULONGLONG), # ULARGE_INTEGER
700
+ ("pShimData", PVOID),
701
+ ("AppCompatInfo", PVOID),
702
+ ("CSDVersion", UNICODE_STRING),
703
+ ("ActivationContextData", PVOID), # ACTIVATION_CONTEXT_DATA
704
+ ("ProcessAssemblyStorageMap", PVOID), # ASSEMBLY_STORAGE_MAP
705
+ ("SystemDefaultActivationContextData", PVOID), # ACTIVATION_CONTEXT_DATA
706
+ ("SystemAssemblyStorageMap", PVOID), # ASSEMBLY_STORAGE_MAP
707
+ ("MinimumStackCommit", DWORD),
708
+ ]
709
+
710
+
711
+ # +0x000 InheritedAddressSpace : UChar
712
+ # +0x001 ReadImageFileExecOptions : UChar
713
+ # +0x002 BeingDebugged : UChar
714
+ # +0x003 BitField : UChar
715
+ # +0x003 ImageUsesLargePages : Pos 0, 1 Bit
716
+ # +0x003 SpareBits : Pos 1, 7 Bits
717
+ # +0x008 Mutant : Ptr64 Void
718
+ # +0x010 ImageBaseAddress : Ptr64 Void
719
+ # +0x018 Ldr : Ptr64 _PEB_LDR_DATA
720
+ # +0x020 ProcessParameters : Ptr64 _RTL_USER_PROCESS_PARAMETERS
721
+ # +0x028 SubSystemData : Ptr64 Void
722
+ # +0x030 ProcessHeap : Ptr64 Void
723
+ # +0x038 FastPebLock : Ptr64 _RTL_CRITICAL_SECTION
724
+ # +0x040 AtlThunkSListPtr : Ptr64 Void
725
+ # +0x048 SparePtr2 : Ptr64 Void
726
+ # +0x050 EnvironmentUpdateCount : Uint4B
727
+ # +0x058 KernelCallbackTable : Ptr64 Void
728
+ # +0x060 SystemReserved : [1] Uint4B
729
+ # +0x064 SpareUlong : Uint4B
730
+ # +0x068 FreeList : Ptr64 _PEB_FREE_BLOCK
731
+ # +0x070 TlsExpansionCounter : Uint4B
732
+ # +0x078 TlsBitmap : Ptr64 Void
733
+ # +0x080 TlsBitmapBits : [2] Uint4B
734
+ # +0x088 ReadOnlySharedMemoryBase : Ptr64 Void
735
+ # +0x090 ReadOnlySharedMemoryHeap : Ptr64 Void
736
+ # +0x098 ReadOnlyStaticServerData : Ptr64 Ptr64 Void
737
+ # +0x0a0 AnsiCodePageData : Ptr64 Void
738
+ # +0x0a8 OemCodePageData : Ptr64 Void
739
+ # +0x0b0 UnicodeCaseTableData : Ptr64 Void
740
+ # +0x0b8 NumberOfProcessors : Uint4B
741
+ # +0x0bc NtGlobalFlag : Uint4B
742
+ # +0x0c0 CriticalSectionTimeout : _LARGE_INTEGER
743
+ # +0x0c8 HeapSegmentReserve : Uint8B
744
+ # +0x0d0 HeapSegmentCommit : Uint8B
745
+ # +0x0d8 HeapDeCommitTotalFreeThreshold : Uint8B
746
+ # +0x0e0 HeapDeCommitFreeBlockThreshold : Uint8B
747
+ # +0x0e8 NumberOfHeaps : Uint4B
748
+ # +0x0ec MaximumNumberOfHeaps : Uint4B
749
+ # +0x0f0 ProcessHeaps : Ptr64 Ptr64 Void
750
+ # +0x0f8 GdiSharedHandleTable : Ptr64 Void
751
+ # +0x100 ProcessStarterHelper : Ptr64 Void
752
+ # +0x108 GdiDCAttributeList : Uint4B
753
+ # +0x110 LoaderLock : Ptr64 _RTL_CRITICAL_SECTION
754
+ # +0x118 OSMajorVersion : Uint4B
755
+ # +0x11c OSMinorVersion : Uint4B
756
+ # +0x120 OSBuildNumber : Uint2B
757
+ # +0x122 OSCSDVersion : Uint2B
758
+ # +0x124 OSPlatformId : Uint4B
759
+ # +0x128 ImageSubsystem : Uint4B
760
+ # +0x12c ImageSubsystemMajorVersion : Uint4B
761
+ # +0x130 ImageSubsystemMinorVersion : Uint4B
762
+ # +0x138 ImageProcessAffinityMask : Uint8B
763
+ # +0x140 GdiHandleBuffer : [60] Uint4B
764
+ # +0x230 PostProcessInitRoutine : Ptr64 void
765
+ # +0x238 TlsExpansionBitmap : Ptr64 Void
766
+ # +0x240 TlsExpansionBitmapBits : [32] Uint4B
767
+ # +0x2c0 SessionId : Uint4B
768
+ # +0x2c8 AppCompatFlags : _ULARGE_INTEGER
769
+ # +0x2d0 AppCompatFlagsUser : _ULARGE_INTEGER
770
+ # +0x2d8 pShimData : Ptr64 Void
771
+ # +0x2e0 AppCompatInfo : Ptr64 Void
772
+ # +0x2e8 CSDVersion : _UNICODE_STRING
773
+ # +0x2f8 ActivationContextData : Ptr64 _ACTIVATION_CONTEXT_DATA
774
+ # +0x300 ProcessAssemblyStorageMap : Ptr64 _ASSEMBLY_STORAGE_MAP
775
+ # +0x308 SystemDefaultActivationContextData : Ptr64 _ACTIVATION_CONTEXT_DATA
776
+ # +0x310 SystemAssemblyStorageMap : Ptr64 _ASSEMBLY_STORAGE_MAP
777
+ # +0x318 MinimumStackCommit : Uint8B
778
+ # +0x320 FlsCallback : Ptr64 Ptr64 Void
779
+ # +0x328 FlsListHead : _LIST_ENTRY
780
+ # +0x338 FlsBitmap : Ptr64 Void
781
+ # +0x340 FlsBitmapBits : [4] Uint4B
782
+ # +0x350 FlsHighIndex : Uint4B
783
+ class _PEB_XP_64(Structure):
784
+ _pack_ = 8
785
+ _fields_ = [
786
+ ("InheritedAddressSpace", BOOLEAN),
787
+ ("ReadImageFileExecOptions", UCHAR),
788
+ ("BeingDebugged", BOOLEAN),
789
+ ("BitField", UCHAR),
790
+ ("Mutant", HANDLE),
791
+ ("ImageBaseAddress", PVOID),
792
+ ("Ldr", PVOID), # PPEB_LDR_DATA
793
+ ("ProcessParameters", PVOID), # PRTL_USER_PROCESS_PARAMETERS
794
+ ("SubSystemData", PVOID),
795
+ ("ProcessHeap", PVOID),
796
+ ("FastPebLock", PVOID), # PRTL_CRITICAL_SECTION
797
+ ("AtlThunkSListPtr", PVOID),
798
+ ("SparePtr2", PVOID),
799
+ ("EnvironmentUpdateCount", DWORD),
800
+ ("KernelCallbackTable", PVOID),
801
+ ("SystemReserved", DWORD),
802
+ ("SpareUlong", DWORD),
803
+ ("FreeList", PVOID), # PPEB_FREE_BLOCK
804
+ ("TlsExpansionCounter", DWORD),
805
+ ("TlsBitmap", PVOID),
806
+ ("TlsBitmapBits", DWORD * 2),
807
+ ("ReadOnlySharedMemoryBase", PVOID),
808
+ ("ReadOnlySharedMemoryHeap", PVOID),
809
+ ("ReadOnlyStaticServerData", PVOID), # Ptr64 Ptr64 Void
810
+ ("AnsiCodePageData", PVOID),
811
+ ("OemCodePageData", PVOID),
812
+ ("UnicodeCaseTableData", PVOID),
813
+ ("NumberOfProcessors", DWORD),
814
+ ("NtGlobalFlag", DWORD),
815
+ ("CriticalSectionTimeout", LONGLONG), # LARGE_INTEGER
816
+ ("HeapSegmentReserve", QWORD),
817
+ ("HeapSegmentCommit", QWORD),
818
+ ("HeapDeCommitTotalFreeThreshold", QWORD),
819
+ ("HeapDeCommitFreeBlockThreshold", QWORD),
820
+ ("NumberOfHeaps", DWORD),
821
+ ("MaximumNumberOfHeaps", DWORD),
822
+ ("ProcessHeaps", PVOID), # Ptr64 Ptr64 Void
823
+ ("GdiSharedHandleTable", PVOID),
824
+ ("ProcessStarterHelper", PVOID),
825
+ ("GdiDCAttributeList", DWORD),
826
+ ("LoaderLock", PVOID), # PRTL_CRITICAL_SECTION
827
+ ("OSMajorVersion", DWORD),
828
+ ("OSMinorVersion", DWORD),
829
+ ("OSBuildNumber", WORD),
830
+ ("OSCSDVersion", WORD),
831
+ ("OSPlatformId", DWORD),
832
+ ("ImageSubsystem", DWORD),
833
+ ("ImageSubsystemMajorVersion", DWORD),
834
+ ("ImageSubsystemMinorVersion", DWORD),
835
+ ("ImageProcessAffinityMask", QWORD),
836
+ ("GdiHandleBuffer", DWORD * 60),
837
+ ("PostProcessInitRoutine", PPS_POST_PROCESS_INIT_ROUTINE),
838
+ ("TlsExpansionBitmap", PVOID),
839
+ ("TlsExpansionBitmapBits", DWORD * 32),
840
+ ("SessionId", DWORD),
841
+ ("AppCompatFlags", ULONGLONG), # ULARGE_INTEGER
842
+ ("AppCompatFlagsUser", ULONGLONG), # ULARGE_INTEGER
843
+ ("pShimData", PVOID),
844
+ ("AppCompatInfo", PVOID),
845
+ ("CSDVersion", UNICODE_STRING),
846
+ ("ActivationContextData", PVOID), # ACTIVATION_CONTEXT_DATA
847
+ ("ProcessAssemblyStorageMap", PVOID), # ASSEMBLY_STORAGE_MAP
848
+ ("SystemDefaultActivationContextData", PVOID), # ACTIVATION_CONTEXT_DATA
849
+ ("SystemAssemblyStorageMap", PVOID), # ASSEMBLY_STORAGE_MAP
850
+ ("MinimumStackCommit", QWORD),
851
+ ("FlsCallback", PVOID), # Ptr64 Ptr64 Void
852
+ ("FlsListHead", LIST_ENTRY),
853
+ ("FlsBitmap", PVOID),
854
+ ("FlsBitmapBits", DWORD * 4),
855
+ ("FlsHighIndex", DWORD),
856
+ ]
857
+
858
+
859
+ # +0x000 InheritedAddressSpace : UChar
860
+ # +0x001 ReadImageFileExecOptions : UChar
861
+ # +0x002 BeingDebugged : UChar
862
+ # +0x003 BitField : UChar
863
+ # +0x003 ImageUsesLargePages : Pos 0, 1 Bit
864
+ # +0x003 SpareBits : Pos 1, 7 Bits
865
+ # +0x004 Mutant : Ptr32 Void
866
+ # +0x008 ImageBaseAddress : Ptr32 Void
867
+ # +0x00c Ldr : Ptr32 _PEB_LDR_DATA
868
+ # +0x010 ProcessParameters : Ptr32 _RTL_USER_PROCESS_PARAMETERS
869
+ # +0x014 SubSystemData : Ptr32 Void
870
+ # +0x018 ProcessHeap : Ptr32 Void
871
+ # +0x01c FastPebLock : Ptr32 _RTL_CRITICAL_SECTION
872
+ # +0x020 AtlThunkSListPtr : Ptr32 Void
873
+ # +0x024 SparePtr2 : Ptr32 Void
874
+ # +0x028 EnvironmentUpdateCount : Uint4B
875
+ # +0x02c KernelCallbackTable : Ptr32 Void
876
+ # +0x030 SystemReserved : [1] Uint4B
877
+ # +0x034 SpareUlong : Uint4B
878
+ # +0x038 FreeList : Ptr32 _PEB_FREE_BLOCK
879
+ # +0x03c TlsExpansionCounter : Uint4B
880
+ # +0x040 TlsBitmap : Ptr32 Void
881
+ # +0x044 TlsBitmapBits : [2] Uint4B
882
+ # +0x04c ReadOnlySharedMemoryBase : Ptr32 Void
883
+ # +0x050 ReadOnlySharedMemoryHeap : Ptr32 Void
884
+ # +0x054 ReadOnlyStaticServerData : Ptr32 Ptr32 Void
885
+ # +0x058 AnsiCodePageData : Ptr32 Void
886
+ # +0x05c OemCodePageData : Ptr32 Void
887
+ # +0x060 UnicodeCaseTableData : Ptr32 Void
888
+ # +0x064 NumberOfProcessors : Uint4B
889
+ # +0x068 NtGlobalFlag : Uint4B
890
+ # +0x070 CriticalSectionTimeout : _LARGE_INTEGER
891
+ # +0x078 HeapSegmentReserve : Uint4B
892
+ # +0x07c HeapSegmentCommit : Uint4B
893
+ # +0x080 HeapDeCommitTotalFreeThreshold : Uint4B
894
+ # +0x084 HeapDeCommitFreeBlockThreshold : Uint4B
895
+ # +0x088 NumberOfHeaps : Uint4B
896
+ # +0x08c MaximumNumberOfHeaps : Uint4B
897
+ # +0x090 ProcessHeaps : Ptr32 Ptr32 Void
898
+ # +0x094 GdiSharedHandleTable : Ptr32 Void
899
+ # +0x098 ProcessStarterHelper : Ptr32 Void
900
+ # +0x09c GdiDCAttributeList : Uint4B
901
+ # +0x0a0 LoaderLock : Ptr32 _RTL_CRITICAL_SECTION
902
+ # +0x0a4 OSMajorVersion : Uint4B
903
+ # +0x0a8 OSMinorVersion : Uint4B
904
+ # +0x0ac OSBuildNumber : Uint2B
905
+ # +0x0ae OSCSDVersion : Uint2B
906
+ # +0x0b0 OSPlatformId : Uint4B
907
+ # +0x0b4 ImageSubsystem : Uint4B
908
+ # +0x0b8 ImageSubsystemMajorVersion : Uint4B
909
+ # +0x0bc ImageSubsystemMinorVersion : Uint4B
910
+ # +0x0c0 ImageProcessAffinityMask : Uint4B
911
+ # +0x0c4 GdiHandleBuffer : [34] Uint4B
912
+ # +0x14c PostProcessInitRoutine : Ptr32 void
913
+ # +0x150 TlsExpansionBitmap : Ptr32 Void
914
+ # +0x154 TlsExpansionBitmapBits : [32] Uint4B
915
+ # +0x1d4 SessionId : Uint4B
916
+ # +0x1d8 AppCompatFlags : _ULARGE_INTEGER
917
+ # +0x1e0 AppCompatFlagsUser : _ULARGE_INTEGER
918
+ # +0x1e8 pShimData : Ptr32 Void
919
+ # +0x1ec AppCompatInfo : Ptr32 Void
920
+ # +0x1f0 CSDVersion : _UNICODE_STRING
921
+ # +0x1f8 ActivationContextData : Ptr32 _ACTIVATION_CONTEXT_DATA
922
+ # +0x1fc ProcessAssemblyStorageMap : Ptr32 _ASSEMBLY_STORAGE_MAP
923
+ # +0x200 SystemDefaultActivationContextData : Ptr32 _ACTIVATION_CONTEXT_DATA
924
+ # +0x204 SystemAssemblyStorageMap : Ptr32 _ASSEMBLY_STORAGE_MAP
925
+ # +0x208 MinimumStackCommit : Uint4B
926
+ # +0x20c FlsCallback : Ptr32 Ptr32 Void
927
+ # +0x210 FlsListHead : _LIST_ENTRY
928
+ # +0x218 FlsBitmap : Ptr32 Void
929
+ # +0x21c FlsBitmapBits : [4] Uint4B
930
+ # +0x22c FlsHighIndex : Uint4B
931
+ class _PEB_2003(Structure):
932
+ _pack_ = 8
933
+ _fields_ = [
934
+ ("InheritedAddressSpace", BOOLEAN),
935
+ ("ReadImageFileExecOptions", UCHAR),
936
+ ("BeingDebugged", BOOLEAN),
937
+ ("BitField", UCHAR),
938
+ ("Mutant", HANDLE),
939
+ ("ImageBaseAddress", PVOID),
940
+ ("Ldr", PVOID), # PPEB_LDR_DATA
941
+ ("ProcessParameters", PVOID), # PRTL_USER_PROCESS_PARAMETERS
942
+ ("SubSystemData", PVOID),
943
+ ("ProcessHeap", PVOID),
944
+ ("FastPebLock", PVOID), # PRTL_CRITICAL_SECTION
945
+ ("AtlThunkSListPtr", PVOID),
946
+ ("SparePtr2", PVOID),
947
+ ("EnvironmentUpdateCount", DWORD),
948
+ ("KernelCallbackTable", PVOID),
949
+ ("SystemReserved", DWORD),
950
+ ("SpareUlong", DWORD),
951
+ ("FreeList", PVOID), # PPEB_FREE_BLOCK
952
+ ("TlsExpansionCounter", DWORD),
953
+ ("TlsBitmap", PVOID),
954
+ ("TlsBitmapBits", DWORD * 2),
955
+ ("ReadOnlySharedMemoryBase", PVOID),
956
+ ("ReadOnlySharedMemoryHeap", PVOID),
957
+ ("ReadOnlyStaticServerData", PVOID), # Ptr32 Ptr32 Void
958
+ ("AnsiCodePageData", PVOID),
959
+ ("OemCodePageData", PVOID),
960
+ ("UnicodeCaseTableData", PVOID),
961
+ ("NumberOfProcessors", DWORD),
962
+ ("NtGlobalFlag", DWORD),
963
+ ("CriticalSectionTimeout", LONGLONG), # LARGE_INTEGER
964
+ ("HeapSegmentReserve", DWORD),
965
+ ("HeapSegmentCommit", DWORD),
966
+ ("HeapDeCommitTotalFreeThreshold", DWORD),
967
+ ("HeapDeCommitFreeBlockThreshold", DWORD),
968
+ ("NumberOfHeaps", DWORD),
969
+ ("MaximumNumberOfHeaps", DWORD),
970
+ ("ProcessHeaps", PVOID), # Ptr32 Ptr32 Void
971
+ ("GdiSharedHandleTable", PVOID),
972
+ ("ProcessStarterHelper", PVOID),
973
+ ("GdiDCAttributeList", DWORD),
974
+ ("LoaderLock", PVOID), # PRTL_CRITICAL_SECTION
975
+ ("OSMajorVersion", DWORD),
976
+ ("OSMinorVersion", DWORD),
977
+ ("OSBuildNumber", WORD),
978
+ ("OSCSDVersion", WORD),
979
+ ("OSPlatformId", DWORD),
980
+ ("ImageSubsystem", DWORD),
981
+ ("ImageSubsystemMajorVersion", DWORD),
982
+ ("ImageSubsystemMinorVersion", DWORD),
983
+ ("ImageProcessAffinityMask", DWORD),
984
+ ("GdiHandleBuffer", DWORD * 34),
985
+ ("PostProcessInitRoutine", PPS_POST_PROCESS_INIT_ROUTINE),
986
+ ("TlsExpansionBitmap", PVOID),
987
+ ("TlsExpansionBitmapBits", DWORD * 32),
988
+ ("SessionId", DWORD),
989
+ ("AppCompatFlags", ULONGLONG), # ULARGE_INTEGER
990
+ ("AppCompatFlagsUser", ULONGLONG), # ULARGE_INTEGER
991
+ ("pShimData", PVOID),
992
+ ("AppCompatInfo", PVOID),
993
+ ("CSDVersion", UNICODE_STRING),
994
+ ("ActivationContextData", PVOID), # ACTIVATION_CONTEXT_DATA
995
+ ("ProcessAssemblyStorageMap", PVOID), # ASSEMBLY_STORAGE_MAP
996
+ ("SystemDefaultActivationContextData", PVOID), # ACTIVATION_CONTEXT_DATA
997
+ ("SystemAssemblyStorageMap", PVOID), # ASSEMBLY_STORAGE_MAP
998
+ ("MinimumStackCommit", QWORD),
999
+ ("FlsCallback", PVOID), # Ptr32 Ptr32 Void
1000
+ ("FlsListHead", LIST_ENTRY),
1001
+ ("FlsBitmap", PVOID),
1002
+ ("FlsBitmapBits", DWORD * 4),
1003
+ ("FlsHighIndex", DWORD),
1004
+ ]
1005
+
1006
+
1007
+ _PEB_2003_64 = _PEB_XP_64
1008
+ _PEB_2003_R2 = _PEB_2003
1009
+ _PEB_2003_R2_64 = _PEB_2003_64
1010
+
1011
+
1012
+ # +0x000 InheritedAddressSpace : UChar
1013
+ # +0x001 ReadImageFileExecOptions : UChar
1014
+ # +0x002 BeingDebugged : UChar
1015
+ # +0x003 BitField : UChar
1016
+ # +0x003 ImageUsesLargePages : Pos 0, 1 Bit
1017
+ # +0x003 IsProtectedProcess : Pos 1, 1 Bit
1018
+ # +0x003 IsLegacyProcess : Pos 2, 1 Bit
1019
+ # +0x003 IsImageDynamicallyRelocated : Pos 3, 1 Bit
1020
+ # +0x003 SkipPatchingUser32Forwarders : Pos 4, 1 Bit
1021
+ # +0x003 SpareBits : Pos 5, 3 Bits
1022
+ # +0x004 Mutant : Ptr32 Void
1023
+ # +0x008 ImageBaseAddress : Ptr32 Void
1024
+ # +0x00c Ldr : Ptr32 _PEB_LDR_DATA
1025
+ # +0x010 ProcessParameters : Ptr32 _RTL_USER_PROCESS_PARAMETERS
1026
+ # +0x014 SubSystemData : Ptr32 Void
1027
+ # +0x018 ProcessHeap : Ptr32 Void
1028
+ # +0x01c FastPebLock : Ptr32 _RTL_CRITICAL_SECTION
1029
+ # +0x020 AtlThunkSListPtr : Ptr32 Void
1030
+ # +0x024 IFEOKey : Ptr32 Void
1031
+ # +0x028 CrossProcessFlags : Uint4B
1032
+ # +0x028 ProcessInJob : Pos 0, 1 Bit
1033
+ # +0x028 ProcessInitializing : Pos 1, 1 Bit
1034
+ # +0x028 ProcessUsingVEH : Pos 2, 1 Bit
1035
+ # +0x028 ProcessUsingVCH : Pos 3, 1 Bit
1036
+ # +0x028 ReservedBits0 : Pos 4, 28 Bits
1037
+ # +0x02c KernelCallbackTable : Ptr32 Void
1038
+ # +0x02c UserSharedInfoPtr : Ptr32 Void
1039
+ # +0x030 SystemReserved : [1] Uint4B
1040
+ # +0x034 SpareUlong : Uint4B
1041
+ # +0x038 SparePebPtr0 : Uint4B
1042
+ # +0x03c TlsExpansionCounter : Uint4B
1043
+ # +0x040 TlsBitmap : Ptr32 Void
1044
+ # +0x044 TlsBitmapBits : [2] Uint4B
1045
+ # +0x04c ReadOnlySharedMemoryBase : Ptr32 Void
1046
+ # +0x050 HotpatchInformation : Ptr32 Void
1047
+ # +0x054 ReadOnlyStaticServerData : Ptr32 Ptr32 Void
1048
+ # +0x058 AnsiCodePageData : Ptr32 Void
1049
+ # +0x05c OemCodePageData : Ptr32 Void
1050
+ # +0x060 UnicodeCaseTableData : Ptr32 Void
1051
+ # +0x064 NumberOfProcessors : Uint4B
1052
+ # +0x068 NtGlobalFlag : Uint4B
1053
+ # +0x070 CriticalSectionTimeout : _LARGE_INTEGER
1054
+ # +0x078 HeapSegmentReserve : Uint4B
1055
+ # +0x07c HeapSegmentCommit : Uint4B
1056
+ # +0x080 HeapDeCommitTotalFreeThreshold : Uint4B
1057
+ # +0x084 HeapDeCommitFreeBlockThreshold : Uint4B
1058
+ # +0x088 NumberOfHeaps : Uint4B
1059
+ # +0x08c MaximumNumberOfHeaps : Uint4B
1060
+ # +0x090 ProcessHeaps : Ptr32 Ptr32 Void
1061
+ # +0x094 GdiSharedHandleTable : Ptr32 Void
1062
+ # +0x098 ProcessStarterHelper : Ptr32 Void
1063
+ # +0x09c GdiDCAttributeList : Uint4B
1064
+ # +0x0a0 LoaderLock : Ptr32 _RTL_CRITICAL_SECTION
1065
+ # +0x0a4 OSMajorVersion : Uint4B
1066
+ # +0x0a8 OSMinorVersion : Uint4B
1067
+ # +0x0ac OSBuildNumber : Uint2B
1068
+ # +0x0ae OSCSDVersion : Uint2B
1069
+ # +0x0b0 OSPlatformId : Uint4B
1070
+ # +0x0b4 ImageSubsystem : Uint4B
1071
+ # +0x0b8 ImageSubsystemMajorVersion : Uint4B
1072
+ # +0x0bc ImageSubsystemMinorVersion : Uint4B
1073
+ # +0x0c0 ActiveProcessAffinityMask : Uint4B
1074
+ # +0x0c4 GdiHandleBuffer : [34] Uint4B
1075
+ # +0x14c PostProcessInitRoutine : Ptr32 void
1076
+ # +0x150 TlsExpansionBitmap : Ptr32 Void
1077
+ # +0x154 TlsExpansionBitmapBits : [32] Uint4B
1078
+ # +0x1d4 SessionId : Uint4B
1079
+ # +0x1d8 AppCompatFlags : _ULARGE_INTEGER
1080
+ # +0x1e0 AppCompatFlagsUser : _ULARGE_INTEGER
1081
+ # +0x1e8 pShimData : Ptr32 Void
1082
+ # +0x1ec AppCompatInfo : Ptr32 Void
1083
+ # +0x1f0 CSDVersion : _UNICODE_STRING
1084
+ # +0x1f8 ActivationContextData : Ptr32 _ACTIVATION_CONTEXT_DATA
1085
+ # +0x1fc ProcessAssemblyStorageMap : Ptr32 _ASSEMBLY_STORAGE_MAP
1086
+ # +0x200 SystemDefaultActivationContextData : Ptr32 _ACTIVATION_CONTEXT_DATA
1087
+ # +0x204 SystemAssemblyStorageMap : Ptr32 _ASSEMBLY_STORAGE_MAP
1088
+ # +0x208 MinimumStackCommit : Uint4B
1089
+ # +0x20c FlsCallback : Ptr32 _FLS_CALLBACK_INFO
1090
+ # +0x210 FlsListHead : _LIST_ENTRY
1091
+ # +0x218 FlsBitmap : Ptr32 Void
1092
+ # +0x21c FlsBitmapBits : [4] Uint4B
1093
+ # +0x22c FlsHighIndex : Uint4B
1094
+ # +0x230 WerRegistrationData : Ptr32 Void
1095
+ # +0x234 WerShipAssertPtr : Ptr32 Void
1096
+ class _PEB_2008(Structure):
1097
+ _pack_ = 8
1098
+ _fields_ = [
1099
+ ("InheritedAddressSpace", BOOLEAN),
1100
+ ("ReadImageFileExecOptions", UCHAR),
1101
+ ("BeingDebugged", BOOLEAN),
1102
+ ("BitField", UCHAR),
1103
+ ("Mutant", HANDLE),
1104
+ ("ImageBaseAddress", PVOID),
1105
+ ("Ldr", PVOID), # PPEB_LDR_DATA
1106
+ ("ProcessParameters", PVOID), # PRTL_USER_PROCESS_PARAMETERS
1107
+ ("SubSystemData", PVOID),
1108
+ ("ProcessHeap", PVOID),
1109
+ ("FastPebLock", PVOID), # PRTL_CRITICAL_SECTION
1110
+ ("AtlThunkSListPtr", PVOID),
1111
+ ("IFEOKey", PVOID),
1112
+ ("CrossProcessFlags", DWORD),
1113
+ ("KernelCallbackTable", PVOID),
1114
+ ("SystemReserved", DWORD),
1115
+ ("SpareUlong", DWORD),
1116
+ ("SparePebPtr0", PVOID),
1117
+ ("TlsExpansionCounter", DWORD),
1118
+ ("TlsBitmap", PVOID),
1119
+ ("TlsBitmapBits", DWORD * 2),
1120
+ ("ReadOnlySharedMemoryBase", PVOID),
1121
+ ("HotpatchInformation", PVOID),
1122
+ ("ReadOnlyStaticServerData", PVOID), # Ptr32 Ptr32 Void
1123
+ ("AnsiCodePageData", PVOID),
1124
+ ("OemCodePageData", PVOID),
1125
+ ("UnicodeCaseTableData", PVOID),
1126
+ ("NumberOfProcessors", DWORD),
1127
+ ("NtGlobalFlag", DWORD),
1128
+ ("CriticalSectionTimeout", LONGLONG), # LARGE_INTEGER
1129
+ ("HeapSegmentReserve", DWORD),
1130
+ ("HeapSegmentCommit", DWORD),
1131
+ ("HeapDeCommitTotalFreeThreshold", DWORD),
1132
+ ("HeapDeCommitFreeBlockThreshold", DWORD),
1133
+ ("NumberOfHeaps", DWORD),
1134
+ ("MaximumNumberOfHeaps", DWORD),
1135
+ ("ProcessHeaps", PVOID), # Ptr32 Ptr32 Void
1136
+ ("GdiSharedHandleTable", PVOID),
1137
+ ("ProcessStarterHelper", PVOID),
1138
+ ("GdiDCAttributeList", DWORD),
1139
+ ("LoaderLock", PVOID), # PRTL_CRITICAL_SECTION
1140
+ ("OSMajorVersion", DWORD),
1141
+ ("OSMinorVersion", DWORD),
1142
+ ("OSBuildNumber", WORD),
1143
+ ("OSCSDVersion", WORD),
1144
+ ("OSPlatformId", DWORD),
1145
+ ("ImageSubsystem", DWORD),
1146
+ ("ImageSubsystemMajorVersion", DWORD),
1147
+ ("ImageSubsystemMinorVersion", DWORD),
1148
+ ("ActiveProcessAffinityMask", DWORD),
1149
+ ("GdiHandleBuffer", DWORD * 34),
1150
+ ("PostProcessInitRoutine", PPS_POST_PROCESS_INIT_ROUTINE),
1151
+ ("TlsExpansionBitmap", PVOID),
1152
+ ("TlsExpansionBitmapBits", DWORD * 32),
1153
+ ("SessionId", DWORD),
1154
+ ("AppCompatFlags", ULONGLONG), # ULARGE_INTEGER
1155
+ ("AppCompatFlagsUser", ULONGLONG), # ULARGE_INTEGER
1156
+ ("pShimData", PVOID),
1157
+ ("AppCompatInfo", PVOID),
1158
+ ("CSDVersion", UNICODE_STRING),
1159
+ ("ActivationContextData", PVOID), # ACTIVATION_CONTEXT_DATA
1160
+ ("ProcessAssemblyStorageMap", PVOID), # ASSEMBLY_STORAGE_MAP
1161
+ ("SystemDefaultActivationContextData", PVOID), # ACTIVATION_CONTEXT_DATA
1162
+ ("SystemAssemblyStorageMap", PVOID), # ASSEMBLY_STORAGE_MAP
1163
+ ("MinimumStackCommit", DWORD),
1164
+ ("FlsCallback", PVOID), # PFLS_CALLBACK_INFO
1165
+ ("FlsListHead", LIST_ENTRY),
1166
+ ("FlsBitmap", PVOID),
1167
+ ("FlsBitmapBits", DWORD * 4),
1168
+ ("FlsHighIndex", DWORD),
1169
+ ("WerRegistrationData", PVOID),
1170
+ ("WerShipAssertPtr", PVOID),
1171
+ ]
1172
+
1173
+ def __get_UserSharedInfoPtr(self):
1174
+ return self.KernelCallbackTable
1175
+
1176
+ def __set_UserSharedInfoPtr(self, value):
1177
+ self.KernelCallbackTable = value
1178
+
1179
+ UserSharedInfoPtr = property(__get_UserSharedInfoPtr, __set_UserSharedInfoPtr)
1180
+
1181
+
1182
+ # +0x000 InheritedAddressSpace : UChar
1183
+ # +0x001 ReadImageFileExecOptions : UChar
1184
+ # +0x002 BeingDebugged : UChar
1185
+ # +0x003 BitField : UChar
1186
+ # +0x003 ImageUsesLargePages : Pos 0, 1 Bit
1187
+ # +0x003 IsProtectedProcess : Pos 1, 1 Bit
1188
+ # +0x003 IsLegacyProcess : Pos 2, 1 Bit
1189
+ # +0x003 IsImageDynamicallyRelocated : Pos 3, 1 Bit
1190
+ # +0x003 SkipPatchingUser32Forwarders : Pos 4, 1 Bit
1191
+ # +0x003 SpareBits : Pos 5, 3 Bits
1192
+ # +0x008 Mutant : Ptr64 Void
1193
+ # +0x010 ImageBaseAddress : Ptr64 Void
1194
+ # +0x018 Ldr : Ptr64 _PEB_LDR_DATA
1195
+ # +0x020 ProcessParameters : Ptr64 _RTL_USER_PROCESS_PARAMETERS
1196
+ # +0x028 SubSystemData : Ptr64 Void
1197
+ # +0x030 ProcessHeap : Ptr64 Void
1198
+ # +0x038 FastPebLock : Ptr64 _RTL_CRITICAL_SECTION
1199
+ # +0x040 AtlThunkSListPtr : Ptr64 Void
1200
+ # +0x048 IFEOKey : Ptr64 Void
1201
+ # +0x050 CrossProcessFlags : Uint4B
1202
+ # +0x050 ProcessInJob : Pos 0, 1 Bit
1203
+ # +0x050 ProcessInitializing : Pos 1, 1 Bit
1204
+ # +0x050 ProcessUsingVEH : Pos 2, 1 Bit
1205
+ # +0x050 ProcessUsingVCH : Pos 3, 1 Bit
1206
+ # +0x050 ReservedBits0 : Pos 4, 28 Bits
1207
+ # +0x058 KernelCallbackTable : Ptr64 Void
1208
+ # +0x058 UserSharedInfoPtr : Ptr64 Void
1209
+ # +0x060 SystemReserved : [1] Uint4B
1210
+ # +0x064 SpareUlong : Uint4B
1211
+ # +0x068 SparePebPtr0 : Uint8B
1212
+ # +0x070 TlsExpansionCounter : Uint4B
1213
+ # +0x078 TlsBitmap : Ptr64 Void
1214
+ # +0x080 TlsBitmapBits : [2] Uint4B
1215
+ # +0x088 ReadOnlySharedMemoryBase : Ptr64 Void
1216
+ # +0x090 HotpatchInformation : Ptr64 Void
1217
+ # +0x098 ReadOnlyStaticServerData : Ptr64 Ptr64 Void
1218
+ # +0x0a0 AnsiCodePageData : Ptr64 Void
1219
+ # +0x0a8 OemCodePageData : Ptr64 Void
1220
+ # +0x0b0 UnicodeCaseTableData : Ptr64 Void
1221
+ # +0x0b8 NumberOfProcessors : Uint4B
1222
+ # +0x0bc NtGlobalFlag : Uint4B
1223
+ # +0x0c0 CriticalSectionTimeout : _LARGE_INTEGER
1224
+ # +0x0c8 HeapSegmentReserve : Uint8B
1225
+ # +0x0d0 HeapSegmentCommit : Uint8B
1226
+ # +0x0d8 HeapDeCommitTotalFreeThreshold : Uint8B
1227
+ # +0x0e0 HeapDeCommitFreeBlockThreshold : Uint8B
1228
+ # +0x0e8 NumberOfHeaps : Uint4B
1229
+ # +0x0ec MaximumNumberOfHeaps : Uint4B
1230
+ # +0x0f0 ProcessHeaps : Ptr64 Ptr64 Void
1231
+ # +0x0f8 GdiSharedHandleTable : Ptr64 Void
1232
+ # +0x100 ProcessStarterHelper : Ptr64 Void
1233
+ # +0x108 GdiDCAttributeList : Uint4B
1234
+ # +0x110 LoaderLock : Ptr64 _RTL_CRITICAL_SECTION
1235
+ # +0x118 OSMajorVersion : Uint4B
1236
+ # +0x11c OSMinorVersion : Uint4B
1237
+ # +0x120 OSBuildNumber : Uint2B
1238
+ # +0x122 OSCSDVersion : Uint2B
1239
+ # +0x124 OSPlatformId : Uint4B
1240
+ # +0x128 ImageSubsystem : Uint4B
1241
+ # +0x12c ImageSubsystemMajorVersion : Uint4B
1242
+ # +0x130 ImageSubsystemMinorVersion : Uint4B
1243
+ # +0x138 ActiveProcessAffinityMask : Uint8B
1244
+ # +0x140 GdiHandleBuffer : [60] Uint4B
1245
+ # +0x230 PostProcessInitRoutine : Ptr64 void
1246
+ # +0x238 TlsExpansionBitmap : Ptr64 Void
1247
+ # +0x240 TlsExpansionBitmapBits : [32] Uint4B
1248
+ # +0x2c0 SessionId : Uint4B
1249
+ # +0x2c8 AppCompatFlags : _ULARGE_INTEGER
1250
+ # +0x2d0 AppCompatFlagsUser : _ULARGE_INTEGER
1251
+ # +0x2d8 pShimData : Ptr64 Void
1252
+ # +0x2e0 AppCompatInfo : Ptr64 Void
1253
+ # +0x2e8 CSDVersion : _UNICODE_STRING
1254
+ # +0x2f8 ActivationContextData : Ptr64 _ACTIVATION_CONTEXT_DATA
1255
+ # +0x300 ProcessAssemblyStorageMap : Ptr64 _ASSEMBLY_STORAGE_MAP
1256
+ # +0x308 SystemDefaultActivationContextData : Ptr64 _ACTIVATION_CONTEXT_DATA
1257
+ # +0x310 SystemAssemblyStorageMap : Ptr64 _ASSEMBLY_STORAGE_MAP
1258
+ # +0x318 MinimumStackCommit : Uint8B
1259
+ # +0x320 FlsCallback : Ptr64 _FLS_CALLBACK_INFO
1260
+ # +0x328 FlsListHead : _LIST_ENTRY
1261
+ # +0x338 FlsBitmap : Ptr64 Void
1262
+ # +0x340 FlsBitmapBits : [4] Uint4B
1263
+ # +0x350 FlsHighIndex : Uint4B
1264
+ # +0x358 WerRegistrationData : Ptr64 Void
1265
+ # +0x360 WerShipAssertPtr : Ptr64 Void
1266
+ class _PEB_2008_64(Structure):
1267
+ _pack_ = 8
1268
+ _fields_ = [
1269
+ ("InheritedAddressSpace", BOOLEAN),
1270
+ ("ReadImageFileExecOptions", UCHAR),
1271
+ ("BeingDebugged", BOOLEAN),
1272
+ ("BitField", UCHAR),
1273
+ ("Mutant", HANDLE),
1274
+ ("ImageBaseAddress", PVOID),
1275
+ ("Ldr", PVOID), # PPEB_LDR_DATA
1276
+ ("ProcessParameters", PVOID), # PRTL_USER_PROCESS_PARAMETERS
1277
+ ("SubSystemData", PVOID),
1278
+ ("ProcessHeap", PVOID),
1279
+ ("FastPebLock", PVOID), # PRTL_CRITICAL_SECTION
1280
+ ("AtlThunkSListPtr", PVOID),
1281
+ ("IFEOKey", PVOID),
1282
+ ("CrossProcessFlags", DWORD),
1283
+ ("KernelCallbackTable", PVOID),
1284
+ ("SystemReserved", DWORD),
1285
+ ("SpareUlong", DWORD),
1286
+ ("SparePebPtr0", PVOID),
1287
+ ("TlsExpansionCounter", DWORD),
1288
+ ("TlsBitmap", PVOID),
1289
+ ("TlsBitmapBits", DWORD * 2),
1290
+ ("ReadOnlySharedMemoryBase", PVOID),
1291
+ ("HotpatchInformation", PVOID),
1292
+ ("ReadOnlyStaticServerData", PVOID), # Ptr64 Ptr64 Void
1293
+ ("AnsiCodePageData", PVOID),
1294
+ ("OemCodePageData", PVOID),
1295
+ ("UnicodeCaseTableData", PVOID),
1296
+ ("NumberOfProcessors", DWORD),
1297
+ ("NtGlobalFlag", DWORD),
1298
+ ("CriticalSectionTimeout", LONGLONG), # LARGE_INTEGER
1299
+ ("HeapSegmentReserve", QWORD),
1300
+ ("HeapSegmentCommit", QWORD),
1301
+ ("HeapDeCommitTotalFreeThreshold", QWORD),
1302
+ ("HeapDeCommitFreeBlockThreshold", QWORD),
1303
+ ("NumberOfHeaps", DWORD),
1304
+ ("MaximumNumberOfHeaps", DWORD),
1305
+ ("ProcessHeaps", PVOID), # Ptr64 Ptr64 Void
1306
+ ("GdiSharedHandleTable", PVOID),
1307
+ ("ProcessStarterHelper", PVOID),
1308
+ ("GdiDCAttributeList", DWORD),
1309
+ ("LoaderLock", PVOID), # PRTL_CRITICAL_SECTION
1310
+ ("OSMajorVersion", DWORD),
1311
+ ("OSMinorVersion", DWORD),
1312
+ ("OSBuildNumber", WORD),
1313
+ ("OSCSDVersion", WORD),
1314
+ ("OSPlatformId", DWORD),
1315
+ ("ImageSubsystem", DWORD),
1316
+ ("ImageSubsystemMajorVersion", DWORD),
1317
+ ("ImageSubsystemMinorVersion", DWORD),
1318
+ ("ActiveProcessAffinityMask", QWORD),
1319
+ ("GdiHandleBuffer", DWORD * 60),
1320
+ ("PostProcessInitRoutine", PPS_POST_PROCESS_INIT_ROUTINE),
1321
+ ("TlsExpansionBitmap", PVOID),
1322
+ ("TlsExpansionBitmapBits", DWORD * 32),
1323
+ ("SessionId", DWORD),
1324
+ ("AppCompatFlags", ULONGLONG), # ULARGE_INTEGER
1325
+ ("AppCompatFlagsUser", ULONGLONG), # ULARGE_INTEGER
1326
+ ("pShimData", PVOID),
1327
+ ("AppCompatInfo", PVOID),
1328
+ ("CSDVersion", UNICODE_STRING),
1329
+ ("ActivationContextData", PVOID), # ACTIVATION_CONTEXT_DATA
1330
+ ("ProcessAssemblyStorageMap", PVOID), # ASSEMBLY_STORAGE_MAP
1331
+ ("SystemDefaultActivationContextData", PVOID), # ACTIVATION_CONTEXT_DATA
1332
+ ("SystemAssemblyStorageMap", PVOID), # ASSEMBLY_STORAGE_MAP
1333
+ ("MinimumStackCommit", QWORD),
1334
+ ("FlsCallback", PVOID), # PFLS_CALLBACK_INFO
1335
+ ("FlsListHead", LIST_ENTRY),
1336
+ ("FlsBitmap", PVOID),
1337
+ ("FlsBitmapBits", DWORD * 4),
1338
+ ("FlsHighIndex", DWORD),
1339
+ ("WerRegistrationData", PVOID),
1340
+ ("WerShipAssertPtr", PVOID),
1341
+ ]
1342
+
1343
+ def __get_UserSharedInfoPtr(self):
1344
+ return self.KernelCallbackTable
1345
+
1346
+ def __set_UserSharedInfoPtr(self, value):
1347
+ self.KernelCallbackTable = value
1348
+
1349
+ UserSharedInfoPtr = property(__get_UserSharedInfoPtr, __set_UserSharedInfoPtr)
1350
+
1351
+
1352
+ # +0x000 InheritedAddressSpace : UChar
1353
+ # +0x001 ReadImageFileExecOptions : UChar
1354
+ # +0x002 BeingDebugged : UChar
1355
+ # +0x003 BitField : UChar
1356
+ # +0x003 ImageUsesLargePages : Pos 0, 1 Bit
1357
+ # +0x003 IsProtectedProcess : Pos 1, 1 Bit
1358
+ # +0x003 IsLegacyProcess : Pos 2, 1 Bit
1359
+ # +0x003 IsImageDynamicallyRelocated : Pos 3, 1 Bit
1360
+ # +0x003 SkipPatchingUser32Forwarders : Pos 4, 1 Bit
1361
+ # +0x003 SpareBits : Pos 5, 3 Bits
1362
+ # +0x004 Mutant : Ptr32 Void
1363
+ # +0x008 ImageBaseAddress : Ptr32 Void
1364
+ # +0x00c Ldr : Ptr32 _PEB_LDR_DATA
1365
+ # +0x010 ProcessParameters : Ptr32 _RTL_USER_PROCESS_PARAMETERS
1366
+ # +0x014 SubSystemData : Ptr32 Void
1367
+ # +0x018 ProcessHeap : Ptr32 Void
1368
+ # +0x01c FastPebLock : Ptr32 _RTL_CRITICAL_SECTION
1369
+ # +0x020 AtlThunkSListPtr : Ptr32 Void
1370
+ # +0x024 IFEOKey : Ptr32 Void
1371
+ # +0x028 CrossProcessFlags : Uint4B
1372
+ # +0x028 ProcessInJob : Pos 0, 1 Bit
1373
+ # +0x028 ProcessInitializing : Pos 1, 1 Bit
1374
+ # +0x028 ProcessUsingVEH : Pos 2, 1 Bit
1375
+ # +0x028 ProcessUsingVCH : Pos 3, 1 Bit
1376
+ # +0x028 ProcessUsingFTH : Pos 4, 1 Bit
1377
+ # +0x028 ReservedBits0 : Pos 5, 27 Bits
1378
+ # +0x02c KernelCallbackTable : Ptr32 Void
1379
+ # +0x02c UserSharedInfoPtr : Ptr32 Void
1380
+ # +0x030 SystemReserved : [1] Uint4B
1381
+ # +0x034 AtlThunkSListPtr32 : Uint4B
1382
+ # +0x038 ApiSetMap : Ptr32 Void
1383
+ # +0x03c TlsExpansionCounter : Uint4B
1384
+ # +0x040 TlsBitmap : Ptr32 Void
1385
+ # +0x044 TlsBitmapBits : [2] Uint4B
1386
+ # +0x04c ReadOnlySharedMemoryBase : Ptr32 Void
1387
+ # +0x050 HotpatchInformation : Ptr32 Void
1388
+ # +0x054 ReadOnlyStaticServerData : Ptr32 Ptr32 Void
1389
+ # +0x058 AnsiCodePageData : Ptr32 Void
1390
+ # +0x05c OemCodePageData : Ptr32 Void
1391
+ # +0x060 UnicodeCaseTableData : Ptr32 Void
1392
+ # +0x064 NumberOfProcessors : Uint4B
1393
+ # +0x068 NtGlobalFlag : Uint4B
1394
+ # +0x070 CriticalSectionTimeout : _LARGE_INTEGER
1395
+ # +0x078 HeapSegmentReserve : Uint4B
1396
+ # +0x07c HeapSegmentCommit : Uint4B
1397
+ # +0x080 HeapDeCommitTotalFreeThreshold : Uint4B
1398
+ # +0x084 HeapDeCommitFreeBlockThreshold : Uint4B
1399
+ # +0x088 NumberOfHeaps : Uint4B
1400
+ # +0x08c MaximumNumberOfHeaps : Uint4B
1401
+ # +0x090 ProcessHeaps : Ptr32 Ptr32 Void
1402
+ # +0x094 GdiSharedHandleTable : Ptr32 Void
1403
+ # +0x098 ProcessStarterHelper : Ptr32 Void
1404
+ # +0x09c GdiDCAttributeList : Uint4B
1405
+ # +0x0a0 LoaderLock : Ptr32 _RTL_CRITICAL_SECTION
1406
+ # +0x0a4 OSMajorVersion : Uint4B
1407
+ # +0x0a8 OSMinorVersion : Uint4B
1408
+ # +0x0ac OSBuildNumber : Uint2B
1409
+ # +0x0ae OSCSDVersion : Uint2B
1410
+ # +0x0b0 OSPlatformId : Uint4B
1411
+ # +0x0b4 ImageSubsystem : Uint4B
1412
+ # +0x0b8 ImageSubsystemMajorVersion : Uint4B
1413
+ # +0x0bc ImageSubsystemMinorVersion : Uint4B
1414
+ # +0x0c0 ActiveProcessAffinityMask : Uint4B
1415
+ # +0x0c4 GdiHandleBuffer : [34] Uint4B
1416
+ # +0x14c PostProcessInitRoutine : Ptr32 void
1417
+ # +0x150 TlsExpansionBitmap : Ptr32 Void
1418
+ # +0x154 TlsExpansionBitmapBits : [32] Uint4B
1419
+ # +0x1d4 SessionId : Uint4B
1420
+ # +0x1d8 AppCompatFlags : _ULARGE_INTEGER
1421
+ # +0x1e0 AppCompatFlagsUser : _ULARGE_INTEGER
1422
+ # +0x1e8 pShimData : Ptr32 Void
1423
+ # +0x1ec AppCompatInfo : Ptr32 Void
1424
+ # +0x1f0 CSDVersion : _UNICODE_STRING
1425
+ # +0x1f8 ActivationContextData : Ptr32 _ACTIVATION_CONTEXT_DATA
1426
+ # +0x1fc ProcessAssemblyStorageMap : Ptr32 _ASSEMBLY_STORAGE_MAP
1427
+ # +0x200 SystemDefaultActivationContextData : Ptr32 _ACTIVATION_CONTEXT_DATA
1428
+ # +0x204 SystemAssemblyStorageMap : Ptr32 _ASSEMBLY_STORAGE_MAP
1429
+ # +0x208 MinimumStackCommit : Uint4B
1430
+ # +0x20c FlsCallback : Ptr32 _FLS_CALLBACK_INFO
1431
+ # +0x210 FlsListHead : _LIST_ENTRY
1432
+ # +0x218 FlsBitmap : Ptr32 Void
1433
+ # +0x21c FlsBitmapBits : [4] Uint4B
1434
+ # +0x22c FlsHighIndex : Uint4B
1435
+ # +0x230 WerRegistrationData : Ptr32 Void
1436
+ # +0x234 WerShipAssertPtr : Ptr32 Void
1437
+ # +0x238 pContextData : Ptr32 Void
1438
+ # +0x23c pImageHeaderHash : Ptr32 Void
1439
+ # +0x240 TracingFlags : Uint4B
1440
+ # +0x240 HeapTracingEnabled : Pos 0, 1 Bit
1441
+ # +0x240 CritSecTracingEnabled : Pos 1, 1 Bit
1442
+ # +0x240 SpareTracingBits : Pos 2, 30 Bits
1443
+ class _PEB_2008_R2(Structure):
1444
+ _pack_ = 8
1445
+ _fields_ = [
1446
+ ("InheritedAddressSpace", BOOLEAN),
1447
+ ("ReadImageFileExecOptions", UCHAR),
1448
+ ("BeingDebugged", BOOLEAN),
1449
+ ("BitField", UCHAR),
1450
+ ("Mutant", HANDLE),
1451
+ ("ImageBaseAddress", PVOID),
1452
+ ("Ldr", PVOID), # PPEB_LDR_DATA
1453
+ ("ProcessParameters", PVOID), # PRTL_USER_PROCESS_PARAMETERS
1454
+ ("SubSystemData", PVOID),
1455
+ ("ProcessHeap", PVOID),
1456
+ ("FastPebLock", PVOID), # PRTL_CRITICAL_SECTION
1457
+ ("AtlThunkSListPtr", PVOID),
1458
+ ("IFEOKey", PVOID),
1459
+ ("CrossProcessFlags", DWORD),
1460
+ ("KernelCallbackTable", PVOID),
1461
+ ("SystemReserved", DWORD),
1462
+ ("AtlThunkSListPtr32", PVOID),
1463
+ ("ApiSetMap", PVOID),
1464
+ ("TlsExpansionCounter", DWORD),
1465
+ ("TlsBitmap", PVOID),
1466
+ ("TlsBitmapBits", DWORD * 2),
1467
+ ("ReadOnlySharedMemoryBase", PVOID),
1468
+ ("HotpatchInformation", PVOID),
1469
+ ("ReadOnlyStaticServerData", PVOID), # Ptr32 Ptr32 Void
1470
+ ("AnsiCodePageData", PVOID),
1471
+ ("OemCodePageData", PVOID),
1472
+ ("UnicodeCaseTableData", PVOID),
1473
+ ("NumberOfProcessors", DWORD),
1474
+ ("NtGlobalFlag", DWORD),
1475
+ ("CriticalSectionTimeout", LONGLONG), # LARGE_INTEGER
1476
+ ("HeapSegmentReserve", DWORD),
1477
+ ("HeapSegmentCommit", DWORD),
1478
+ ("HeapDeCommitTotalFreeThreshold", DWORD),
1479
+ ("HeapDeCommitFreeBlockThreshold", DWORD),
1480
+ ("NumberOfHeaps", DWORD),
1481
+ ("MaximumNumberOfHeaps", DWORD),
1482
+ ("ProcessHeaps", PVOID), # Ptr32 Ptr32 Void
1483
+ ("GdiSharedHandleTable", PVOID),
1484
+ ("ProcessStarterHelper", PVOID),
1485
+ ("GdiDCAttributeList", DWORD),
1486
+ ("LoaderLock", PVOID), # PRTL_CRITICAL_SECTION
1487
+ ("OSMajorVersion", DWORD),
1488
+ ("OSMinorVersion", DWORD),
1489
+ ("OSBuildNumber", WORD),
1490
+ ("OSCSDVersion", WORD),
1491
+ ("OSPlatformId", DWORD),
1492
+ ("ImageSubsystem", DWORD),
1493
+ ("ImageSubsystemMajorVersion", DWORD),
1494
+ ("ImageSubsystemMinorVersion", DWORD),
1495
+ ("ActiveProcessAffinityMask", DWORD),
1496
+ ("GdiHandleBuffer", DWORD * 34),
1497
+ ("PostProcessInitRoutine", PPS_POST_PROCESS_INIT_ROUTINE),
1498
+ ("TlsExpansionBitmap", PVOID),
1499
+ ("TlsExpansionBitmapBits", DWORD * 32),
1500
+ ("SessionId", DWORD),
1501
+ ("AppCompatFlags", ULONGLONG), # ULARGE_INTEGER
1502
+ ("AppCompatFlagsUser", ULONGLONG), # ULARGE_INTEGER
1503
+ ("pShimData", PVOID),
1504
+ ("AppCompatInfo", PVOID),
1505
+ ("CSDVersion", UNICODE_STRING),
1506
+ ("ActivationContextData", PVOID), # ACTIVATION_CONTEXT_DATA
1507
+ ("ProcessAssemblyStorageMap", PVOID), # ASSEMBLY_STORAGE_MAP
1508
+ ("SystemDefaultActivationContextData", PVOID), # ACTIVATION_CONTEXT_DATA
1509
+ ("SystemAssemblyStorageMap", PVOID), # ASSEMBLY_STORAGE_MAP
1510
+ ("MinimumStackCommit", DWORD),
1511
+ ("FlsCallback", PVOID), # PFLS_CALLBACK_INFO
1512
+ ("FlsListHead", LIST_ENTRY),
1513
+ ("FlsBitmap", PVOID),
1514
+ ("FlsBitmapBits", DWORD * 4),
1515
+ ("FlsHighIndex", DWORD),
1516
+ ("WerRegistrationData", PVOID),
1517
+ ("WerShipAssertPtr", PVOID),
1518
+ ("pContextData", PVOID),
1519
+ ("pImageHeaderHash", PVOID),
1520
+ ("TracingFlags", DWORD),
1521
+ ]
1522
+
1523
+ def __get_UserSharedInfoPtr(self):
1524
+ return self.KernelCallbackTable
1525
+
1526
+ def __set_UserSharedInfoPtr(self, value):
1527
+ self.KernelCallbackTable = value
1528
+
1529
+ UserSharedInfoPtr = property(__get_UserSharedInfoPtr, __set_UserSharedInfoPtr)
1530
+
1531
+
1532
+ # +0x000 InheritedAddressSpace : UChar
1533
+ # +0x001 ReadImageFileExecOptions : UChar
1534
+ # +0x002 BeingDebugged : UChar
1535
+ # +0x003 BitField : UChar
1536
+ # +0x003 ImageUsesLargePages : Pos 0, 1 Bit
1537
+ # +0x003 IsProtectedProcess : Pos 1, 1 Bit
1538
+ # +0x003 IsLegacyProcess : Pos 2, 1 Bit
1539
+ # +0x003 IsImageDynamicallyRelocated : Pos 3, 1 Bit
1540
+ # +0x003 SkipPatchingUser32Forwarders : Pos 4, 1 Bit
1541
+ # +0x003 SpareBits : Pos 5, 3 Bits
1542
+ # +0x008 Mutant : Ptr64 Void
1543
+ # +0x010 ImageBaseAddress : Ptr64 Void
1544
+ # +0x018 Ldr : Ptr64 _PEB_LDR_DATA
1545
+ # +0x020 ProcessParameters : Ptr64 _RTL_USER_PROCESS_PARAMETERS
1546
+ # +0x028 SubSystemData : Ptr64 Void
1547
+ # +0x030 ProcessHeap : Ptr64 Void
1548
+ # +0x038 FastPebLock : Ptr64 _RTL_CRITICAL_SECTION
1549
+ # +0x040 AtlThunkSListPtr : Ptr64 Void
1550
+ # +0x048 IFEOKey : Ptr64 Void
1551
+ # +0x050 CrossProcessFlags : Uint4B
1552
+ # +0x050 ProcessInJob : Pos 0, 1 Bit
1553
+ # +0x050 ProcessInitializing : Pos 1, 1 Bit
1554
+ # +0x050 ProcessUsingVEH : Pos 2, 1 Bit
1555
+ # +0x050 ProcessUsingVCH : Pos 3, 1 Bit
1556
+ # +0x050 ProcessUsingFTH : Pos 4, 1 Bit
1557
+ # +0x050 ReservedBits0 : Pos 5, 27 Bits
1558
+ # +0x058 KernelCallbackTable : Ptr64 Void
1559
+ # +0x058 UserSharedInfoPtr : Ptr64 Void
1560
+ # +0x060 SystemReserved : [1] Uint4B
1561
+ # +0x064 AtlThunkSListPtr32 : Uint4B
1562
+ # +0x068 ApiSetMap : Ptr64 Void
1563
+ # +0x070 TlsExpansionCounter : Uint4B
1564
+ # +0x078 TlsBitmap : Ptr64 Void
1565
+ # +0x080 TlsBitmapBits : [2] Uint4B
1566
+ # +0x088 ReadOnlySharedMemoryBase : Ptr64 Void
1567
+ # +0x090 HotpatchInformation : Ptr64 Void
1568
+ # +0x098 ReadOnlyStaticServerData : Ptr64 Ptr64 Void
1569
+ # +0x0a0 AnsiCodePageData : Ptr64 Void
1570
+ # +0x0a8 OemCodePageData : Ptr64 Void
1571
+ # +0x0b0 UnicodeCaseTableData : Ptr64 Void
1572
+ # +0x0b8 NumberOfProcessors : Uint4B
1573
+ # +0x0bc NtGlobalFlag : Uint4B
1574
+ # +0x0c0 CriticalSectionTimeout : _LARGE_INTEGER
1575
+ # +0x0c8 HeapSegmentReserve : Uint8B
1576
+ # +0x0d0 HeapSegmentCommit : Uint8B
1577
+ # +0x0d8 HeapDeCommitTotalFreeThreshold : Uint8B
1578
+ # +0x0e0 HeapDeCommitFreeBlockThreshold : Uint8B
1579
+ # +0x0e8 NumberOfHeaps : Uint4B
1580
+ # +0x0ec MaximumNumberOfHeaps : Uint4B
1581
+ # +0x0f0 ProcessHeaps : Ptr64 Ptr64 Void
1582
+ # +0x0f8 GdiSharedHandleTable : Ptr64 Void
1583
+ # +0x100 ProcessStarterHelper : Ptr64 Void
1584
+ # +0x108 GdiDCAttributeList : Uint4B
1585
+ # +0x110 LoaderLock : Ptr64 _RTL_CRITICAL_SECTION
1586
+ # +0x118 OSMajorVersion : Uint4B
1587
+ # +0x11c OSMinorVersion : Uint4B
1588
+ # +0x120 OSBuildNumber : Uint2B
1589
+ # +0x122 OSCSDVersion : Uint2B
1590
+ # +0x124 OSPlatformId : Uint4B
1591
+ # +0x128 ImageSubsystem : Uint4B
1592
+ # +0x12c ImageSubsystemMajorVersion : Uint4B
1593
+ # +0x130 ImageSubsystemMinorVersion : Uint4B
1594
+ # +0x138 ActiveProcessAffinityMask : Uint8B
1595
+ # +0x140 GdiHandleBuffer : [60] Uint4B
1596
+ # +0x230 PostProcessInitRoutine : Ptr64 void
1597
+ # +0x238 TlsExpansionBitmap : Ptr64 Void
1598
+ # +0x240 TlsExpansionBitmapBits : [32] Uint4B
1599
+ # +0x2c0 SessionId : Uint4B
1600
+ # +0x2c8 AppCompatFlags : _ULARGE_INTEGER
1601
+ # +0x2d0 AppCompatFlagsUser : _ULARGE_INTEGER
1602
+ # +0x2d8 pShimData : Ptr64 Void
1603
+ # +0x2e0 AppCompatInfo : Ptr64 Void
1604
+ # +0x2e8 CSDVersion : _UNICODE_STRING
1605
+ # +0x2f8 ActivationContextData : Ptr64 _ACTIVATION_CONTEXT_DATA
1606
+ # +0x300 ProcessAssemblyStorageMap : Ptr64 _ASSEMBLY_STORAGE_MAP
1607
+ # +0x308 SystemDefaultActivationContextData : Ptr64 _ACTIVATION_CONTEXT_DATA
1608
+ # +0x310 SystemAssemblyStorageMap : Ptr64 _ASSEMBLY_STORAGE_MAP
1609
+ # +0x318 MinimumStackCommit : Uint8B
1610
+ # +0x320 FlsCallback : Ptr64 _FLS_CALLBACK_INFO
1611
+ # +0x328 FlsListHead : _LIST_ENTRY
1612
+ # +0x338 FlsBitmap : Ptr64 Void
1613
+ # +0x340 FlsBitmapBits : [4] Uint4B
1614
+ # +0x350 FlsHighIndex : Uint4B
1615
+ # +0x358 WerRegistrationData : Ptr64 Void
1616
+ # +0x360 WerShipAssertPtr : Ptr64 Void
1617
+ # +0x368 pContextData : Ptr64 Void
1618
+ # +0x370 pImageHeaderHash : Ptr64 Void
1619
+ # +0x378 TracingFlags : Uint4B
1620
+ # +0x378 HeapTracingEnabled : Pos 0, 1 Bit
1621
+ # +0x378 CritSecTracingEnabled : Pos 1, 1 Bit
1622
+ # +0x378 SpareTracingBits : Pos 2, 30 Bits
1623
+ class _PEB_2008_R2_64(Structure):
1624
+ _pack_ = 8
1625
+ _fields_ = [
1626
+ ("InheritedAddressSpace", BOOLEAN),
1627
+ ("ReadImageFileExecOptions", UCHAR),
1628
+ ("BeingDebugged", BOOLEAN),
1629
+ ("BitField", UCHAR),
1630
+ ("Mutant", HANDLE),
1631
+ ("ImageBaseAddress", PVOID),
1632
+ ("Ldr", PVOID), # PPEB_LDR_DATA
1633
+ ("ProcessParameters", PVOID), # PRTL_USER_PROCESS_PARAMETERS
1634
+ ("SubSystemData", PVOID),
1635
+ ("ProcessHeap", PVOID),
1636
+ ("FastPebLock", PVOID), # PRTL_CRITICAL_SECTION
1637
+ ("AtlThunkSListPtr", PVOID),
1638
+ ("IFEOKey", PVOID),
1639
+ ("CrossProcessFlags", DWORD),
1640
+ ("KernelCallbackTable", PVOID),
1641
+ ("SystemReserved", DWORD),
1642
+ ("AtlThunkSListPtr32", DWORD),
1643
+ ("ApiSetMap", PVOID),
1644
+ ("TlsExpansionCounter", DWORD),
1645
+ ("TlsBitmap", PVOID),
1646
+ ("TlsBitmapBits", DWORD * 2),
1647
+ ("ReadOnlySharedMemoryBase", PVOID),
1648
+ ("HotpatchInformation", PVOID),
1649
+ ("ReadOnlyStaticServerData", PVOID), # Ptr32 Ptr32 Void
1650
+ ("AnsiCodePageData", PVOID),
1651
+ ("OemCodePageData", PVOID),
1652
+ ("UnicodeCaseTableData", PVOID),
1653
+ ("NumberOfProcessors", DWORD),
1654
+ ("NtGlobalFlag", DWORD),
1655
+ ("CriticalSectionTimeout", LONGLONG), # LARGE_INTEGER
1656
+ ("HeapSegmentReserve", QWORD),
1657
+ ("HeapSegmentCommit", QWORD),
1658
+ ("HeapDeCommitTotalFreeThreshold", QWORD),
1659
+ ("HeapDeCommitFreeBlockThreshold", QWORD),
1660
+ ("NumberOfHeaps", DWORD),
1661
+ ("MaximumNumberOfHeaps", DWORD),
1662
+ ("ProcessHeaps", PVOID), # Ptr64 Ptr64 Void
1663
+ ("GdiSharedHandleTable", PVOID),
1664
+ ("ProcessStarterHelper", PVOID),
1665
+ ("GdiDCAttributeList", DWORD),
1666
+ ("LoaderLock", PVOID), # PRTL_CRITICAL_SECTION
1667
+ ("OSMajorVersion", DWORD),
1668
+ ("OSMinorVersion", DWORD),
1669
+ ("OSBuildNumber", WORD),
1670
+ ("OSCSDVersion", WORD),
1671
+ ("OSPlatformId", DWORD),
1672
+ ("ImageSubsystem", DWORD),
1673
+ ("ImageSubsystemMajorVersion", DWORD),
1674
+ ("ImageSubsystemMinorVersion", DWORD),
1675
+ ("ActiveProcessAffinityMask", QWORD),
1676
+ ("GdiHandleBuffer", DWORD * 60),
1677
+ ("PostProcessInitRoutine", PPS_POST_PROCESS_INIT_ROUTINE),
1678
+ ("TlsExpansionBitmap", PVOID),
1679
+ ("TlsExpansionBitmapBits", DWORD * 32),
1680
+ ("SessionId", DWORD),
1681
+ ("AppCompatFlags", ULONGLONG), # ULARGE_INTEGER
1682
+ ("AppCompatFlagsUser", ULONGLONG), # ULARGE_INTEGER
1683
+ ("pShimData", PVOID),
1684
+ ("AppCompatInfo", PVOID),
1685
+ ("CSDVersion", UNICODE_STRING),
1686
+ ("ActivationContextData", PVOID), # ACTIVATION_CONTEXT_DATA
1687
+ ("ProcessAssemblyStorageMap", PVOID), # ASSEMBLY_STORAGE_MAP
1688
+ ("SystemDefaultActivationContextData", PVOID), # ACTIVATION_CONTEXT_DATA
1689
+ ("SystemAssemblyStorageMap", PVOID), # ASSEMBLY_STORAGE_MAP
1690
+ ("MinimumStackCommit", QWORD),
1691
+ ("FlsCallback", PVOID), # PFLS_CALLBACK_INFO
1692
+ ("FlsListHead", LIST_ENTRY),
1693
+ ("FlsBitmap", PVOID),
1694
+ ("FlsBitmapBits", DWORD * 4),
1695
+ ("FlsHighIndex", DWORD),
1696
+ ("WerRegistrationData", PVOID),
1697
+ ("WerShipAssertPtr", PVOID),
1698
+ ("pContextData", PVOID),
1699
+ ("pImageHeaderHash", PVOID),
1700
+ ("TracingFlags", DWORD),
1701
+ ]
1702
+
1703
+ def __get_UserSharedInfoPtr(self):
1704
+ return self.KernelCallbackTable
1705
+
1706
+ def __set_UserSharedInfoPtr(self, value):
1707
+ self.KernelCallbackTable = value
1708
+
1709
+ UserSharedInfoPtr = property(__get_UserSharedInfoPtr, __set_UserSharedInfoPtr)
1710
+
1711
+
1712
+ _PEB_Vista = _PEB_2008
1713
+ _PEB_Vista_64 = _PEB_2008_64
1714
+ _PEB_W7 = _PEB_2008_R2
1715
+ _PEB_W7_64 = _PEB_2008_R2_64
1716
+
1717
+
1718
+ # +0x000 InheritedAddressSpace : UChar
1719
+ # +0x001 ReadImageFileExecOptions : UChar
1720
+ # +0x002 BeingDebugged : UChar
1721
+ # +0x003 BitField : UChar
1722
+ # +0x003 ImageUsesLargePages : Pos 0, 1 Bit
1723
+ # +0x003 IsProtectedProcess : Pos 1, 1 Bit
1724
+ # +0x003 IsLegacyProcess : Pos 2, 1 Bit
1725
+ # +0x003 IsImageDynamicallyRelocated : Pos 3, 1 Bit
1726
+ # +0x003 SkipPatchingUser32Forwarders : Pos 4, 1 Bit
1727
+ # +0x003 SpareBits : Pos 5, 3 Bits
1728
+ # +0x004 Mutant : Ptr32 Void
1729
+ # +0x008 ImageBaseAddress : Ptr32 Void
1730
+ # +0x00c Ldr : Ptr32 _PEB_LDR_DATA
1731
+ # +0x010 ProcessParameters : Ptr32 _RTL_USER_PROCESS_PARAMETERS
1732
+ # +0x014 SubSystemData : Ptr32 Void
1733
+ # +0x018 ProcessHeap : Ptr32 Void
1734
+ # +0x01c FastPebLock : Ptr32 _RTL_CRITICAL_SECTION
1735
+ # +0x020 AtlThunkSListPtr : Ptr32 Void
1736
+ # +0x024 IFEOKey : Ptr32 Void
1737
+ # +0x028 CrossProcessFlags : Uint4B
1738
+ # +0x028 ProcessInJob : Pos 0, 1 Bit
1739
+ # +0x028 ProcessInitializing : Pos 1, 1 Bit
1740
+ # +0x028 ProcessUsingVEH : Pos 2, 1 Bit
1741
+ # +0x028 ProcessUsingVCH : Pos 3, 1 Bit
1742
+ # +0x028 ProcessUsingFTH : Pos 4, 1 Bit
1743
+ # +0x028 ReservedBits0 : Pos 5, 27 Bits
1744
+ # +0x02c KernelCallbackTable : Ptr32 Void
1745
+ # +0x02c UserSharedInfoPtr : Ptr32 Void
1746
+ # +0x030 SystemReserved : [1] Uint4B
1747
+ # +0x034 TracingFlags : Uint4B
1748
+ # +0x034 HeapTracingEnabled : Pos 0, 1 Bit
1749
+ # +0x034 CritSecTracingEnabled : Pos 1, 1 Bit
1750
+ # +0x034 SpareTracingBits : Pos 2, 30 Bits
1751
+ # +0x038 ApiSetMap : Ptr32 Void
1752
+ # +0x03c TlsExpansionCounter : Uint4B
1753
+ # +0x040 TlsBitmap : Ptr32 Void
1754
+ # +0x044 TlsBitmapBits : [2] Uint4B
1755
+ # +0x04c ReadOnlySharedMemoryBase : Ptr32 Void
1756
+ # +0x050 HotpatchInformation : Ptr32 Void
1757
+ # +0x054 ReadOnlyStaticServerData : Ptr32 Ptr32 Void
1758
+ # +0x058 AnsiCodePageData : Ptr32 Void
1759
+ # +0x05c OemCodePageData : Ptr32 Void
1760
+ # +0x060 UnicodeCaseTableData : Ptr32 Void
1761
+ # +0x064 NumberOfProcessors : Uint4B
1762
+ # +0x068 NtGlobalFlag : Uint4B
1763
+ # +0x070 CriticalSectionTimeout : _LARGE_INTEGER
1764
+ # +0x078 HeapSegmentReserve : Uint4B
1765
+ # +0x07c HeapSegmentCommit : Uint4B
1766
+ # +0x080 HeapDeCommitTotalFreeThreshold : Uint4B
1767
+ # +0x084 HeapDeCommitFreeBlockThreshold : Uint4B
1768
+ # +0x088 NumberOfHeaps : Uint4B
1769
+ # +0x08c MaximumNumberOfHeaps : Uint4B
1770
+ # +0x090 ProcessHeaps : Ptr32 Ptr32 Void
1771
+ # +0x094 GdiSharedHandleTable : Ptr32 Void
1772
+ # +0x098 ProcessStarterHelper : Ptr32 Void
1773
+ # +0x09c GdiDCAttributeList : Uint4B
1774
+ # +0x0a0 LoaderLock : Ptr32 _RTL_CRITICAL_SECTION
1775
+ # +0x0a4 OSMajorVersion : Uint4B
1776
+ # +0x0a8 OSMinorVersion : Uint4B
1777
+ # +0x0ac OSBuildNumber : Uint2B
1778
+ # +0x0ae OSCSDVersion : Uint2B
1779
+ # +0x0b0 OSPlatformId : Uint4B
1780
+ # +0x0b4 ImageSubsystem : Uint4B
1781
+ # +0x0b8 ImageSubsystemMajorVersion : Uint4B
1782
+ # +0x0bc ImageSubsystemMinorVersion : Uint4B
1783
+ # +0x0c0 ActiveProcessAffinityMask : Uint4B
1784
+ # +0x0c4 GdiHandleBuffer : [34] Uint4B
1785
+ # +0x14c PostProcessInitRoutine : Ptr32 void
1786
+ # +0x150 TlsExpansionBitmap : Ptr32 Void
1787
+ # +0x154 TlsExpansionBitmapBits : [32] Uint4B
1788
+ # +0x1d4 SessionId : Uint4B
1789
+ # +0x1d8 AppCompatFlags : _ULARGE_INTEGER
1790
+ # +0x1e0 AppCompatFlagsUser : _ULARGE_INTEGER
1791
+ # +0x1e8 pShimData : Ptr32 Void
1792
+ # +0x1ec AppCompatInfo : Ptr32 Void
1793
+ # +0x1f0 CSDVersion : _UNICODE_STRING
1794
+ # +0x1f8 ActivationContextData : Ptr32 _ACTIVATION_CONTEXT_DATA
1795
+ # +0x1fc ProcessAssemblyStorageMap : Ptr32 _ASSEMBLY_STORAGE_MAP
1796
+ # +0x200 SystemDefaultActivationContextData : Ptr32 _ACTIVATION_CONTEXT_DATA
1797
+ # +0x204 SystemAssemblyStorageMap : Ptr32 _ASSEMBLY_STORAGE_MAP
1798
+ # +0x208 MinimumStackCommit : Uint4B
1799
+ # +0x20c FlsCallback : Ptr32 _FLS_CALLBACK_INFO
1800
+ # +0x210 FlsListHead : _LIST_ENTRY
1801
+ # +0x218 FlsBitmap : Ptr32 Void
1802
+ # +0x21c FlsBitmapBits : [4] Uint4B
1803
+ # +0x22c FlsHighIndex : Uint4B
1804
+ # +0x230 WerRegistrationData : Ptr32 Void
1805
+ # +0x234 WerShipAssertPtr : Ptr32 Void
1806
+ # +0x238 pContextData : Ptr32 Void
1807
+ # +0x23c pImageHeaderHash : Ptr32 Void
1808
+ class _PEB_W7_Beta(Structure):
1809
+ """
1810
+ This definition of the PEB structure is only valid for the beta versions
1811
+ of Windows 7. For the final version of Windows 7 use L{_PEB_W7} instead.
1812
+ This structure is not chosen automatically.
1813
+ """
1814
+
1815
+ _pack_ = 8
1816
+ _fields_ = [
1817
+ ("InheritedAddressSpace", BOOLEAN),
1818
+ ("ReadImageFileExecOptions", UCHAR),
1819
+ ("BeingDebugged", BOOLEAN),
1820
+ ("BitField", UCHAR),
1821
+ ("Mutant", HANDLE),
1822
+ ("ImageBaseAddress", PVOID),
1823
+ ("Ldr", PVOID), # PPEB_LDR_DATA
1824
+ ("ProcessParameters", PVOID), # PRTL_USER_PROCESS_PARAMETERS
1825
+ ("SubSystemData", PVOID),
1826
+ ("ProcessHeap", PVOID),
1827
+ ("FastPebLock", PVOID), # PRTL_CRITICAL_SECTION
1828
+ ("AtlThunkSListPtr", PVOID),
1829
+ ("IFEOKey", PVOID),
1830
+ ("CrossProcessFlags", DWORD),
1831
+ ("KernelCallbackTable", PVOID),
1832
+ ("SystemReserved", DWORD),
1833
+ ("TracingFlags", DWORD),
1834
+ ("ApiSetMap", PVOID),
1835
+ ("TlsExpansionCounter", DWORD),
1836
+ ("TlsBitmap", PVOID),
1837
+ ("TlsBitmapBits", DWORD * 2),
1838
+ ("ReadOnlySharedMemoryBase", PVOID),
1839
+ ("HotpatchInformation", PVOID),
1840
+ ("ReadOnlyStaticServerData", PVOID), # Ptr32 Ptr32 Void
1841
+ ("AnsiCodePageData", PVOID),
1842
+ ("OemCodePageData", PVOID),
1843
+ ("UnicodeCaseTableData", PVOID),
1844
+ ("NumberOfProcessors", DWORD),
1845
+ ("NtGlobalFlag", DWORD),
1846
+ ("CriticalSectionTimeout", LONGLONG), # LARGE_INTEGER
1847
+ ("HeapSegmentReserve", DWORD),
1848
+ ("HeapSegmentCommit", DWORD),
1849
+ ("HeapDeCommitTotalFreeThreshold", DWORD),
1850
+ ("HeapDeCommitFreeBlockThreshold", DWORD),
1851
+ ("NumberOfHeaps", DWORD),
1852
+ ("MaximumNumberOfHeaps", DWORD),
1853
+ ("ProcessHeaps", PVOID), # Ptr32 Ptr32 Void
1854
+ ("GdiSharedHandleTable", PVOID),
1855
+ ("ProcessStarterHelper", PVOID),
1856
+ ("GdiDCAttributeList", DWORD),
1857
+ ("LoaderLock", PVOID), # PRTL_CRITICAL_SECTION
1858
+ ("OSMajorVersion", DWORD),
1859
+ ("OSMinorVersion", DWORD),
1860
+ ("OSBuildNumber", WORD),
1861
+ ("OSCSDVersion", WORD),
1862
+ ("OSPlatformId", DWORD),
1863
+ ("ImageSubsystem", DWORD),
1864
+ ("ImageSubsystemMajorVersion", DWORD),
1865
+ ("ImageSubsystemMinorVersion", DWORD),
1866
+ ("ActiveProcessAffinityMask", DWORD),
1867
+ ("GdiHandleBuffer", DWORD * 34),
1868
+ ("PostProcessInitRoutine", PPS_POST_PROCESS_INIT_ROUTINE),
1869
+ ("TlsExpansionBitmap", PVOID),
1870
+ ("TlsExpansionBitmapBits", DWORD * 32),
1871
+ ("SessionId", DWORD),
1872
+ ("AppCompatFlags", ULONGLONG), # ULARGE_INTEGER
1873
+ ("AppCompatFlagsUser", ULONGLONG), # ULARGE_INTEGER
1874
+ ("pShimData", PVOID),
1875
+ ("AppCompatInfo", PVOID),
1876
+ ("CSDVersion", UNICODE_STRING),
1877
+ ("ActivationContextData", PVOID), # ACTIVATION_CONTEXT_DATA
1878
+ ("ProcessAssemblyStorageMap", PVOID), # ASSEMBLY_STORAGE_MAP
1879
+ ("SystemDefaultActivationContextData", PVOID), # ACTIVATION_CONTEXT_DATA
1880
+ ("SystemAssemblyStorageMap", PVOID), # ASSEMBLY_STORAGE_MAP
1881
+ ("MinimumStackCommit", DWORD),
1882
+ ("FlsCallback", PVOID), # PFLS_CALLBACK_INFO
1883
+ ("FlsListHead", LIST_ENTRY),
1884
+ ("FlsBitmap", PVOID),
1885
+ ("FlsBitmapBits", DWORD * 4),
1886
+ ("FlsHighIndex", DWORD),
1887
+ ("WerRegistrationData", PVOID),
1888
+ ("WerShipAssertPtr", PVOID),
1889
+ ("pContextData", PVOID),
1890
+ ("pImageHeaderHash", PVOID),
1891
+ ]
1892
+
1893
+ def __get_UserSharedInfoPtr(self):
1894
+ return self.KernelCallbackTable
1895
+
1896
+ def __set_UserSharedInfoPtr(self, value):
1897
+ self.KernelCallbackTable = value
1898
+
1899
+ UserSharedInfoPtr = property(__get_UserSharedInfoPtr, __set_UserSharedInfoPtr)
1900
+
1901
+
1902
+ # Use the correct PEB structure definition.
1903
+ # Defaults to the latest Windows version.
1904
+ class PEB(Structure):
1905
+ _pack_ = 8
1906
+ if os == "Windows NT":
1907
+ _pack_ = _PEB_NT._pack_
1908
+ _fields_ = _PEB_NT._fields_
1909
+ elif os == "Windows 2000":
1910
+ _pack_ = _PEB_2000._pack_
1911
+ _fields_ = _PEB_2000._fields_
1912
+ elif os == "Windows XP":
1913
+ _fields_ = _PEB_XP._fields_
1914
+ elif os == "Windows XP (64 bits)":
1915
+ _fields_ = _PEB_XP_64._fields_
1916
+ elif os == "Windows 2003":
1917
+ _fields_ = _PEB_2003._fields_
1918
+ elif os == "Windows 2003 (64 bits)":
1919
+ _fields_ = _PEB_2003_64._fields_
1920
+ elif os == "Windows 2003 R2":
1921
+ _fields_ = _PEB_2003_R2._fields_
1922
+ elif os == "Windows 2003 R2 (64 bits)":
1923
+ _fields_ = _PEB_2003_R2_64._fields_
1924
+ elif os == "Windows 2008":
1925
+ _fields_ = _PEB_2008._fields_
1926
+ elif os == "Windows 2008 (64 bits)":
1927
+ _fields_ = _PEB_2008_64._fields_
1928
+ elif os == "Windows 2008 R2":
1929
+ _fields_ = _PEB_2008_R2._fields_
1930
+ elif os == "Windows 2008 R2 (64 bits)":
1931
+ _fields_ = _PEB_2008_R2_64._fields_
1932
+ elif os == "Windows Vista":
1933
+ _fields_ = _PEB_Vista._fields_
1934
+ elif os == "Windows Vista (64 bits)":
1935
+ _fields_ = _PEB_Vista_64._fields_
1936
+ elif os == "Windows 7":
1937
+ _fields_ = _PEB_W7._fields_
1938
+ elif os == "Windows 7 (64 bits)":
1939
+ _fields_ = _PEB_W7_64._fields_
1940
+ elif sizeof(SIZE_T) == sizeof(DWORD):
1941
+ _fields_ = _PEB_W7._fields_
1942
+ else:
1943
+ _fields_ = _PEB_W7_64._fields_
1944
+
1945
+
1946
+ PPEB = POINTER(PEB)
1947
+
1948
+
1949
+ # PEB structure for WOW64 processes.
1950
+ class PEB_32(Structure):
1951
+ _pack_ = 8
1952
+ if os == "Windows NT":
1953
+ _pack_ = _PEB_NT._pack_
1954
+ _fields_ = _PEB_NT._fields_
1955
+ elif os == "Windows 2000":
1956
+ _pack_ = _PEB_2000._pack_
1957
+ _fields_ = _PEB_2000._fields_
1958
+ elif os.startswith("Windows XP"):
1959
+ _fields_ = _PEB_XP._fields_
1960
+ elif os.startswith("Windows 2003 R2"):
1961
+ _fields_ = _PEB_2003_R2._fields_
1962
+ elif os.startswith("Windows 2003"):
1963
+ _fields_ = _PEB_2003._fields_
1964
+ elif os.startswith("Windows 2008 R2"):
1965
+ _fields_ = _PEB_2008_R2._fields_
1966
+ elif os.startswith("Windows 2008"):
1967
+ _fields_ = _PEB_2008._fields_
1968
+ elif os.startswith("Windows Vista"):
1969
+ _fields_ = _PEB_Vista._fields_
1970
+ else: # if os.startswith('Windows 7'):
1971
+ _fields_ = _PEB_W7._fields_
1972
+
1973
+
1974
+ # from https://vmexplorer.svn.codeplex.com/svn/VMExplorer/src/Win32/Threads.cs
1975
+ #
1976
+ # [StructLayout (LayoutKind.Sequential, Size = 0x0C)]
1977
+ # public struct Wx86ThreadState
1978
+ # {
1979
+ # public IntPtr CallBx86Eip; // Ptr32 to Uint4B
1980
+ # public IntPtr DeallocationCpu; // Ptr32 to Void
1981
+ # public Byte UseKnownWx86Dll; // UChar
1982
+ # public Byte OleStubInvoked; // Char
1983
+ # };
1984
+ class Wx86ThreadState(Structure):
1985
+ _fields_ = [
1986
+ ("CallBx86Eip", PVOID),
1987
+ ("DeallocationCpu", PVOID),
1988
+ ("UseKnownWx86Dll", UCHAR),
1989
+ ("OleStubInvoked", CHAR),
1990
+ ]
1991
+
1992
+
1993
+ # ntdll!_RTL_ACTIVATION_CONTEXT_STACK_FRAME
1994
+ # +0x000 Previous : Ptr64 _RTL_ACTIVATION_CONTEXT_STACK_FRAME
1995
+ # +0x008 ActivationContext : Ptr64 _ACTIVATION_CONTEXT
1996
+ # +0x010 Flags : Uint4B
1997
+ class RTL_ACTIVATION_CONTEXT_STACK_FRAME(Structure):
1998
+ _fields_ = [
1999
+ ("Previous", PVOID),
2000
+ ("ActivationContext", PVOID),
2001
+ ("Flags", DWORD),
2002
+ ]
2003
+
2004
+
2005
+ # ntdll!_ACTIVATION_CONTEXT_STACK
2006
+ # +0x000 ActiveFrame : Ptr64 _RTL_ACTIVATION_CONTEXT_STACK_FRAME
2007
+ # +0x008 FrameListCache : _LIST_ENTRY
2008
+ # +0x018 Flags : Uint4B
2009
+ # +0x01c NextCookieSequenceNumber : Uint4B
2010
+ # +0x020 StackId : Uint4B
2011
+ class ACTIVATION_CONTEXT_STACK(Structure):
2012
+ _fields_ = [
2013
+ ("ActiveFrame", PVOID),
2014
+ ("FrameListCache", LIST_ENTRY),
2015
+ ("Flags", DWORD),
2016
+ ("NextCookieSequenceNumber", DWORD),
2017
+ ("StackId", DWORD),
2018
+ ]
2019
+
2020
+
2021
+ # typedef struct _PROCESSOR_NUMBER {
2022
+ # WORD Group;
2023
+ # BYTE Number;
2024
+ # BYTE Reserved;
2025
+ # }PROCESSOR_NUMBER, *PPROCESSOR_NUMBER;
2026
+ class PROCESSOR_NUMBER(Structure):
2027
+ _fields_ = [
2028
+ ("Group", WORD),
2029
+ ("Number", BYTE),
2030
+ ("Reserved", BYTE),
2031
+ ]
2032
+
2033
+
2034
+ # from http://www.nirsoft.net/kernel_struct/vista/NT_TIB.html
2035
+ #
2036
+ # typedef struct _NT_TIB
2037
+ # {
2038
+ # PEXCEPTION_REGISTRATION_RECORD ExceptionList;
2039
+ # PVOID StackBase;
2040
+ # PVOID StackLimit;
2041
+ # PVOID SubSystemTib;
2042
+ # union
2043
+ # {
2044
+ # PVOID FiberData;
2045
+ # ULONG Version;
2046
+ # };
2047
+ # PVOID ArbitraryUserPointer;
2048
+ # PNT_TIB Self;
2049
+ # } NT_TIB, *PNT_TIB;
2050
+ class _NT_TIB_UNION(Union):
2051
+ _fields_ = [
2052
+ ("FiberData", PVOID),
2053
+ ("Version", ULONG),
2054
+ ]
2055
+
2056
+
2057
+ class NT_TIB(Structure):
2058
+ _fields_ = [
2059
+ ("ExceptionList", PVOID), # PEXCEPTION_REGISTRATION_RECORD
2060
+ ("StackBase", PVOID),
2061
+ ("StackLimit", PVOID),
2062
+ ("SubSystemTib", PVOID),
2063
+ ("u", _NT_TIB_UNION),
2064
+ ("ArbitraryUserPointer", PVOID),
2065
+ ("Self", PVOID), # PNTTIB
2066
+ ]
2067
+
2068
+ def __get_FiberData(self):
2069
+ return self.u.FiberData
2070
+
2071
+ def __set_FiberData(self, value):
2072
+ self.u.FiberData = value
2073
+
2074
+ FiberData = property(__get_FiberData, __set_FiberData)
2075
+
2076
+ def __get_Version(self):
2077
+ return self.u.Version
2078
+
2079
+ def __set_Version(self, value):
2080
+ self.u.Version = value
2081
+
2082
+ Version = property(__get_Version, __set_Version)
2083
+
2084
+
2085
+ PNTTIB = POINTER(NT_TIB)
2086
+
2087
+
2088
+ # From http://www.nirsoft.net/kernel_struct/vista/EXCEPTION_REGISTRATION_RECORD.html
2089
+ #
2090
+ # typedef struct _EXCEPTION_REGISTRATION_RECORD
2091
+ # {
2092
+ # PEXCEPTION_REGISTRATION_RECORD Next;
2093
+ # PEXCEPTION_DISPOSITION Handler;
2094
+ # } EXCEPTION_REGISTRATION_RECORD, *PEXCEPTION_REGISTRATION_RECORD;
2095
+ class EXCEPTION_REGISTRATION_RECORD(Structure):
2096
+ pass
2097
+
2098
+
2099
+ EXCEPTION_DISPOSITION = DWORD
2100
+ ##PEXCEPTION_DISPOSITION = POINTER(EXCEPTION_DISPOSITION)
2101
+ ##PEXCEPTION_REGISTRATION_RECORD = POINTER(EXCEPTION_REGISTRATION_RECORD)
2102
+ PEXCEPTION_DISPOSITION = PVOID
2103
+ PEXCEPTION_REGISTRATION_RECORD = PVOID
2104
+
2105
+ EXCEPTION_REGISTRATION_RECORD._fields_ = [
2106
+ ("Next", PEXCEPTION_REGISTRATION_RECORD),
2107
+ ("Handler", PEXCEPTION_DISPOSITION),
2108
+ ]
2109
+
2110
+ ##PPEB = POINTER(PEB)
2111
+ PPEB = PVOID
2112
+
2113
+
2114
+ # From http://www.nirsoft.net/kernel_struct/vista/GDI_TEB_BATCH.html
2115
+ #
2116
+ # typedef struct _GDI_TEB_BATCH
2117
+ # {
2118
+ # ULONG Offset;
2119
+ # ULONG HDC;
2120
+ # ULONG Buffer[310];
2121
+ # } GDI_TEB_BATCH, *PGDI_TEB_BATCH;
2122
+ class GDI_TEB_BATCH(Structure):
2123
+ _fields_ = [
2124
+ ("Offset", ULONG),
2125
+ ("HDC", ULONG),
2126
+ ("Buffer", ULONG * 310),
2127
+ ]
2128
+
2129
+
2130
+ # ntdll!_TEB_ACTIVE_FRAME_CONTEXT
2131
+ # +0x000 Flags : Uint4B
2132
+ # +0x008 FrameName : Ptr64 Char
2133
+ class TEB_ACTIVE_FRAME_CONTEXT(Structure):
2134
+ _fields_ = [
2135
+ ("Flags", DWORD),
2136
+ ("FrameName", LPVOID), # LPCHAR
2137
+ ]
2138
+
2139
+
2140
+ PTEB_ACTIVE_FRAME_CONTEXT = POINTER(TEB_ACTIVE_FRAME_CONTEXT)
2141
+
2142
+
2143
+ # ntdll!_TEB_ACTIVE_FRAME
2144
+ # +0x000 Flags : Uint4B
2145
+ # +0x008 Previous : Ptr64 _TEB_ACTIVE_FRAME
2146
+ # +0x010 Context : Ptr64 _TEB_ACTIVE_FRAME_CONTEXT
2147
+ class TEB_ACTIVE_FRAME(Structure):
2148
+ _fields_ = [
2149
+ ("Flags", DWORD),
2150
+ ("Previous", LPVOID), # PTEB_ACTIVE_FRAME
2151
+ ("Context", LPVOID), # PTEB_ACTIVE_FRAME_CONTEXT
2152
+ ]
2153
+
2154
+
2155
+ PTEB_ACTIVE_FRAME = POINTER(TEB_ACTIVE_FRAME)
2156
+
2157
+ # SameTebFlags
2158
+ DbgSafeThunkCall = 1 << 0
2159
+ DbgInDebugPrint = 1 << 1
2160
+ DbgHasFiberData = 1 << 2
2161
+ DbgSkipThreadAttach = 1 << 3
2162
+ DbgWerInShipAssertCode = 1 << 4
2163
+ DbgRanProcessInit = 1 << 5
2164
+ DbgClonedThread = 1 << 6
2165
+ DbgSuppressDebugMsg = 1 << 7
2166
+ RtlDisableUserStackWalk = 1 << 8
2167
+ RtlExceptionAttached = 1 << 9
2168
+ RtlInitialThread = 1 << 10
2169
+
2170
+
2171
+ # XXX This is quite wrong :P
2172
+ class _TEB_NT(Structure):
2173
+ _pack_ = 4
2174
+ _fields_ = [
2175
+ ("NtTib", NT_TIB),
2176
+ ("EnvironmentPointer", PVOID),
2177
+ ("ClientId", CLIENT_ID),
2178
+ ("ActiveRpcHandle", HANDLE),
2179
+ ("ThreadLocalStoragePointer", PVOID),
2180
+ ("ProcessEnvironmentBlock", PPEB),
2181
+ ("LastErrorValue", ULONG),
2182
+ ("CountOfOwnedCriticalSections", ULONG),
2183
+ ("CsrClientThread", PVOID),
2184
+ ("Win32ThreadInfo", PVOID),
2185
+ ("User32Reserved", ULONG * 26),
2186
+ ("UserReserved", ULONG * 5),
2187
+ ("WOW32Reserved", PVOID), # ptr to wow64cpu!X86SwitchTo64BitMode
2188
+ ("CurrentLocale", ULONG),
2189
+ ("FpSoftwareStatusRegister", ULONG),
2190
+ ("SystemReserved1", PVOID * 54),
2191
+ ("Spare1", PVOID),
2192
+ ("ExceptionCode", ULONG),
2193
+ ("ActivationContextStackPointer", PVOID), # PACTIVATION_CONTEXT_STACK
2194
+ ("SpareBytes1", ULONG * 36),
2195
+ ("TxFsContext", ULONG),
2196
+ ("GdiTebBatch", GDI_TEB_BATCH),
2197
+ ("RealClientId", CLIENT_ID),
2198
+ ("GdiCachedProcessHandle", PVOID),
2199
+ ("GdiClientPID", ULONG),
2200
+ ("GdiClientTID", ULONG),
2201
+ ("GdiThreadLocalInfo", PVOID),
2202
+ ("Win32ClientInfo", PVOID * 62),
2203
+ ("glDispatchTable", PVOID * 233),
2204
+ ("glReserved1", ULONG * 29),
2205
+ ("glReserved2", PVOID),
2206
+ ("glSectionInfo", PVOID),
2207
+ ("glSection", PVOID),
2208
+ ("glTable", PVOID),
2209
+ ("glCurrentRC", PVOID),
2210
+ ("glContext", PVOID),
2211
+ ("LastStatusValue", NTSTATUS),
2212
+ ("StaticUnicodeString", UNICODE_STRING),
2213
+ ("StaticUnicodeBuffer", WCHAR * 261),
2214
+ ("DeallocationStack", PVOID),
2215
+ ("TlsSlots", PVOID * 64),
2216
+ ("TlsLinks", LIST_ENTRY),
2217
+ ("Vdm", PVOID),
2218
+ ("ReservedForNtRpc", PVOID),
2219
+ ("DbgSsReserved", PVOID * 2),
2220
+ ("HardErrorDisabled", ULONG),
2221
+ ("Instrumentation", PVOID * 9),
2222
+ ("ActivityId", GUID),
2223
+ ("SubProcessTag", PVOID),
2224
+ ("EtwLocalData", PVOID),
2225
+ ("EtwTraceData", PVOID),
2226
+ ("WinSockData", PVOID),
2227
+ ("GdiBatchCount", ULONG),
2228
+ ("SpareBool0", BOOLEAN),
2229
+ ("SpareBool1", BOOLEAN),
2230
+ ("SpareBool2", BOOLEAN),
2231
+ ("IdealProcessor", UCHAR),
2232
+ ("GuaranteedStackBytes", ULONG),
2233
+ ("ReservedForPerf", PVOID),
2234
+ ("ReservedForOle", PVOID),
2235
+ ("WaitingOnLoaderLock", ULONG),
2236
+ ("StackCommit", PVOID),
2237
+ ("StackCommitMax", PVOID),
2238
+ ("StackReserved", PVOID),
2239
+ ]
2240
+
2241
+
2242
+ # not really, but "dt _TEB" in w2k isn't working for me :(
2243
+ _TEB_2000 = _TEB_NT
2244
+
2245
+
2246
+ # +0x000 NtTib : _NT_TIB
2247
+ # +0x01c EnvironmentPointer : Ptr32 Void
2248
+ # +0x020 ClientId : _CLIENT_ID
2249
+ # +0x028 ActiveRpcHandle : Ptr32 Void
2250
+ # +0x02c ThreadLocalStoragePointer : Ptr32 Void
2251
+ # +0x030 ProcessEnvironmentBlock : Ptr32 _PEB
2252
+ # +0x034 LastErrorValue : Uint4B
2253
+ # +0x038 CountOfOwnedCriticalSections : Uint4B
2254
+ # +0x03c CsrClientThread : Ptr32 Void
2255
+ # +0x040 Win32ThreadInfo : Ptr32 Void
2256
+ # +0x044 User32Reserved : [26] Uint4B
2257
+ # +0x0ac UserReserved : [5] Uint4B
2258
+ # +0x0c0 WOW32Reserved : Ptr32 Void
2259
+ # +0x0c4 CurrentLocale : Uint4B
2260
+ # +0x0c8 FpSoftwareStatusRegister : Uint4B
2261
+ # +0x0cc SystemReserved1 : [54] Ptr32 Void
2262
+ # +0x1a4 ExceptionCode : Int4B
2263
+ # +0x1a8 ActivationContextStack : _ACTIVATION_CONTEXT_STACK
2264
+ # +0x1bc SpareBytes1 : [24] UChar
2265
+ # +0x1d4 GdiTebBatch : _GDI_TEB_BATCH
2266
+ # +0x6b4 RealClientId : _CLIENT_ID
2267
+ # +0x6bc GdiCachedProcessHandle : Ptr32 Void
2268
+ # +0x6c0 GdiClientPID : Uint4B
2269
+ # +0x6c4 GdiClientTID : Uint4B
2270
+ # +0x6c8 GdiThreadLocalInfo : Ptr32 Void
2271
+ # +0x6cc Win32ClientInfo : [62] Uint4B
2272
+ # +0x7c4 glDispatchTable : [233] Ptr32 Void
2273
+ # +0xb68 glReserved1 : [29] Uint4B
2274
+ # +0xbdc glReserved2 : Ptr32 Void
2275
+ # +0xbe0 glSectionInfo : Ptr32 Void
2276
+ # +0xbe4 glSection : Ptr32 Void
2277
+ # +0xbe8 glTable : Ptr32 Void
2278
+ # +0xbec glCurrentRC : Ptr32 Void
2279
+ # +0xbf0 glContext : Ptr32 Void
2280
+ # +0xbf4 LastStatusValue : Uint4B
2281
+ # +0xbf8 StaticUnicodeString : _UNICODE_STRING
2282
+ # +0xc00 StaticUnicodeBuffer : [261] Uint2B
2283
+ # +0xe0c DeallocationStack : Ptr32 Void
2284
+ # +0xe10 TlsSlots : [64] Ptr32 Void
2285
+ # +0xf10 TlsLinks : _LIST_ENTRY
2286
+ # +0xf18 Vdm : Ptr32 Void
2287
+ # +0xf1c ReservedForNtRpc : Ptr32 Void
2288
+ # +0xf20 DbgSsReserved : [2] Ptr32 Void
2289
+ # +0xf28 HardErrorsAreDisabled : Uint4B
2290
+ # +0xf2c Instrumentation : [16] Ptr32 Void
2291
+ # +0xf6c WinSockData : Ptr32 Void
2292
+ # +0xf70 GdiBatchCount : Uint4B
2293
+ # +0xf74 InDbgPrint : UChar
2294
+ # +0xf75 FreeStackOnTermination : UChar
2295
+ # +0xf76 HasFiberData : UChar
2296
+ # +0xf77 IdealProcessor : UChar
2297
+ # +0xf78 Spare3 : Uint4B
2298
+ # +0xf7c ReservedForPerf : Ptr32 Void
2299
+ # +0xf80 ReservedForOle : Ptr32 Void
2300
+ # +0xf84 WaitingOnLoaderLock : Uint4B
2301
+ # +0xf88 Wx86Thread : _Wx86ThreadState
2302
+ # +0xf94 TlsExpansionSlots : Ptr32 Ptr32 Void
2303
+ # +0xf98 ImpersonationLocale : Uint4B
2304
+ # +0xf9c IsImpersonating : Uint4B
2305
+ # +0xfa0 NlsCache : Ptr32 Void
2306
+ # +0xfa4 pShimData : Ptr32 Void
2307
+ # +0xfa8 HeapVirtualAffinity : Uint4B
2308
+ # +0xfac CurrentTransactionHandle : Ptr32 Void
2309
+ # +0xfb0 ActiveFrame : Ptr32 _TEB_ACTIVE_FRAME
2310
+ # +0xfb4 SafeThunkCall : UChar
2311
+ # +0xfb5 BooleanSpare : [3] UChar
2312
+ class _TEB_XP(Structure):
2313
+ _pack_ = 8
2314
+ _fields_ = [
2315
+ ("NtTib", NT_TIB),
2316
+ ("EnvironmentPointer", PVOID),
2317
+ ("ClientId", CLIENT_ID),
2318
+ ("ActiveRpcHandle", HANDLE),
2319
+ ("ThreadLocalStoragePointer", PVOID),
2320
+ ("ProcessEnvironmentBlock", PVOID), # PPEB
2321
+ ("LastErrorValue", DWORD),
2322
+ ("CountOfOwnedCriticalSections", DWORD),
2323
+ ("CsrClientThread", PVOID),
2324
+ ("Win32ThreadInfo", PVOID),
2325
+ ("User32Reserved", DWORD * 26),
2326
+ ("UserReserved", DWORD * 5),
2327
+ ("WOW32Reserved", PVOID), # ptr to wow64cpu!X86SwitchTo64BitMode
2328
+ ("CurrentLocale", DWORD),
2329
+ ("FpSoftwareStatusRegister", DWORD),
2330
+ ("SystemReserved1", PVOID * 54),
2331
+ ("ExceptionCode", SDWORD),
2332
+ ("ActivationContextStackPointer", PVOID), # PACTIVATION_CONTEXT_STACK
2333
+ ("SpareBytes1", UCHAR * 24),
2334
+ ("TxFsContext", DWORD),
2335
+ ("GdiTebBatch", GDI_TEB_BATCH),
2336
+ ("RealClientId", CLIENT_ID),
2337
+ ("GdiCachedProcessHandle", HANDLE),
2338
+ ("GdiClientPID", DWORD),
2339
+ ("GdiClientTID", DWORD),
2340
+ ("GdiThreadLocalInfo", PVOID),
2341
+ ("Win32ClientInfo", DWORD * 62),
2342
+ ("glDispatchTable", PVOID * 233),
2343
+ ("glReserved1", DWORD * 29),
2344
+ ("glReserved2", PVOID),
2345
+ ("glSectionInfo", PVOID),
2346
+ ("glSection", PVOID),
2347
+ ("glTable", PVOID),
2348
+ ("glCurrentRC", PVOID),
2349
+ ("glContext", PVOID),
2350
+ ("LastStatusValue", NTSTATUS),
2351
+ ("StaticUnicodeString", UNICODE_STRING),
2352
+ ("StaticUnicodeBuffer", WCHAR * 261),
2353
+ ("DeallocationStack", PVOID),
2354
+ ("TlsSlots", PVOID * 64),
2355
+ ("TlsLinks", LIST_ENTRY),
2356
+ ("Vdm", PVOID),
2357
+ ("ReservedForNtRpc", PVOID),
2358
+ ("DbgSsReserved", PVOID * 2),
2359
+ ("HardErrorsAreDisabled", DWORD),
2360
+ ("Instrumentation", PVOID * 16),
2361
+ ("WinSockData", PVOID),
2362
+ ("GdiBatchCount", DWORD),
2363
+ ("InDbgPrint", BOOLEAN),
2364
+ ("FreeStackOnTermination", BOOLEAN),
2365
+ ("HasFiberData", BOOLEAN),
2366
+ ("IdealProcessor", UCHAR),
2367
+ ("Spare3", DWORD),
2368
+ ("ReservedForPerf", PVOID),
2369
+ ("ReservedForOle", PVOID),
2370
+ ("WaitingOnLoaderLock", DWORD),
2371
+ ("Wx86Thread", Wx86ThreadState),
2372
+ ("TlsExpansionSlots", PVOID), # Ptr32 Ptr32 Void
2373
+ ("ImpersonationLocale", DWORD),
2374
+ ("IsImpersonating", BOOL),
2375
+ ("NlsCache", PVOID),
2376
+ ("pShimData", PVOID),
2377
+ ("HeapVirtualAffinity", DWORD),
2378
+ ("CurrentTransactionHandle", HANDLE),
2379
+ ("ActiveFrame", PVOID), # PTEB_ACTIVE_FRAME
2380
+ ("SafeThunkCall", BOOLEAN),
2381
+ ("BooleanSpare", BOOLEAN * 3),
2382
+ ]
2383
+
2384
+
2385
+ # +0x000 NtTib : _NT_TIB
2386
+ # +0x038 EnvironmentPointer : Ptr64 Void
2387
+ # +0x040 ClientId : _CLIENT_ID
2388
+ # +0x050 ActiveRpcHandle : Ptr64 Void
2389
+ # +0x058 ThreadLocalStoragePointer : Ptr64 Void
2390
+ # +0x060 ProcessEnvironmentBlock : Ptr64 _PEB
2391
+ # +0x068 LastErrorValue : Uint4B
2392
+ # +0x06c CountOfOwnedCriticalSections : Uint4B
2393
+ # +0x070 CsrClientThread : Ptr64 Void
2394
+ # +0x078 Win32ThreadInfo : Ptr64 Void
2395
+ # +0x080 User32Reserved : [26] Uint4B
2396
+ # +0x0e8 UserReserved : [5] Uint4B
2397
+ # +0x100 WOW32Reserved : Ptr64 Void
2398
+ # +0x108 CurrentLocale : Uint4B
2399
+ # +0x10c FpSoftwareStatusRegister : Uint4B
2400
+ # +0x110 SystemReserved1 : [54] Ptr64 Void
2401
+ # +0x2c0 ExceptionCode : Int4B
2402
+ # +0x2c8 ActivationContextStackPointer : Ptr64 _ACTIVATION_CONTEXT_STACK
2403
+ # +0x2d0 SpareBytes1 : [28] UChar
2404
+ # +0x2f0 GdiTebBatch : _GDI_TEB_BATCH
2405
+ # +0x7d8 RealClientId : _CLIENT_ID
2406
+ # +0x7e8 GdiCachedProcessHandle : Ptr64 Void
2407
+ # +0x7f0 GdiClientPID : Uint4B
2408
+ # +0x7f4 GdiClientTID : Uint4B
2409
+ # +0x7f8 GdiThreadLocalInfo : Ptr64 Void
2410
+ # +0x800 Win32ClientInfo : [62] Uint8B
2411
+ # +0x9f0 glDispatchTable : [233] Ptr64 Void
2412
+ # +0x1138 glReserved1 : [29] Uint8B
2413
+ # +0x1220 glReserved2 : Ptr64 Void
2414
+ # +0x1228 glSectionInfo : Ptr64 Void
2415
+ # +0x1230 glSection : Ptr64 Void
2416
+ # +0x1238 glTable : Ptr64 Void
2417
+ # +0x1240 glCurrentRC : Ptr64 Void
2418
+ # +0x1248 glContext : Ptr64 Void
2419
+ # +0x1250 LastStatusValue : Uint4B
2420
+ # +0x1258 StaticUnicodeString : _UNICODE_STRING
2421
+ # +0x1268 StaticUnicodeBuffer : [261] Uint2B
2422
+ # +0x1478 DeallocationStack : Ptr64 Void
2423
+ # +0x1480 TlsSlots : [64] Ptr64 Void
2424
+ # +0x1680 TlsLinks : _LIST_ENTRY
2425
+ # +0x1690 Vdm : Ptr64 Void
2426
+ # +0x1698 ReservedForNtRpc : Ptr64 Void
2427
+ # +0x16a0 DbgSsReserved : [2] Ptr64 Void
2428
+ # +0x16b0 HardErrorMode : Uint4B
2429
+ # +0x16b8 Instrumentation : [14] Ptr64 Void
2430
+ # +0x1728 SubProcessTag : Ptr64 Void
2431
+ # +0x1730 EtwTraceData : Ptr64 Void
2432
+ # +0x1738 WinSockData : Ptr64 Void
2433
+ # +0x1740 GdiBatchCount : Uint4B
2434
+ # +0x1744 InDbgPrint : UChar
2435
+ # +0x1745 FreeStackOnTermination : UChar
2436
+ # +0x1746 HasFiberData : UChar
2437
+ # +0x1747 IdealProcessor : UChar
2438
+ # +0x1748 GuaranteedStackBytes : Uint4B
2439
+ # +0x1750 ReservedForPerf : Ptr64 Void
2440
+ # +0x1758 ReservedForOle : Ptr64 Void
2441
+ # +0x1760 WaitingOnLoaderLock : Uint4B
2442
+ # +0x1768 SparePointer1 : Uint8B
2443
+ # +0x1770 SoftPatchPtr1 : Uint8B
2444
+ # +0x1778 SoftPatchPtr2 : Uint8B
2445
+ # +0x1780 TlsExpansionSlots : Ptr64 Ptr64 Void
2446
+ # +0x1788 DeallocationBStore : Ptr64 Void
2447
+ # +0x1790 BStoreLimit : Ptr64 Void
2448
+ # +0x1798 ImpersonationLocale : Uint4B
2449
+ # +0x179c IsImpersonating : Uint4B
2450
+ # +0x17a0 NlsCache : Ptr64 Void
2451
+ # +0x17a8 pShimData : Ptr64 Void
2452
+ # +0x17b0 HeapVirtualAffinity : Uint4B
2453
+ # +0x17b8 CurrentTransactionHandle : Ptr64 Void
2454
+ # +0x17c0 ActiveFrame : Ptr64 _TEB_ACTIVE_FRAME
2455
+ # +0x17c8 FlsData : Ptr64 Void
2456
+ # +0x17d0 SafeThunkCall : UChar
2457
+ # +0x17d1 BooleanSpare : [3] UChar
2458
+ class _TEB_XP_64(Structure):
2459
+ _pack_ = 8
2460
+ _fields_ = [
2461
+ ("NtTib", NT_TIB),
2462
+ ("EnvironmentPointer", PVOID),
2463
+ ("ClientId", CLIENT_ID),
2464
+ ("ActiveRpcHandle", PVOID),
2465
+ ("ThreadLocalStoragePointer", PVOID),
2466
+ ("ProcessEnvironmentBlock", PVOID), # PPEB
2467
+ ("LastErrorValue", DWORD),
2468
+ ("CountOfOwnedCriticalSections", DWORD),
2469
+ ("CsrClientThread", PVOID),
2470
+ ("Win32ThreadInfo", PVOID),
2471
+ ("User32Reserved", DWORD * 26),
2472
+ ("UserReserved", DWORD * 5),
2473
+ ("WOW32Reserved", PVOID), # ptr to wow64cpu!X86SwitchTo64BitMode
2474
+ ("CurrentLocale", DWORD),
2475
+ ("FpSoftwareStatusRegister", DWORD),
2476
+ ("SystemReserved1", PVOID * 54),
2477
+ ("ExceptionCode", SDWORD),
2478
+ ("ActivationContextStackPointer", PVOID), # PACTIVATION_CONTEXT_STACK
2479
+ ("SpareBytes1", UCHAR * 28),
2480
+ ("GdiTebBatch", GDI_TEB_BATCH),
2481
+ ("RealClientId", CLIENT_ID),
2482
+ ("GdiCachedProcessHandle", HANDLE),
2483
+ ("GdiClientPID", DWORD),
2484
+ ("GdiClientTID", DWORD),
2485
+ ("GdiThreadLocalInfo", PVOID),
2486
+ ("Win32ClientInfo", QWORD * 62),
2487
+ ("glDispatchTable", PVOID * 233),
2488
+ ("glReserved1", QWORD * 29),
2489
+ ("glReserved2", PVOID),
2490
+ ("glSectionInfo", PVOID),
2491
+ ("glSection", PVOID),
2492
+ ("glTable", PVOID),
2493
+ ("glCurrentRC", PVOID),
2494
+ ("glContext", PVOID),
2495
+ ("LastStatusValue", NTSTATUS),
2496
+ ("StaticUnicodeString", UNICODE_STRING),
2497
+ ("StaticUnicodeBuffer", WCHAR * 261),
2498
+ ("DeallocationStack", PVOID),
2499
+ ("TlsSlots", PVOID * 64),
2500
+ ("TlsLinks", LIST_ENTRY),
2501
+ ("Vdm", PVOID),
2502
+ ("ReservedForNtRpc", PVOID),
2503
+ ("DbgSsReserved", PVOID * 2),
2504
+ ("HardErrorMode", DWORD),
2505
+ ("Instrumentation", PVOID * 14),
2506
+ ("SubProcessTag", PVOID),
2507
+ ("EtwTraceData", PVOID),
2508
+ ("WinSockData", PVOID),
2509
+ ("GdiBatchCount", DWORD),
2510
+ ("InDbgPrint", BOOLEAN),
2511
+ ("FreeStackOnTermination", BOOLEAN),
2512
+ ("HasFiberData", BOOLEAN),
2513
+ ("IdealProcessor", UCHAR),
2514
+ ("GuaranteedStackBytes", DWORD),
2515
+ ("ReservedForPerf", PVOID),
2516
+ ("ReservedForOle", PVOID),
2517
+ ("WaitingOnLoaderLock", DWORD),
2518
+ ("SparePointer1", PVOID),
2519
+ ("SoftPatchPtr1", PVOID),
2520
+ ("SoftPatchPtr2", PVOID),
2521
+ ("TlsExpansionSlots", PVOID), # Ptr64 Ptr64 Void
2522
+ ("DeallocationBStore", PVOID),
2523
+ ("BStoreLimit", PVOID),
2524
+ ("ImpersonationLocale", DWORD),
2525
+ ("IsImpersonating", BOOL),
2526
+ ("NlsCache", PVOID),
2527
+ ("pShimData", PVOID),
2528
+ ("HeapVirtualAffinity", DWORD),
2529
+ ("CurrentTransactionHandle", HANDLE),
2530
+ ("ActiveFrame", PVOID), # PTEB_ACTIVE_FRAME
2531
+ ("FlsData", PVOID),
2532
+ ("SafeThunkCall", BOOLEAN),
2533
+ ("BooleanSpare", BOOLEAN * 3),
2534
+ ]
2535
+
2536
+
2537
+ # +0x000 NtTib : _NT_TIB
2538
+ # +0x01c EnvironmentPointer : Ptr32 Void
2539
+ # +0x020 ClientId : _CLIENT_ID
2540
+ # +0x028 ActiveRpcHandle : Ptr32 Void
2541
+ # +0x02c ThreadLocalStoragePointer : Ptr32 Void
2542
+ # +0x030 ProcessEnvironmentBlock : Ptr32 _PEB
2543
+ # +0x034 LastErrorValue : Uint4B
2544
+ # +0x038 CountOfOwnedCriticalSections : Uint4B
2545
+ # +0x03c CsrClientThread : Ptr32 Void
2546
+ # +0x040 Win32ThreadInfo : Ptr32 Void
2547
+ # +0x044 User32Reserved : [26] Uint4B
2548
+ # +0x0ac UserReserved : [5] Uint4B
2549
+ # +0x0c0 WOW32Reserved : Ptr32 Void
2550
+ # +0x0c4 CurrentLocale : Uint4B
2551
+ # +0x0c8 FpSoftwareStatusRegister : Uint4B
2552
+ # +0x0cc SystemReserved1 : [54] Ptr32 Void
2553
+ # +0x1a4 ExceptionCode : Int4B
2554
+ # +0x1a8 ActivationContextStackPointer : Ptr32 _ACTIVATION_CONTEXT_STACK
2555
+ # +0x1ac SpareBytes1 : [40] UChar
2556
+ # +0x1d4 GdiTebBatch : _GDI_TEB_BATCH
2557
+ # +0x6b4 RealClientId : _CLIENT_ID
2558
+ # +0x6bc GdiCachedProcessHandle : Ptr32 Void
2559
+ # +0x6c0 GdiClientPID : Uint4B
2560
+ # +0x6c4 GdiClientTID : Uint4B
2561
+ # +0x6c8 GdiThreadLocalInfo : Ptr32 Void
2562
+ # +0x6cc Win32ClientInfo : [62] Uint4B
2563
+ # +0x7c4 glDispatchTable : [233] Ptr32 Void
2564
+ # +0xb68 glReserved1 : [29] Uint4B
2565
+ # +0xbdc glReserved2 : Ptr32 Void
2566
+ # +0xbe0 glSectionInfo : Ptr32 Void
2567
+ # +0xbe4 glSection : Ptr32 Void
2568
+ # +0xbe8 glTable : Ptr32 Void
2569
+ # +0xbec glCurrentRC : Ptr32 Void
2570
+ # +0xbf0 glContext : Ptr32 Void
2571
+ # +0xbf4 LastStatusValue : Uint4B
2572
+ # +0xbf8 StaticUnicodeString : _UNICODE_STRING
2573
+ # +0xc00 StaticUnicodeBuffer : [261] Uint2B
2574
+ # +0xe0c DeallocationStack : Ptr32 Void
2575
+ # +0xe10 TlsSlots : [64] Ptr32 Void
2576
+ # +0xf10 TlsLinks : _LIST_ENTRY
2577
+ # +0xf18 Vdm : Ptr32 Void
2578
+ # +0xf1c ReservedForNtRpc : Ptr32 Void
2579
+ # +0xf20 DbgSsReserved : [2] Ptr32 Void
2580
+ # +0xf28 HardErrorMode : Uint4B
2581
+ # +0xf2c Instrumentation : [14] Ptr32 Void
2582
+ # +0xf64 SubProcessTag : Ptr32 Void
2583
+ # +0xf68 EtwTraceData : Ptr32 Void
2584
+ # +0xf6c WinSockData : Ptr32 Void
2585
+ # +0xf70 GdiBatchCount : Uint4B
2586
+ # +0xf74 InDbgPrint : UChar
2587
+ # +0xf75 FreeStackOnTermination : UChar
2588
+ # +0xf76 HasFiberData : UChar
2589
+ # +0xf77 IdealProcessor : UChar
2590
+ # +0xf78 GuaranteedStackBytes : Uint4B
2591
+ # +0xf7c ReservedForPerf : Ptr32 Void
2592
+ # +0xf80 ReservedForOle : Ptr32 Void
2593
+ # +0xf84 WaitingOnLoaderLock : Uint4B
2594
+ # +0xf88 SparePointer1 : Uint4B
2595
+ # +0xf8c SoftPatchPtr1 : Uint4B
2596
+ # +0xf90 SoftPatchPtr2 : Uint4B
2597
+ # +0xf94 TlsExpansionSlots : Ptr32 Ptr32 Void
2598
+ # +0xf98 ImpersonationLocale : Uint4B
2599
+ # +0xf9c IsImpersonating : Uint4B
2600
+ # +0xfa0 NlsCache : Ptr32 Void
2601
+ # +0xfa4 pShimData : Ptr32 Void
2602
+ # +0xfa8 HeapVirtualAffinity : Uint4B
2603
+ # +0xfac CurrentTransactionHandle : Ptr32 Void
2604
+ # +0xfb0 ActiveFrame : Ptr32 _TEB_ACTIVE_FRAME
2605
+ # +0xfb4 FlsData : Ptr32 Void
2606
+ # +0xfb8 SafeThunkCall : UChar
2607
+ # +0xfb9 BooleanSpare : [3] UChar
2608
+ class _TEB_2003(Structure):
2609
+ _pack_ = 8
2610
+ _fields_ = [
2611
+ ("NtTib", NT_TIB),
2612
+ ("EnvironmentPointer", PVOID),
2613
+ ("ClientId", CLIENT_ID),
2614
+ ("ActiveRpcHandle", HANDLE),
2615
+ ("ThreadLocalStoragePointer", PVOID),
2616
+ ("ProcessEnvironmentBlock", PVOID), # PPEB
2617
+ ("LastErrorValue", DWORD),
2618
+ ("CountOfOwnedCriticalSections", DWORD),
2619
+ ("CsrClientThread", PVOID),
2620
+ ("Win32ThreadInfo", PVOID),
2621
+ ("User32Reserved", DWORD * 26),
2622
+ ("UserReserved", DWORD * 5),
2623
+ ("WOW32Reserved", PVOID), # ptr to wow64cpu!X86SwitchTo64BitMode
2624
+ ("CurrentLocale", DWORD),
2625
+ ("FpSoftwareStatusRegister", DWORD),
2626
+ ("SystemReserved1", PVOID * 54),
2627
+ ("ExceptionCode", SDWORD),
2628
+ ("ActivationContextStackPointer", PVOID), # PACTIVATION_CONTEXT_STACK
2629
+ ("SpareBytes1", UCHAR * 40),
2630
+ ("GdiTebBatch", GDI_TEB_BATCH),
2631
+ ("RealClientId", CLIENT_ID),
2632
+ ("GdiCachedProcessHandle", HANDLE),
2633
+ ("GdiClientPID", DWORD),
2634
+ ("GdiClientTID", DWORD),
2635
+ ("GdiThreadLocalInfo", PVOID),
2636
+ ("Win32ClientInfo", DWORD * 62),
2637
+ ("glDispatchTable", PVOID * 233),
2638
+ ("glReserved1", DWORD * 29),
2639
+ ("glReserved2", PVOID),
2640
+ ("glSectionInfo", PVOID),
2641
+ ("glSection", PVOID),
2642
+ ("glTable", PVOID),
2643
+ ("glCurrentRC", PVOID),
2644
+ ("glContext", PVOID),
2645
+ ("LastStatusValue", NTSTATUS),
2646
+ ("StaticUnicodeString", UNICODE_STRING),
2647
+ ("StaticUnicodeBuffer", WCHAR * 261),
2648
+ ("DeallocationStack", PVOID),
2649
+ ("TlsSlots", PVOID * 64),
2650
+ ("TlsLinks", LIST_ENTRY),
2651
+ ("Vdm", PVOID),
2652
+ ("ReservedForNtRpc", PVOID),
2653
+ ("DbgSsReserved", PVOID * 2),
2654
+ ("HardErrorMode", DWORD),
2655
+ ("Instrumentation", PVOID * 14),
2656
+ ("SubProcessTag", PVOID),
2657
+ ("EtwTraceData", PVOID),
2658
+ ("WinSockData", PVOID),
2659
+ ("GdiBatchCount", DWORD),
2660
+ ("InDbgPrint", BOOLEAN),
2661
+ ("FreeStackOnTermination", BOOLEAN),
2662
+ ("HasFiberData", BOOLEAN),
2663
+ ("IdealProcessor", UCHAR),
2664
+ ("GuaranteedStackBytes", DWORD),
2665
+ ("ReservedForPerf", PVOID),
2666
+ ("ReservedForOle", PVOID),
2667
+ ("WaitingOnLoaderLock", DWORD),
2668
+ ("SparePointer1", PVOID),
2669
+ ("SoftPatchPtr1", PVOID),
2670
+ ("SoftPatchPtr2", PVOID),
2671
+ ("TlsExpansionSlots", PVOID), # Ptr32 Ptr32 Void
2672
+ ("ImpersonationLocale", DWORD),
2673
+ ("IsImpersonating", BOOL),
2674
+ ("NlsCache", PVOID),
2675
+ ("pShimData", PVOID),
2676
+ ("HeapVirtualAffinity", DWORD),
2677
+ ("CurrentTransactionHandle", HANDLE),
2678
+ ("ActiveFrame", PVOID), # PTEB_ACTIVE_FRAME
2679
+ ("FlsData", PVOID),
2680
+ ("SafeThunkCall", BOOLEAN),
2681
+ ("BooleanSpare", BOOLEAN * 3),
2682
+ ]
2683
+
2684
+
2685
+ _TEB_2003_64 = _TEB_XP_64
2686
+ _TEB_2003_R2 = _TEB_2003
2687
+ _TEB_2003_R2_64 = _TEB_2003_64
2688
+
2689
+
2690
+ # +0x000 NtTib : _NT_TIB
2691
+ # +0x01c EnvironmentPointer : Ptr32 Void
2692
+ # +0x020 ClientId : _CLIENT_ID
2693
+ # +0x028 ActiveRpcHandle : Ptr32 Void
2694
+ # +0x02c ThreadLocalStoragePointer : Ptr32 Void
2695
+ # +0x030 ProcessEnvironmentBlock : Ptr32 _PEB
2696
+ # +0x034 LastErrorValue : Uint4B
2697
+ # +0x038 CountOfOwnedCriticalSections : Uint4B
2698
+ # +0x03c CsrClientThread : Ptr32 Void
2699
+ # +0x040 Win32ThreadInfo : Ptr32 Void
2700
+ # +0x044 User32Reserved : [26] Uint4B
2701
+ # +0x0ac UserReserved : [5] Uint4B
2702
+ # +0x0c0 WOW32Reserved : Ptr32 Void
2703
+ # +0x0c4 CurrentLocale : Uint4B
2704
+ # +0x0c8 FpSoftwareStatusRegister : Uint4B
2705
+ # +0x0cc SystemReserved1 : [54] Ptr32 Void
2706
+ # +0x1a4 ExceptionCode : Int4B
2707
+ # +0x1a8 ActivationContextStackPointer : Ptr32 _ACTIVATION_CONTEXT_STACK
2708
+ # +0x1ac SpareBytes1 : [36] UChar
2709
+ # +0x1d0 TxFsContext : Uint4B
2710
+ # +0x1d4 GdiTebBatch : _GDI_TEB_BATCH
2711
+ # +0x6b4 RealClientId : _CLIENT_ID
2712
+ # +0x6bc GdiCachedProcessHandle : Ptr32 Void
2713
+ # +0x6c0 GdiClientPID : Uint4B
2714
+ # +0x6c4 GdiClientTID : Uint4B
2715
+ # +0x6c8 GdiThreadLocalInfo : Ptr32 Void
2716
+ # +0x6cc Win32ClientInfo : [62] Uint4B
2717
+ # +0x7c4 glDispatchTable : [233] Ptr32 Void
2718
+ # +0xb68 glReserved1 : [29] Uint4B
2719
+ # +0xbdc glReserved2 : Ptr32 Void
2720
+ # +0xbe0 glSectionInfo : Ptr32 Void
2721
+ # +0xbe4 glSection : Ptr32 Void
2722
+ # +0xbe8 glTable : Ptr32 Void
2723
+ # +0xbec glCurrentRC : Ptr32 Void
2724
+ # +0xbf0 glContext : Ptr32 Void
2725
+ # +0xbf4 LastStatusValue : Uint4B
2726
+ # +0xbf8 StaticUnicodeString : _UNICODE_STRING
2727
+ # +0xc00 StaticUnicodeBuffer : [261] Wchar
2728
+ # +0xe0c DeallocationStack : Ptr32 Void
2729
+ # +0xe10 TlsSlots : [64] Ptr32 Void
2730
+ # +0xf10 TlsLinks : _LIST_ENTRY
2731
+ # +0xf18 Vdm : Ptr32 Void
2732
+ # +0xf1c ReservedForNtRpc : Ptr32 Void
2733
+ # +0xf20 DbgSsReserved : [2] Ptr32 Void
2734
+ # +0xf28 HardErrorMode : Uint4B
2735
+ # +0xf2c Instrumentation : [9] Ptr32 Void
2736
+ # +0xf50 ActivityId : _GUID
2737
+ # +0xf60 SubProcessTag : Ptr32 Void
2738
+ # +0xf64 EtwLocalData : Ptr32 Void
2739
+ # +0xf68 EtwTraceData : Ptr32 Void
2740
+ # +0xf6c WinSockData : Ptr32 Void
2741
+ # +0xf70 GdiBatchCount : Uint4B
2742
+ # +0xf74 SpareBool0 : UChar
2743
+ # +0xf75 SpareBool1 : UChar
2744
+ # +0xf76 SpareBool2 : UChar
2745
+ # +0xf77 IdealProcessor : UChar
2746
+ # +0xf78 GuaranteedStackBytes : Uint4B
2747
+ # +0xf7c ReservedForPerf : Ptr32 Void
2748
+ # +0xf80 ReservedForOle : Ptr32 Void
2749
+ # +0xf84 WaitingOnLoaderLock : Uint4B
2750
+ # +0xf88 SavedPriorityState : Ptr32 Void
2751
+ # +0xf8c SoftPatchPtr1 : Uint4B
2752
+ # +0xf90 ThreadPoolData : Ptr32 Void
2753
+ # +0xf94 TlsExpansionSlots : Ptr32 Ptr32 Void
2754
+ # +0xf98 ImpersonationLocale : Uint4B
2755
+ # +0xf9c IsImpersonating : Uint4B
2756
+ # +0xfa0 NlsCache : Ptr32 Void
2757
+ # +0xfa4 pShimData : Ptr32 Void
2758
+ # +0xfa8 HeapVirtualAffinity : Uint4B
2759
+ # +0xfac CurrentTransactionHandle : Ptr32 Void
2760
+ # +0xfb0 ActiveFrame : Ptr32 _TEB_ACTIVE_FRAME
2761
+ # +0xfb4 FlsData : Ptr32 Void
2762
+ # +0xfb8 PreferredLanguages : Ptr32 Void
2763
+ # +0xfbc UserPrefLanguages : Ptr32 Void
2764
+ # +0xfc0 MergedPrefLanguages : Ptr32 Void
2765
+ # +0xfc4 MuiImpersonation : Uint4B
2766
+ # +0xfc8 CrossTebFlags : Uint2B
2767
+ # +0xfc8 SpareCrossTebBits : Pos 0, 16 Bits
2768
+ # +0xfca SameTebFlags : Uint2B
2769
+ # +0xfca DbgSafeThunkCall : Pos 0, 1 Bit
2770
+ # +0xfca DbgInDebugPrint : Pos 1, 1 Bit
2771
+ # +0xfca DbgHasFiberData : Pos 2, 1 Bit
2772
+ # +0xfca DbgSkipThreadAttach : Pos 3, 1 Bit
2773
+ # +0xfca DbgWerInShipAssertCode : Pos 4, 1 Bit
2774
+ # +0xfca DbgRanProcessInit : Pos 5, 1 Bit
2775
+ # +0xfca DbgClonedThread : Pos 6, 1 Bit
2776
+ # +0xfca DbgSuppressDebugMsg : Pos 7, 1 Bit
2777
+ # +0xfca RtlDisableUserStackWalk : Pos 8, 1 Bit
2778
+ # +0xfca RtlExceptionAttached : Pos 9, 1 Bit
2779
+ # +0xfca SpareSameTebBits : Pos 10, 6 Bits
2780
+ # +0xfcc TxnScopeEnterCallback : Ptr32 Void
2781
+ # +0xfd0 TxnScopeExitCallback : Ptr32 Void
2782
+ # +0xfd4 TxnScopeContext : Ptr32 Void
2783
+ # +0xfd8 LockCount : Uint4B
2784
+ # +0xfdc ProcessRundown : Uint4B
2785
+ # +0xfe0 LastSwitchTime : Uint8B
2786
+ # +0xfe8 TotalSwitchOutTime : Uint8B
2787
+ # +0xff0 WaitReasonBitMap : _LARGE_INTEGER
2788
+ class _TEB_2008(Structure):
2789
+ _pack_ = 8
2790
+ _fields_ = [
2791
+ ("NtTib", NT_TIB),
2792
+ ("EnvironmentPointer", PVOID),
2793
+ ("ClientId", CLIENT_ID),
2794
+ ("ActiveRpcHandle", HANDLE),
2795
+ ("ThreadLocalStoragePointer", PVOID),
2796
+ ("ProcessEnvironmentBlock", PVOID), # PPEB
2797
+ ("LastErrorValue", DWORD),
2798
+ ("CountOfOwnedCriticalSections", DWORD),
2799
+ ("CsrClientThread", PVOID),
2800
+ ("Win32ThreadInfo", PVOID),
2801
+ ("User32Reserved", DWORD * 26),
2802
+ ("UserReserved", DWORD * 5),
2803
+ ("WOW32Reserved", PVOID), # ptr to wow64cpu!X86SwitchTo64BitMode
2804
+ ("CurrentLocale", DWORD),
2805
+ ("FpSoftwareStatusRegister", DWORD),
2806
+ ("SystemReserved1", PVOID * 54),
2807
+ ("ExceptionCode", SDWORD),
2808
+ ("ActivationContextStackPointer", PVOID), # PACTIVATION_CONTEXT_STACK
2809
+ ("SpareBytes1", UCHAR * 36),
2810
+ ("TxFsContext", DWORD),
2811
+ ("GdiTebBatch", GDI_TEB_BATCH),
2812
+ ("RealClientId", CLIENT_ID),
2813
+ ("GdiCachedProcessHandle", HANDLE),
2814
+ ("GdiClientPID", DWORD),
2815
+ ("GdiClientTID", DWORD),
2816
+ ("GdiThreadLocalInfo", PVOID),
2817
+ ("Win32ClientInfo", DWORD * 62),
2818
+ ("glDispatchTable", PVOID * 233),
2819
+ ("glReserved1", DWORD * 29),
2820
+ ("glReserved2", PVOID),
2821
+ ("glSectionInfo", PVOID),
2822
+ ("glSection", PVOID),
2823
+ ("glTable", PVOID),
2824
+ ("glCurrentRC", PVOID),
2825
+ ("glContext", PVOID),
2826
+ ("LastStatusValue", NTSTATUS),
2827
+ ("StaticUnicodeString", UNICODE_STRING),
2828
+ ("StaticUnicodeBuffer", WCHAR * 261),
2829
+ ("DeallocationStack", PVOID),
2830
+ ("TlsSlots", PVOID * 64),
2831
+ ("TlsLinks", LIST_ENTRY),
2832
+ ("Vdm", PVOID),
2833
+ ("ReservedForNtRpc", PVOID),
2834
+ ("DbgSsReserved", PVOID * 2),
2835
+ ("HardErrorMode", DWORD),
2836
+ ("Instrumentation", PVOID * 9),
2837
+ ("ActivityId", GUID),
2838
+ ("SubProcessTag", PVOID),
2839
+ ("EtwLocalData", PVOID),
2840
+ ("EtwTraceData", PVOID),
2841
+ ("WinSockData", PVOID),
2842
+ ("GdiBatchCount", DWORD),
2843
+ ("SpareBool0", BOOLEAN),
2844
+ ("SpareBool1", BOOLEAN),
2845
+ ("SpareBool2", BOOLEAN),
2846
+ ("IdealProcessor", UCHAR),
2847
+ ("GuaranteedStackBytes", DWORD),
2848
+ ("ReservedForPerf", PVOID),
2849
+ ("ReservedForOle", PVOID),
2850
+ ("WaitingOnLoaderLock", DWORD),
2851
+ ("SavedPriorityState", PVOID),
2852
+ ("SoftPatchPtr1", PVOID),
2853
+ ("ThreadPoolData", PVOID),
2854
+ ("TlsExpansionSlots", PVOID), # Ptr32 Ptr32 Void
2855
+ ("ImpersonationLocale", DWORD),
2856
+ ("IsImpersonating", BOOL),
2857
+ ("NlsCache", PVOID),
2858
+ ("pShimData", PVOID),
2859
+ ("HeapVirtualAffinity", DWORD),
2860
+ ("CurrentTransactionHandle", HANDLE),
2861
+ ("ActiveFrame", PVOID), # PTEB_ACTIVE_FRAME
2862
+ ("FlsData", PVOID),
2863
+ ("PreferredLanguages", PVOID),
2864
+ ("UserPrefLanguages", PVOID),
2865
+ ("MergedPrefLanguages", PVOID),
2866
+ ("MuiImpersonation", BOOL),
2867
+ ("CrossTebFlags", WORD),
2868
+ ("SameTebFlags", WORD),
2869
+ ("TxnScopeEnterCallback", PVOID),
2870
+ ("TxnScopeExitCallback", PVOID),
2871
+ ("TxnScopeContext", PVOID),
2872
+ ("LockCount", DWORD),
2873
+ ("ProcessRundown", DWORD),
2874
+ ("LastSwitchTime", QWORD),
2875
+ ("TotalSwitchOutTime", QWORD),
2876
+ ("WaitReasonBitMap", LONGLONG), # LARGE_INTEGER
2877
+ ]
2878
+
2879
+
2880
+ # +0x000 NtTib : _NT_TIB
2881
+ # +0x038 EnvironmentPointer : Ptr64 Void
2882
+ # +0x040 ClientId : _CLIENT_ID
2883
+ # +0x050 ActiveRpcHandle : Ptr64 Void
2884
+ # +0x058 ThreadLocalStoragePointer : Ptr64 Void
2885
+ # +0x060 ProcessEnvironmentBlock : Ptr64 _PEB
2886
+ # +0x068 LastErrorValue : Uint4B
2887
+ # +0x06c CountOfOwnedCriticalSections : Uint4B
2888
+ # +0x070 CsrClientThread : Ptr64 Void
2889
+ # +0x078 Win32ThreadInfo : Ptr64 Void
2890
+ # +0x080 User32Reserved : [26] Uint4B
2891
+ # +0x0e8 UserReserved : [5] Uint4B
2892
+ # +0x100 WOW32Reserved : Ptr64 Void
2893
+ # +0x108 CurrentLocale : Uint4B
2894
+ # +0x10c FpSoftwareStatusRegister : Uint4B
2895
+ # +0x110 SystemReserved1 : [54] Ptr64 Void
2896
+ # +0x2c0 ExceptionCode : Int4B
2897
+ # +0x2c8 ActivationContextStackPointer : Ptr64 _ACTIVATION_CONTEXT_STACK
2898
+ # +0x2d0 SpareBytes1 : [24] UChar
2899
+ # +0x2e8 TxFsContext : Uint4B
2900
+ # +0x2f0 GdiTebBatch : _GDI_TEB_BATCH
2901
+ # +0x7d8 RealClientId : _CLIENT_ID
2902
+ # +0x7e8 GdiCachedProcessHandle : Ptr64 Void
2903
+ # +0x7f0 GdiClientPID : Uint4B
2904
+ # +0x7f4 GdiClientTID : Uint4B
2905
+ # +0x7f8 GdiThreadLocalInfo : Ptr64 Void
2906
+ # +0x800 Win32ClientInfo : [62] Uint8B
2907
+ # +0x9f0 glDispatchTable : [233] Ptr64 Void
2908
+ # +0x1138 glReserved1 : [29] Uint8B
2909
+ # +0x1220 glReserved2 : Ptr64 Void
2910
+ # +0x1228 glSectionInfo : Ptr64 Void
2911
+ # +0x1230 glSection : Ptr64 Void
2912
+ # +0x1238 glTable : Ptr64 Void
2913
+ # +0x1240 glCurrentRC : Ptr64 Void
2914
+ # +0x1248 glContext : Ptr64 Void
2915
+ # +0x1250 LastStatusValue : Uint4B
2916
+ # +0x1258 StaticUnicodeString : _UNICODE_STRING
2917
+ # +0x1268 StaticUnicodeBuffer : [261] Wchar
2918
+ # +0x1478 DeallocationStack : Ptr64 Void
2919
+ # +0x1480 TlsSlots : [64] Ptr64 Void
2920
+ # +0x1680 TlsLinks : _LIST_ENTRY
2921
+ # +0x1690 Vdm : Ptr64 Void
2922
+ # +0x1698 ReservedForNtRpc : Ptr64 Void
2923
+ # +0x16a0 DbgSsReserved : [2] Ptr64 Void
2924
+ # +0x16b0 HardErrorMode : Uint4B
2925
+ # +0x16b8 Instrumentation : [11] Ptr64 Void
2926
+ # +0x1710 ActivityId : _GUID
2927
+ # +0x1720 SubProcessTag : Ptr64 Void
2928
+ # +0x1728 EtwLocalData : Ptr64 Void
2929
+ # +0x1730 EtwTraceData : Ptr64 Void
2930
+ # +0x1738 WinSockData : Ptr64 Void
2931
+ # +0x1740 GdiBatchCount : Uint4B
2932
+ # +0x1744 SpareBool0 : UChar
2933
+ # +0x1745 SpareBool1 : UChar
2934
+ # +0x1746 SpareBool2 : UChar
2935
+ # +0x1747 IdealProcessor : UChar
2936
+ # +0x1748 GuaranteedStackBytes : Uint4B
2937
+ # +0x1750 ReservedForPerf : Ptr64 Void
2938
+ # +0x1758 ReservedForOle : Ptr64 Void
2939
+ # +0x1760 WaitingOnLoaderLock : Uint4B
2940
+ # +0x1768 SavedPriorityState : Ptr64 Void
2941
+ # +0x1770 SoftPatchPtr1 : Uint8B
2942
+ # +0x1778 ThreadPoolData : Ptr64 Void
2943
+ # +0x1780 TlsExpansionSlots : Ptr64 Ptr64 Void
2944
+ # +0x1788 DeallocationBStore : Ptr64 Void
2945
+ # +0x1790 BStoreLimit : Ptr64 Void
2946
+ # +0x1798 ImpersonationLocale : Uint4B
2947
+ # +0x179c IsImpersonating : Uint4B
2948
+ # +0x17a0 NlsCache : Ptr64 Void
2949
+ # +0x17a8 pShimData : Ptr64 Void
2950
+ # +0x17b0 HeapVirtualAffinity : Uint4B
2951
+ # +0x17b8 CurrentTransactionHandle : Ptr64 Void
2952
+ # +0x17c0 ActiveFrame : Ptr64 _TEB_ACTIVE_FRAME
2953
+ # +0x17c8 FlsData : Ptr64 Void
2954
+ # +0x17d0 PreferredLanguages : Ptr64 Void
2955
+ # +0x17d8 UserPrefLanguages : Ptr64 Void
2956
+ # +0x17e0 MergedPrefLanguages : Ptr64 Void
2957
+ # +0x17e8 MuiImpersonation : Uint4B
2958
+ # +0x17ec CrossTebFlags : Uint2B
2959
+ # +0x17ec SpareCrossTebBits : Pos 0, 16 Bits
2960
+ # +0x17ee SameTebFlags : Uint2B
2961
+ # +0x17ee DbgSafeThunkCall : Pos 0, 1 Bit
2962
+ # +0x17ee DbgInDebugPrint : Pos 1, 1 Bit
2963
+ # +0x17ee DbgHasFiberData : Pos 2, 1 Bit
2964
+ # +0x17ee DbgSkipThreadAttach : Pos 3, 1 Bit
2965
+ # +0x17ee DbgWerInShipAssertCode : Pos 4, 1 Bit
2966
+ # +0x17ee DbgRanProcessInit : Pos 5, 1 Bit
2967
+ # +0x17ee DbgClonedThread : Pos 6, 1 Bit
2968
+ # +0x17ee DbgSuppressDebugMsg : Pos 7, 1 Bit
2969
+ # +0x17ee RtlDisableUserStackWalk : Pos 8, 1 Bit
2970
+ # +0x17ee RtlExceptionAttached : Pos 9, 1 Bit
2971
+ # +0x17ee SpareSameTebBits : Pos 10, 6 Bits
2972
+ # +0x17f0 TxnScopeEnterCallback : Ptr64 Void
2973
+ # +0x17f8 TxnScopeExitCallback : Ptr64 Void
2974
+ # +0x1800 TxnScopeContext : Ptr64 Void
2975
+ # +0x1808 LockCount : Uint4B
2976
+ # +0x180c ProcessRundown : Uint4B
2977
+ # +0x1810 LastSwitchTime : Uint8B
2978
+ # +0x1818 TotalSwitchOutTime : Uint8B
2979
+ # +0x1820 WaitReasonBitMap : _LARGE_INTEGER
2980
+ class _TEB_2008_64(Structure):
2981
+ _pack_ = 8
2982
+ _fields_ = [
2983
+ ("NtTib", NT_TIB),
2984
+ ("EnvironmentPointer", PVOID),
2985
+ ("ClientId", CLIENT_ID),
2986
+ ("ActiveRpcHandle", HANDLE),
2987
+ ("ThreadLocalStoragePointer", PVOID),
2988
+ ("ProcessEnvironmentBlock", PVOID), # PPEB
2989
+ ("LastErrorValue", DWORD),
2990
+ ("CountOfOwnedCriticalSections", DWORD),
2991
+ ("CsrClientThread", PVOID),
2992
+ ("Win32ThreadInfo", PVOID),
2993
+ ("User32Reserved", DWORD * 26),
2994
+ ("UserReserved", DWORD * 5),
2995
+ ("WOW32Reserved", PVOID), # ptr to wow64cpu!X86SwitchTo64BitMode
2996
+ ("CurrentLocale", DWORD),
2997
+ ("FpSoftwareStatusRegister", DWORD),
2998
+ ("SystemReserved1", PVOID * 54),
2999
+ ("ExceptionCode", SDWORD),
3000
+ ("ActivationContextStackPointer", PVOID), # PACTIVATION_CONTEXT_STACK
3001
+ ("SpareBytes1", UCHAR * 24),
3002
+ ("TxFsContext", DWORD),
3003
+ ("GdiTebBatch", GDI_TEB_BATCH),
3004
+ ("RealClientId", CLIENT_ID),
3005
+ ("GdiCachedProcessHandle", HANDLE),
3006
+ ("GdiClientPID", DWORD),
3007
+ ("GdiClientTID", DWORD),
3008
+ ("GdiThreadLocalInfo", PVOID),
3009
+ ("Win32ClientInfo", QWORD * 62),
3010
+ ("glDispatchTable", PVOID * 233),
3011
+ ("glReserved1", QWORD * 29),
3012
+ ("glReserved2", PVOID),
3013
+ ("glSectionInfo", PVOID),
3014
+ ("glSection", PVOID),
3015
+ ("glTable", PVOID),
3016
+ ("glCurrentRC", PVOID),
3017
+ ("glContext", PVOID),
3018
+ ("LastStatusValue", NTSTATUS),
3019
+ ("StaticUnicodeString", UNICODE_STRING),
3020
+ ("StaticUnicodeBuffer", WCHAR * 261),
3021
+ ("DeallocationStack", PVOID),
3022
+ ("TlsSlots", PVOID * 64),
3023
+ ("TlsLinks", LIST_ENTRY),
3024
+ ("Vdm", PVOID),
3025
+ ("ReservedForNtRpc", PVOID),
3026
+ ("DbgSsReserved", PVOID * 2),
3027
+ ("HardErrorMode", DWORD),
3028
+ ("Instrumentation", PVOID * 11),
3029
+ ("ActivityId", GUID),
3030
+ ("SubProcessTag", PVOID),
3031
+ ("EtwLocalData", PVOID),
3032
+ ("EtwTraceData", PVOID),
3033
+ ("WinSockData", PVOID),
3034
+ ("GdiBatchCount", DWORD),
3035
+ ("SpareBool0", BOOLEAN),
3036
+ ("SpareBool1", BOOLEAN),
3037
+ ("SpareBool2", BOOLEAN),
3038
+ ("IdealProcessor", UCHAR),
3039
+ ("GuaranteedStackBytes", DWORD),
3040
+ ("ReservedForPerf", PVOID),
3041
+ ("ReservedForOle", PVOID),
3042
+ ("WaitingOnLoaderLock", DWORD),
3043
+ ("SavedPriorityState", PVOID),
3044
+ ("SoftPatchPtr1", PVOID),
3045
+ ("ThreadPoolData", PVOID),
3046
+ ("TlsExpansionSlots", PVOID), # Ptr64 Ptr64 Void
3047
+ ("DeallocationBStore", PVOID),
3048
+ ("BStoreLimit", PVOID),
3049
+ ("ImpersonationLocale", DWORD),
3050
+ ("IsImpersonating", BOOL),
3051
+ ("NlsCache", PVOID),
3052
+ ("pShimData", PVOID),
3053
+ ("HeapVirtualAffinity", DWORD),
3054
+ ("CurrentTransactionHandle", HANDLE),
3055
+ ("ActiveFrame", PVOID), # PTEB_ACTIVE_FRAME
3056
+ ("FlsData", PVOID),
3057
+ ("PreferredLanguages", PVOID),
3058
+ ("UserPrefLanguages", PVOID),
3059
+ ("MergedPrefLanguages", PVOID),
3060
+ ("MuiImpersonation", BOOL),
3061
+ ("CrossTebFlags", WORD),
3062
+ ("SameTebFlags", WORD),
3063
+ ("TxnScopeEnterCallback", PVOID),
3064
+ ("TxnScopeExitCallback", PVOID),
3065
+ ("TxnScopeContext", PVOID),
3066
+ ("LockCount", DWORD),
3067
+ ("ProcessRundown", DWORD),
3068
+ ("LastSwitchTime", QWORD),
3069
+ ("TotalSwitchOutTime", QWORD),
3070
+ ("WaitReasonBitMap", LONGLONG), # LARGE_INTEGER
3071
+ ]
3072
+
3073
+
3074
+ # +0x000 NtTib : _NT_TIB
3075
+ # +0x01c EnvironmentPointer : Ptr32 Void
3076
+ # +0x020 ClientId : _CLIENT_ID
3077
+ # +0x028 ActiveRpcHandle : Ptr32 Void
3078
+ # +0x02c ThreadLocalStoragePointer : Ptr32 Void
3079
+ # +0x030 ProcessEnvironmentBlock : Ptr32 _PEB
3080
+ # +0x034 LastErrorValue : Uint4B
3081
+ # +0x038 CountOfOwnedCriticalSections : Uint4B
3082
+ # +0x03c CsrClientThread : Ptr32 Void
3083
+ # +0x040 Win32ThreadInfo : Ptr32 Void
3084
+ # +0x044 User32Reserved : [26] Uint4B
3085
+ # +0x0ac UserReserved : [5] Uint4B
3086
+ # +0x0c0 WOW32Reserved : Ptr32 Void
3087
+ # +0x0c4 CurrentLocale : Uint4B
3088
+ # +0x0c8 FpSoftwareStatusRegister : Uint4B
3089
+ # +0x0cc SystemReserved1 : [54] Ptr32 Void
3090
+ # +0x1a4 ExceptionCode : Int4B
3091
+ # +0x1a8 ActivationContextStackPointer : Ptr32 _ACTIVATION_CONTEXT_STACK
3092
+ # +0x1ac SpareBytes : [36] UChar
3093
+ # +0x1d0 TxFsContext : Uint4B
3094
+ # +0x1d4 GdiTebBatch : _GDI_TEB_BATCH
3095
+ # +0x6b4 RealClientId : _CLIENT_ID
3096
+ # +0x6bc GdiCachedProcessHandle : Ptr32 Void
3097
+ # +0x6c0 GdiClientPID : Uint4B
3098
+ # +0x6c4 GdiClientTID : Uint4B
3099
+ # +0x6c8 GdiThreadLocalInfo : Ptr32 Void
3100
+ # +0x6cc Win32ClientInfo : [62] Uint4B
3101
+ # +0x7c4 glDispatchTable : [233] Ptr32 Void
3102
+ # +0xb68 glReserved1 : [29] Uint4B
3103
+ # +0xbdc glReserved2 : Ptr32 Void
3104
+ # +0xbe0 glSectionInfo : Ptr32 Void
3105
+ # +0xbe4 glSection : Ptr32 Void
3106
+ # +0xbe8 glTable : Ptr32 Void
3107
+ # +0xbec glCurrentRC : Ptr32 Void
3108
+ # +0xbf0 glContext : Ptr32 Void
3109
+ # +0xbf4 LastStatusValue : Uint4B
3110
+ # +0xbf8 StaticUnicodeString : _UNICODE_STRING
3111
+ # +0xc00 StaticUnicodeBuffer : [261] Wchar
3112
+ # +0xe0c DeallocationStack : Ptr32 Void
3113
+ # +0xe10 TlsSlots : [64] Ptr32 Void
3114
+ # +0xf10 TlsLinks : _LIST_ENTRY
3115
+ # +0xf18 Vdm : Ptr32 Void
3116
+ # +0xf1c ReservedForNtRpc : Ptr32 Void
3117
+ # +0xf20 DbgSsReserved : [2] Ptr32 Void
3118
+ # +0xf28 HardErrorMode : Uint4B
3119
+ # +0xf2c Instrumentation : [9] Ptr32 Void
3120
+ # +0xf50 ActivityId : _GUID
3121
+ # +0xf60 SubProcessTag : Ptr32 Void
3122
+ # +0xf64 EtwLocalData : Ptr32 Void
3123
+ # +0xf68 EtwTraceData : Ptr32 Void
3124
+ # +0xf6c WinSockData : Ptr32 Void
3125
+ # +0xf70 GdiBatchCount : Uint4B
3126
+ # +0xf74 CurrentIdealProcessor : _PROCESSOR_NUMBER
3127
+ # +0xf74 IdealProcessorValue : Uint4B
3128
+ # +0xf74 ReservedPad0 : UChar
3129
+ # +0xf75 ReservedPad1 : UChar
3130
+ # +0xf76 ReservedPad2 : UChar
3131
+ # +0xf77 IdealProcessor : UChar
3132
+ # +0xf78 GuaranteedStackBytes : Uint4B
3133
+ # +0xf7c ReservedForPerf : Ptr32 Void
3134
+ # +0xf80 ReservedForOle : Ptr32 Void
3135
+ # +0xf84 WaitingOnLoaderLock : Uint4B
3136
+ # +0xf88 SavedPriorityState : Ptr32 Void
3137
+ # +0xf8c SoftPatchPtr1 : Uint4B
3138
+ # +0xf90 ThreadPoolData : Ptr32 Void
3139
+ # +0xf94 TlsExpansionSlots : Ptr32 Ptr32 Void
3140
+ # +0xf98 MuiGeneration : Uint4B
3141
+ # +0xf9c IsImpersonating : Uint4B
3142
+ # +0xfa0 NlsCache : Ptr32 Void
3143
+ # +0xfa4 pShimData : Ptr32 Void
3144
+ # +0xfa8 HeapVirtualAffinity : Uint4B
3145
+ # +0xfac CurrentTransactionHandle : Ptr32 Void
3146
+ # +0xfb0 ActiveFrame : Ptr32 _TEB_ACTIVE_FRAME
3147
+ # +0xfb4 FlsData : Ptr32 Void
3148
+ # +0xfb8 PreferredLanguages : Ptr32 Void
3149
+ # +0xfbc UserPrefLanguages : Ptr32 Void
3150
+ # +0xfc0 MergedPrefLanguages : Ptr32 Void
3151
+ # +0xfc4 MuiImpersonation : Uint4B
3152
+ # +0xfc8 CrossTebFlags : Uint2B
3153
+ # +0xfc8 SpareCrossTebBits : Pos 0, 16 Bits
3154
+ # +0xfca SameTebFlags : Uint2B
3155
+ # +0xfca SafeThunkCall : Pos 0, 1 Bit
3156
+ # +0xfca InDebugPrint : Pos 1, 1 Bit
3157
+ # +0xfca HasFiberData : Pos 2, 1 Bit
3158
+ # +0xfca SkipThreadAttach : Pos 3, 1 Bit
3159
+ # +0xfca WerInShipAssertCode : Pos 4, 1 Bit
3160
+ # +0xfca RanProcessInit : Pos 5, 1 Bit
3161
+ # +0xfca ClonedThread : Pos 6, 1 Bit
3162
+ # +0xfca SuppressDebugMsg : Pos 7, 1 Bit
3163
+ # +0xfca DisableUserStackWalk : Pos 8, 1 Bit
3164
+ # +0xfca RtlExceptionAttached : Pos 9, 1 Bit
3165
+ # +0xfca InitialThread : Pos 10, 1 Bit
3166
+ # +0xfca SpareSameTebBits : Pos 11, 5 Bits
3167
+ # +0xfcc TxnScopeEnterCallback : Ptr32 Void
3168
+ # +0xfd0 TxnScopeExitCallback : Ptr32 Void
3169
+ # +0xfd4 TxnScopeContext : Ptr32 Void
3170
+ # +0xfd8 LockCount : Uint4B
3171
+ # +0xfdc SpareUlong0 : Uint4B
3172
+ # +0xfe0 ResourceRetValue : Ptr32 Void
3173
+ class _TEB_2008_R2(Structure):
3174
+ _pack_ = 8
3175
+ _fields_ = [
3176
+ ("NtTib", NT_TIB),
3177
+ ("EnvironmentPointer", PVOID),
3178
+ ("ClientId", CLIENT_ID),
3179
+ ("ActiveRpcHandle", HANDLE),
3180
+ ("ThreadLocalStoragePointer", PVOID),
3181
+ ("ProcessEnvironmentBlock", PVOID), # PPEB
3182
+ ("LastErrorValue", DWORD),
3183
+ ("CountOfOwnedCriticalSections", DWORD),
3184
+ ("CsrClientThread", PVOID),
3185
+ ("Win32ThreadInfo", PVOID),
3186
+ ("User32Reserved", DWORD * 26),
3187
+ ("UserReserved", DWORD * 5),
3188
+ ("WOW32Reserved", PVOID), # ptr to wow64cpu!X86SwitchTo64BitMode
3189
+ ("CurrentLocale", DWORD),
3190
+ ("FpSoftwareStatusRegister", DWORD),
3191
+ ("SystemReserved1", PVOID * 54),
3192
+ ("ExceptionCode", SDWORD),
3193
+ ("ActivationContextStackPointer", PVOID), # PACTIVATION_CONTEXT_STACK
3194
+ ("SpareBytes", UCHAR * 36),
3195
+ ("TxFsContext", DWORD),
3196
+ ("GdiTebBatch", GDI_TEB_BATCH),
3197
+ ("RealClientId", CLIENT_ID),
3198
+ ("GdiCachedProcessHandle", HANDLE),
3199
+ ("GdiClientPID", DWORD),
3200
+ ("GdiClientTID", DWORD),
3201
+ ("GdiThreadLocalInfo", PVOID),
3202
+ ("Win32ClientInfo", DWORD * 62),
3203
+ ("glDispatchTable", PVOID * 233),
3204
+ ("glReserved1", DWORD * 29),
3205
+ ("glReserved2", PVOID),
3206
+ ("glSectionInfo", PVOID),
3207
+ ("glSection", PVOID),
3208
+ ("glTable", PVOID),
3209
+ ("glCurrentRC", PVOID),
3210
+ ("glContext", PVOID),
3211
+ ("LastStatusValue", NTSTATUS),
3212
+ ("StaticUnicodeString", UNICODE_STRING),
3213
+ ("StaticUnicodeBuffer", WCHAR * 261),
3214
+ ("DeallocationStack", PVOID),
3215
+ ("TlsSlots", PVOID * 64),
3216
+ ("TlsLinks", LIST_ENTRY),
3217
+ ("Vdm", PVOID),
3218
+ ("ReservedForNtRpc", PVOID),
3219
+ ("DbgSsReserved", PVOID * 2),
3220
+ ("HardErrorMode", DWORD),
3221
+ ("Instrumentation", PVOID * 9),
3222
+ ("ActivityId", GUID),
3223
+ ("SubProcessTag", PVOID),
3224
+ ("EtwLocalData", PVOID),
3225
+ ("EtwTraceData", PVOID),
3226
+ ("WinSockData", PVOID),
3227
+ ("GdiBatchCount", DWORD),
3228
+ ("CurrentIdealProcessor", PROCESSOR_NUMBER),
3229
+ ("IdealProcessorValue", DWORD),
3230
+ ("ReservedPad0", UCHAR),
3231
+ ("ReservedPad1", UCHAR),
3232
+ ("ReservedPad2", UCHAR),
3233
+ ("IdealProcessor", UCHAR),
3234
+ ("GuaranteedStackBytes", DWORD),
3235
+ ("ReservedForPerf", PVOID),
3236
+ ("ReservedForOle", PVOID),
3237
+ ("WaitingOnLoaderLock", DWORD),
3238
+ ("SavedPriorityState", PVOID),
3239
+ ("SoftPatchPtr1", PVOID),
3240
+ ("ThreadPoolData", PVOID),
3241
+ ("TlsExpansionSlots", PVOID), # Ptr32 Ptr32 Void
3242
+ ("MuiGeneration", DWORD),
3243
+ ("IsImpersonating", BOOL),
3244
+ ("NlsCache", PVOID),
3245
+ ("pShimData", PVOID),
3246
+ ("HeapVirtualAffinity", DWORD),
3247
+ ("CurrentTransactionHandle", HANDLE),
3248
+ ("ActiveFrame", PVOID), # PTEB_ACTIVE_FRAME
3249
+ ("FlsData", PVOID),
3250
+ ("PreferredLanguages", PVOID),
3251
+ ("UserPrefLanguages", PVOID),
3252
+ ("MergedPrefLanguages", PVOID),
3253
+ ("MuiImpersonation", BOOL),
3254
+ ("CrossTebFlags", WORD),
3255
+ ("SameTebFlags", WORD),
3256
+ ("TxnScopeEnterCallback", PVOID),
3257
+ ("TxnScopeExitCallback", PVOID),
3258
+ ("TxnScopeContext", PVOID),
3259
+ ("LockCount", DWORD),
3260
+ ("SpareUlong0", ULONG),
3261
+ ("ResourceRetValue", PVOID),
3262
+ ]
3263
+
3264
+
3265
+ # +0x000 NtTib : _NT_TIB
3266
+ # +0x038 EnvironmentPointer : Ptr64 Void
3267
+ # +0x040 ClientId : _CLIENT_ID
3268
+ # +0x050 ActiveRpcHandle : Ptr64 Void
3269
+ # +0x058 ThreadLocalStoragePointer : Ptr64 Void
3270
+ # +0x060 ProcessEnvironmentBlock : Ptr64 _PEB
3271
+ # +0x068 LastErrorValue : Uint4B
3272
+ # +0x06c CountOfOwnedCriticalSections : Uint4B
3273
+ # +0x070 CsrClientThread : Ptr64 Void
3274
+ # +0x078 Win32ThreadInfo : Ptr64 Void
3275
+ # +0x080 User32Reserved : [26] Uint4B
3276
+ # +0x0e8 UserReserved : [5] Uint4B
3277
+ # +0x100 WOW32Reserved : Ptr64 Void
3278
+ # +0x108 CurrentLocale : Uint4B
3279
+ # +0x10c FpSoftwareStatusRegister : Uint4B
3280
+ # +0x110 SystemReserved1 : [54] Ptr64 Void
3281
+ # +0x2c0 ExceptionCode : Int4B
3282
+ # +0x2c8 ActivationContextStackPointer : Ptr64 _ACTIVATION_CONTEXT_STACK
3283
+ # +0x2d0 SpareBytes : [24] UChar
3284
+ # +0x2e8 TxFsContext : Uint4B
3285
+ # +0x2f0 GdiTebBatch : _GDI_TEB_BATCH
3286
+ # +0x7d8 RealClientId : _CLIENT_ID
3287
+ # +0x7e8 GdiCachedProcessHandle : Ptr64 Void
3288
+ # +0x7f0 GdiClientPID : Uint4B
3289
+ # +0x7f4 GdiClientTID : Uint4B
3290
+ # +0x7f8 GdiThreadLocalInfo : Ptr64 Void
3291
+ # +0x800 Win32ClientInfo : [62] Uint8B
3292
+ # +0x9f0 glDispatchTable : [233] Ptr64 Void
3293
+ # +0x1138 glReserved1 : [29] Uint8B
3294
+ # +0x1220 glReserved2 : Ptr64 Void
3295
+ # +0x1228 glSectionInfo : Ptr64 Void
3296
+ # +0x1230 glSection : Ptr64 Void
3297
+ # +0x1238 glTable : Ptr64 Void
3298
+ # +0x1240 glCurrentRC : Ptr64 Void
3299
+ # +0x1248 glContext : Ptr64 Void
3300
+ # +0x1250 LastStatusValue : Uint4B
3301
+ # +0x1258 StaticUnicodeString : _UNICODE_STRING
3302
+ # +0x1268 StaticUnicodeBuffer : [261] Wchar
3303
+ # +0x1478 DeallocationStack : Ptr64 Void
3304
+ # +0x1480 TlsSlots : [64] Ptr64 Void
3305
+ # +0x1680 TlsLinks : _LIST_ENTRY
3306
+ # +0x1690 Vdm : Ptr64 Void
3307
+ # +0x1698 ReservedForNtRpc : Ptr64 Void
3308
+ # +0x16a0 DbgSsReserved : [2] Ptr64 Void
3309
+ # +0x16b0 HardErrorMode : Uint4B
3310
+ # +0x16b8 Instrumentation : [11] Ptr64 Void
3311
+ # +0x1710 ActivityId : _GUID
3312
+ # +0x1720 SubProcessTag : Ptr64 Void
3313
+ # +0x1728 EtwLocalData : Ptr64 Void
3314
+ # +0x1730 EtwTraceData : Ptr64 Void
3315
+ # +0x1738 WinSockData : Ptr64 Void
3316
+ # +0x1740 GdiBatchCount : Uint4B
3317
+ # +0x1744 CurrentIdealProcessor : _PROCESSOR_NUMBER
3318
+ # +0x1744 IdealProcessorValue : Uint4B
3319
+ # +0x1744 ReservedPad0 : UChar
3320
+ # +0x1745 ReservedPad1 : UChar
3321
+ # +0x1746 ReservedPad2 : UChar
3322
+ # +0x1747 IdealProcessor : UChar
3323
+ # +0x1748 GuaranteedStackBytes : Uint4B
3324
+ # +0x1750 ReservedForPerf : Ptr64 Void
3325
+ # +0x1758 ReservedForOle : Ptr64 Void
3326
+ # +0x1760 WaitingOnLoaderLock : Uint4B
3327
+ # +0x1768 SavedPriorityState : Ptr64 Void
3328
+ # +0x1770 SoftPatchPtr1 : Uint8B
3329
+ # +0x1778 ThreadPoolData : Ptr64 Void
3330
+ # +0x1780 TlsExpansionSlots : Ptr64 Ptr64 Void
3331
+ # +0x1788 DeallocationBStore : Ptr64 Void
3332
+ # +0x1790 BStoreLimit : Ptr64 Void
3333
+ # +0x1798 MuiGeneration : Uint4B
3334
+ # +0x179c IsImpersonating : Uint4B
3335
+ # +0x17a0 NlsCache : Ptr64 Void
3336
+ # +0x17a8 pShimData : Ptr64 Void
3337
+ # +0x17b0 HeapVirtualAffinity : Uint4B
3338
+ # +0x17b8 CurrentTransactionHandle : Ptr64 Void
3339
+ # +0x17c0 ActiveFrame : Ptr64 _TEB_ACTIVE_FRAME
3340
+ # +0x17c8 FlsData : Ptr64 Void
3341
+ # +0x17d0 PreferredLanguages : Ptr64 Void
3342
+ # +0x17d8 UserPrefLanguages : Ptr64 Void
3343
+ # +0x17e0 MergedPrefLanguages : Ptr64 Void
3344
+ # +0x17e8 MuiImpersonation : Uint4B
3345
+ # +0x17ec CrossTebFlags : Uint2B
3346
+ # +0x17ec SpareCrossTebBits : Pos 0, 16 Bits
3347
+ # +0x17ee SameTebFlags : Uint2B
3348
+ # +0x17ee SafeThunkCall : Pos 0, 1 Bit
3349
+ # +0x17ee InDebugPrint : Pos 1, 1 Bit
3350
+ # +0x17ee HasFiberData : Pos 2, 1 Bit
3351
+ # +0x17ee SkipThreadAttach : Pos 3, 1 Bit
3352
+ # +0x17ee WerInShipAssertCode : Pos 4, 1 Bit
3353
+ # +0x17ee RanProcessInit : Pos 5, 1 Bit
3354
+ # +0x17ee ClonedThread : Pos 6, 1 Bit
3355
+ # +0x17ee SuppressDebugMsg : Pos 7, 1 Bit
3356
+ # +0x17ee DisableUserStackWalk : Pos 8, 1 Bit
3357
+ # +0x17ee RtlExceptionAttached : Pos 9, 1 Bit
3358
+ # +0x17ee InitialThread : Pos 10, 1 Bit
3359
+ # +0x17ee SpareSameTebBits : Pos 11, 5 Bits
3360
+ # +0x17f0 TxnScopeEnterCallback : Ptr64 Void
3361
+ # +0x17f8 TxnScopeExitCallback : Ptr64 Void
3362
+ # +0x1800 TxnScopeContext : Ptr64 Void
3363
+ # +0x1808 LockCount : Uint4B
3364
+ # +0x180c SpareUlong0 : Uint4B
3365
+ # +0x1810 ResourceRetValue : Ptr64 Void
3366
+ class _TEB_2008_R2_64(Structure):
3367
+ _pack_ = 8
3368
+ _fields_ = [
3369
+ ("NtTib", NT_TIB),
3370
+ ("EnvironmentPointer", PVOID),
3371
+ ("ClientId", CLIENT_ID),
3372
+ ("ActiveRpcHandle", HANDLE),
3373
+ ("ThreadLocalStoragePointer", PVOID),
3374
+ ("ProcessEnvironmentBlock", PVOID), # PPEB
3375
+ ("LastErrorValue", DWORD),
3376
+ ("CountOfOwnedCriticalSections", DWORD),
3377
+ ("CsrClientThread", PVOID),
3378
+ ("Win32ThreadInfo", PVOID),
3379
+ ("User32Reserved", DWORD * 26),
3380
+ ("UserReserved", DWORD * 5),
3381
+ ("WOW32Reserved", PVOID), # ptr to wow64cpu!X86SwitchTo64BitMode
3382
+ ("CurrentLocale", DWORD),
3383
+ ("FpSoftwareStatusRegister", DWORD),
3384
+ ("SystemReserved1", PVOID * 54),
3385
+ ("ExceptionCode", SDWORD),
3386
+ ("ActivationContextStackPointer", PVOID), # PACTIVATION_CONTEXT_STACK
3387
+ ("SpareBytes", UCHAR * 24),
3388
+ ("TxFsContext", DWORD),
3389
+ ("GdiTebBatch", GDI_TEB_BATCH),
3390
+ ("RealClientId", CLIENT_ID),
3391
+ ("GdiCachedProcessHandle", HANDLE),
3392
+ ("GdiClientPID", DWORD),
3393
+ ("GdiClientTID", DWORD),
3394
+ ("GdiThreadLocalInfo", PVOID),
3395
+ ("Win32ClientInfo", DWORD * 62),
3396
+ ("glDispatchTable", PVOID * 233),
3397
+ ("glReserved1", QWORD * 29),
3398
+ ("glReserved2", PVOID),
3399
+ ("glSectionInfo", PVOID),
3400
+ ("glSection", PVOID),
3401
+ ("glTable", PVOID),
3402
+ ("glCurrentRC", PVOID),
3403
+ ("glContext", PVOID),
3404
+ ("LastStatusValue", NTSTATUS),
3405
+ ("StaticUnicodeString", UNICODE_STRING),
3406
+ ("StaticUnicodeBuffer", WCHAR * 261),
3407
+ ("DeallocationStack", PVOID),
3408
+ ("TlsSlots", PVOID * 64),
3409
+ ("TlsLinks", LIST_ENTRY),
3410
+ ("Vdm", PVOID),
3411
+ ("ReservedForNtRpc", PVOID),
3412
+ ("DbgSsReserved", PVOID * 2),
3413
+ ("HardErrorMode", DWORD),
3414
+ ("Instrumentation", PVOID * 11),
3415
+ ("ActivityId", GUID),
3416
+ ("SubProcessTag", PVOID),
3417
+ ("EtwLocalData", PVOID),
3418
+ ("EtwTraceData", PVOID),
3419
+ ("WinSockData", PVOID),
3420
+ ("GdiBatchCount", DWORD),
3421
+ ("CurrentIdealProcessor", PROCESSOR_NUMBER),
3422
+ ("IdealProcessorValue", DWORD),
3423
+ ("ReservedPad0", UCHAR),
3424
+ ("ReservedPad1", UCHAR),
3425
+ ("ReservedPad2", UCHAR),
3426
+ ("IdealProcessor", UCHAR),
3427
+ ("GuaranteedStackBytes", DWORD),
3428
+ ("ReservedForPerf", PVOID),
3429
+ ("ReservedForOle", PVOID),
3430
+ ("WaitingOnLoaderLock", DWORD),
3431
+ ("SavedPriorityState", PVOID),
3432
+ ("SoftPatchPtr1", PVOID),
3433
+ ("ThreadPoolData", PVOID),
3434
+ ("TlsExpansionSlots", PVOID), # Ptr64 Ptr64 Void
3435
+ ("DeallocationBStore", PVOID),
3436
+ ("BStoreLimit", PVOID),
3437
+ ("MuiGeneration", DWORD),
3438
+ ("IsImpersonating", BOOL),
3439
+ ("NlsCache", PVOID),
3440
+ ("pShimData", PVOID),
3441
+ ("HeapVirtualAffinity", DWORD),
3442
+ ("CurrentTransactionHandle", HANDLE),
3443
+ ("ActiveFrame", PVOID), # PTEB_ACTIVE_FRAME
3444
+ ("FlsData", PVOID),
3445
+ ("PreferredLanguages", PVOID),
3446
+ ("UserPrefLanguages", PVOID),
3447
+ ("MergedPrefLanguages", PVOID),
3448
+ ("MuiImpersonation", BOOL),
3449
+ ("CrossTebFlags", WORD),
3450
+ ("SameTebFlags", WORD),
3451
+ ("TxnScopeEnterCallback", PVOID),
3452
+ ("TxnScopeExitCallback", PVOID),
3453
+ ("TxnScopeContext", PVOID),
3454
+ ("LockCount", DWORD),
3455
+ ("SpareUlong0", ULONG),
3456
+ ("ResourceRetValue", PVOID),
3457
+ ]
3458
+
3459
+
3460
+ _TEB_Vista = _TEB_2008
3461
+ _TEB_Vista_64 = _TEB_2008_64
3462
+ _TEB_W7 = _TEB_2008_R2
3463
+ _TEB_W7_64 = _TEB_2008_R2_64
3464
+
3465
+
3466
+ # Use the correct TEB structure definition.
3467
+ # Defaults to the latest Windows version.
3468
+ class TEB(Structure):
3469
+ _pack_ = 8
3470
+ if os == "Windows NT":
3471
+ _pack_ = _TEB_NT._pack_
3472
+ _fields_ = _TEB_NT._fields_
3473
+ elif os == "Windows 2000":
3474
+ _pack_ = _TEB_2000._pack_
3475
+ _fields_ = _TEB_2000._fields_
3476
+ elif os == "Windows XP":
3477
+ _fields_ = _TEB_XP._fields_
3478
+ elif os == "Windows XP (64 bits)":
3479
+ _fields_ = _TEB_XP_64._fields_
3480
+ elif os == "Windows 2003":
3481
+ _fields_ = _TEB_2003._fields_
3482
+ elif os == "Windows 2003 (64 bits)":
3483
+ _fields_ = _TEB_2003_64._fields_
3484
+ elif os == "Windows 2008":
3485
+ _fields_ = _TEB_2008._fields_
3486
+ elif os == "Windows 2008 (64 bits)":
3487
+ _fields_ = _TEB_2008_64._fields_
3488
+ elif os == "Windows 2003 R2":
3489
+ _fields_ = _TEB_2003_R2._fields_
3490
+ elif os == "Windows 2003 R2 (64 bits)":
3491
+ _fields_ = _TEB_2003_R2_64._fields_
3492
+ elif os == "Windows 2008 R2":
3493
+ _fields_ = _TEB_2008_R2._fields_
3494
+ elif os == "Windows 2008 R2 (64 bits)":
3495
+ _fields_ = _TEB_2008_R2_64._fields_
3496
+ elif os == "Windows Vista":
3497
+ _fields_ = _TEB_Vista._fields_
3498
+ elif os == "Windows Vista (64 bits)":
3499
+ _fields_ = _TEB_Vista_64._fields_
3500
+ elif os == "Windows 7":
3501
+ _fields_ = _TEB_W7._fields_
3502
+ elif os == "Windows 7 (64 bits)":
3503
+ _fields_ = _TEB_W7_64._fields_
3504
+ elif sizeof(SIZE_T) == sizeof(DWORD):
3505
+ _fields_ = _TEB_W7._fields_
3506
+ else:
3507
+ _fields_ = _TEB_W7_64._fields_
3508
+
3509
+
3510
+ PTEB = POINTER(TEB)
3511
+
3512
+ # ==============================================================================
3513
+ # This calculates the list of exported symbols.
3514
+ _all = set(vars().keys()).difference(_all)
3515
+ __all__ = [_x for _x in _all if not _x.startswith("_")]
3516
+ __all__.sort()
3517
+ # ==============================================================================