PIDL (DCERPC winreg): enhance dissector
[metze/wireshark/wip.git] / epan / dissectors / packet-dcerpc-winreg.c
1 /* DO NOT EDIT
2         This file was automatically generated by Pidl
3         from winreg.idl and winreg.cnf.
4
5         Pidl is a perl based IDL compiler for DCE/RPC idl files.
6         It is maintained by the Samba team, not the Wireshark team.
7         Instructions on how to download and install Pidl can be
8         found at http://wiki.wireshark.org/Pidl
9 */
10
11
12 #include "config.h"
13 #ifdef _MSC_VER
14 #pragma warning(disable:4005)
15 #pragma warning(disable:4013)
16 #pragma warning(disable:4018)
17 #pragma warning(disable:4101)
18 #endif
19
20 #include <glib.h>
21 #include <string.h>
22 #include <epan/packet.h>
23
24 #include "packet-dcerpc.h"
25 #include "packet-dcerpc-nt.h"
26 #include "packet-windows-common.h"
27 #include "packet-dcerpc-winreg.h"
28 void proto_register_dcerpc_winreg(void);
29 void proto_reg_handoff_dcerpc_winreg(void);
30
31 /* Ett declarations */
32 static gint ett_dcerpc_winreg = -1;
33 static gint ett_winreg_security_secinfo = -1;
34 static gint ett_winreg_winreg_AccessMask = -1;
35 static gint ett_winreg_winreg_String = -1;
36 static gint ett_winreg_KeySecurityData = -1;
37 static gint ett_winreg_winreg_SecBuf = -1;
38 static gint ett_winreg_winreg_KeyOptions = -1;
39 static gint ett_winreg_winreg_StringBuf = -1;
40 static gint ett_winreg_winreg_ValNameBuf = -1;
41 static gint ett_winreg_winreg_NotifyChangeType = -1;
42 static gint ett_winreg_winreg_RestoreKeyFlags = -1;
43 static gint ett_winreg_KeySecurityAttribute = -1;
44 static gint ett_winreg_QueryMultipleValue = -1;
45
46
47 /* Header field declarations */
48 static gint hf_winreg_winreg_AccessMask_KEY_ENUMERATE_SUB_KEYS = -1;
49 static gint hf_winreg_winreg_NotifyChangeKeyValue_string2 = -1;
50 static gint hf_winreg_winreg_InitiateSystemShutdown_message = -1;
51 static gint hf_winreg_winreg_String_name = -1;
52 static gint hf_winreg_winreg_InitiateSystemShutdownEx_message = -1;
53 static gint hf_winreg_winreg_EnumValue_enum_index = -1;
54 static gint hf_winreg_access_mask = -1;
55 static gint hf_winreg_winreg_CreateKey_options = -1;
56 static gint hf_winreg_winreg_InitiateSystemShutdownEx_timeout = -1;
57 static gint hf_winreg_handle = -1;
58 static gint hf_winreg_winreg_QueryInfoKey_max_valnamelen = -1;
59 static gint hf_winreg_winreg_SecBuf_length = -1;
60 static gint hf_winreg_winreg_InitiateSystemShutdown_do_reboot = -1;
61 static gint hf_winreg_winreg_DeleteKeyEx_handle = -1;
62 static gint hf_winreg_winreg_QueryMultipleValues_buffer_size = -1;
63 static gint hf_winreg_winreg_CreateKey_new_handle = -1;
64 static gint hf_winreg_winreg_QueryMultipleValues2_needed = -1;
65 static gint hf_winreg_QueryMultipleValue_ve_valuelen = -1;
66 static gint hf_winreg_KeySecurityAttribute_sec_data = -1;
67 static gint hf_winreg_winreg_GetKeySecurity_sec_info = -1;
68 static gint hf_winreg_winreg_SaveKeyEx_handle = -1;
69 static gint hf_winreg_winreg_KeyOptions_REG_OPTION_VOLATILE = -1;
70 static gint hf_winreg_winreg_QueryMultipleValues2_num_values = -1;
71 static gint hf_winreg_winreg_SetKeySecurity_sec_info = -1;
72 static gint hf_winreg_winreg_StringBuf_size = -1;
73 static gint hf_winreg_winreg_SecBuf_sd = -1;
74 static gint hf_winreg_winreg_QueryInfoKey_secdescsize = -1;
75 static gint hf_winreg_winreg_NotifyChangeType_REG_NOTIFY_CHANGE_SECURITY = -1;
76 static gint hf_winreg_winreg_SetValue_name = -1;
77 static gint hf_winreg_winreg_RestoreKey_flags = -1;
78 static gint hf_winreg_QueryMultipleValue_ve_type = -1;
79 static gint hf_winreg_winreg_CreateKey_secdesc = -1;
80 static gint hf_winreg_winreg_DeleteKeyEx_reserved = -1;
81 static gint hf_winreg_winreg_InitiateSystemShutdownEx_force_apps = -1;
82 static gint hf_winreg_winreg_SetValue_type = -1;
83 static gint hf_winreg_opnum = -1;
84 static gint hf_winreg_winreg_EnumValue_name = -1;
85 static gint hf_winreg_winreg_LoadKey_filename = -1;
86 static gint hf_winreg_winreg_AccessMask_KEY_CREATE_LINK = -1;
87 static gint hf_winreg_winreg_DeleteValue_value = -1;
88 static gint hf_winreg_winreg_QueryMultipleValues2_offered = -1;
89 static gint hf_winreg_winreg_QueryMultipleValues_values_in = -1;
90 static gint hf_winreg_winreg_AccessMask_KEY_NOTIFY = -1;
91 static gint hf_winreg_winreg_OpenKey_parent_handle = -1;
92 static gint hf_winreg_winreg_QueryInfoKey_num_subkeys = -1;
93 static gint hf_winreg_winreg_AccessMask_KEY_WOW64_32KEY = -1;
94 static gint hf_winreg_winreg_SaveKeyEx_sec_attrib = -1;
95 static gint hf_winreg_winreg_QueryInfoKey_last_changed_time = -1;
96 static gint hf_winreg_winreg_KeyOptions_REG_OPTION_OPEN_LINK = -1;
97 static gint hf_winreg_winreg_OpenHKPD_access_mask = -1;
98 static gint hf_winreg_winreg_AbortSystemShutdown_server = -1;
99 static gint hf_winreg_winreg_QueryValue_type = -1;
100 static gint hf_winreg_sd_actual_size = -1;
101 static gint hf_winreg_winreg_RestoreKeyFlags_REG_FORCE_RESTORE = -1;
102 static gint hf_winreg_winreg_SecBuf_inherit = -1;
103 static gint hf_winreg_winreg_SetValue_size = -1;
104 static gint hf_winreg_winreg_SaveKey_handle = -1;
105 static gint hf_winreg_winreg_NotifyChangeType_REG_NOTIFY_CHANGE_LAST_SET = -1;
106 static gint hf_winreg_winreg_ReplaceKey_handle = -1;
107 static gint hf_winreg_winreg_GetVersion_version = -1;
108 static gint hf_winreg_winreg_ReplaceKey_old_file = -1;
109 static gint hf_winreg_winreg_AccessMask_KEY_QUERY_VALUE = -1;
110 static gint hf_winreg_winreg_CreateKey_action_taken = -1;
111 static gint hf_winreg_winreg_QueryInfoKey_num_values = -1;
112 static gint hf_winreg_winreg_RestoreKeyFlags_REG_WHOLE_HIVE_VOLATILE = -1;
113 static gint hf_winreg_winreg_NotifyChangeType_REG_NOTIFY_CHANGE_NAME = -1;
114 static gint hf_winreg_winreg_AccessMask_KEY_SET_VALUE = -1;
115 static gint hf_winreg_winreg_EnumKey_enum_index = -1;
116 static gint hf_winreg_winreg_RestoreKey_handle = -1;
117 static gint hf_winreg_winreg_SetValue_data = -1;
118 static gint hf_winreg_winreg_InitiateSystemShutdown_force_apps = -1;
119 static gint hf_winreg_winreg_NotifyChangeKeyValue_string1 = -1;
120 static gint hf_winreg_winreg_SaveKeyEx_flags = -1;
121 static gint hf_winreg_winreg_QueryMultipleValues_buffer = -1;
122 static gint hf_winreg_winreg_QueryInfoKey_classname = -1;
123 static gint hf_winreg_winreg_AccessMask_KEY_WOW64_64KEY = -1;
124 static gint hf_winreg_winreg_ReplaceKey_subkey = -1;
125 static gint hf_winreg_sd_max_size = -1;
126 static gint hf_winreg_winreg_QueryInfoKey_max_classlen = -1;
127 static gint hf_winreg_winreg_ValNameBuf_length = -1;
128 static gint hf_winreg_winreg_NotifyChangeKeyValue_notify_filter = -1;
129 static gint hf_winreg_winreg_UnLoadKey_subkey = -1;
130 static gint hf_winreg_winreg_ReplaceKey_new_file = -1;
131 static gint hf_winreg_winreg_SaveKeyEx_filename = -1;
132 static gint hf_winreg_QueryMultipleValue_ve_valuename = -1;
133 static gint hf_winreg_winreg_QueryMultipleValues2_key_handle = -1;
134 static gint hf_winreg_KeySecurityData_size = -1;
135 static gint hf_winreg_winreg_KeyOptions_REG_OPTION_BACKUP_RESTORE = -1;
136 static gint hf_winreg_winreg_EnumKey_name = -1;
137 static gint hf_winreg_winreg_LoadKey_keyname = -1;
138 static gint hf_winreg_winreg_QueryMultipleValues_key_handle = -1;
139 static gint hf_winreg_winreg_EnumValue_type = -1;
140 static gint hf_winreg_winreg_EnumKey_last_changed_time = -1;
141 static gint hf_winreg_winreg_EnumValue_size = -1;
142 static gint hf_winreg_winreg_SaveKey_sec_attrib = -1;
143 static gint hf_winreg_sd = -1;
144 static gint hf_winreg_winreg_KeyOptions_REG_OPTION_CREATE_LINK = -1;
145 static gint hf_winreg_winreg_OpenKey_options = -1;
146 static gint hf_winreg_winreg_SaveKey_filename = -1;
147 static gint hf_winreg_winreg_QueryValue_data = -1;
148 static gint hf_winreg_winreg_QueryMultipleValues2_buffer = -1;
149 static gint hf_winreg_winreg_InitiateSystemShutdown_hostname = -1;
150 static gint hf_winreg_winreg_UnLoadKey_handle = -1;
151 static gint hf_winreg_winreg_QueryMultipleValues_values_out = -1;
152 static gint hf_winreg_KeySecurityData_data = -1;
153 static gint hf_winreg_winreg_OpenKey_access_mask = -1;
154 static gint hf_winreg_winreg_OpenKey_keyname = -1;
155 static gint hf_winreg_winreg_InitiateSystemShutdownEx_do_reboot = -1;
156 static gint hf_winreg_winreg_NotifyChangeKeyValue_watch_subtree = -1;
157 static gint hf_winreg_winreg_DeleteKeyEx_access_mask = -1;
158 static gint hf_winreg_winreg_DeleteKeyEx_key = -1;
159 static gint hf_winreg_winreg_QueryValue_data_length = -1;
160 static gint hf_winreg_KeySecurityData_len = -1;
161 static gint hf_winreg_winreg_ValNameBuf_size = -1;
162 static gint hf_winreg_winreg_CreateKey_name = -1;
163 static gint hf_winreg_winreg_NotifyChangeType_REG_NOTIFY_CHANGE_ATTRIBUTES = -1;
164 static gint hf_winreg_winreg_String_name_len = -1;
165 static gint hf_winreg_winreg_DeleteKey_key = -1;
166 static gint hf_winreg_winreg_QueryValue_data_size = -1;
167 static gint hf_winreg_system_name = -1;
168 static gint hf_winreg_QueryMultipleValue_ve_valueptr = -1;
169 static gint hf_winreg_KeySecurityAttribute_data_size = -1;
170 static gint hf_winreg_winreg_QueryMultipleValues_num_values = -1;
171 static gint hf_winreg_winreg_StringBuf_name = -1;
172 static gint hf_winreg_winreg_NotifyChangeKeyValue_unknown2 = -1;
173 static gint hf_winreg_sd_offset = -1;
174 static gint hf_winreg_winreg_ValNameBuf_name = -1;
175 static gint hf_winreg_winreg_StringBuf_length = -1;
176 static gint hf_winreg_winreg_QueryMultipleValues2_values_in = -1;
177 static gint hf_winreg_winreg_String_name_size = -1;
178 static gint hf_winreg_winreg_NotifyChangeKeyValue_unknown = -1;
179 static gint hf_winreg_winreg_AccessMask_KEY_CREATE_SUB_KEY = -1;
180 static gint hf_winreg_winreg_RestoreKey_filename = -1;
181 static gint hf_winreg_winreg_RestoreKeyFlags_REG_REFRESH_HIVE = -1;
182 static gint hf_winreg_winreg_QueryInfoKey_max_valbufsize = -1;
183 static gint hf_winreg_winreg_InitiateSystemShutdownEx_reason = -1;
184 static gint hf_winreg_winreg_EnumValue_length = -1;
185 static gint hf_winreg_winreg_QueryInfoKey_max_subkeylen = -1;
186 static gint hf_winreg_winreg_InitiateSystemShutdown_timeout = -1;
187 static gint hf_winreg_winreg_InitiateSystemShutdownEx_hostname = -1;
188 static gint hf_winreg_KeySecurityAttribute_inherit = -1;
189 static gint hf_winreg_werror = -1;
190 static gint hf_winreg_winreg_QueryMultipleValues2_values_out = -1;
191 static gint hf_winreg_winreg_EnumKey_keyclass = -1;
192 static gint hf_winreg_winreg_CreateKey_keyclass = -1;
193 static gint hf_winreg_winreg_EnumValue_value = -1;
194 static gint hf_winreg_winreg_OpenHKCU_access_mask = -1;
195 static gint hf_winreg_winreg_QueryValue_value_name = -1;
196 static gint hf_winreg_winreg_RestoreKeyFlags_REG_NO_LAZY_FLUSH = -1;
197
198 static gint proto_dcerpc_winreg = -1;
199 /* Version information */
200
201
202 static e_uuid_t uuid_dcerpc_winreg = {
203         0x338cd001, 0x2244, 0x31f1,
204         { 0xaa, 0xaa, 0x90, 0x00, 0x38, 0x00, 0x10, 0x03 }
205 };
206 static guint16 ver_dcerpc_winreg = 1;
207
208 static const true_false_string winreg_AccessMask_KEY_QUERY_VALUE_tfs = {
209    "KEY_QUERY_VALUE is SET",
210    "KEY_QUERY_VALUE is NOT SET",
211 };
212 static const true_false_string winreg_AccessMask_KEY_SET_VALUE_tfs = {
213    "KEY_SET_VALUE is SET",
214    "KEY_SET_VALUE is NOT SET",
215 };
216 static const true_false_string winreg_AccessMask_KEY_CREATE_SUB_KEY_tfs = {
217    "KEY_CREATE_SUB_KEY is SET",
218    "KEY_CREATE_SUB_KEY is NOT SET",
219 };
220 static const true_false_string winreg_AccessMask_KEY_ENUMERATE_SUB_KEYS_tfs = {
221    "KEY_ENUMERATE_SUB_KEYS is SET",
222    "KEY_ENUMERATE_SUB_KEYS is NOT SET",
223 };
224 static const true_false_string winreg_AccessMask_KEY_NOTIFY_tfs = {
225    "KEY_NOTIFY is SET",
226    "KEY_NOTIFY is NOT SET",
227 };
228 static const true_false_string winreg_AccessMask_KEY_CREATE_LINK_tfs = {
229    "KEY_CREATE_LINK is SET",
230    "KEY_CREATE_LINK is NOT SET",
231 };
232 static const true_false_string winreg_AccessMask_KEY_WOW64_64KEY_tfs = {
233    "KEY_WOW64_64KEY is SET",
234    "KEY_WOW64_64KEY is NOT SET",
235 };
236 static const true_false_string winreg_AccessMask_KEY_WOW64_32KEY_tfs = {
237    "KEY_WOW64_32KEY is SET",
238    "KEY_WOW64_32KEY is NOT SET",
239 };
240 static int winreg_dissect_element_String_name_len(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
241 static int winreg_dissect_element_String_name_size(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
242 static int winreg_dissect_element_String_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
243 static int winreg_dissect_element_String_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
244 static int winreg_dissect_element_KeySecurityData_data(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
245 static int winreg_dissect_element_KeySecurityData_data_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
246 static int winreg_dissect_element_KeySecurityData_size(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
247 static int winreg_dissect_element_KeySecurityData_len(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
248 static int winreg_dissect_element_SecBuf_length(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
249 static int winreg_dissect_element_SecBuf_sd(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
250 static int winreg_dissect_element_SecBuf_inherit(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
251 static const true_false_string winreg_KeyOptions_REG_OPTION_VOLATILE_tfs = {
252    "REG_OPTION_VOLATILE is SET",
253    "REG_OPTION_VOLATILE is NOT SET",
254 };
255 static const true_false_string winreg_KeyOptions_REG_OPTION_CREATE_LINK_tfs = {
256    "REG_OPTION_CREATE_LINK is SET",
257    "REG_OPTION_CREATE_LINK is NOT SET",
258 };
259 static const true_false_string winreg_KeyOptions_REG_OPTION_BACKUP_RESTORE_tfs = {
260    "REG_OPTION_BACKUP_RESTORE is SET",
261    "REG_OPTION_BACKUP_RESTORE is NOT SET",
262 };
263 static const true_false_string winreg_KeyOptions_REG_OPTION_OPEN_LINK_tfs = {
264    "REG_OPTION_OPEN_LINK is SET",
265    "REG_OPTION_OPEN_LINK is NOT SET",
266 };
267 const value_string winreg_winreg_CreateAction_vals[] = {
268         { REG_ACTION_NONE, "REG_ACTION_NONE" },
269         { REG_CREATED_NEW_KEY, "REG_CREATED_NEW_KEY" },
270         { REG_OPENED_EXISTING_KEY, "REG_OPENED_EXISTING_KEY" },
271 { 0, NULL }
272 };
273 static int winreg_dissect_element_StringBuf_length(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
274 static int winreg_dissect_element_StringBuf_size(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
275 static int winreg_dissect_element_StringBuf_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
276 static int winreg_dissect_element_StringBuf_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
277 static int winreg_dissect_element_StringBuf_name__(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
278 static int winreg_dissect_element_ValNameBuf_length(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
279 static int winreg_dissect_element_ValNameBuf_size(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
280 static int winreg_dissect_element_ValNameBuf_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
281 static int winreg_dissect_element_ValNameBuf_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
282 static int winreg_dissect_element_ValNameBuf_name__(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
283 static const true_false_string winreg_NotifyChangeType_REG_NOTIFY_CHANGE_NAME_tfs = {
284    "REG_NOTIFY_CHANGE_NAME is SET",
285    "REG_NOTIFY_CHANGE_NAME is NOT SET",
286 };
287 static const true_false_string winreg_NotifyChangeType_REG_NOTIFY_CHANGE_ATTRIBUTES_tfs = {
288    "REG_NOTIFY_CHANGE_ATTRIBUTES is SET",
289    "REG_NOTIFY_CHANGE_ATTRIBUTES is NOT SET",
290 };
291 static const true_false_string winreg_NotifyChangeType_REG_NOTIFY_CHANGE_LAST_SET_tfs = {
292    "REG_NOTIFY_CHANGE_LAST_SET is SET",
293    "REG_NOTIFY_CHANGE_LAST_SET is NOT SET",
294 };
295 static const true_false_string winreg_NotifyChangeType_REG_NOTIFY_CHANGE_SECURITY_tfs = {
296    "REG_NOTIFY_CHANGE_SECURITY is SET",
297    "REG_NOTIFY_CHANGE_SECURITY is NOT SET",
298 };
299 static const true_false_string winreg_RestoreKeyFlags_REG_WHOLE_HIVE_VOLATILE_tfs = {
300    "REG_WHOLE_HIVE_VOLATILE is SET",
301    "REG_WHOLE_HIVE_VOLATILE is NOT SET",
302 };
303 static const true_false_string winreg_RestoreKeyFlags_REG_REFRESH_HIVE_tfs = {
304    "REG_REFRESH_HIVE is SET",
305    "REG_REFRESH_HIVE is NOT SET",
306 };
307 static const true_false_string winreg_RestoreKeyFlags_REG_NO_LAZY_FLUSH_tfs = {
308    "REG_NO_LAZY_FLUSH is SET",
309    "REG_NO_LAZY_FLUSH is NOT SET",
310 };
311 static const true_false_string winreg_RestoreKeyFlags_REG_FORCE_RESTORE_tfs = {
312    "REG_FORCE_RESTORE is SET",
313    "REG_FORCE_RESTORE is NOT SET",
314 };
315 static int winreg_dissect_element_KeySecurityAttribute_data_size(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
316 static int winreg_dissect_element_KeySecurityAttribute_sec_data(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
317 static int winreg_dissect_element_KeySecurityAttribute_inherit(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
318 static int winreg_dissect_element_QueryMultipleValue_ve_valuename(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
319 static int winreg_dissect_element_QueryMultipleValue_ve_valuename_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
320 static int winreg_dissect_element_QueryMultipleValue_ve_valuelen(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
321 static int winreg_dissect_element_QueryMultipleValue_ve_valueptr(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
322 static int winreg_dissect_element_QueryMultipleValue_ve_type(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
323 static int winreg_dissect_element_OpenHKCR_system_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
324 static int winreg_dissect_element_OpenHKCR_system_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
325 static int winreg_dissect_element_OpenHKCR_access_mask(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
326 static int winreg_dissect_element_OpenHKCR_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
327 static int winreg_dissect_element_OpenHKCR_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
328 static int winreg_dissect_element_OpenHKCU_system_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
329 static int winreg_dissect_element_OpenHKCU_system_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
330 static int winreg_dissect_element_OpenHKCU_access_mask(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
331 static int winreg_dissect_element_OpenHKCU_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
332 static int winreg_dissect_element_OpenHKCU_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
333 static int winreg_dissect_element_OpenHKLM_system_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
334 static int winreg_dissect_element_OpenHKLM_system_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
335 static int winreg_dissect_element_OpenHKLM_access_mask(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
336 static int winreg_dissect_element_OpenHKLM_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
337 static int winreg_dissect_element_OpenHKLM_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
338 static int winreg_dissect_element_OpenHKPD_system_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
339 static int winreg_dissect_element_OpenHKPD_system_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
340 static int winreg_dissect_element_OpenHKPD_access_mask(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
341 static int winreg_dissect_element_OpenHKPD_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
342 static int winreg_dissect_element_OpenHKPD_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
343 static int winreg_dissect_element_OpenHKU_system_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
344 static int winreg_dissect_element_OpenHKU_system_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
345 static int winreg_dissect_element_OpenHKU_access_mask(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
346 static int winreg_dissect_element_OpenHKU_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
347 static int winreg_dissect_element_OpenHKU_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
348 static int winreg_dissect_element_CloseKey_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
349 static int winreg_dissect_element_CloseKey_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
350 static int winreg_dissect_element_CreateKey_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
351 static int winreg_dissect_element_CreateKey_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
352 static int winreg_dissect_element_CreateKey_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
353 static int winreg_dissect_element_CreateKey_keyclass(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
354 static int winreg_dissect_element_CreateKey_options(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
355 static int winreg_dissect_element_CreateKey_access_mask(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
356 static int winreg_dissect_element_CreateKey_secdesc(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
357 static int winreg_dissect_element_CreateKey_secdesc_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
358 static int winreg_dissect_element_CreateKey_new_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
359 static int winreg_dissect_element_CreateKey_new_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
360 static int winreg_dissect_element_CreateKey_action_taken(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
361 static int winreg_dissect_element_CreateKey_action_taken_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
362 static int winreg_dissect_element_DeleteKey_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
363 static int winreg_dissect_element_DeleteKey_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
364 static int winreg_dissect_element_DeleteKey_key(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
365 static int winreg_dissect_element_DeleteValue_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
366 static int winreg_dissect_element_DeleteValue_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
367 static int winreg_dissect_element_DeleteValue_value(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
368 static int winreg_dissect_element_EnumKey_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
369 static int winreg_dissect_element_EnumKey_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
370 static int winreg_dissect_element_EnumKey_enum_index(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
371 static int winreg_dissect_element_EnumKey_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
372 static int winreg_dissect_element_EnumKey_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
373 static int winreg_dissect_element_EnumKey_keyclass(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
374 static int winreg_dissect_element_EnumKey_keyclass_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
375 static int winreg_dissect_element_EnumKey_last_changed_time(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
376 static int winreg_dissect_element_EnumKey_last_changed_time_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
377 static int winreg_dissect_element_EnumValue_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
378 static int winreg_dissect_element_EnumValue_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
379 static int winreg_dissect_element_EnumValue_enum_index(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
380 static int winreg_dissect_element_EnumValue_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
381 static int winreg_dissect_element_EnumValue_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
382 static int winreg_dissect_element_EnumValue_type(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
383 static int winreg_dissect_element_EnumValue_type_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
384 static int winreg_dissect_element_EnumValue_value(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
385 static int winreg_dissect_element_EnumValue_value_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
386 static int winreg_dissect_element_EnumValue_value__(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
387 static int winreg_dissect_element_EnumValue_size(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
388 static int winreg_dissect_element_EnumValue_size_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
389 static int winreg_dissect_element_EnumValue_length(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
390 static int winreg_dissect_element_EnumValue_length_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
391 static int winreg_dissect_element_FlushKey_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
392 static int winreg_dissect_element_FlushKey_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
393 static int winreg_dissect_element_GetKeySecurity_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
394 static int winreg_dissect_element_GetKeySecurity_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
395 static int winreg_dissect_element_GetKeySecurity_sec_info(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
396 static int winreg_dissect_element_GetKeySecurity_sd(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
397 static int winreg_dissect_element_GetKeySecurity_sd_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
398 static int winreg_dissect_element_LoadKey_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
399 static int winreg_dissect_element_LoadKey_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
400 static int winreg_dissect_element_LoadKey_keyname(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
401 static int winreg_dissect_element_LoadKey_keyname_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
402 static int winreg_dissect_element_LoadKey_filename(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
403 static int winreg_dissect_element_LoadKey_filename_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
404 static int winreg_dissect_element_NotifyChangeKeyValue_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
405 static int winreg_dissect_element_NotifyChangeKeyValue_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
406 static int winreg_dissect_element_NotifyChangeKeyValue_watch_subtree(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
407 static int winreg_dissect_element_NotifyChangeKeyValue_notify_filter(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
408 static int winreg_dissect_element_NotifyChangeKeyValue_unknown(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
409 static int winreg_dissect_element_NotifyChangeKeyValue_string1(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
410 static int winreg_dissect_element_NotifyChangeKeyValue_string2(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
411 static int winreg_dissect_element_NotifyChangeKeyValue_unknown2(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
412 static int winreg_dissect_element_OpenKey_parent_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
413 static int winreg_dissect_element_OpenKey_parent_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
414 static int winreg_dissect_element_OpenKey_keyname(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
415 static int winreg_dissect_element_OpenKey_options(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
416 static int winreg_dissect_element_OpenKey_access_mask(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
417 static int winreg_dissect_element_OpenKey_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
418 static int winreg_dissect_element_OpenKey_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
419 static int winreg_dissect_element_QueryInfoKey_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
420 static int winreg_dissect_element_QueryInfoKey_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
421 static int winreg_dissect_element_QueryInfoKey_classname(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
422 static int winreg_dissect_element_QueryInfoKey_classname_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
423 static int winreg_dissect_element_QueryInfoKey_num_subkeys(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
424 static int winreg_dissect_element_QueryInfoKey_num_subkeys_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
425 static int winreg_dissect_element_QueryInfoKey_max_subkeylen(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
426 static int winreg_dissect_element_QueryInfoKey_max_subkeylen_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
427 static int winreg_dissect_element_QueryInfoKey_max_classlen(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
428 static int winreg_dissect_element_QueryInfoKey_max_classlen_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
429 static int winreg_dissect_element_QueryInfoKey_num_values(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
430 static int winreg_dissect_element_QueryInfoKey_num_values_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
431 static int winreg_dissect_element_QueryInfoKey_max_valnamelen(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
432 static int winreg_dissect_element_QueryInfoKey_max_valnamelen_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
433 static int winreg_dissect_element_QueryInfoKey_max_valbufsize(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
434 static int winreg_dissect_element_QueryInfoKey_max_valbufsize_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
435 static int winreg_dissect_element_QueryInfoKey_secdescsize(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
436 static int winreg_dissect_element_QueryInfoKey_secdescsize_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
437 static int winreg_dissect_element_QueryInfoKey_last_changed_time(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
438 static int winreg_dissect_element_QueryInfoKey_last_changed_time_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
439 static int winreg_dissect_element_QueryValue_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
440 static int winreg_dissect_element_QueryValue_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
441 static int winreg_dissect_element_QueryValue_value_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
442 static int winreg_dissect_element_QueryValue_value_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
443 static int winreg_dissect_element_QueryValue_type(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
444 static int winreg_dissect_element_QueryValue_type_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
445 static int winreg_dissect_element_QueryValue_data(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
446 static int winreg_dissect_element_QueryValue_data_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
447 static int winreg_dissect_element_QueryValue_data__(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
448 static int winreg_dissect_element_QueryValue_data_size(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
449 static int winreg_dissect_element_QueryValue_data_size_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
450 static int winreg_dissect_element_QueryValue_data_length(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
451 static int winreg_dissect_element_QueryValue_data_length_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
452 static int winreg_dissect_element_ReplaceKey_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
453 static int winreg_dissect_element_ReplaceKey_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
454 static int winreg_dissect_element_ReplaceKey_subkey(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
455 static int winreg_dissect_element_ReplaceKey_subkey_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
456 static int winreg_dissect_element_ReplaceKey_new_file(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
457 static int winreg_dissect_element_ReplaceKey_new_file_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
458 static int winreg_dissect_element_ReplaceKey_old_file(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
459 static int winreg_dissect_element_ReplaceKey_old_file_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
460 static int winreg_dissect_element_RestoreKey_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
461 static int winreg_dissect_element_RestoreKey_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
462 static int winreg_dissect_element_RestoreKey_filename(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
463 static int winreg_dissect_element_RestoreKey_filename_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
464 static int winreg_dissect_element_RestoreKey_flags(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
465 static int winreg_dissect_element_SaveKey_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
466 static int winreg_dissect_element_SaveKey_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
467 static int winreg_dissect_element_SaveKey_filename(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
468 static int winreg_dissect_element_SaveKey_filename_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
469 static int winreg_dissect_element_SaveKey_sec_attrib(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
470 static int winreg_dissect_element_SaveKey_sec_attrib_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
471 static int winreg_dissect_element_SetKeySecurity_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
472 static int winreg_dissect_element_SetKeySecurity_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
473 static int winreg_dissect_element_SetKeySecurity_sec_info(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
474 static int winreg_dissect_element_SetKeySecurity_sd(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
475 static int winreg_dissect_element_SetKeySecurity_sd_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
476 static int winreg_dissect_element_SetValue_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
477 static int winreg_dissect_element_SetValue_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
478 static int winreg_dissect_element_SetValue_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
479 static int winreg_dissect_element_SetValue_type(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
480 static int winreg_dissect_element_SetValue_data(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
481 static int winreg_dissect_element_SetValue_data_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
482 static int winreg_dissect_element_SetValue_data__(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
483 static int winreg_dissect_element_SetValue_size(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
484 static int winreg_dissect_element_UnLoadKey_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
485 static int winreg_dissect_element_UnLoadKey_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
486 static int winreg_dissect_element_UnLoadKey_subkey(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
487 static int winreg_dissect_element_UnLoadKey_subkey_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
488 static int winreg_dissect_element_InitiateSystemShutdown_hostname(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
489 static int winreg_dissect_element_InitiateSystemShutdown_hostname_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
490 static int winreg_dissect_element_InitiateSystemShutdown_message(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
491 static int winreg_dissect_element_InitiateSystemShutdown_message_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
492 static int winreg_dissect_element_InitiateSystemShutdown_timeout(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
493 static int winreg_dissect_element_InitiateSystemShutdown_force_apps(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
494 static int winreg_dissect_element_InitiateSystemShutdown_do_reboot(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
495 static int winreg_dissect_element_AbortSystemShutdown_server(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
496 static int winreg_dissect_element_AbortSystemShutdown_server_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
497 static int winreg_dissect_element_GetVersion_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
498 static int winreg_dissect_element_GetVersion_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
499 static int winreg_dissect_element_GetVersion_version(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
500 static int winreg_dissect_element_GetVersion_version_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
501 static int winreg_dissect_element_OpenHKCC_system_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
502 static int winreg_dissect_element_OpenHKCC_system_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
503 static int winreg_dissect_element_OpenHKCC_access_mask(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
504 static int winreg_dissect_element_OpenHKCC_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
505 static int winreg_dissect_element_OpenHKCC_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
506 static int winreg_dissect_element_OpenHKDD_system_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
507 static int winreg_dissect_element_OpenHKDD_system_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
508 static int winreg_dissect_element_OpenHKDD_access_mask(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
509 static int winreg_dissect_element_OpenHKDD_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
510 static int winreg_dissect_element_OpenHKDD_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
511 static int winreg_dissect_element_QueryMultipleValues_key_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
512 static int winreg_dissect_element_QueryMultipleValues_key_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
513 static int winreg_dissect_element_QueryMultipleValues_values_in(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
514 static int winreg_dissect_element_QueryMultipleValues_values_in_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
515 static int winreg_dissect_element_QueryMultipleValues_values_in__(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
516 static int winreg_dissect_element_QueryMultipleValues_values_out(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
517 static int winreg_dissect_element_QueryMultipleValues_values_out_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
518 static int winreg_dissect_element_QueryMultipleValues_values_out__(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
519 static int winreg_dissect_element_QueryMultipleValues_num_values(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
520 static int winreg_dissect_element_QueryMultipleValues_buffer(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
521 static int winreg_dissect_element_QueryMultipleValues_buffer_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
522 static int winreg_dissect_element_QueryMultipleValues_buffer__(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
523 static int winreg_dissect_element_QueryMultipleValues_buffer_size(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
524 static int winreg_dissect_element_QueryMultipleValues_buffer_size_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
525 static int winreg_dissect_element_InitiateSystemShutdownEx_hostname(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
526 static int winreg_dissect_element_InitiateSystemShutdownEx_hostname_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
527 static int winreg_dissect_element_InitiateSystemShutdownEx_message(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
528 static int winreg_dissect_element_InitiateSystemShutdownEx_message_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
529 static int winreg_dissect_element_InitiateSystemShutdownEx_timeout(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
530 static int winreg_dissect_element_InitiateSystemShutdownEx_force_apps(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
531 static int winreg_dissect_element_InitiateSystemShutdownEx_do_reboot(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
532 static int winreg_dissect_element_InitiateSystemShutdownEx_reason(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
533 static int winreg_dissect_element_SaveKeyEx_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
534 static int winreg_dissect_element_SaveKeyEx_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
535 static int winreg_dissect_element_SaveKeyEx_filename(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
536 static int winreg_dissect_element_SaveKeyEx_filename_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
537 static int winreg_dissect_element_SaveKeyEx_sec_attrib(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
538 static int winreg_dissect_element_SaveKeyEx_sec_attrib_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
539 static int winreg_dissect_element_SaveKeyEx_flags(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
540 static int winreg_dissect_element_OpenHKPT_system_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
541 static int winreg_dissect_element_OpenHKPT_system_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
542 static int winreg_dissect_element_OpenHKPT_access_mask(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
543 static int winreg_dissect_element_OpenHKPT_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
544 static int winreg_dissect_element_OpenHKPT_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
545 static int winreg_dissect_element_OpenHKPN_system_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
546 static int winreg_dissect_element_OpenHKPN_system_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
547 static int winreg_dissect_element_OpenHKPN_access_mask(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
548 static int winreg_dissect_element_OpenHKPN_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
549 static int winreg_dissect_element_OpenHKPN_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
550 static int winreg_dissect_element_QueryMultipleValues2_key_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
551 static int winreg_dissect_element_QueryMultipleValues2_key_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
552 static int winreg_dissect_element_QueryMultipleValues2_values_in(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
553 static int winreg_dissect_element_QueryMultipleValues2_values_in_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
554 static int winreg_dissect_element_QueryMultipleValues2_values_in__(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
555 static int winreg_dissect_element_QueryMultipleValues2_values_out(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
556 static int winreg_dissect_element_QueryMultipleValues2_values_out_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
557 static int winreg_dissect_element_QueryMultipleValues2_values_out__(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
558 static int winreg_dissect_element_QueryMultipleValues2_num_values(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
559 static int winreg_dissect_element_QueryMultipleValues2_buffer(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
560 static int winreg_dissect_element_QueryMultipleValues2_buffer_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
561 static int winreg_dissect_element_QueryMultipleValues2_buffer__(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
562 static int winreg_dissect_element_QueryMultipleValues2_offered(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
563 static int winreg_dissect_element_QueryMultipleValues2_offered_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
564 static int winreg_dissect_element_QueryMultipleValues2_needed(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
565 static int winreg_dissect_element_QueryMultipleValues2_needed_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
566 static int winreg_dissect_element_DeleteKeyEx_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
567 static int winreg_dissect_element_DeleteKeyEx_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
568 static int winreg_dissect_element_DeleteKeyEx_key(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
569 static int winreg_dissect_element_DeleteKeyEx_key_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
570 static int winreg_dissect_element_DeleteKeyEx_access_mask(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
571 static int winreg_dissect_element_DeleteKeyEx_reserved(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
572  #include "packet-dcerpc-lsa.h"
573 static void
574 winreg_specific_rights(tvbuff_t *tvb, gint offset, proto_tree *tree, guint32 access)
575 {
576         proto_tree_add_boolean(tree, hf_winreg_winreg_AccessMask_KEY_WOW64_32KEY, tvb, offset, 4, access);
577         proto_tree_add_boolean(tree, hf_winreg_winreg_AccessMask_KEY_WOW64_64KEY, tvb, offset, 4, access);
578         proto_tree_add_boolean(tree, hf_winreg_winreg_AccessMask_KEY_CREATE_LINK, tvb, offset, 4, access);
579         proto_tree_add_boolean(tree, hf_winreg_winreg_AccessMask_KEY_NOTIFY, tvb, offset, 4, access);
580         proto_tree_add_boolean(tree, hf_winreg_winreg_AccessMask_KEY_ENUMERATE_SUB_KEYS, tvb, offset, 4, access);
581         proto_tree_add_boolean(tree, hf_winreg_winreg_AccessMask_KEY_CREATE_SUB_KEY, tvb, offset, 4, access);
582         proto_tree_add_boolean(tree, hf_winreg_winreg_AccessMask_KEY_SET_VALUE, tvb, offset, 4, access);
583         proto_tree_add_boolean(tree, hf_winreg_winreg_AccessMask_KEY_QUERY_VALUE, tvb, offset, 4, access);
584 }
585 struct access_mask_info winreg_access_mask_info = {
586         "WINREG",               /* Name of specific rights */
587         winreg_specific_rights, /* Dissection function */
588         NULL,                   /* Generic mapping table */
589         NULL                    /* Standard mapping table */
590 };
591 static int
592 winreg_dissect_element_KeySecurityData_data_(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, dcerpc_info* di, guint8 *drep)
593 {
594         guint32 len;
595         if(di->conformant_run){
596                 /*just a run to handle conformant arrays, nothing to dissect */
597                 return offset;
598         }
599         /* this is a varying and conformant array */
600         offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep, hf_winreg_sd_max_size, NULL);
601         offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep, hf_winreg_sd_offset, NULL);
602         offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep, hf_winreg_sd_actual_size, &len);
603         dissect_nt_sec_desc(tvb, offset, pinfo, tree, drep, TRUE, len,
604                 &winreg_access_mask_info);
605         offset += len;
606         return offset;
607 }
608 int
609 winreg_dissect_bitmap_AccessMask(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, dcerpc_info* di, guint8 *drep, int hf_index _U_, guint32 param _U_)
610 {
611         offset = dissect_nt_access_mask(
612                 tvb, offset, pinfo, tree, di, drep, hf_winreg_access_mask,
613                 &winreg_access_mask_info, NULL);
614         return offset;
615 }
616 /* winreg_String :
617  *      typedef [public,noejs] struct {
618  *              [value(strlen_m_term(name)*2)] uint16 name_len;
619  *              [value(strlen_m_term(name)*2)] uint16 name_size;
620  *              [string,charset(UTF16)] uint16 *name;
621  *      } winreg_String;
622  */
623 static int
624 cnf_dissect_winreg_String(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *parent_tree, dcerpc_info* di, guint8 *drep, guint32 param, int hfindex)
625 {
626         proto_item *item = NULL;
627         proto_tree *tree = NULL;
628         int old_offset;
629         header_field_info *hf_info;
630         ALIGN_TO_4_BYTES;
631         old_offset = offset;
632         hf_info=proto_registrar_get_nth(hfindex);
633         if (parent_tree) {
634                 tree = proto_tree_add_subtree_format(parent_tree, tvb, offset, 0, ett_winreg_winreg_String, &item, "%s: ", hf_info->name);
635         }
636         
637         offset = winreg_dissect_element_String_name_len(tvb, offset, pinfo, tree, di, drep);
638         offset = winreg_dissect_element_String_name_size(tvb, offset, pinfo, tree, di, drep);
639         offset = dissect_ndr_pointer_cb(
640                 tvb, offset, pinfo, tree, di, drep,
641                 dissect_ndr_wchar_cvstring, NDR_POINTER_UNIQUE,
642                 hf_info->name, hfindex, cb_wstr_postprocess,
643                 GINT_TO_POINTER(param));
644         proto_item_set_len(item, offset-old_offset);
645         return offset;
646 }
647
648
649 /* IDL: bitmap { */
650 /* IDL: } */
651
652 int
653 winreg_dissect_bitmap_security_secinfo(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, dcerpc_info* di _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
654 {
655         proto_item *item = NULL;
656         proto_tree *tree = NULL;
657
658         guint32 flags;
659         ALIGN_TO_4_BYTES;
660
661         if (parent_tree) {
662                 item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, 4, DREP_ENC_INTEGER(drep));
663                 tree = proto_item_add_subtree(item,ett_winreg_security_secinfo);
664         }
665
666         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, -1, &flags);
667         proto_item_append_text(item, ": ");
668
669         if (!flags)
670                 proto_item_append_text(item, "(No values set)");
671
672         if (flags) {
673                 proto_item_append_text(item, "Unknown bitmap value 0x%x", flags);
674         }
675
676         return offset;
677 }
678
679
680 /* IDL: bitmap { */
681 /* IDL:         KEY_QUERY_VALUE =  0x00001 , */
682 /* IDL:         KEY_SET_VALUE =  0x00002 , */
683 /* IDL:         KEY_CREATE_SUB_KEY =  0x00004 , */
684 /* IDL:         KEY_ENUMERATE_SUB_KEYS =  0x00008 , */
685 /* IDL:         KEY_NOTIFY =  0x00010 , */
686 /* IDL:         KEY_CREATE_LINK =  0x00020 , */
687 /* IDL:         KEY_WOW64_64KEY =  0x00100 , */
688 /* IDL:         KEY_WOW64_32KEY =  0x00200 , */
689 /* IDL: } */
690
691
692 /* IDL: struct { */
693 /* IDL:         [value(strlen_m_term(name)*2)] uint16 name_len; */
694 /* IDL:         [value(strlen_m_term(name)*2)] uint16 name_size; */
695 /* IDL:         [unique(1)] [charset(UTF16)] uint16 *name; */
696 /* IDL: } */
697
698 static int
699 winreg_dissect_element_String_name_len(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
700 {
701         offset = PIDL_dissect_uint16(tvb, offset, pinfo, tree, di, drep, hf_winreg_winreg_String_name_len, 0);
702
703         return offset;
704 }
705
706 static int
707 winreg_dissect_element_String_name_size(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
708 {
709         offset = PIDL_dissect_uint16(tvb, offset, pinfo, tree, di, drep, hf_winreg_winreg_String_name_size, 0);
710
711         return offset;
712 }
713
714 static int
715 winreg_dissect_element_String_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
716 {
717         offset = dissect_ndr_embedded_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_String_name_, NDR_POINTER_UNIQUE, "Pointer to Name (uint16)",hf_winreg_winreg_String_name);
718
719         return offset;
720 }
721
722 static int
723 winreg_dissect_element_String_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
724 {
725         char *data;
726
727         offset = dissect_ndr_cvstring(tvb, offset, pinfo, tree, di, drep, sizeof(guint16), hf_winreg_winreg_String_name, FALSE, &data);
728         proto_item_append_text(tree, ": %s", data);
729
730         return offset;
731 }
732
733 int
734 winreg_dissect_struct_String(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, dcerpc_info* di _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
735 {
736         proto_item *item = NULL;
737         proto_tree *tree = NULL;
738         int old_offset;
739
740         ALIGN_TO_4_BYTES;
741
742         old_offset = offset;
743
744         if (parent_tree) {
745                 item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, ENC_NA);
746                 tree = proto_item_add_subtree(item, ett_winreg_winreg_String);
747         }
748         
749         offset = winreg_dissect_element_String_name_len(tvb, offset, pinfo, tree, di, drep);
750
751         offset = winreg_dissect_element_String_name_size(tvb, offset, pinfo, tree, di, drep);
752
753         offset = winreg_dissect_element_String_name(tvb, offset, pinfo, tree, di, drep);
754
755
756         proto_item_set_len(item, offset-old_offset);
757
758
759         if (di->call_data->flags & DCERPC_IS_NDR64) {
760                 ALIGN_TO_4_BYTES;
761         }
762
763         return offset;
764 }
765
766
767 /* IDL: struct { */
768 /* IDL:         [unique(1)] [length_is(len)] [size_is(size)] uint8 *data; */
769 /* IDL:         uint32 size; */
770 /* IDL:         uint32 len; */
771 /* IDL: } */
772
773 static int
774 winreg_dissect_element_KeySecurityData_data(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
775 {
776         offset = dissect_ndr_embedded_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_KeySecurityData_data_, NDR_POINTER_UNIQUE, "Pointer to Data (uint8)",hf_winreg_KeySecurityData_data);
777
778         return offset;
779 }
780
781 static int
782 winreg_dissect_element_KeySecurityData_size(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
783 {
784         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, di, drep, hf_winreg_KeySecurityData_size, 0);
785
786         return offset;
787 }
788
789 static int
790 winreg_dissect_element_KeySecurityData_len(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
791 {
792         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, di, drep, hf_winreg_KeySecurityData_len, 0);
793
794         return offset;
795 }
796
797 int
798 winreg_dissect_struct_KeySecurityData(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, dcerpc_info* di _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
799 {
800         proto_item *item = NULL;
801         proto_tree *tree = NULL;
802         int old_offset;
803
804         ALIGN_TO_5_BYTES;
805
806         old_offset = offset;
807
808         if (parent_tree) {
809                 item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, ENC_NA);
810                 tree = proto_item_add_subtree(item, ett_winreg_KeySecurityData);
811         }
812         
813         offset = winreg_dissect_element_KeySecurityData_data(tvb, offset, pinfo, tree, di, drep);
814
815         offset = winreg_dissect_element_KeySecurityData_size(tvb, offset, pinfo, tree, di, drep);
816
817         offset = winreg_dissect_element_KeySecurityData_len(tvb, offset, pinfo, tree, di, drep);
818
819
820         proto_item_set_len(item, offset-old_offset);
821
822
823         if (di->call_data->flags & DCERPC_IS_NDR64) {
824                 ALIGN_TO_5_BYTES;
825         }
826
827         return offset;
828 }
829
830
831 /* IDL: struct { */
832 /* IDL:         uint32 length; */
833 /* IDL:         KeySecurityData sd; */
834 /* IDL:         uint8 inherit; */
835 /* IDL: } */
836
837 static int
838 winreg_dissect_element_SecBuf_length(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
839 {
840         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, di, drep, hf_winreg_winreg_SecBuf_length, 0);
841
842         return offset;
843 }
844
845 static int
846 winreg_dissect_element_SecBuf_sd(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
847 {
848         offset = winreg_dissect_struct_KeySecurityData(tvb,offset,pinfo,tree,di,drep,hf_winreg_winreg_SecBuf_sd,0);
849
850         return offset;
851 }
852
853 static int
854 winreg_dissect_element_SecBuf_inherit(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
855 {
856         offset = PIDL_dissect_uint8(tvb, offset, pinfo, tree, di, drep, hf_winreg_winreg_SecBuf_inherit, 0);
857
858         return offset;
859 }
860
861 int
862 winreg_dissect_struct_SecBuf(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, dcerpc_info* di _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
863 {
864         proto_item *item = NULL;
865         proto_tree *tree = NULL;
866         int old_offset;
867
868         ALIGN_TO_5_BYTES;
869
870         old_offset = offset;
871
872         if (parent_tree) {
873                 item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, ENC_NA);
874                 tree = proto_item_add_subtree(item, ett_winreg_winreg_SecBuf);
875         }
876         
877         offset = winreg_dissect_element_SecBuf_length(tvb, offset, pinfo, tree, di, drep);
878
879         offset = winreg_dissect_element_SecBuf_sd(tvb, offset, pinfo, tree, di, drep);
880
881         offset = winreg_dissect_element_SecBuf_inherit(tvb, offset, pinfo, tree, di, drep);
882
883
884         proto_item_set_len(item, offset-old_offset);
885
886
887         if (di->call_data->flags & DCERPC_IS_NDR64) {
888                 ALIGN_TO_5_BYTES;
889         }
890
891         return offset;
892 }
893
894
895 /* IDL: bitmap { */
896 /* IDL:         REG_OPTION_VOLATILE =  0x00000001 , */
897 /* IDL:         REG_OPTION_CREATE_LINK =  0x00000002 , */
898 /* IDL:         REG_OPTION_BACKUP_RESTORE =  0x00000004 , */
899 /* IDL:         REG_OPTION_OPEN_LINK =  0x00000008 , */
900 /* IDL: } */
901
902 int
903 winreg_dissect_bitmap_KeyOptions(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, dcerpc_info* di _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
904 {
905         proto_item *item = NULL;
906         proto_tree *tree = NULL;
907
908         guint32 flags;
909         ALIGN_TO_4_BYTES;
910
911         if (parent_tree) {
912                 item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, 4, DREP_ENC_INTEGER(drep));
913                 tree = proto_item_add_subtree(item,ett_winreg_winreg_KeyOptions);
914         }
915
916         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, -1, &flags);
917         proto_item_append_text(item, ": ");
918
919         if (!flags)
920                 proto_item_append_text(item, "(No values set)");
921
922         proto_tree_add_boolean(tree, hf_winreg_winreg_KeyOptions_REG_OPTION_VOLATILE, tvb, offset-4, 4, flags);
923         if (flags&( 0x00000001 )){
924                 proto_item_append_text(item, "REG_OPTION_VOLATILE");
925                 if (flags & (~( 0x00000001 )))
926                         proto_item_append_text(item, ", ");
927         }
928         flags&=(~( 0x00000001 ));
929
930         proto_tree_add_boolean(tree, hf_winreg_winreg_KeyOptions_REG_OPTION_CREATE_LINK, tvb, offset-4, 4, flags);
931         if (flags&( 0x00000002 )){
932                 proto_item_append_text(item, "REG_OPTION_CREATE_LINK");
933                 if (flags & (~( 0x00000002 )))
934                         proto_item_append_text(item, ", ");
935         }
936         flags&=(~( 0x00000002 ));
937
938         proto_tree_add_boolean(tree, hf_winreg_winreg_KeyOptions_REG_OPTION_BACKUP_RESTORE, tvb, offset-4, 4, flags);
939         if (flags&( 0x00000004 )){
940                 proto_item_append_text(item, "REG_OPTION_BACKUP_RESTORE");
941                 if (flags & (~( 0x00000004 )))
942                         proto_item_append_text(item, ", ");
943         }
944         flags&=(~( 0x00000004 ));
945
946         proto_tree_add_boolean(tree, hf_winreg_winreg_KeyOptions_REG_OPTION_OPEN_LINK, tvb, offset-4, 4, flags);
947         if (flags&( 0x00000008 )){
948                 proto_item_append_text(item, "REG_OPTION_OPEN_LINK");
949                 if (flags & (~( 0x00000008 )))
950                         proto_item_append_text(item, ", ");
951         }
952         flags&=(~( 0x00000008 ));
953
954         if (flags) {
955                 proto_item_append_text(item, "Unknown bitmap value 0x%x", flags);
956         }
957
958         return offset;
959 }
960
961
962 /* IDL: enum { */
963 /* IDL:         REG_ACTION_NONE=0, */
964 /* IDL:         REG_CREATED_NEW_KEY=1, */
965 /* IDL:         REG_OPENED_EXISTING_KEY=2, */
966 /* IDL: } */
967
968 int
969 winreg_dissect_enum_CreateAction(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_, int hf_index _U_, guint32 *param _U_)
970 {
971         guint32 parameter=0;
972         if(param){
973                 parameter=(guint32)*param;
974         }
975         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_index, &parameter);
976         if(param){
977                 *param=(guint32)parameter;
978         }
979         return offset;
980 }
981
982
983 /* IDL: struct { */
984 /* IDL:         [value(strlen_m_term_null(name)*2)] uint16 length; */
985 /* IDL:         uint16 size; */
986 /* IDL:         [unique(1)] [length_is(length/2)] [charset(UTF16)] [size_is(size/2)] uint16 *name; */
987 /* IDL: } */
988
989 static int
990 winreg_dissect_element_StringBuf_length(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
991 {
992         offset = PIDL_dissect_uint16(tvb, offset, pinfo, tree, di, drep, hf_winreg_winreg_StringBuf_length, 0);
993
994         return offset;
995 }
996
997 static int
998 winreg_dissect_element_StringBuf_size(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
999 {
1000         offset = PIDL_dissect_uint16(tvb, offset, pinfo, tree, di, drep, hf_winreg_winreg_StringBuf_size, 0);
1001
1002         return offset;
1003 }
1004
1005 static int
1006 winreg_dissect_element_StringBuf_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1007 {
1008         offset = dissect_ndr_embedded_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_StringBuf_name_, NDR_POINTER_UNIQUE, "Pointer to Name (uint16)",hf_winreg_winreg_StringBuf_name);
1009
1010         return offset;
1011 }
1012
1013 static int
1014 winreg_dissect_element_StringBuf_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1015 {
1016         offset = dissect_ndr_ucvarray(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_StringBuf_name__);
1017
1018         return offset;
1019 }
1020
1021 static int
1022 winreg_dissect_element_StringBuf_name__(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1023 {
1024         offset = PIDL_dissect_uint16(tvb, offset, pinfo, tree, di, drep, hf_winreg_winreg_StringBuf_name, 0);
1025
1026         return offset;
1027 }
1028
1029 int
1030 winreg_dissect_struct_StringBuf(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, dcerpc_info* di _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
1031 {
1032         proto_item *item = NULL;
1033         proto_tree *tree = NULL;
1034         int old_offset;
1035
1036         ALIGN_TO_5_BYTES;
1037
1038         old_offset = offset;
1039
1040         if (parent_tree) {
1041                 item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, ENC_NA);
1042                 tree = proto_item_add_subtree(item, ett_winreg_winreg_StringBuf);
1043         }
1044         
1045         offset = winreg_dissect_element_StringBuf_length(tvb, offset, pinfo, tree, di, drep);
1046
1047         offset = winreg_dissect_element_StringBuf_size(tvb, offset, pinfo, tree, di, drep);
1048
1049         offset = winreg_dissect_element_StringBuf_name(tvb, offset, pinfo, tree, di, drep);
1050
1051
1052         proto_item_set_len(item, offset-old_offset);
1053
1054
1055         if (di->call_data->flags & DCERPC_IS_NDR64) {
1056                 ALIGN_TO_5_BYTES;
1057         }
1058
1059         return offset;
1060 }
1061
1062
1063 /* IDL: struct { */
1064 /* IDL:         [value(strlen_m_term(name)*2)] uint16 length; */
1065 /* IDL:         uint16 size; */
1066 /* IDL:         [unique(1)] [length_is(length/2)] [charset(UTF16)] [size_is(size/2)] uint16 *name; */
1067 /* IDL: } */
1068
1069 static int
1070 winreg_dissect_element_ValNameBuf_length(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1071 {
1072         offset = PIDL_dissect_uint16(tvb, offset, pinfo, tree, di, drep, hf_winreg_winreg_ValNameBuf_length, 0);
1073
1074         return offset;
1075 }
1076
1077 static int
1078 winreg_dissect_element_ValNameBuf_size(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1079 {
1080         offset = PIDL_dissect_uint16(tvb, offset, pinfo, tree, di, drep, hf_winreg_winreg_ValNameBuf_size, 0);
1081
1082         return offset;
1083 }
1084
1085 static int
1086 winreg_dissect_element_ValNameBuf_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1087 {
1088         offset = dissect_ndr_embedded_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_ValNameBuf_name_, NDR_POINTER_UNIQUE, "Pointer to Name (uint16)",hf_winreg_winreg_ValNameBuf_name);
1089
1090         return offset;
1091 }
1092
1093 static int
1094 winreg_dissect_element_ValNameBuf_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1095 {
1096         offset = dissect_ndr_ucvarray(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_ValNameBuf_name__);
1097
1098         return offset;
1099 }
1100
1101 static int
1102 winreg_dissect_element_ValNameBuf_name__(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1103 {
1104         offset = PIDL_dissect_uint16(tvb, offset, pinfo, tree, di, drep, hf_winreg_winreg_ValNameBuf_name, 0);
1105
1106         return offset;
1107 }
1108
1109 int
1110 winreg_dissect_struct_ValNameBuf(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, dcerpc_info* di _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
1111 {
1112         proto_item *item = NULL;
1113         proto_tree *tree = NULL;
1114         int old_offset;
1115
1116         ALIGN_TO_5_BYTES;
1117
1118         old_offset = offset;
1119
1120         if (parent_tree) {
1121                 item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, ENC_NA);
1122                 tree = proto_item_add_subtree(item, ett_winreg_winreg_ValNameBuf);
1123         }
1124         
1125         offset = winreg_dissect_element_ValNameBuf_length(tvb, offset, pinfo, tree, di, drep);
1126
1127         offset = winreg_dissect_element_ValNameBuf_size(tvb, offset, pinfo, tree, di, drep);
1128
1129         offset = winreg_dissect_element_ValNameBuf_name(tvb, offset, pinfo, tree, di, drep);
1130
1131
1132         proto_item_set_len(item, offset-old_offset);
1133
1134
1135         if (di->call_data->flags & DCERPC_IS_NDR64) {
1136                 ALIGN_TO_5_BYTES;
1137         }
1138
1139         return offset;
1140 }
1141
1142
1143 /* IDL: bitmap { */
1144 /* IDL:         REG_NOTIFY_CHANGE_NAME =  0x00000001 , */
1145 /* IDL:         REG_NOTIFY_CHANGE_ATTRIBUTES =  0x00000002 , */
1146 /* IDL:         REG_NOTIFY_CHANGE_LAST_SET =  0x00000004 , */
1147 /* IDL:         REG_NOTIFY_CHANGE_SECURITY =  0x00000008 , */
1148 /* IDL: } */
1149
1150 int
1151 winreg_dissect_bitmap_NotifyChangeType(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, dcerpc_info* di _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
1152 {
1153         proto_item *item = NULL;
1154         proto_tree *tree = NULL;
1155
1156         guint32 flags;
1157         ALIGN_TO_4_BYTES;
1158
1159         if (parent_tree) {
1160                 item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, 4, DREP_ENC_INTEGER(drep));
1161                 tree = proto_item_add_subtree(item,ett_winreg_winreg_NotifyChangeType);
1162         }
1163
1164         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, -1, &flags);
1165         proto_item_append_text(item, ": ");
1166
1167         if (!flags)
1168                 proto_item_append_text(item, "(No values set)");
1169
1170         proto_tree_add_boolean(tree, hf_winreg_winreg_NotifyChangeType_REG_NOTIFY_CHANGE_NAME, tvb, offset-4, 4, flags);
1171         if (flags&( 0x00000001 )){
1172                 proto_item_append_text(item, "REG_NOTIFY_CHANGE_NAME");
1173                 if (flags & (~( 0x00000001 )))
1174                         proto_item_append_text(item, ", ");
1175         }
1176         flags&=(~( 0x00000001 ));
1177
1178         proto_tree_add_boolean(tree, hf_winreg_winreg_NotifyChangeType_REG_NOTIFY_CHANGE_ATTRIBUTES, tvb, offset-4, 4, flags);
1179         if (flags&( 0x00000002 )){
1180                 proto_item_append_text(item, "REG_NOTIFY_CHANGE_ATTRIBUTES");
1181                 if (flags & (~( 0x00000002 )))
1182                         proto_item_append_text(item, ", ");
1183         }
1184         flags&=(~( 0x00000002 ));
1185
1186         proto_tree_add_boolean(tree, hf_winreg_winreg_NotifyChangeType_REG_NOTIFY_CHANGE_LAST_SET, tvb, offset-4, 4, flags);
1187         if (flags&( 0x00000004 )){
1188                 proto_item_append_text(item, "REG_NOTIFY_CHANGE_LAST_SET");
1189                 if (flags & (~( 0x00000004 )))
1190                         proto_item_append_text(item, ", ");
1191         }
1192         flags&=(~( 0x00000004 ));
1193
1194         proto_tree_add_boolean(tree, hf_winreg_winreg_NotifyChangeType_REG_NOTIFY_CHANGE_SECURITY, tvb, offset-4, 4, flags);
1195         if (flags&( 0x00000008 )){
1196                 proto_item_append_text(item, "REG_NOTIFY_CHANGE_SECURITY");
1197                 if (flags & (~( 0x00000008 )))
1198                         proto_item_append_text(item, ", ");
1199         }
1200         flags&=(~( 0x00000008 ));
1201
1202         if (flags) {
1203                 proto_item_append_text(item, "Unknown bitmap value 0x%x", flags);
1204         }
1205
1206         return offset;
1207 }
1208
1209
1210 /* IDL: bitmap { */
1211 /* IDL:         REG_WHOLE_HIVE_VOLATILE =  0x00000001 , */
1212 /* IDL:         REG_REFRESH_HIVE =  0x00000002 , */
1213 /* IDL:         REG_NO_LAZY_FLUSH =  0x00000004 , */
1214 /* IDL:         REG_FORCE_RESTORE =  0x00000008 , */
1215 /* IDL: } */
1216
1217 int
1218 winreg_dissect_bitmap_RestoreKeyFlags(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, dcerpc_info* di _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
1219 {
1220         proto_item *item = NULL;
1221         proto_tree *tree = NULL;
1222
1223         guint32 flags;
1224         ALIGN_TO_4_BYTES;
1225
1226         if (parent_tree) {
1227                 item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, 4, DREP_ENC_INTEGER(drep));
1228                 tree = proto_item_add_subtree(item,ett_winreg_winreg_RestoreKeyFlags);
1229         }
1230
1231         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, -1, &flags);
1232         proto_item_append_text(item, ": ");
1233
1234         if (!flags)
1235                 proto_item_append_text(item, "(No values set)");
1236
1237         proto_tree_add_boolean(tree, hf_winreg_winreg_RestoreKeyFlags_REG_WHOLE_HIVE_VOLATILE, tvb, offset-4, 4, flags);
1238         if (flags&( 0x00000001 )){
1239                 proto_item_append_text(item, "REG_WHOLE_HIVE_VOLATILE");
1240                 if (flags & (~( 0x00000001 )))
1241                         proto_item_append_text(item, ", ");
1242         }
1243         flags&=(~( 0x00000001 ));
1244
1245         proto_tree_add_boolean(tree, hf_winreg_winreg_RestoreKeyFlags_REG_REFRESH_HIVE, tvb, offset-4, 4, flags);
1246         if (flags&( 0x00000002 )){
1247                 proto_item_append_text(item, "REG_REFRESH_HIVE");
1248                 if (flags & (~( 0x00000002 )))
1249                         proto_item_append_text(item, ", ");
1250         }
1251         flags&=(~( 0x00000002 ));
1252
1253         proto_tree_add_boolean(tree, hf_winreg_winreg_RestoreKeyFlags_REG_NO_LAZY_FLUSH, tvb, offset-4, 4, flags);
1254         if (flags&( 0x00000004 )){
1255                 proto_item_append_text(item, "REG_NO_LAZY_FLUSH");
1256                 if (flags & (~( 0x00000004 )))
1257                         proto_item_append_text(item, ", ");
1258         }
1259         flags&=(~( 0x00000004 ));
1260
1261         proto_tree_add_boolean(tree, hf_winreg_winreg_RestoreKeyFlags_REG_FORCE_RESTORE, tvb, offset-4, 4, flags);
1262         if (flags&( 0x00000008 )){
1263                 proto_item_append_text(item, "REG_FORCE_RESTORE");
1264                 if (flags & (~( 0x00000008 )))
1265                         proto_item_append_text(item, ", ");
1266         }
1267         flags&=(~( 0x00000008 ));
1268
1269         if (flags) {
1270                 proto_item_append_text(item, "Unknown bitmap value 0x%x", flags);
1271         }
1272
1273         return offset;
1274 }
1275
1276
1277 /* IDL: struct { */
1278 /* IDL:         uint32 data_size; */
1279 /* IDL:         KeySecurityData sec_data; */
1280 /* IDL:         uint8 inherit; */
1281 /* IDL: } */
1282
1283 static int
1284 winreg_dissect_element_KeySecurityAttribute_data_size(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1285 {
1286         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, di, drep, hf_winreg_KeySecurityAttribute_data_size, 0);
1287
1288         return offset;
1289 }
1290
1291 static int
1292 winreg_dissect_element_KeySecurityAttribute_sec_data(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1293 {
1294         offset = winreg_dissect_struct_KeySecurityData(tvb,offset,pinfo,tree,di,drep,hf_winreg_KeySecurityAttribute_sec_data,0);
1295
1296         return offset;
1297 }
1298
1299 static int
1300 winreg_dissect_element_KeySecurityAttribute_inherit(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1301 {
1302         offset = PIDL_dissect_uint8(tvb, offset, pinfo, tree, di, drep, hf_winreg_KeySecurityAttribute_inherit, 0);
1303
1304         return offset;
1305 }
1306
1307 int
1308 winreg_dissect_struct_KeySecurityAttribute(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, dcerpc_info* di _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
1309 {
1310         proto_item *item = NULL;
1311         proto_tree *tree = NULL;
1312         int old_offset;
1313
1314         ALIGN_TO_5_BYTES;
1315
1316         old_offset = offset;
1317
1318         if (parent_tree) {
1319                 item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, ENC_NA);
1320                 tree = proto_item_add_subtree(item, ett_winreg_KeySecurityAttribute);
1321         }
1322         
1323         offset = winreg_dissect_element_KeySecurityAttribute_data_size(tvb, offset, pinfo, tree, di, drep);
1324
1325         offset = winreg_dissect_element_KeySecurityAttribute_sec_data(tvb, offset, pinfo, tree, di, drep);
1326
1327         offset = winreg_dissect_element_KeySecurityAttribute_inherit(tvb, offset, pinfo, tree, di, drep);
1328
1329
1330         proto_item_set_len(item, offset-old_offset);
1331
1332
1333         if (di->call_data->flags & DCERPC_IS_NDR64) {
1334                 ALIGN_TO_5_BYTES;
1335         }
1336
1337         return offset;
1338 }
1339
1340
1341 /* IDL: struct { */
1342 /* IDL:         [unique(1)] winreg_ValNameBuf *ve_valuename; */
1343 /* IDL:         uint32 ve_valuelen; */
1344 /* IDL:         uint32 ve_valueptr; */
1345 /* IDL:         winreg_Type ve_type; */
1346 /* IDL: } */
1347
1348 static int
1349 winreg_dissect_element_QueryMultipleValue_ve_valuename(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1350 {
1351         offset = dissect_ndr_embedded_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_QueryMultipleValue_ve_valuename_, NDR_POINTER_UNIQUE, "Pointer to Ve Valuename (winreg_ValNameBuf)",hf_winreg_QueryMultipleValue_ve_valuename);
1352
1353         return offset;
1354 }
1355
1356 static int
1357 winreg_dissect_element_QueryMultipleValue_ve_valuename_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1358 {
1359         offset = winreg_dissect_struct_ValNameBuf(tvb,offset,pinfo,tree,di,drep,hf_winreg_QueryMultipleValue_ve_valuename,0);
1360
1361         return offset;
1362 }
1363
1364 static int
1365 winreg_dissect_element_QueryMultipleValue_ve_valuelen(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1366 {
1367         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, di, drep, hf_winreg_QueryMultipleValue_ve_valuelen, 0);
1368
1369         return offset;
1370 }
1371
1372 static int
1373 winreg_dissect_element_QueryMultipleValue_ve_valueptr(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1374 {
1375         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, di, drep, hf_winreg_QueryMultipleValue_ve_valueptr, 0);
1376
1377         return offset;
1378 }
1379
1380 static int
1381 winreg_dissect_element_QueryMultipleValue_ve_type(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1382 {
1383         offset=misc_dissect_enum_winreg_Type(tvb, offset, pinfo, tree, di, drep, hf_winreg_QueryMultipleValue_ve_type, 0);
1384
1385         return offset;
1386 }
1387
1388 int
1389 winreg_dissect_struct_QueryMultipleValue(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, dcerpc_info* di _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
1390 {
1391         proto_item *item = NULL;
1392         proto_tree *tree = NULL;
1393         int old_offset;
1394
1395         ALIGN_TO_5_BYTES;
1396
1397         old_offset = offset;
1398
1399         if (parent_tree) {
1400                 item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, ENC_NA);
1401                 tree = proto_item_add_subtree(item, ett_winreg_QueryMultipleValue);
1402         }
1403         
1404         offset = winreg_dissect_element_QueryMultipleValue_ve_valuename(tvb, offset, pinfo, tree, di, drep);
1405
1406         offset = winreg_dissect_element_QueryMultipleValue_ve_valuelen(tvb, offset, pinfo, tree, di, drep);
1407
1408         offset = winreg_dissect_element_QueryMultipleValue_ve_valueptr(tvb, offset, pinfo, tree, di, drep);
1409
1410         offset = winreg_dissect_element_QueryMultipleValue_ve_type(tvb, offset, pinfo, tree, di, drep);
1411
1412
1413         proto_item_set_len(item, offset-old_offset);
1414
1415
1416         if (di->call_data->flags & DCERPC_IS_NDR64) {
1417                 ALIGN_TO_5_BYTES;
1418         }
1419
1420         return offset;
1421 }
1422
1423 static int
1424 winreg_dissect_element_OpenHKCR_system_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1425 {
1426         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_OpenHKCR_system_name_, NDR_POINTER_UNIQUE, "Pointer to System Name (uint16)",hf_winreg_system_name);
1427
1428         return offset;
1429 }
1430
1431 static int
1432 winreg_dissect_element_OpenHKCR_system_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1433 {
1434         offset = PIDL_dissect_uint16(tvb, offset, pinfo, tree, di, drep, hf_winreg_system_name, 0);
1435
1436         return offset;
1437 }
1438
1439 static int
1440 winreg_dissect_element_OpenHKCR_access_mask(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1441 {
1442         offset = winreg_dissect_bitmap_AccessMask(tvb, offset, pinfo, tree, di, drep, hf_winreg_access_mask, 0);
1443
1444         return offset;
1445 }
1446
1447 static int
1448 winreg_dissect_element_OpenHKCR_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1449 {
1450         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_OpenHKCR_handle_, NDR_POINTER_REF, "Pointer to Handle (policy_handle)",hf_winreg_handle);
1451
1452         return offset;
1453 }
1454
1455 static int
1456 winreg_dissect_element_OpenHKCR_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1457 {
1458         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, di, drep, hf_winreg_handle, PIDL_POLHND_OPEN);
1459
1460         return offset;
1461 }
1462
1463 /* IDL: WERROR winreg_OpenHKCR( */
1464 /* IDL: [unique(1)] [in] uint16 *system_name, */
1465 /* IDL: [in] winreg_AccessMask access_mask, */
1466 /* IDL: [out] [ref] policy_handle *handle */
1467 /* IDL: ); */
1468
1469 static int
1470 winreg_dissect_OpenHKCR_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1471 {
1472         guint32 status;
1473
1474         di->dcerpc_procedure_name="OpenHKCR";
1475         offset = winreg_dissect_element_OpenHKCR_handle(tvb, offset, pinfo, tree, di, drep);
1476         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
1477
1478         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_winreg_werror, &status);
1479
1480         if (status != 0)
1481                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
1482
1483         return offset;
1484 }
1485
1486 static int
1487 winreg_dissect_OpenHKCR_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1488 {
1489         di->dcerpc_procedure_name="OpenHKCR";
1490         offset = winreg_dissect_element_OpenHKCR_system_name(tvb, offset, pinfo, tree, di, drep);
1491         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
1492         offset = winreg_dissect_element_OpenHKCR_access_mask(tvb, offset, pinfo, tree, di, drep);
1493         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
1494         return offset;
1495 }
1496
1497 static int
1498 winreg_dissect_element_OpenHKCU_system_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1499 {
1500         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_OpenHKCU_system_name_, NDR_POINTER_UNIQUE, "Pointer to System Name (uint16)",hf_winreg_system_name);
1501
1502         return offset;
1503 }
1504
1505 static int
1506 winreg_dissect_element_OpenHKCU_system_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1507 {
1508         offset = PIDL_dissect_uint16(tvb, offset, pinfo, tree, di, drep, hf_winreg_system_name, 0);
1509
1510         return offset;
1511 }
1512
1513 static int
1514 winreg_dissect_element_OpenHKCU_access_mask(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1515 {
1516         offset = winreg_dissect_bitmap_AccessMask(tvb, offset, pinfo, tree, di, drep, hf_winreg_winreg_OpenHKCU_access_mask, 0);
1517
1518         return offset;
1519 }
1520
1521 static int
1522 winreg_dissect_element_OpenHKCU_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1523 {
1524         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_OpenHKCU_handle_, NDR_POINTER_REF, "Pointer to Handle (policy_handle)",hf_winreg_handle);
1525
1526         return offset;
1527 }
1528
1529 static int
1530 winreg_dissect_element_OpenHKCU_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1531 {
1532         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, di, drep, hf_winreg_handle, PIDL_POLHND_OPEN);
1533
1534         return offset;
1535 }
1536
1537 /* IDL: WERROR winreg_OpenHKCU( */
1538 /* IDL: [unique(1)] [in] uint16 *system_name, */
1539 /* IDL: [in] winreg_AccessMask access_mask, */
1540 /* IDL: [out] [ref] policy_handle *handle */
1541 /* IDL: ); */
1542
1543 static int
1544 winreg_dissect_OpenHKCU_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1545 {
1546         guint32 status;
1547
1548         di->dcerpc_procedure_name="OpenHKCU";
1549         offset = winreg_dissect_element_OpenHKCU_handle(tvb, offset, pinfo, tree, di, drep);
1550         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
1551
1552         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_winreg_werror, &status);
1553
1554         if (status != 0)
1555                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
1556
1557         return offset;
1558 }
1559
1560 static int
1561 winreg_dissect_OpenHKCU_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1562 {
1563         di->dcerpc_procedure_name="OpenHKCU";
1564         offset = winreg_dissect_element_OpenHKCU_system_name(tvb, offset, pinfo, tree, di, drep);
1565         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
1566         offset = winreg_dissect_element_OpenHKCU_access_mask(tvb, offset, pinfo, tree, di, drep);
1567         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
1568         return offset;
1569 }
1570
1571 static int
1572 winreg_dissect_element_OpenHKLM_system_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1573 {
1574         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_OpenHKLM_system_name_, NDR_POINTER_UNIQUE, "Pointer to System Name (uint16)",hf_winreg_system_name);
1575
1576         return offset;
1577 }
1578
1579 static int
1580 winreg_dissect_element_OpenHKLM_system_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1581 {
1582         offset = PIDL_dissect_uint16(tvb, offset, pinfo, tree, di, drep, hf_winreg_system_name, 0);
1583
1584         return offset;
1585 }
1586
1587 static int
1588 winreg_dissect_element_OpenHKLM_access_mask(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1589 {
1590         offset = winreg_dissect_bitmap_AccessMask(tvb, offset, pinfo, tree, di, drep, hf_winreg_access_mask, 0);
1591
1592         return offset;
1593 }
1594
1595 static int
1596 winreg_dissect_element_OpenHKLM_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1597 {
1598         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_OpenHKLM_handle_, NDR_POINTER_REF, "Pointer to Handle (policy_handle)",hf_winreg_handle);
1599
1600         return offset;
1601 }
1602
1603 static int
1604 winreg_dissect_element_OpenHKLM_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1605 {
1606         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, di, drep, hf_winreg_handle, PIDL_POLHND_OPEN);
1607
1608         return offset;
1609 }
1610
1611 /* IDL: WERROR winreg_OpenHKLM( */
1612 /* IDL: [unique(1)] [in] uint16 *system_name, */
1613 /* IDL: [in] winreg_AccessMask access_mask, */
1614 /* IDL: [out] [ref] policy_handle *handle */
1615 /* IDL: ); */
1616
1617 static int
1618 winreg_dissect_OpenHKLM_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1619 {
1620         guint32 status;
1621
1622         di->dcerpc_procedure_name="OpenHKLM";
1623         offset = winreg_dissect_element_OpenHKLM_handle(tvb, offset, pinfo, tree, di, drep);
1624         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
1625
1626         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_winreg_werror, &status);
1627
1628         if (status != 0)
1629                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
1630
1631         return offset;
1632 }
1633
1634 static int
1635 winreg_dissect_OpenHKLM_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1636 {
1637         di->dcerpc_procedure_name="OpenHKLM";
1638         offset = winreg_dissect_element_OpenHKLM_system_name(tvb, offset, pinfo, tree, di, drep);
1639         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
1640         offset = winreg_dissect_element_OpenHKLM_access_mask(tvb, offset, pinfo, tree, di, drep);
1641         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
1642         return offset;
1643 }
1644
1645 static int
1646 winreg_dissect_element_OpenHKPD_system_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1647 {
1648         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_OpenHKPD_system_name_, NDR_POINTER_UNIQUE, "Pointer to System Name (uint16)",hf_winreg_system_name);
1649
1650         return offset;
1651 }
1652
1653 static int
1654 winreg_dissect_element_OpenHKPD_system_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1655 {
1656         offset = PIDL_dissect_uint16(tvb, offset, pinfo, tree, di, drep, hf_winreg_system_name, 0);
1657
1658         return offset;
1659 }
1660
1661 static int
1662 winreg_dissect_element_OpenHKPD_access_mask(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1663 {
1664         offset = winreg_dissect_bitmap_AccessMask(tvb, offset, pinfo, tree, di, drep, hf_winreg_winreg_OpenHKPD_access_mask, 0);
1665
1666         return offset;
1667 }
1668
1669 static int
1670 winreg_dissect_element_OpenHKPD_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1671 {
1672         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_OpenHKPD_handle_, NDR_POINTER_REF, "Pointer to Handle (policy_handle)",hf_winreg_handle);
1673
1674         return offset;
1675 }
1676
1677 static int
1678 winreg_dissect_element_OpenHKPD_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1679 {
1680         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, di, drep, hf_winreg_handle, PIDL_POLHND_OPEN);
1681
1682         return offset;
1683 }
1684
1685 /* IDL: WERROR winreg_OpenHKPD( */
1686 /* IDL: [unique(1)] [in] uint16 *system_name, */
1687 /* IDL: [in] winreg_AccessMask access_mask, */
1688 /* IDL: [out] [ref] policy_handle *handle */
1689 /* IDL: ); */
1690
1691 static int
1692 winreg_dissect_OpenHKPD_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1693 {
1694         guint32 status;
1695
1696         di->dcerpc_procedure_name="OpenHKPD";
1697         offset = winreg_dissect_element_OpenHKPD_handle(tvb, offset, pinfo, tree, di, drep);
1698         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
1699
1700         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_winreg_werror, &status);
1701
1702         if (status != 0)
1703                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
1704
1705         return offset;
1706 }
1707
1708 static int
1709 winreg_dissect_OpenHKPD_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1710 {
1711         di->dcerpc_procedure_name="OpenHKPD";
1712         offset = winreg_dissect_element_OpenHKPD_system_name(tvb, offset, pinfo, tree, di, drep);
1713         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
1714         offset = winreg_dissect_element_OpenHKPD_access_mask(tvb, offset, pinfo, tree, di, drep);
1715         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
1716         return offset;
1717 }
1718
1719 static int
1720 winreg_dissect_element_OpenHKU_system_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1721 {
1722         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_OpenHKU_system_name_, NDR_POINTER_UNIQUE, "Pointer to System Name (uint16)",hf_winreg_system_name);
1723
1724         return offset;
1725 }
1726
1727 static int
1728 winreg_dissect_element_OpenHKU_system_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1729 {
1730         offset = PIDL_dissect_uint16(tvb, offset, pinfo, tree, di, drep, hf_winreg_system_name, 0);
1731
1732         return offset;
1733 }
1734
1735 static int
1736 winreg_dissect_element_OpenHKU_access_mask(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1737 {
1738         offset = winreg_dissect_bitmap_AccessMask(tvb, offset, pinfo, tree, di, drep, hf_winreg_access_mask, 0);
1739
1740         return offset;
1741 }
1742
1743 static int
1744 winreg_dissect_element_OpenHKU_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1745 {
1746         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_OpenHKU_handle_, NDR_POINTER_REF, "Pointer to Handle (policy_handle)",hf_winreg_handle);
1747
1748         return offset;
1749 }
1750
1751 static int
1752 winreg_dissect_element_OpenHKU_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1753 {
1754         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, di, drep, hf_winreg_handle, PIDL_POLHND_OPEN);
1755
1756         return offset;
1757 }
1758
1759 /* IDL: WERROR winreg_OpenHKU( */
1760 /* IDL: [unique(1)] [in] uint16 *system_name, */
1761 /* IDL: [in] winreg_AccessMask access_mask, */
1762 /* IDL: [out] [ref] policy_handle *handle */
1763 /* IDL: ); */
1764
1765 static int
1766 winreg_dissect_OpenHKU_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1767 {
1768         guint32 status;
1769
1770         di->dcerpc_procedure_name="OpenHKU";
1771         offset = winreg_dissect_element_OpenHKU_handle(tvb, offset, pinfo, tree, di, drep);
1772         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
1773
1774         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_winreg_werror, &status);
1775
1776         if (status != 0)
1777                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
1778
1779         return offset;
1780 }
1781
1782 static int
1783 winreg_dissect_OpenHKU_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1784 {
1785         di->dcerpc_procedure_name="OpenHKU";
1786         offset = winreg_dissect_element_OpenHKU_system_name(tvb, offset, pinfo, tree, di, drep);
1787         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
1788         offset = winreg_dissect_element_OpenHKU_access_mask(tvb, offset, pinfo, tree, di, drep);
1789         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
1790         return offset;
1791 }
1792
1793 static int
1794 winreg_dissect_element_CloseKey_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1795 {
1796         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_CloseKey_handle_, NDR_POINTER_REF, "Pointer to Handle (policy_handle)",hf_winreg_handle);
1797
1798         return offset;
1799 }
1800
1801 static int
1802 winreg_dissect_element_CloseKey_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1803 {
1804         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, di, drep, hf_winreg_handle, PIDL_POLHND_CLOSE);
1805
1806         return offset;
1807 }
1808
1809 /* IDL: WERROR winreg_CloseKey( */
1810 /* IDL: [out] [in] [ref] policy_handle *handle */
1811 /* IDL: ); */
1812
1813 static int
1814 winreg_dissect_CloseKey_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1815 {
1816         guint32 status;
1817
1818         di->dcerpc_procedure_name="CloseKey";
1819         offset = winreg_dissect_element_CloseKey_handle(tvb, offset, pinfo, tree, di, drep);
1820         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
1821
1822         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_winreg_werror, &status);
1823
1824         if (status != 0)
1825                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
1826
1827         return offset;
1828 }
1829
1830 static int
1831 winreg_dissect_CloseKey_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1832 {
1833         di->dcerpc_procedure_name="CloseKey";
1834         offset = winreg_dissect_element_CloseKey_handle(tvb, offset, pinfo, tree, di, drep);
1835         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
1836         return offset;
1837 }
1838
1839 static int
1840 winreg_dissect_element_CreateKey_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1841 {
1842         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_CreateKey_handle_, NDR_POINTER_REF, "Pointer to Handle (policy_handle)",hf_winreg_handle);
1843
1844         return offset;
1845 }
1846
1847 static int
1848 winreg_dissect_element_CreateKey_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1849 {
1850         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, di, drep, hf_winreg_handle, 0);
1851
1852         return offset;
1853 }
1854
1855 static int
1856 winreg_dissect_element_CreateKey_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1857 {
1858         offset=cnf_dissect_winreg_String(tvb, offset, pinfo, tree, di, drep, 2|PIDL_SET_COL_INFO, hf_winreg_winreg_CreateKey_name);
1859
1860         return offset;
1861 }
1862
1863 static int
1864 winreg_dissect_element_CreateKey_keyclass(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1865 {
1866         offset=cnf_dissect_winreg_String(tvb, offset, pinfo, tree, di, drep, 0, hf_winreg_winreg_CreateKey_keyclass);
1867
1868         return offset;
1869 }
1870
1871 static int
1872 winreg_dissect_element_CreateKey_options(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1873 {
1874         offset = winreg_dissect_bitmap_KeyOptions(tvb, offset, pinfo, tree, di, drep, hf_winreg_winreg_CreateKey_options, 0);
1875
1876         return offset;
1877 }
1878
1879 static int
1880 winreg_dissect_element_CreateKey_access_mask(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1881 {
1882         offset = winreg_dissect_bitmap_AccessMask(tvb, offset, pinfo, tree, di, drep, hf_winreg_access_mask, 0);
1883
1884         return offset;
1885 }
1886
1887 static int
1888 winreg_dissect_element_CreateKey_secdesc(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1889 {
1890         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_CreateKey_secdesc_, NDR_POINTER_UNIQUE, "Pointer to Secdesc (winreg_SecBuf)",hf_winreg_winreg_CreateKey_secdesc);
1891
1892         return offset;
1893 }
1894
1895 static int
1896 winreg_dissect_element_CreateKey_secdesc_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1897 {
1898         offset = winreg_dissect_struct_SecBuf(tvb,offset,pinfo,tree,di,drep,hf_winreg_winreg_CreateKey_secdesc,0);
1899
1900         return offset;
1901 }
1902
1903 static int
1904 winreg_dissect_element_CreateKey_new_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1905 {
1906         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_CreateKey_new_handle_, NDR_POINTER_REF, "Pointer to New Handle (policy_handle)",hf_winreg_winreg_CreateKey_new_handle);
1907
1908         return offset;
1909 }
1910
1911 static int
1912 winreg_dissect_element_CreateKey_new_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1913 {
1914         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, di, drep, hf_winreg_winreg_CreateKey_new_handle, PIDL_POLHND_OPEN);
1915
1916         return offset;
1917 }
1918
1919 static int
1920 winreg_dissect_element_CreateKey_action_taken(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1921 {
1922         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_CreateKey_action_taken_, NDR_POINTER_UNIQUE, "Pointer to Action Taken (winreg_CreateAction)",hf_winreg_winreg_CreateKey_action_taken);
1923
1924         return offset;
1925 }
1926
1927 static int
1928 winreg_dissect_element_CreateKey_action_taken_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1929 {
1930         offset = winreg_dissect_enum_CreateAction(tvb, offset, pinfo, tree, di, drep, hf_winreg_winreg_CreateKey_action_taken, 0);
1931
1932         return offset;
1933 }
1934
1935 /* IDL: WERROR winreg_CreateKey( */
1936 /* IDL: [in] [ref] policy_handle *handle, */
1937 /* IDL: [in] winreg_String name, */
1938 /* IDL: [in] winreg_String keyclass, */
1939 /* IDL: [in] winreg_KeyOptions options, */
1940 /* IDL: [in] winreg_AccessMask access_mask, */
1941 /* IDL: [unique(1)] [in] winreg_SecBuf *secdesc, */
1942 /* IDL: [out] [ref] policy_handle *new_handle, */
1943 /* IDL: [out] [unique(1)] [in] winreg_CreateAction *action_taken */
1944 /* IDL: ); */
1945
1946 static int
1947 winreg_dissect_CreateKey_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1948 {
1949         guint32 status;
1950
1951         di->dcerpc_procedure_name="CreateKey";
1952         offset = winreg_dissect_element_CreateKey_new_handle(tvb, offset, pinfo, tree, di, drep);
1953         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
1954
1955         offset = winreg_dissect_element_CreateKey_action_taken(tvb, offset, pinfo, tree, di, drep);
1956         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
1957
1958         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_winreg_werror, &status);
1959
1960         if (status != 0)
1961                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
1962
1963         return offset;
1964 }
1965
1966 static int
1967 winreg_dissect_CreateKey_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1968 {
1969         di->dcerpc_procedure_name="CreateKey";
1970         offset = winreg_dissect_element_CreateKey_handle(tvb, offset, pinfo, tree, di, drep);
1971         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
1972         offset = winreg_dissect_element_CreateKey_name(tvb, offset, pinfo, tree, di, drep);
1973         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
1974         offset = winreg_dissect_element_CreateKey_keyclass(tvb, offset, pinfo, tree, di, drep);
1975         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
1976         offset = winreg_dissect_element_CreateKey_options(tvb, offset, pinfo, tree, di, drep);
1977         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
1978         offset = winreg_dissect_element_CreateKey_access_mask(tvb, offset, pinfo, tree, di, drep);
1979         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
1980         offset = winreg_dissect_element_CreateKey_secdesc(tvb, offset, pinfo, tree, di, drep);
1981         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
1982         offset = winreg_dissect_element_CreateKey_action_taken(tvb, offset, pinfo, tree, di, drep);
1983         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
1984         return offset;
1985 }
1986
1987 static int
1988 winreg_dissect_element_DeleteKey_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1989 {
1990         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_DeleteKey_handle_, NDR_POINTER_REF, "Pointer to Handle (policy_handle)",hf_winreg_handle);
1991
1992         return offset;
1993 }
1994
1995 static int
1996 winreg_dissect_element_DeleteKey_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
1997 {
1998         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, di, drep, hf_winreg_handle, 0);
1999
2000         return offset;
2001 }
2002
2003 static int
2004 winreg_dissect_element_DeleteKey_key(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2005 {
2006         offset=cnf_dissect_winreg_String(tvb, offset, pinfo, tree, di, drep, 2|PIDL_SET_COL_INFO, hf_winreg_winreg_DeleteKey_key);
2007
2008         return offset;
2009 }
2010
2011 /* IDL: WERROR winreg_DeleteKey( */
2012 /* IDL: [in] [ref] policy_handle *handle, */
2013 /* IDL: [in] winreg_String key */
2014 /* IDL: ); */
2015
2016 static int
2017 winreg_dissect_DeleteKey_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2018 {
2019         guint32 status;
2020
2021         di->dcerpc_procedure_name="DeleteKey";
2022         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_winreg_werror, &status);
2023
2024         if (status != 0)
2025                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
2026
2027         return offset;
2028 }
2029
2030 static int
2031 winreg_dissect_DeleteKey_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2032 {
2033         di->dcerpc_procedure_name="DeleteKey";
2034         offset = winreg_dissect_element_DeleteKey_handle(tvb, offset, pinfo, tree, di, drep);
2035         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
2036         offset = winreg_dissect_element_DeleteKey_key(tvb, offset, pinfo, tree, di, drep);
2037         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
2038         return offset;
2039 }
2040
2041 static int
2042 winreg_dissect_element_DeleteValue_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2043 {
2044         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_DeleteValue_handle_, NDR_POINTER_REF, "Pointer to Handle (policy_handle)",hf_winreg_handle);
2045
2046         return offset;
2047 }
2048
2049 static int
2050 winreg_dissect_element_DeleteValue_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2051 {
2052         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, di, drep, hf_winreg_handle, 0);
2053
2054         return offset;
2055 }
2056
2057 static int
2058 winreg_dissect_element_DeleteValue_value(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2059 {
2060         offset=cnf_dissect_winreg_String(tvb, offset, pinfo, tree, di, drep, 0, hf_winreg_winreg_DeleteValue_value);
2061
2062         return offset;
2063 }
2064
2065 /* IDL: WERROR winreg_DeleteValue( */
2066 /* IDL: [in] [ref] policy_handle *handle, */
2067 /* IDL: [in] winreg_String value */
2068 /* IDL: ); */
2069
2070 static int
2071 winreg_dissect_DeleteValue_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2072 {
2073         guint32 status;
2074
2075         di->dcerpc_procedure_name="DeleteValue";
2076         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_winreg_werror, &status);
2077
2078         if (status != 0)
2079                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
2080
2081         return offset;
2082 }
2083
2084 static int
2085 winreg_dissect_DeleteValue_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2086 {
2087         di->dcerpc_procedure_name="DeleteValue";
2088         offset = winreg_dissect_element_DeleteValue_handle(tvb, offset, pinfo, tree, di, drep);
2089         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
2090         offset = winreg_dissect_element_DeleteValue_value(tvb, offset, pinfo, tree, di, drep);
2091         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
2092         return offset;
2093 }
2094
2095 static int
2096 winreg_dissect_element_EnumKey_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2097 {
2098         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_EnumKey_handle_, NDR_POINTER_REF, "Pointer to Handle (policy_handle)",hf_winreg_handle);
2099
2100         return offset;
2101 }
2102
2103 static int
2104 winreg_dissect_element_EnumKey_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2105 {
2106         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, di, drep, hf_winreg_handle, 0);
2107
2108         return offset;
2109 }
2110
2111 static int
2112 winreg_dissect_element_EnumKey_enum_index(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2113 {
2114         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, di, drep, hf_winreg_winreg_EnumKey_enum_index, 0);
2115
2116         return offset;
2117 }
2118
2119 static int
2120 winreg_dissect_element_EnumKey_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2121 {
2122         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_EnumKey_name_, NDR_POINTER_REF, "Pointer to Name (winreg_StringBuf)",hf_winreg_winreg_EnumKey_name);
2123
2124         return offset;
2125 }
2126
2127 static int
2128 winreg_dissect_element_EnumKey_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2129 {
2130         offset = winreg_dissect_struct_StringBuf(tvb,offset,pinfo,tree,di,drep,hf_winreg_winreg_EnumKey_name,0);
2131
2132         return offset;
2133 }
2134
2135 static int
2136 winreg_dissect_element_EnumKey_keyclass(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2137 {
2138         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_EnumKey_keyclass_, NDR_POINTER_UNIQUE, "Pointer to Keyclass (winreg_StringBuf)",hf_winreg_winreg_EnumKey_keyclass);
2139
2140         return offset;
2141 }
2142
2143 static int
2144 winreg_dissect_element_EnumKey_keyclass_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2145 {
2146         offset = winreg_dissect_struct_StringBuf(tvb,offset,pinfo,tree,di,drep,hf_winreg_winreg_EnumKey_keyclass,0);
2147
2148         return offset;
2149 }
2150
2151 static int
2152 winreg_dissect_element_EnumKey_last_changed_time(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2153 {
2154         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_EnumKey_last_changed_time_, NDR_POINTER_UNIQUE, "Pointer to Last Changed Time (NTTIME)",hf_winreg_winreg_EnumKey_last_changed_time);
2155
2156         return offset;
2157 }
2158
2159 static int
2160 winreg_dissect_element_EnumKey_last_changed_time_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2161 {
2162         offset = dissect_ndr_nt_NTTIME(tvb, offset, pinfo, tree, di, drep, hf_winreg_winreg_EnumKey_last_changed_time);
2163
2164         return offset;
2165 }
2166
2167 /* IDL: WERROR winreg_EnumKey( */
2168 /* IDL: [in] [ref] policy_handle *handle, */
2169 /* IDL: [in] uint32 enum_index, */
2170 /* IDL: [out] [in] [ref] winreg_StringBuf *name, */
2171 /* IDL: [out] [unique(1)] [in] winreg_StringBuf *keyclass, */
2172 /* IDL: [out] [unique(1)] [in] NTTIME *last_changed_time */
2173 /* IDL: ); */
2174
2175 static int
2176 winreg_dissect_EnumKey_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2177 {
2178         guint32 status;
2179
2180         di->dcerpc_procedure_name="EnumKey";
2181         offset = winreg_dissect_element_EnumKey_name(tvb, offset, pinfo, tree, di, drep);
2182         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
2183
2184         offset = winreg_dissect_element_EnumKey_keyclass(tvb, offset, pinfo, tree, di, drep);
2185         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
2186
2187         offset = winreg_dissect_element_EnumKey_last_changed_time(tvb, offset, pinfo, tree, di, drep);
2188         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
2189
2190         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_winreg_werror, &status);
2191
2192         if (status != 0)
2193                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
2194
2195         return offset;
2196 }
2197
2198 static int
2199 winreg_dissect_EnumKey_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2200 {
2201         di->dcerpc_procedure_name="EnumKey";
2202         offset = winreg_dissect_element_EnumKey_handle(tvb, offset, pinfo, tree, di, drep);
2203         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
2204         offset = winreg_dissect_element_EnumKey_enum_index(tvb, offset, pinfo, tree, di, drep);
2205         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
2206         offset = winreg_dissect_element_EnumKey_name(tvb, offset, pinfo, tree, di, drep);
2207         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
2208         offset = winreg_dissect_element_EnumKey_keyclass(tvb, offset, pinfo, tree, di, drep);
2209         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
2210         offset = winreg_dissect_element_EnumKey_last_changed_time(tvb, offset, pinfo, tree, di, drep);
2211         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
2212         return offset;
2213 }
2214
2215 static int
2216 winreg_dissect_element_EnumValue_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2217 {
2218         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_EnumValue_handle_, NDR_POINTER_REF, "Pointer to Handle (policy_handle)",hf_winreg_handle);
2219
2220         return offset;
2221 }
2222
2223 static int
2224 winreg_dissect_element_EnumValue_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2225 {
2226         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, di, drep, hf_winreg_handle, 0);
2227
2228         return offset;
2229 }
2230
2231 static int
2232 winreg_dissect_element_EnumValue_enum_index(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2233 {
2234         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, di, drep, hf_winreg_winreg_EnumValue_enum_index, 0);
2235
2236         return offset;
2237 }
2238
2239 static int
2240 winreg_dissect_element_EnumValue_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2241 {
2242         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_EnumValue_name_, NDR_POINTER_REF, "Pointer to Name (winreg_ValNameBuf)",hf_winreg_winreg_EnumValue_name);
2243
2244         return offset;
2245 }
2246
2247 static int
2248 winreg_dissect_element_EnumValue_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2249 {
2250         offset = winreg_dissect_struct_ValNameBuf(tvb,offset,pinfo,tree,di,drep,hf_winreg_winreg_EnumValue_name,0);
2251
2252         return offset;
2253 }
2254
2255 static int
2256 winreg_dissect_element_EnumValue_type(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2257 {
2258         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_EnumValue_type_, NDR_POINTER_UNIQUE, "Pointer to Type (winreg_Type)",hf_winreg_winreg_EnumValue_type);
2259
2260         return offset;
2261 }
2262
2263 static int
2264 winreg_dissect_element_EnumValue_type_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2265 {
2266         offset=misc_dissect_enum_winreg_Type(tvb, offset, pinfo, tree, di, drep, hf_winreg_winreg_EnumValue_type, 0);
2267
2268         return offset;
2269 }
2270
2271 static int
2272 winreg_dissect_element_EnumValue_value(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2273 {
2274         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_EnumValue_value_, NDR_POINTER_UNIQUE, "Pointer to Value (uint8)",hf_winreg_winreg_EnumValue_value);
2275
2276         return offset;
2277 }
2278
2279 static int
2280 winreg_dissect_element_EnumValue_value_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2281 {
2282         offset = dissect_ndr_ucvarray(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_EnumValue_value__);
2283
2284         return offset;
2285 }
2286
2287 static int
2288 winreg_dissect_element_EnumValue_value__(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2289 {
2290         offset = PIDL_dissect_uint8(tvb, offset, pinfo, tree, di, drep, hf_winreg_winreg_EnumValue_value, 0);
2291
2292         return offset;
2293 }
2294
2295 static int
2296 winreg_dissect_element_EnumValue_size(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2297 {
2298         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_EnumValue_size_, NDR_POINTER_UNIQUE, "Pointer to Size (uint32)",hf_winreg_winreg_EnumValue_size);
2299
2300         return offset;
2301 }
2302
2303 static int
2304 winreg_dissect_element_EnumValue_size_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2305 {
2306         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, di, drep, hf_winreg_winreg_EnumValue_size, 0);
2307
2308         return offset;
2309 }
2310
2311 static int
2312 winreg_dissect_element_EnumValue_length(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2313 {
2314         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_EnumValue_length_, NDR_POINTER_UNIQUE, "Pointer to Length (uint32)",hf_winreg_winreg_EnumValue_length);
2315
2316         return offset;
2317 }
2318
2319 static int
2320 winreg_dissect_element_EnumValue_length_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2321 {
2322         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, di, drep, hf_winreg_winreg_EnumValue_length, 0);
2323
2324         return offset;
2325 }
2326
2327 /* IDL: WERROR winreg_EnumValue( */
2328 /* IDL: [in] [ref] policy_handle *handle, */
2329 /* IDL: [in] uint32 enum_index, */
2330 /* IDL: [out] [in] [ref] winreg_ValNameBuf *name, */
2331 /* IDL: [out] [unique(1)] [in] winreg_Type *type, */
2332 /* IDL: [unique(1)] [out] [in] [range(0,0x4000000)] [length_is(length?*length:0)] [size_is(size?*size:0)] uint8 *value, */
2333 /* IDL: [out] [unique(1)] [in] uint32 *size, */
2334 /* IDL: [out] [unique(1)] [in] uint32 *length */
2335 /* IDL: ); */
2336
2337 static int
2338 winreg_dissect_EnumValue_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2339 {
2340         guint32 status;
2341
2342         di->dcerpc_procedure_name="EnumValue";
2343         offset = winreg_dissect_element_EnumValue_name(tvb, offset, pinfo, tree, di, drep);
2344         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
2345
2346         offset = winreg_dissect_element_EnumValue_type(tvb, offset, pinfo, tree, di, drep);
2347         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
2348
2349         offset = winreg_dissect_element_EnumValue_value(tvb, offset, pinfo, tree, di, drep);
2350         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
2351
2352         offset = winreg_dissect_element_EnumValue_size(tvb, offset, pinfo, tree, di, drep);
2353         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
2354
2355         offset = winreg_dissect_element_EnumValue_length(tvb, offset, pinfo, tree, di, drep);
2356         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
2357
2358         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_winreg_werror, &status);
2359
2360         if (status != 0)
2361                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
2362
2363         return offset;
2364 }
2365
2366 static int
2367 winreg_dissect_EnumValue_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2368 {
2369         di->dcerpc_procedure_name="EnumValue";
2370         offset = winreg_dissect_element_EnumValue_handle(tvb, offset, pinfo, tree, di, drep);
2371         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
2372         offset = winreg_dissect_element_EnumValue_enum_index(tvb, offset, pinfo, tree, di, drep);
2373         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
2374         offset = winreg_dissect_element_EnumValue_name(tvb, offset, pinfo, tree, di, drep);
2375         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
2376         offset = winreg_dissect_element_EnumValue_type(tvb, offset, pinfo, tree, di, drep);
2377         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
2378         offset = winreg_dissect_element_EnumValue_value(tvb, offset, pinfo, tree, di, drep);
2379         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
2380         offset = winreg_dissect_element_EnumValue_size(tvb, offset, pinfo, tree, di, drep);
2381         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
2382         offset = winreg_dissect_element_EnumValue_length(tvb, offset, pinfo, tree, di, drep);
2383         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
2384         return offset;
2385 }
2386
2387 static int
2388 winreg_dissect_element_FlushKey_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2389 {
2390         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_FlushKey_handle_, NDR_POINTER_REF, "Pointer to Handle (policy_handle)",hf_winreg_handle);
2391
2392         return offset;
2393 }
2394
2395 static int
2396 winreg_dissect_element_FlushKey_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2397 {
2398         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, di, drep, hf_winreg_handle, 0);
2399
2400         return offset;
2401 }
2402
2403 /* IDL: WERROR winreg_FlushKey( */
2404 /* IDL: [in] [ref] policy_handle *handle */
2405 /* IDL: ); */
2406
2407 static int
2408 winreg_dissect_FlushKey_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2409 {
2410         guint32 status;
2411
2412         di->dcerpc_procedure_name="FlushKey";
2413         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_winreg_werror, &status);
2414
2415         if (status != 0)
2416                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
2417
2418         return offset;
2419 }
2420
2421 static int
2422 winreg_dissect_FlushKey_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2423 {
2424         di->dcerpc_procedure_name="FlushKey";
2425         offset = winreg_dissect_element_FlushKey_handle(tvb, offset, pinfo, tree, di, drep);
2426         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
2427         return offset;
2428 }
2429
2430 static int
2431 winreg_dissect_element_GetKeySecurity_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2432 {
2433         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_GetKeySecurity_handle_, NDR_POINTER_REF, "Pointer to Handle (policy_handle)",hf_winreg_handle);
2434
2435         return offset;
2436 }
2437
2438 static int
2439 winreg_dissect_element_GetKeySecurity_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2440 {
2441         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, di, drep, hf_winreg_handle, 0);
2442
2443         return offset;
2444 }
2445
2446 static int
2447 winreg_dissect_element_GetKeySecurity_sec_info(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2448 {
2449                 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_winreg_winreg_GetKeySecurity_sec_info, NULL);
2450
2451         return offset;
2452 }
2453
2454 static int
2455 winreg_dissect_element_GetKeySecurity_sd(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2456 {
2457         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_GetKeySecurity_sd_, NDR_POINTER_REF, "Pointer to Sd (KeySecurityData)",hf_winreg_sd);
2458
2459         return offset;
2460 }
2461
2462 static int
2463 winreg_dissect_element_GetKeySecurity_sd_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2464 {
2465         offset = winreg_dissect_struct_KeySecurityData(tvb,offset,pinfo,tree,di,drep,hf_winreg_sd,0);
2466
2467         return offset;
2468 }
2469
2470 /* IDL: WERROR winreg_GetKeySecurity( */
2471 /* IDL: [in] [ref] policy_handle *handle, */
2472 /* IDL: [in] security_secinfo sec_info, */
2473 /* IDL: [out] [in] [ref] KeySecurityData *sd */
2474 /* IDL: ); */
2475
2476 static int
2477 winreg_dissect_GetKeySecurity_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2478 {
2479         guint32 status;
2480
2481         di->dcerpc_procedure_name="GetKeySecurity";
2482         offset = winreg_dissect_element_GetKeySecurity_sd(tvb, offset, pinfo, tree, di, drep);
2483         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
2484
2485         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_winreg_werror, &status);
2486
2487         if (status != 0)
2488                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
2489
2490         return offset;
2491 }
2492
2493 static int
2494 winreg_dissect_GetKeySecurity_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2495 {
2496         di->dcerpc_procedure_name="GetKeySecurity";
2497         offset = winreg_dissect_element_GetKeySecurity_handle(tvb, offset, pinfo, tree, di, drep);
2498         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
2499         offset = winreg_dissect_element_GetKeySecurity_sec_info(tvb, offset, pinfo, tree, di, drep);
2500         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
2501         offset = winreg_dissect_element_GetKeySecurity_sd(tvb, offset, pinfo, tree, di, drep);
2502         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
2503         return offset;
2504 }
2505
2506 static int
2507 winreg_dissect_element_LoadKey_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2508 {
2509         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_LoadKey_handle_, NDR_POINTER_REF, "Pointer to Handle (policy_handle)",hf_winreg_handle);
2510
2511         return offset;
2512 }
2513
2514 static int
2515 winreg_dissect_element_LoadKey_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2516 {
2517         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, di, drep, hf_winreg_handle, 0);
2518
2519         return offset;
2520 }
2521
2522 static int
2523 winreg_dissect_element_LoadKey_keyname(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2524 {
2525         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_LoadKey_keyname_, NDR_POINTER_UNIQUE, "Pointer to Keyname (winreg_String)",hf_winreg_winreg_LoadKey_keyname);
2526
2527         return offset;
2528 }
2529
2530 static int
2531 winreg_dissect_element_LoadKey_keyname_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2532 {
2533         offset=cnf_dissect_winreg_String(tvb, offset, pinfo, tree, di, drep, 0, hf_winreg_winreg_LoadKey_keyname);
2534
2535         return offset;
2536 }
2537
2538 static int
2539 winreg_dissect_element_LoadKey_filename(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2540 {
2541         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_LoadKey_filename_, NDR_POINTER_UNIQUE, "Pointer to Filename (winreg_String)",hf_winreg_winreg_LoadKey_filename);
2542
2543         return offset;
2544 }
2545
2546 static int
2547 winreg_dissect_element_LoadKey_filename_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2548 {
2549         offset=cnf_dissect_winreg_String(tvb, offset, pinfo, tree, di, drep, 0, hf_winreg_winreg_LoadKey_filename);
2550
2551         return offset;
2552 }
2553
2554 /* IDL: WERROR winreg_LoadKey( */
2555 /* IDL: [in] [ref] policy_handle *handle, */
2556 /* IDL: [unique(1)] [in] winreg_String *keyname, */
2557 /* IDL: [unique(1)] [in] winreg_String *filename */
2558 /* IDL: ); */
2559
2560 static int
2561 winreg_dissect_LoadKey_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2562 {
2563         guint32 status;
2564
2565         di->dcerpc_procedure_name="LoadKey";
2566         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_winreg_werror, &status);
2567
2568         if (status != 0)
2569                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
2570
2571         return offset;
2572 }
2573
2574 static int
2575 winreg_dissect_LoadKey_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2576 {
2577         di->dcerpc_procedure_name="LoadKey";
2578         offset = winreg_dissect_element_LoadKey_handle(tvb, offset, pinfo, tree, di, drep);
2579         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
2580         offset = winreg_dissect_element_LoadKey_keyname(tvb, offset, pinfo, tree, di, drep);
2581         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
2582         offset = winreg_dissect_element_LoadKey_filename(tvb, offset, pinfo, tree, di, drep);
2583         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
2584         return offset;
2585 }
2586
2587 static int
2588 winreg_dissect_element_NotifyChangeKeyValue_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2589 {
2590         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_NotifyChangeKeyValue_handle_, NDR_POINTER_REF, "Pointer to Handle (policy_handle)",hf_winreg_handle);
2591
2592         return offset;
2593 }
2594
2595 static int
2596 winreg_dissect_element_NotifyChangeKeyValue_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2597 {
2598         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, di, drep, hf_winreg_handle, 0);
2599
2600         return offset;
2601 }
2602
2603 static int
2604 winreg_dissect_element_NotifyChangeKeyValue_watch_subtree(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2605 {
2606         offset = PIDL_dissect_uint8(tvb, offset, pinfo, tree, di, drep, hf_winreg_winreg_NotifyChangeKeyValue_watch_subtree, 0);
2607
2608         return offset;
2609 }
2610
2611 static int
2612 winreg_dissect_element_NotifyChangeKeyValue_notify_filter(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2613 {
2614         offset = winreg_dissect_bitmap_NotifyChangeType(tvb, offset, pinfo, tree, di, drep, hf_winreg_winreg_NotifyChangeKeyValue_notify_filter, 0);
2615
2616         return offset;
2617 }
2618
2619 static int
2620 winreg_dissect_element_NotifyChangeKeyValue_unknown(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2621 {
2622         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, di, drep, hf_winreg_winreg_NotifyChangeKeyValue_unknown, 0);
2623
2624         return offset;
2625 }
2626
2627 static int
2628 winreg_dissect_element_NotifyChangeKeyValue_string1(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2629 {
2630         offset=cnf_dissect_winreg_String(tvb, offset, pinfo, tree, di, drep, 0, hf_winreg_winreg_NotifyChangeKeyValue_string1);
2631
2632         return offset;
2633 }
2634
2635 static int
2636 winreg_dissect_element_NotifyChangeKeyValue_string2(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2637 {
2638         offset=cnf_dissect_winreg_String(tvb, offset, pinfo, tree, di, drep, 0, hf_winreg_winreg_NotifyChangeKeyValue_string2);
2639
2640         return offset;
2641 }
2642
2643 static int
2644 winreg_dissect_element_NotifyChangeKeyValue_unknown2(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2645 {
2646         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, di, drep, hf_winreg_winreg_NotifyChangeKeyValue_unknown2, 0);
2647
2648         return offset;
2649 }
2650
2651 /* IDL: WERROR winreg_NotifyChangeKeyValue( */
2652 /* IDL: [in] [ref] policy_handle *handle, */
2653 /* IDL: [in] uint8 watch_subtree, */
2654 /* IDL: [in] winreg_NotifyChangeType notify_filter, */
2655 /* IDL: [in] uint32 unknown, */
2656 /* IDL: [in] winreg_String string1, */
2657 /* IDL: [in] winreg_String string2, */
2658 /* IDL: [in] uint32 unknown2 */
2659 /* IDL: ); */
2660
2661 static int
2662 winreg_dissect_NotifyChangeKeyValue_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2663 {
2664         guint32 status;
2665
2666         di->dcerpc_procedure_name="NotifyChangeKeyValue";
2667         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_winreg_werror, &status);
2668
2669         if (status != 0)
2670                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
2671
2672         return offset;
2673 }
2674
2675 static int
2676 winreg_dissect_NotifyChangeKeyValue_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2677 {
2678         di->dcerpc_procedure_name="NotifyChangeKeyValue";
2679         offset = winreg_dissect_element_NotifyChangeKeyValue_handle(tvb, offset, pinfo, tree, di, drep);
2680         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
2681         offset = winreg_dissect_element_NotifyChangeKeyValue_watch_subtree(tvb, offset, pinfo, tree, di, drep);
2682         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
2683         offset = winreg_dissect_element_NotifyChangeKeyValue_notify_filter(tvb, offset, pinfo, tree, di, drep);
2684         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
2685         offset = winreg_dissect_element_NotifyChangeKeyValue_unknown(tvb, offset, pinfo, tree, di, drep);
2686         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
2687         offset = winreg_dissect_element_NotifyChangeKeyValue_string1(tvb, offset, pinfo, tree, di, drep);
2688         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
2689         offset = winreg_dissect_element_NotifyChangeKeyValue_string2(tvb, offset, pinfo, tree, di, drep);
2690         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
2691         offset = winreg_dissect_element_NotifyChangeKeyValue_unknown2(tvb, offset, pinfo, tree, di, drep);
2692         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
2693         return offset;
2694 }
2695
2696 static int
2697 winreg_dissect_element_OpenKey_parent_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2698 {
2699         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_OpenKey_parent_handle_, NDR_POINTER_REF, "Pointer to Parent Handle (policy_handle)",hf_winreg_winreg_OpenKey_parent_handle);
2700
2701         return offset;
2702 }
2703
2704 static int
2705 winreg_dissect_element_OpenKey_parent_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2706 {
2707         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, di, drep, hf_winreg_winreg_OpenKey_parent_handle, 0);
2708
2709         return offset;
2710 }
2711
2712 static int
2713 winreg_dissect_element_OpenKey_keyname(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2714 {
2715         offset=cnf_dissect_winreg_String(tvb, offset, pinfo, tree, di, drep, 2|PIDL_SET_COL_INFO|PIDL_STR_SAVE, hf_winreg_winreg_OpenKey_keyname);
2716
2717         return offset;
2718 }
2719
2720 static int
2721 winreg_dissect_element_OpenKey_options(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2722 {
2723         offset = winreg_dissect_bitmap_KeyOptions(tvb, offset, pinfo, tree, di, drep, hf_winreg_winreg_OpenKey_options, 0);
2724
2725         return offset;
2726 }
2727
2728 static int
2729 winreg_dissect_element_OpenKey_access_mask(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2730 {
2731         offset = winreg_dissect_bitmap_AccessMask(tvb, offset, pinfo, tree, di, drep, hf_winreg_winreg_OpenKey_access_mask, 0);
2732
2733         return offset;
2734 }
2735
2736 static int
2737 winreg_dissect_element_OpenKey_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2738 {
2739         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_OpenKey_handle_, NDR_POINTER_REF, "Pointer to Handle (policy_handle)",hf_winreg_handle);
2740
2741         return offset;
2742 }
2743
2744 static int
2745 winreg_dissect_element_OpenKey_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2746 {
2747         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, di, drep, hf_winreg_handle, PIDL_POLHND_OPEN);
2748
2749         return offset;
2750 }
2751
2752 /* IDL: WERROR winreg_OpenKey( */
2753 /* IDL: [in] [ref] policy_handle *parent_handle, */
2754 /* IDL: [in] winreg_String keyname, */
2755 /* IDL: [in] winreg_KeyOptions options, */
2756 /* IDL: [in] winreg_AccessMask access_mask, */
2757 /* IDL: [out] [ref] policy_handle *handle */
2758 /* IDL: ); */
2759
2760 static int
2761 winreg_dissect_OpenKey_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2762 {
2763         guint32 status;
2764
2765         di->dcerpc_procedure_name="OpenKey";
2766         offset = winreg_dissect_element_OpenKey_handle(tvb, offset, pinfo, tree, di, drep);
2767         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
2768
2769         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_winreg_werror, &status);
2770
2771         if (status != 0)
2772                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
2773
2774         return offset;
2775 }
2776
2777 static int
2778 winreg_dissect_OpenKey_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2779 {
2780         di->dcerpc_procedure_name="OpenKey";
2781         offset = winreg_dissect_element_OpenKey_parent_handle(tvb, offset, pinfo, tree, di, drep);
2782         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
2783         offset = winreg_dissect_element_OpenKey_keyname(tvb, offset, pinfo, tree, di, drep);
2784         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
2785         offset = winreg_dissect_element_OpenKey_options(tvb, offset, pinfo, tree, di, drep);
2786         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
2787         offset = winreg_dissect_element_OpenKey_access_mask(tvb, offset, pinfo, tree, di, drep);
2788         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
2789         return offset;
2790 }
2791
2792 static int
2793 winreg_dissect_element_QueryInfoKey_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2794 {
2795         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_QueryInfoKey_handle_, NDR_POINTER_REF, "Pointer to Handle (policy_handle)",hf_winreg_handle);
2796
2797         return offset;
2798 }
2799
2800 static int
2801 winreg_dissect_element_QueryInfoKey_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2802 {
2803         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, di, drep, hf_winreg_handle, 0);
2804
2805         return offset;
2806 }
2807
2808 static int
2809 winreg_dissect_element_QueryInfoKey_classname(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2810 {
2811         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_QueryInfoKey_classname_, NDR_POINTER_REF, "Pointer to Classname (winreg_String)",hf_winreg_winreg_QueryInfoKey_classname);
2812
2813         return offset;
2814 }
2815
2816 static int
2817 winreg_dissect_element_QueryInfoKey_classname_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2818 {
2819         offset=cnf_dissect_winreg_String(tvb, offset, pinfo, tree, di, drep, 0, hf_winreg_winreg_QueryInfoKey_classname);
2820
2821         return offset;
2822 }
2823
2824 static int
2825 winreg_dissect_element_QueryInfoKey_num_subkeys(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2826 {
2827         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_QueryInfoKey_num_subkeys_, NDR_POINTER_REF, "Pointer to Num Subkeys (uint32)",hf_winreg_winreg_QueryInfoKey_num_subkeys);
2828
2829         return offset;
2830 }
2831
2832 static int
2833 winreg_dissect_element_QueryInfoKey_num_subkeys_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2834 {
2835         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, di, drep, hf_winreg_winreg_QueryInfoKey_num_subkeys, 0);
2836
2837         return offset;
2838 }
2839
2840 static int
2841 winreg_dissect_element_QueryInfoKey_max_subkeylen(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2842 {
2843         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_QueryInfoKey_max_subkeylen_, NDR_POINTER_REF, "Pointer to Max Subkeylen (uint32)",hf_winreg_winreg_QueryInfoKey_max_subkeylen);
2844
2845         return offset;
2846 }
2847
2848 static int
2849 winreg_dissect_element_QueryInfoKey_max_subkeylen_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2850 {
2851         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, di, drep, hf_winreg_winreg_QueryInfoKey_max_subkeylen, 0);
2852
2853         return offset;
2854 }
2855
2856 static int
2857 winreg_dissect_element_QueryInfoKey_max_classlen(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2858 {
2859         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_QueryInfoKey_max_classlen_, NDR_POINTER_REF, "Pointer to Max Classlen (uint32)",hf_winreg_winreg_QueryInfoKey_max_classlen);
2860
2861         return offset;
2862 }
2863
2864 static int
2865 winreg_dissect_element_QueryInfoKey_max_classlen_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2866 {
2867         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, di, drep, hf_winreg_winreg_QueryInfoKey_max_classlen, 0);
2868
2869         return offset;
2870 }
2871
2872 static int
2873 winreg_dissect_element_QueryInfoKey_num_values(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2874 {
2875         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_QueryInfoKey_num_values_, NDR_POINTER_REF, "Pointer to Num Values (uint32)",hf_winreg_winreg_QueryInfoKey_num_values);
2876
2877         return offset;
2878 }
2879
2880 static int
2881 winreg_dissect_element_QueryInfoKey_num_values_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2882 {
2883         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, di, drep, hf_winreg_winreg_QueryInfoKey_num_values, 0);
2884
2885         return offset;
2886 }
2887
2888 static int
2889 winreg_dissect_element_QueryInfoKey_max_valnamelen(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2890 {
2891         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_QueryInfoKey_max_valnamelen_, NDR_POINTER_REF, "Pointer to Max Valnamelen (uint32)",hf_winreg_winreg_QueryInfoKey_max_valnamelen);
2892
2893         return offset;
2894 }
2895
2896 static int
2897 winreg_dissect_element_QueryInfoKey_max_valnamelen_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2898 {
2899         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, di, drep, hf_winreg_winreg_QueryInfoKey_max_valnamelen, 0);
2900
2901         return offset;
2902 }
2903
2904 static int
2905 winreg_dissect_element_QueryInfoKey_max_valbufsize(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2906 {
2907         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_QueryInfoKey_max_valbufsize_, NDR_POINTER_REF, "Pointer to Max Valbufsize (uint32)",hf_winreg_winreg_QueryInfoKey_max_valbufsize);
2908
2909         return offset;
2910 }
2911
2912 static int
2913 winreg_dissect_element_QueryInfoKey_max_valbufsize_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2914 {
2915         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, di, drep, hf_winreg_winreg_QueryInfoKey_max_valbufsize, 0);
2916
2917         return offset;
2918 }
2919
2920 static int
2921 winreg_dissect_element_QueryInfoKey_secdescsize(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2922 {
2923         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_QueryInfoKey_secdescsize_, NDR_POINTER_REF, "Pointer to Secdescsize (uint32)",hf_winreg_winreg_QueryInfoKey_secdescsize);
2924
2925         return offset;
2926 }
2927
2928 static int
2929 winreg_dissect_element_QueryInfoKey_secdescsize_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2930 {
2931         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, di, drep, hf_winreg_winreg_QueryInfoKey_secdescsize, 0);
2932
2933         return offset;
2934 }
2935
2936 static int
2937 winreg_dissect_element_QueryInfoKey_last_changed_time(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2938 {
2939         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_QueryInfoKey_last_changed_time_, NDR_POINTER_REF, "Pointer to Last Changed Time (NTTIME)",hf_winreg_winreg_QueryInfoKey_last_changed_time);
2940
2941         return offset;
2942 }
2943
2944 static int
2945 winreg_dissect_element_QueryInfoKey_last_changed_time_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2946 {
2947         offset = dissect_ndr_nt_NTTIME(tvb, offset, pinfo, tree, di, drep, hf_winreg_winreg_QueryInfoKey_last_changed_time);
2948
2949         return offset;
2950 }
2951
2952 /* IDL: WERROR winreg_QueryInfoKey( */
2953 /* IDL: [in] [ref] policy_handle *handle, */
2954 /* IDL: [out] [in] [ref] winreg_String *classname, */
2955 /* IDL: [out] [ref] uint32 *num_subkeys, */
2956 /* IDL: [out] [ref] uint32 *max_subkeylen, */
2957 /* IDL: [out] [ref] uint32 *max_classlen, */
2958 /* IDL: [out] [ref] uint32 *num_values, */
2959 /* IDL: [out] [ref] uint32 *max_valnamelen, */
2960 /* IDL: [out] [ref] uint32 *max_valbufsize, */
2961 /* IDL: [out] [ref] uint32 *secdescsize, */
2962 /* IDL: [out] [ref] NTTIME *last_changed_time */
2963 /* IDL: ); */
2964
2965 static int
2966 winreg_dissect_QueryInfoKey_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
2967 {
2968         guint32 status;
2969
2970         di->dcerpc_procedure_name="QueryInfoKey";
2971         offset = winreg_dissect_element_QueryInfoKey_classname(tvb, offset, pinfo, tree, di, drep);
2972         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
2973
2974         offset = winreg_dissect_element_QueryInfoKey_num_subkeys(tvb, offset, pinfo, tree, di, drep);
2975         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
2976
2977         offset = winreg_dissect_element_QueryInfoKey_max_subkeylen(tvb, offset, pinfo, tree, di, drep);
2978         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
2979
2980         offset = winreg_dissect_element_QueryInfoKey_max_classlen(tvb, offset, pinfo, tree, di, drep);
2981         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
2982
2983         offset = winreg_dissect_element_QueryInfoKey_num_values(tvb, offset, pinfo, tree, di, drep);
2984         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
2985
2986         offset = winreg_dissect_element_QueryInfoKey_max_valnamelen(tvb, offset, pinfo, tree, di, drep);
2987         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
2988
2989         offset = winreg_dissect_element_QueryInfoKey_max_valbufsize(tvb, offset, pinfo, tree, di, drep);
2990         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
2991
2992         offset = winreg_dissect_element_QueryInfoKey_secdescsize(tvb, offset, pinfo, tree, di, drep);
2993         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
2994
2995         offset = winreg_dissect_element_QueryInfoKey_last_changed_time(tvb, offset, pinfo, tree, di, drep);
2996         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
2997
2998         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_winreg_werror, &status);
2999
3000         if (status != 0)
3001                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
3002
3003         return offset;
3004 }
3005
3006 static int
3007 winreg_dissect_QueryInfoKey_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3008 {
3009         di->dcerpc_procedure_name="QueryInfoKey";
3010         offset = winreg_dissect_element_QueryInfoKey_handle(tvb, offset, pinfo, tree, di, drep);
3011         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
3012         offset = winreg_dissect_element_QueryInfoKey_classname(tvb, offset, pinfo, tree, di, drep);
3013         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
3014         return offset;
3015 }
3016
3017 static int
3018 winreg_dissect_element_QueryValue_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3019 {
3020         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_QueryValue_handle_, NDR_POINTER_REF, "Pointer to Handle (policy_handle)",hf_winreg_handle);
3021
3022         return offset;
3023 }
3024
3025 static int
3026 winreg_dissect_element_QueryValue_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3027 {
3028         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, di, drep, hf_winreg_handle, 0);
3029
3030         return offset;
3031 }
3032
3033 static int
3034 winreg_dissect_element_QueryValue_value_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3035 {
3036         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_QueryValue_value_name_, NDR_POINTER_REF, "Pointer to Value Name (winreg_String)",hf_winreg_winreg_QueryValue_value_name);
3037
3038         return offset;
3039 }
3040
3041 static int
3042 winreg_dissect_element_QueryValue_value_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3043 {
3044         offset=cnf_dissect_winreg_String(tvb, offset, pinfo, tree, di, drep, 0, hf_winreg_winreg_QueryValue_value_name);
3045
3046         return offset;
3047 }
3048
3049 static int
3050 winreg_dissect_element_QueryValue_type(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3051 {
3052         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_QueryValue_type_, NDR_POINTER_UNIQUE, "Pointer to Type (winreg_Type)",hf_winreg_winreg_QueryValue_type);
3053
3054         return offset;
3055 }
3056
3057 static int
3058 winreg_dissect_element_QueryValue_type_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3059 {
3060         offset=misc_dissect_enum_winreg_Type(tvb, offset, pinfo, tree, di, drep, hf_winreg_winreg_QueryValue_type, 0);
3061
3062         return offset;
3063 }
3064
3065 static int
3066 winreg_dissect_element_QueryValue_data(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3067 {
3068         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_QueryValue_data_, NDR_POINTER_UNIQUE, "Pointer to Data (uint8)",hf_winreg_winreg_QueryValue_data);
3069
3070         return offset;
3071 }
3072
3073 static int
3074 winreg_dissect_element_QueryValue_data_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3075 {
3076         offset = dissect_ndr_ucvarray(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_QueryValue_data__);
3077
3078         return offset;
3079 }
3080
3081 static int
3082 winreg_dissect_element_QueryValue_data__(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3083 {
3084         offset = PIDL_dissect_uint8(tvb, offset, pinfo, tree, di, drep, hf_winreg_winreg_QueryValue_data, 0);
3085
3086         return offset;
3087 }
3088
3089 static int
3090 winreg_dissect_element_QueryValue_data_size(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3091 {
3092         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_QueryValue_data_size_, NDR_POINTER_UNIQUE, "Pointer to Data Size (uint32)",hf_winreg_winreg_QueryValue_data_size);
3093
3094         return offset;
3095 }
3096
3097 static int
3098 winreg_dissect_element_QueryValue_data_size_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3099 {
3100         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, di, drep, hf_winreg_winreg_QueryValue_data_size, 0);
3101
3102         return offset;
3103 }
3104
3105 static int
3106 winreg_dissect_element_QueryValue_data_length(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3107 {
3108         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_QueryValue_data_length_, NDR_POINTER_UNIQUE, "Pointer to Data Length (uint32)",hf_winreg_winreg_QueryValue_data_length);
3109
3110         return offset;
3111 }
3112
3113 static int
3114 winreg_dissect_element_QueryValue_data_length_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3115 {
3116         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, di, drep, hf_winreg_winreg_QueryValue_data_length, 0);
3117
3118         return offset;
3119 }
3120
3121 /* IDL: WERROR winreg_QueryValue( */
3122 /* IDL: [in] [ref] policy_handle *handle, */
3123 /* IDL: [in] [ref] winreg_String *value_name, */
3124 /* IDL: [out] [unique(1)] [in] winreg_Type *type, */
3125 /* IDL: [unique(1)] [out] [in] [range(0,0x4000000)] [length_is(data_length?*data_length:0)] [size_is(data_size?*data_size:0)] uint8 *data, */
3126 /* IDL: [out] [unique(1)] [in] uint32 *data_size, */
3127 /* IDL: [out] [unique(1)] [in] uint32 *data_length */
3128 /* IDL: ); */
3129
3130 static int
3131 winreg_dissect_QueryValue_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3132 {
3133         guint32 status;
3134
3135         di->dcerpc_procedure_name="QueryValue";
3136         offset = winreg_dissect_element_QueryValue_type(tvb, offset, pinfo, tree, di, drep);
3137         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
3138
3139         offset = winreg_dissect_element_QueryValue_data(tvb, offset, pinfo, tree, di, drep);
3140         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
3141
3142         offset = winreg_dissect_element_QueryValue_data_size(tvb, offset, pinfo, tree, di, drep);
3143         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
3144
3145         offset = winreg_dissect_element_QueryValue_data_length(tvb, offset, pinfo, tree, di, drep);
3146         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
3147
3148         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_winreg_werror, &status);
3149
3150         if (status != 0)
3151                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
3152
3153         return offset;
3154 }
3155
3156 static int
3157 winreg_dissect_QueryValue_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3158 {
3159         di->dcerpc_procedure_name="QueryValue";
3160         offset = winreg_dissect_element_QueryValue_handle(tvb, offset, pinfo, tree, di, drep);
3161         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
3162         offset = winreg_dissect_element_QueryValue_value_name(tvb, offset, pinfo, tree, di, drep);
3163         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
3164         offset = winreg_dissect_element_QueryValue_type(tvb, offset, pinfo, tree, di, drep);
3165         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
3166         offset = winreg_dissect_element_QueryValue_data(tvb, offset, pinfo, tree, di, drep);
3167         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
3168         offset = winreg_dissect_element_QueryValue_data_size(tvb, offset, pinfo, tree, di, drep);
3169         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
3170         offset = winreg_dissect_element_QueryValue_data_length(tvb, offset, pinfo, tree, di, drep);
3171         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
3172         return offset;
3173 }
3174
3175 static int
3176 winreg_dissect_element_ReplaceKey_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3177 {
3178         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_ReplaceKey_handle_, NDR_POINTER_REF, "Pointer to Handle (policy_handle)",hf_winreg_winreg_ReplaceKey_handle);
3179
3180         return offset;
3181 }
3182
3183 static int
3184 winreg_dissect_element_ReplaceKey_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3185 {
3186         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, di, drep, hf_winreg_winreg_ReplaceKey_handle, 0);
3187
3188         return offset;
3189 }
3190
3191 static int
3192 winreg_dissect_element_ReplaceKey_subkey(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3193 {
3194         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_ReplaceKey_subkey_, NDR_POINTER_REF, "Pointer to Subkey (winreg_String)",hf_winreg_winreg_ReplaceKey_subkey);
3195
3196         return offset;
3197 }
3198
3199 static int
3200 winreg_dissect_element_ReplaceKey_subkey_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3201 {
3202         offset=cnf_dissect_winreg_String(tvb, offset, pinfo, tree, di, drep, 0, hf_winreg_winreg_ReplaceKey_subkey);
3203
3204         return offset;
3205 }
3206
3207 static int
3208 winreg_dissect_element_ReplaceKey_new_file(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3209 {
3210         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_ReplaceKey_new_file_, NDR_POINTER_REF, "Pointer to New File (winreg_String)",hf_winreg_winreg_ReplaceKey_new_file);
3211
3212         return offset;
3213 }
3214
3215 static int
3216 winreg_dissect_element_ReplaceKey_new_file_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3217 {
3218         offset=cnf_dissect_winreg_String(tvb, offset, pinfo, tree, di, drep, 0, hf_winreg_winreg_ReplaceKey_new_file);
3219
3220         return offset;
3221 }
3222
3223 static int
3224 winreg_dissect_element_ReplaceKey_old_file(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3225 {
3226         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_ReplaceKey_old_file_, NDR_POINTER_REF, "Pointer to Old File (winreg_String)",hf_winreg_winreg_ReplaceKey_old_file);
3227
3228         return offset;
3229 }
3230
3231 static int
3232 winreg_dissect_element_ReplaceKey_old_file_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3233 {
3234         offset=cnf_dissect_winreg_String(tvb, offset, pinfo, tree, di, drep, 0, hf_winreg_winreg_ReplaceKey_old_file);
3235
3236         return offset;
3237 }
3238
3239 /* IDL: WERROR winreg_ReplaceKey( */
3240 /* IDL: [in] [ref] policy_handle *handle, */
3241 /* IDL: [in] [ref] winreg_String *subkey, */
3242 /* IDL: [in] [ref] winreg_String *new_file, */
3243 /* IDL: [in] [ref] winreg_String *old_file */
3244 /* IDL: ); */
3245
3246 static int
3247 winreg_dissect_ReplaceKey_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3248 {
3249         guint32 status;
3250
3251         di->dcerpc_procedure_name="ReplaceKey";
3252         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_winreg_werror, &status);
3253
3254         if (status != 0)
3255                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
3256
3257         return offset;
3258 }
3259
3260 static int
3261 winreg_dissect_ReplaceKey_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3262 {
3263         di->dcerpc_procedure_name="ReplaceKey";
3264         offset = winreg_dissect_element_ReplaceKey_handle(tvb, offset, pinfo, tree, di, drep);
3265         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
3266         offset = winreg_dissect_element_ReplaceKey_subkey(tvb, offset, pinfo, tree, di, drep);
3267         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
3268         offset = winreg_dissect_element_ReplaceKey_new_file(tvb, offset, pinfo, tree, di, drep);
3269         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
3270         offset = winreg_dissect_element_ReplaceKey_old_file(tvb, offset, pinfo, tree, di, drep);
3271         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
3272         return offset;
3273 }
3274
3275 static int
3276 winreg_dissect_element_RestoreKey_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3277 {
3278         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_RestoreKey_handle_, NDR_POINTER_REF, "Pointer to Handle (policy_handle)",hf_winreg_winreg_RestoreKey_handle);
3279
3280         return offset;
3281 }
3282
3283 static int
3284 winreg_dissect_element_RestoreKey_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3285 {
3286         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, di, drep, hf_winreg_winreg_RestoreKey_handle, 0);
3287
3288         return offset;
3289 }
3290
3291 static int
3292 winreg_dissect_element_RestoreKey_filename(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3293 {
3294         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_RestoreKey_filename_, NDR_POINTER_REF, "Pointer to Filename (winreg_String)",hf_winreg_winreg_RestoreKey_filename);
3295
3296         return offset;
3297 }
3298
3299 static int
3300 winreg_dissect_element_RestoreKey_filename_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3301 {
3302         offset=cnf_dissect_winreg_String(tvb, offset, pinfo, tree, di, drep, 0, hf_winreg_winreg_RestoreKey_filename);
3303
3304         return offset;
3305 }
3306
3307 static int
3308 winreg_dissect_element_RestoreKey_flags(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3309 {
3310         offset = winreg_dissect_bitmap_RestoreKeyFlags(tvb, offset, pinfo, tree, di, drep, hf_winreg_winreg_RestoreKey_flags, 0);
3311
3312         return offset;
3313 }
3314
3315 /* IDL: WERROR winreg_RestoreKey( */
3316 /* IDL: [in] [ref] policy_handle *handle, */
3317 /* IDL: [in] [ref] winreg_String *filename, */
3318 /* IDL: [in] winreg_RestoreKeyFlags flags */
3319 /* IDL: ); */
3320
3321 static int
3322 winreg_dissect_RestoreKey_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3323 {
3324         guint32 status;
3325
3326         di->dcerpc_procedure_name="RestoreKey";
3327         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_winreg_werror, &status);
3328
3329         if (status != 0)
3330                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
3331
3332         return offset;
3333 }
3334
3335 static int
3336 winreg_dissect_RestoreKey_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3337 {
3338         di->dcerpc_procedure_name="RestoreKey";
3339         offset = winreg_dissect_element_RestoreKey_handle(tvb, offset, pinfo, tree, di, drep);
3340         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
3341         offset = winreg_dissect_element_RestoreKey_filename(tvb, offset, pinfo, tree, di, drep);
3342         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
3343         offset = winreg_dissect_element_RestoreKey_flags(tvb, offset, pinfo, tree, di, drep);
3344         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
3345         return offset;
3346 }
3347
3348 static int
3349 winreg_dissect_element_SaveKey_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3350 {
3351         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_SaveKey_handle_, NDR_POINTER_REF, "Pointer to Handle (policy_handle)",hf_winreg_winreg_SaveKey_handle);
3352
3353         return offset;
3354 }
3355
3356 static int
3357 winreg_dissect_element_SaveKey_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3358 {
3359         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, di, drep, hf_winreg_winreg_SaveKey_handle, 0);
3360
3361         return offset;
3362 }
3363
3364 static int
3365 winreg_dissect_element_SaveKey_filename(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3366 {
3367         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_SaveKey_filename_, NDR_POINTER_REF, "Pointer to Filename (winreg_String)",hf_winreg_winreg_SaveKey_filename);
3368
3369         return offset;
3370 }
3371
3372 static int
3373 winreg_dissect_element_SaveKey_filename_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3374 {
3375         offset=cnf_dissect_winreg_String(tvb, offset, pinfo, tree, di, drep, 0, hf_winreg_winreg_SaveKey_filename);
3376
3377         return offset;
3378 }
3379
3380 static int
3381 winreg_dissect_element_SaveKey_sec_attrib(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3382 {
3383         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_SaveKey_sec_attrib_, NDR_POINTER_UNIQUE, "Pointer to Sec Attrib (KeySecurityAttribute)",hf_winreg_winreg_SaveKey_sec_attrib);
3384
3385         return offset;
3386 }
3387
3388 static int
3389 winreg_dissect_element_SaveKey_sec_attrib_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3390 {
3391         offset = winreg_dissect_struct_KeySecurityAttribute(tvb,offset,pinfo,tree,di,drep,hf_winreg_winreg_SaveKey_sec_attrib,0);
3392
3393         return offset;
3394 }
3395
3396 /* IDL: WERROR winreg_SaveKey( */
3397 /* IDL: [in] [ref] policy_handle *handle, */
3398 /* IDL: [in] [ref] winreg_String *filename, */
3399 /* IDL: [unique(1)] [in] KeySecurityAttribute *sec_attrib */
3400 /* IDL: ); */
3401
3402 static int
3403 winreg_dissect_SaveKey_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3404 {
3405         guint32 status;
3406
3407         di->dcerpc_procedure_name="SaveKey";
3408         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_winreg_werror, &status);
3409
3410         if (status != 0)
3411                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
3412
3413         return offset;
3414 }
3415
3416 static int
3417 winreg_dissect_SaveKey_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3418 {
3419         di->dcerpc_procedure_name="SaveKey";
3420         offset = winreg_dissect_element_SaveKey_handle(tvb, offset, pinfo, tree, di, drep);
3421         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
3422         offset = winreg_dissect_element_SaveKey_filename(tvb, offset, pinfo, tree, di, drep);
3423         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
3424         offset = winreg_dissect_element_SaveKey_sec_attrib(tvb, offset, pinfo, tree, di, drep);
3425         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
3426         return offset;
3427 }
3428
3429 static int
3430 winreg_dissect_element_SetKeySecurity_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3431 {
3432         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_SetKeySecurity_handle_, NDR_POINTER_REF, "Pointer to Handle (policy_handle)",hf_winreg_handle);
3433
3434         return offset;
3435 }
3436
3437 static int
3438 winreg_dissect_element_SetKeySecurity_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3439 {
3440         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, di, drep, hf_winreg_handle, 0);
3441
3442         return offset;
3443 }
3444
3445 static int
3446 winreg_dissect_element_SetKeySecurity_sec_info(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3447 {
3448                 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_winreg_winreg_GetKeySecurity_sec_info, NULL);
3449
3450         return offset;
3451 }
3452
3453 static int
3454 winreg_dissect_element_SetKeySecurity_sd(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3455 {
3456         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_SetKeySecurity_sd_, NDR_POINTER_REF, "Pointer to Sd (KeySecurityData)",hf_winreg_sd);
3457
3458         return offset;
3459 }
3460
3461 static int
3462 winreg_dissect_element_SetKeySecurity_sd_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3463 {
3464         offset = winreg_dissect_struct_KeySecurityData(tvb,offset,pinfo,tree,di,drep,hf_winreg_sd,0);
3465
3466         return offset;
3467 }
3468
3469 /* IDL: WERROR winreg_SetKeySecurity( */
3470 /* IDL: [in] [ref] policy_handle *handle, */
3471 /* IDL: [in] security_secinfo sec_info, */
3472 /* IDL: [in] [ref] KeySecurityData *sd */
3473 /* IDL: ); */
3474
3475 static int
3476 winreg_dissect_SetKeySecurity_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3477 {
3478         guint32 status;
3479
3480         di->dcerpc_procedure_name="SetKeySecurity";
3481         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_winreg_werror, &status);
3482
3483         if (status != 0)
3484                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
3485
3486         return offset;
3487 }
3488
3489 static int
3490 winreg_dissect_SetKeySecurity_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3491 {
3492         di->dcerpc_procedure_name="SetKeySecurity";
3493         offset = winreg_dissect_element_SetKeySecurity_handle(tvb, offset, pinfo, tree, di, drep);
3494         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
3495         offset = winreg_dissect_element_SetKeySecurity_sec_info(tvb, offset, pinfo, tree, di, drep);
3496         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
3497         offset = winreg_dissect_element_SetKeySecurity_sd(tvb, offset, pinfo, tree, di, drep);
3498         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
3499         return offset;
3500 }
3501
3502 static int
3503 winreg_dissect_element_SetValue_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3504 {
3505         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_SetValue_handle_, NDR_POINTER_REF, "Pointer to Handle (policy_handle)",hf_winreg_handle);
3506
3507         return offset;
3508 }
3509
3510 static int
3511 winreg_dissect_element_SetValue_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3512 {
3513         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, di, drep, hf_winreg_handle, 0);
3514
3515         return offset;
3516 }
3517
3518 static int
3519 winreg_dissect_element_SetValue_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3520 {
3521         offset=cnf_dissect_winreg_String(tvb, offset, pinfo, tree, di, drep, 2|PIDL_SET_COL_INFO, hf_winreg_winreg_SetValue_name);
3522
3523         return offset;
3524 }
3525
3526 static int
3527 winreg_dissect_element_SetValue_type(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3528 {
3529         offset=misc_dissect_enum_winreg_Type(tvb, offset, pinfo, tree, di, drep, hf_winreg_winreg_SetValue_type, 0);
3530
3531         return offset;
3532 }
3533
3534 static int
3535 winreg_dissect_element_SetValue_data(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3536 {
3537         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_SetValue_data_, NDR_POINTER_REF, "Pointer to Data (uint8)",hf_winreg_winreg_SetValue_data);
3538
3539         return offset;
3540 }
3541
3542 static int
3543 winreg_dissect_element_SetValue_data_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3544 {
3545         offset = dissect_ndr_ucarray(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_SetValue_data__);
3546
3547         return offset;
3548 }
3549
3550 static int
3551 winreg_dissect_element_SetValue_data__(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3552 {
3553         offset = PIDL_dissect_uint8(tvb, offset, pinfo, tree, di, drep, hf_winreg_winreg_SetValue_data, 0);
3554
3555         return offset;
3556 }
3557
3558 static int
3559 winreg_dissect_element_SetValue_size(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3560 {
3561         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, di, drep, hf_winreg_winreg_SetValue_size, 0);
3562
3563         return offset;
3564 }
3565
3566 /* IDL: WERROR winreg_SetValue( */
3567 /* IDL: [in] [ref] policy_handle *handle, */
3568 /* IDL: [in] winreg_String name, */
3569 /* IDL: [in] winreg_Type type, */
3570 /* IDL: [in] [ref] [size_is(size)] uint8 *data, */
3571 /* IDL: [in] uint32 size */
3572 /* IDL: ); */
3573
3574 static int
3575 winreg_dissect_SetValue_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3576 {
3577         guint32 status;
3578
3579         di->dcerpc_procedure_name="SetValue";
3580         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_winreg_werror, &status);
3581
3582         if (status != 0)
3583                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
3584
3585         return offset;
3586 }
3587
3588 static int
3589 winreg_dissect_SetValue_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3590 {
3591         di->dcerpc_procedure_name="SetValue";
3592         offset = winreg_dissect_element_SetValue_handle(tvb, offset, pinfo, tree, di, drep);
3593         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
3594         offset = winreg_dissect_element_SetValue_name(tvb, offset, pinfo, tree, di, drep);
3595         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
3596         offset = winreg_dissect_element_SetValue_type(tvb, offset, pinfo, tree, di, drep);
3597         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
3598         offset = winreg_dissect_element_SetValue_data(tvb, offset, pinfo, tree, di, drep);
3599         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
3600         offset = winreg_dissect_element_SetValue_size(tvb, offset, pinfo, tree, di, drep);
3601         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
3602         return offset;
3603 }
3604
3605 static int
3606 winreg_dissect_element_UnLoadKey_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3607 {
3608         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_UnLoadKey_handle_, NDR_POINTER_REF, "Pointer to Handle (policy_handle)",hf_winreg_winreg_UnLoadKey_handle);
3609
3610         return offset;
3611 }
3612
3613 static int
3614 winreg_dissect_element_UnLoadKey_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3615 {
3616         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, di, drep, hf_winreg_winreg_UnLoadKey_handle, 0);
3617
3618         return offset;
3619 }
3620
3621 static int
3622 winreg_dissect_element_UnLoadKey_subkey(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3623 {
3624         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_UnLoadKey_subkey_, NDR_POINTER_REF, "Pointer to Subkey (winreg_String)",hf_winreg_winreg_UnLoadKey_subkey);
3625
3626         return offset;
3627 }
3628
3629 static int
3630 winreg_dissect_element_UnLoadKey_subkey_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3631 {
3632         offset=cnf_dissect_winreg_String(tvb, offset, pinfo, tree, di, drep, 0, hf_winreg_winreg_UnLoadKey_subkey);
3633
3634         return offset;
3635 }
3636
3637 /* IDL: WERROR winreg_UnLoadKey( */
3638 /* IDL: [in] [ref] policy_handle *handle, */
3639 /* IDL: [in] [ref] winreg_String *subkey */
3640 /* IDL: ); */
3641
3642 static int
3643 winreg_dissect_UnLoadKey_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3644 {
3645         guint32 status;
3646
3647         di->dcerpc_procedure_name="UnLoadKey";
3648         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_winreg_werror, &status);
3649
3650         if (status != 0)
3651                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
3652
3653         return offset;
3654 }
3655
3656 static int
3657 winreg_dissect_UnLoadKey_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3658 {
3659         di->dcerpc_procedure_name="UnLoadKey";
3660         offset = winreg_dissect_element_UnLoadKey_handle(tvb, offset, pinfo, tree, di, drep);
3661         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
3662         offset = winreg_dissect_element_UnLoadKey_subkey(tvb, offset, pinfo, tree, di, drep);
3663         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
3664         return offset;
3665 }
3666
3667 static int
3668 winreg_dissect_element_InitiateSystemShutdown_hostname(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3669 {
3670         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_InitiateSystemShutdown_hostname_, NDR_POINTER_UNIQUE, "Pointer to Hostname (uint16)",hf_winreg_winreg_InitiateSystemShutdown_hostname);
3671
3672         return offset;
3673 }
3674
3675 static int
3676 winreg_dissect_element_InitiateSystemShutdown_hostname_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3677 {
3678         offset = PIDL_dissect_uint16(tvb, offset, pinfo, tree, di, drep, hf_winreg_winreg_InitiateSystemShutdown_hostname, 0);
3679
3680         return offset;
3681 }
3682
3683 static int
3684 winreg_dissect_element_InitiateSystemShutdown_message(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3685 {
3686         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_InitiateSystemShutdown_message_, NDR_POINTER_UNIQUE, "Pointer to Message (lsa_StringLarge)",hf_winreg_winreg_InitiateSystemShutdown_message);
3687
3688         return offset;
3689 }
3690
3691 static int
3692 winreg_dissect_element_InitiateSystemShutdown_message_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3693 {
3694         offset=lsarpc_dissect_struct_lsa_StringLarge(tvb, offset, pinfo, tree, di, drep, hf_winreg_winreg_InitiateSystemShutdown_message, 0);
3695
3696         return offset;
3697 }
3698
3699 static int
3700 winreg_dissect_element_InitiateSystemShutdown_timeout(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3701 {
3702         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, di, drep, hf_winreg_winreg_InitiateSystemShutdown_timeout, 0);
3703
3704         return offset;
3705 }
3706
3707 static int
3708 winreg_dissect_element_InitiateSystemShutdown_force_apps(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3709 {
3710         offset = PIDL_dissect_uint8(tvb, offset, pinfo, tree, di, drep, hf_winreg_winreg_InitiateSystemShutdown_force_apps, 0);
3711
3712         return offset;
3713 }
3714
3715 static int
3716 winreg_dissect_element_InitiateSystemShutdown_do_reboot(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3717 {
3718         offset = PIDL_dissect_uint8(tvb, offset, pinfo, tree, di, drep, hf_winreg_winreg_InitiateSystemShutdown_do_reboot, 0);
3719
3720         return offset;
3721 }
3722
3723 /* IDL: WERROR winreg_InitiateSystemShutdown( */
3724 /* IDL: [unique(1)] [in] uint16 *hostname, */
3725 /* IDL: [unique(1)] [in] lsa_StringLarge *message, */
3726 /* IDL: [in] uint32 timeout, */
3727 /* IDL: [in] uint8 force_apps, */
3728 /* IDL: [in] uint8 do_reboot */
3729 /* IDL: ); */
3730
3731 static int
3732 winreg_dissect_InitiateSystemShutdown_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3733 {
3734         guint32 status;
3735
3736         di->dcerpc_procedure_name="InitiateSystemShutdown";
3737         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_winreg_werror, &status);
3738
3739         if (status != 0)
3740                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
3741
3742         return offset;
3743 }
3744
3745 static int
3746 winreg_dissect_InitiateSystemShutdown_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3747 {
3748         di->dcerpc_procedure_name="InitiateSystemShutdown";
3749         offset = winreg_dissect_element_InitiateSystemShutdown_hostname(tvb, offset, pinfo, tree, di, drep);
3750         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
3751         offset = winreg_dissect_element_InitiateSystemShutdown_message(tvb, offset, pinfo, tree, di, drep);
3752         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
3753         offset = winreg_dissect_element_InitiateSystemShutdown_timeout(tvb, offset, pinfo, tree, di, drep);
3754         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
3755         offset = winreg_dissect_element_InitiateSystemShutdown_force_apps(tvb, offset, pinfo, tree, di, drep);
3756         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
3757         offset = winreg_dissect_element_InitiateSystemShutdown_do_reboot(tvb, offset, pinfo, tree, di, drep);
3758         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
3759         return offset;
3760 }
3761
3762 static int
3763 winreg_dissect_element_AbortSystemShutdown_server(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3764 {
3765         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_AbortSystemShutdown_server_, NDR_POINTER_UNIQUE, "Pointer to Server (uint16)",hf_winreg_winreg_AbortSystemShutdown_server);
3766
3767         return offset;
3768 }
3769
3770 static int
3771 winreg_dissect_element_AbortSystemShutdown_server_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3772 {
3773         offset = PIDL_dissect_uint16(tvb, offset, pinfo, tree, di, drep, hf_winreg_winreg_AbortSystemShutdown_server, 0);
3774
3775         return offset;
3776 }
3777
3778 /* IDL: WERROR winreg_AbortSystemShutdown( */
3779 /* IDL: [unique(1)] [in] uint16 *server */
3780 /* IDL: ); */
3781
3782 static int
3783 winreg_dissect_AbortSystemShutdown_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3784 {
3785         guint32 status;
3786
3787         di->dcerpc_procedure_name="AbortSystemShutdown";
3788         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_winreg_werror, &status);
3789
3790         if (status != 0)
3791                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
3792
3793         return offset;
3794 }
3795
3796 static int
3797 winreg_dissect_AbortSystemShutdown_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3798 {
3799         di->dcerpc_procedure_name="AbortSystemShutdown";
3800         offset = winreg_dissect_element_AbortSystemShutdown_server(tvb, offset, pinfo, tree, di, drep);
3801         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
3802         return offset;
3803 }
3804
3805 static int
3806 winreg_dissect_element_GetVersion_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3807 {
3808         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_GetVersion_handle_, NDR_POINTER_REF, "Pointer to Handle (policy_handle)",hf_winreg_handle);
3809
3810         return offset;
3811 }
3812
3813 static int
3814 winreg_dissect_element_GetVersion_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3815 {
3816         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, di, drep, hf_winreg_handle, 0);
3817
3818         return offset;
3819 }
3820
3821 static int
3822 winreg_dissect_element_GetVersion_version(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3823 {
3824         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_GetVersion_version_, NDR_POINTER_REF, "Pointer to Version (uint32)",hf_winreg_winreg_GetVersion_version);
3825
3826         return offset;
3827 }
3828
3829 static int
3830 winreg_dissect_element_GetVersion_version_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3831 {
3832         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, di, drep, hf_winreg_winreg_GetVersion_version, 0);
3833
3834         return offset;
3835 }
3836
3837 /* IDL: WERROR winreg_GetVersion( */
3838 /* IDL: [in] [ref] policy_handle *handle, */
3839 /* IDL: [out] [ref] uint32 *version */
3840 /* IDL: ); */
3841
3842 static int
3843 winreg_dissect_GetVersion_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3844 {
3845         guint32 status;
3846
3847         di->dcerpc_procedure_name="GetVersion";
3848         offset = winreg_dissect_element_GetVersion_version(tvb, offset, pinfo, tree, di, drep);
3849         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
3850
3851         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_winreg_werror, &status);
3852
3853         if (status != 0)
3854                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
3855
3856         return offset;
3857 }
3858
3859 static int
3860 winreg_dissect_GetVersion_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3861 {
3862         di->dcerpc_procedure_name="GetVersion";
3863         offset = winreg_dissect_element_GetVersion_handle(tvb, offset, pinfo, tree, di, drep);
3864         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
3865         return offset;
3866 }
3867
3868 static int
3869 winreg_dissect_element_OpenHKCC_system_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3870 {
3871         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_OpenHKCC_system_name_, NDR_POINTER_UNIQUE, "Pointer to System Name (uint16)",hf_winreg_system_name);
3872
3873         return offset;
3874 }
3875
3876 static int
3877 winreg_dissect_element_OpenHKCC_system_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3878 {
3879         offset = PIDL_dissect_uint16(tvb, offset, pinfo, tree, di, drep, hf_winreg_system_name, 0);
3880
3881         return offset;
3882 }
3883
3884 static int
3885 winreg_dissect_element_OpenHKCC_access_mask(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3886 {
3887         offset = winreg_dissect_bitmap_AccessMask(tvb, offset, pinfo, tree, di, drep, hf_winreg_access_mask, 0);
3888
3889         return offset;
3890 }
3891
3892 static int
3893 winreg_dissect_element_OpenHKCC_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3894 {
3895         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_OpenHKCC_handle_, NDR_POINTER_REF, "Pointer to Handle (policy_handle)",hf_winreg_handle);
3896
3897         return offset;
3898 }
3899
3900 static int
3901 winreg_dissect_element_OpenHKCC_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3902 {
3903         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, di, drep, hf_winreg_handle, PIDL_POLHND_OPEN);
3904
3905         return offset;
3906 }
3907
3908 /* IDL: WERROR winreg_OpenHKCC( */
3909 /* IDL: [unique(1)] [in] uint16 *system_name, */
3910 /* IDL: [in] winreg_AccessMask access_mask, */
3911 /* IDL: [out] [ref] policy_handle *handle */
3912 /* IDL: ); */
3913
3914 static int
3915 winreg_dissect_OpenHKCC_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3916 {
3917         guint32 status;
3918
3919         di->dcerpc_procedure_name="OpenHKCC";
3920         offset = winreg_dissect_element_OpenHKCC_handle(tvb, offset, pinfo, tree, di, drep);
3921         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
3922
3923         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_winreg_werror, &status);
3924
3925         if (status != 0)
3926                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
3927
3928         return offset;
3929 }
3930
3931 static int
3932 winreg_dissect_OpenHKCC_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3933 {
3934         di->dcerpc_procedure_name="OpenHKCC";
3935         offset = winreg_dissect_element_OpenHKCC_system_name(tvb, offset, pinfo, tree, di, drep);
3936         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
3937         offset = winreg_dissect_element_OpenHKCC_access_mask(tvb, offset, pinfo, tree, di, drep);
3938         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
3939         return offset;
3940 }
3941
3942 static int
3943 winreg_dissect_element_OpenHKDD_system_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3944 {
3945         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_OpenHKDD_system_name_, NDR_POINTER_UNIQUE, "Pointer to System Name (uint16)",hf_winreg_system_name);
3946
3947         return offset;
3948 }
3949
3950 static int
3951 winreg_dissect_element_OpenHKDD_system_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3952 {
3953         offset = PIDL_dissect_uint16(tvb, offset, pinfo, tree, di, drep, hf_winreg_system_name, 0);
3954
3955         return offset;
3956 }
3957
3958 static int
3959 winreg_dissect_element_OpenHKDD_access_mask(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3960 {
3961         offset = winreg_dissect_bitmap_AccessMask(tvb, offset, pinfo, tree, di, drep, hf_winreg_access_mask, 0);
3962
3963         return offset;
3964 }
3965
3966 static int
3967 winreg_dissect_element_OpenHKDD_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3968 {
3969         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_OpenHKDD_handle_, NDR_POINTER_REF, "Pointer to Handle (policy_handle)",hf_winreg_handle);
3970
3971         return offset;
3972 }
3973
3974 static int
3975 winreg_dissect_element_OpenHKDD_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3976 {
3977         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, di, drep, hf_winreg_handle, PIDL_POLHND_OPEN);
3978
3979         return offset;
3980 }
3981
3982 /* IDL: WERROR winreg_OpenHKDD( */
3983 /* IDL: [unique(1)] [in] uint16 *system_name, */
3984 /* IDL: [in] winreg_AccessMask access_mask, */
3985 /* IDL: [out] [ref] policy_handle *handle */
3986 /* IDL: ); */
3987
3988 static int
3989 winreg_dissect_OpenHKDD_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
3990 {
3991         guint32 status;
3992
3993         di->dcerpc_procedure_name="OpenHKDD";
3994         offset = winreg_dissect_element_OpenHKDD_handle(tvb, offset, pinfo, tree, di, drep);
3995         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
3996
3997         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_winreg_werror, &status);
3998
3999         if (status != 0)
4000                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
4001
4002         return offset;
4003 }
4004
4005 static int
4006 winreg_dissect_OpenHKDD_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
4007 {
4008         di->dcerpc_procedure_name="OpenHKDD";
4009         offset = winreg_dissect_element_OpenHKDD_system_name(tvb, offset, pinfo, tree, di, drep);
4010         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
4011         offset = winreg_dissect_element_OpenHKDD_access_mask(tvb, offset, pinfo, tree, di, drep);
4012         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
4013         return offset;
4014 }
4015
4016 static int
4017 winreg_dissect_element_QueryMultipleValues_key_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
4018 {
4019         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_QueryMultipleValues_key_handle_, NDR_POINTER_REF, "Pointer to Key Handle (policy_handle)",hf_winreg_winreg_QueryMultipleValues_key_handle);
4020
4021         return offset;
4022 }
4023
4024 static int
4025 winreg_dissect_element_QueryMultipleValues_key_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
4026 {
4027         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, di, drep, hf_winreg_winreg_QueryMultipleValues_key_handle, 0);
4028
4029         return offset;
4030 }
4031
4032 static int
4033 winreg_dissect_element_QueryMultipleValues_values_in(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
4034 {
4035         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_QueryMultipleValues_values_in_, NDR_POINTER_REF, "Pointer to Values In (QueryMultipleValue)",hf_winreg_winreg_QueryMultipleValues_values_in);
4036
4037         return offset;
4038 }
4039
4040 static int
4041 winreg_dissect_element_QueryMultipleValues_values_in_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
4042 {
4043         offset = dissect_ndr_ucvarray(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_QueryMultipleValues_values_in__);
4044
4045         return offset;
4046 }
4047
4048 static int
4049 winreg_dissect_element_QueryMultipleValues_values_in__(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
4050 {
4051         offset = winreg_dissect_struct_QueryMultipleValue(tvb,offset,pinfo,tree,di,drep,hf_winreg_winreg_QueryMultipleValues_values_in,0);
4052
4053         return offset;
4054 }
4055
4056 static int
4057 winreg_dissect_element_QueryMultipleValues_values_out(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
4058 {
4059         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_QueryMultipleValues_values_out_, NDR_POINTER_REF, "Pointer to Values Out (QueryMultipleValue)",hf_winreg_winreg_QueryMultipleValues_values_out);
4060
4061         return offset;
4062 }
4063
4064 static int
4065 winreg_dissect_element_QueryMultipleValues_values_out_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
4066 {
4067         offset = dissect_ndr_ucvarray(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_QueryMultipleValues_values_out__);
4068
4069         return offset;
4070 }
4071
4072 static int
4073 winreg_dissect_element_QueryMultipleValues_values_out__(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
4074 {
4075         offset = winreg_dissect_struct_QueryMultipleValue(tvb,offset,pinfo,tree,di,drep,hf_winreg_winreg_QueryMultipleValues_values_out,0);
4076
4077         return offset;
4078 }
4079
4080 static int
4081 winreg_dissect_element_QueryMultipleValues_num_values(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
4082 {
4083         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, di, drep, hf_winreg_winreg_QueryMultipleValues_num_values, 0);
4084
4085         return offset;
4086 }
4087
4088 static int
4089 winreg_dissect_element_QueryMultipleValues_buffer(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
4090 {
4091         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_QueryMultipleValues_buffer_, NDR_POINTER_UNIQUE, "Pointer to Buffer (uint8)",hf_winreg_winreg_QueryMultipleValues_buffer);
4092
4093         return offset;
4094 }
4095
4096 static int
4097 winreg_dissect_element_QueryMultipleValues_buffer_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
4098 {
4099         offset = dissect_ndr_ucvarray(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_QueryMultipleValues_buffer__);
4100
4101         return offset;
4102 }
4103
4104 static int
4105 winreg_dissect_element_QueryMultipleValues_buffer__(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
4106 {
4107         offset = PIDL_dissect_uint8(tvb, offset, pinfo, tree, di, drep, hf_winreg_winreg_QueryMultipleValues_buffer, 0);
4108
4109         return offset;
4110 }
4111
4112 static int
4113 winreg_dissect_element_QueryMultipleValues_buffer_size(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
4114 {
4115         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_QueryMultipleValues_buffer_size_, NDR_POINTER_REF, "Pointer to Buffer Size (uint32)",hf_winreg_winreg_QueryMultipleValues_buffer_size);
4116
4117         return offset;
4118 }
4119
4120 static int
4121 winreg_dissect_element_QueryMultipleValues_buffer_size_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
4122 {
4123         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, di, drep, hf_winreg_winreg_QueryMultipleValues_buffer_size, 0);
4124
4125         return offset;
4126 }
4127
4128 /* IDL: WERROR winreg_QueryMultipleValues( */
4129 /* IDL: [in] [ref] policy_handle *key_handle, */
4130 /* IDL: [in] [ref] [length_is(num_values)] [size_is(num_values)] QueryMultipleValue *values_in, */
4131 /* IDL: [out] [ref] [length_is(num_values)] [size_is(num_values)] QueryMultipleValue *values_out, */
4132 /* IDL: [in] uint32 num_values, */
4133 /* IDL: [out] [unique(1)] [in] [length_is(*buffer_size)] [size_is(*buffer_size)] uint8 *buffer, */
4134 /* IDL: [out] [in] [ref] uint32 *buffer_size */
4135 /* IDL: ); */
4136
4137 static int
4138 winreg_dissect_QueryMultipleValues_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
4139 {
4140         guint32 status;
4141
4142         di->dcerpc_procedure_name="QueryMultipleValues";
4143         offset = winreg_dissect_element_QueryMultipleValues_values_out(tvb, offset, pinfo, tree, di, drep);
4144         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
4145
4146         offset = winreg_dissect_element_QueryMultipleValues_buffer(tvb, offset, pinfo, tree, di, drep);
4147         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
4148
4149         offset = winreg_dissect_element_QueryMultipleValues_buffer_size(tvb, offset, pinfo, tree, di, drep);
4150         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
4151
4152         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_winreg_werror, &status);
4153
4154         if (status != 0)
4155                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
4156
4157         return offset;
4158 }
4159
4160 static int
4161 winreg_dissect_QueryMultipleValues_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
4162 {
4163         di->dcerpc_procedure_name="QueryMultipleValues";
4164         offset = winreg_dissect_element_QueryMultipleValues_key_handle(tvb, offset, pinfo, tree, di, drep);
4165         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
4166         offset = winreg_dissect_element_QueryMultipleValues_values_in(tvb, offset, pinfo, tree, di, drep);
4167         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
4168         offset = winreg_dissect_element_QueryMultipleValues_num_values(tvb, offset, pinfo, tree, di, drep);
4169         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
4170         offset = winreg_dissect_element_QueryMultipleValues_buffer(tvb, offset, pinfo, tree, di, drep);
4171         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
4172         offset = winreg_dissect_element_QueryMultipleValues_buffer_size(tvb, offset, pinfo, tree, di, drep);
4173         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
4174         return offset;
4175 }
4176
4177 static int
4178 winreg_dissect_element_InitiateSystemShutdownEx_hostname(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
4179 {
4180         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_InitiateSystemShutdownEx_hostname_, NDR_POINTER_UNIQUE, "Pointer to Hostname (uint16)",hf_winreg_winreg_InitiateSystemShutdownEx_hostname);
4181
4182         return offset;
4183 }
4184
4185 static int
4186 winreg_dissect_element_InitiateSystemShutdownEx_hostname_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
4187 {
4188         offset = PIDL_dissect_uint16(tvb, offset, pinfo, tree, di, drep, hf_winreg_winreg_InitiateSystemShutdownEx_hostname, 0);
4189
4190         return offset;
4191 }
4192
4193 static int
4194 winreg_dissect_element_InitiateSystemShutdownEx_message(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
4195 {
4196         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_InitiateSystemShutdownEx_message_, NDR_POINTER_UNIQUE, "Pointer to Message (lsa_StringLarge)",hf_winreg_winreg_InitiateSystemShutdownEx_message);
4197
4198         return offset;
4199 }
4200
4201 static int
4202 winreg_dissect_element_InitiateSystemShutdownEx_message_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
4203 {
4204         offset=lsarpc_dissect_struct_lsa_StringLarge(tvb, offset, pinfo, tree, di, drep, hf_winreg_winreg_InitiateSystemShutdownEx_message, 0);
4205
4206         return offset;
4207 }
4208
4209 static int
4210 winreg_dissect_element_InitiateSystemShutdownEx_timeout(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
4211 {
4212         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, di, drep, hf_winreg_winreg_InitiateSystemShutdownEx_timeout, 0);
4213
4214         return offset;
4215 }
4216
4217 static int
4218 winreg_dissect_element_InitiateSystemShutdownEx_force_apps(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
4219 {
4220         offset = PIDL_dissect_uint8(tvb, offset, pinfo, tree, di, drep, hf_winreg_winreg_InitiateSystemShutdownEx_force_apps, 0);
4221
4222         return offset;
4223 }
4224
4225 static int
4226 winreg_dissect_element_InitiateSystemShutdownEx_do_reboot(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
4227 {
4228         offset = PIDL_dissect_uint8(tvb, offset, pinfo, tree, di, drep, hf_winreg_winreg_InitiateSystemShutdownEx_do_reboot, 0);
4229
4230         return offset;
4231 }
4232
4233 static int
4234 winreg_dissect_element_InitiateSystemShutdownEx_reason(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
4235 {
4236         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, di, drep, hf_winreg_winreg_InitiateSystemShutdownEx_reason, 0);
4237
4238         return offset;
4239 }
4240
4241 /* IDL: WERROR winreg_InitiateSystemShutdownEx( */
4242 /* IDL: [unique(1)] [in] uint16 *hostname, */
4243 /* IDL: [unique(1)] [in] lsa_StringLarge *message, */
4244 /* IDL: [in] uint32 timeout, */
4245 /* IDL: [in] uint8 force_apps, */
4246 /* IDL: [in] uint8 do_reboot, */
4247 /* IDL: [in] uint32 reason */
4248 /* IDL: ); */
4249
4250 static int
4251 winreg_dissect_InitiateSystemShutdownEx_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
4252 {
4253         guint32 status;
4254
4255         di->dcerpc_procedure_name="InitiateSystemShutdownEx";
4256         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_winreg_werror, &status);
4257
4258         if (status != 0)
4259                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
4260
4261         return offset;
4262 }
4263
4264 static int
4265 winreg_dissect_InitiateSystemShutdownEx_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
4266 {
4267         di->dcerpc_procedure_name="InitiateSystemShutdownEx";
4268         offset = winreg_dissect_element_InitiateSystemShutdownEx_hostname(tvb, offset, pinfo, tree, di, drep);
4269         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
4270         offset = winreg_dissect_element_InitiateSystemShutdownEx_message(tvb, offset, pinfo, tree, di, drep);
4271         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
4272         offset = winreg_dissect_element_InitiateSystemShutdownEx_timeout(tvb, offset, pinfo, tree, di, drep);
4273         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
4274         offset = winreg_dissect_element_InitiateSystemShutdownEx_force_apps(tvb, offset, pinfo, tree, di, drep);
4275         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
4276         offset = winreg_dissect_element_InitiateSystemShutdownEx_do_reboot(tvb, offset, pinfo, tree, di, drep);
4277         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
4278         offset = winreg_dissect_element_InitiateSystemShutdownEx_reason(tvb, offset, pinfo, tree, di, drep);
4279         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
4280         return offset;
4281 }
4282
4283 static int
4284 winreg_dissect_element_SaveKeyEx_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
4285 {
4286         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_SaveKeyEx_handle_, NDR_POINTER_REF, "Pointer to Handle (policy_handle)",hf_winreg_winreg_SaveKeyEx_handle);
4287
4288         return offset;
4289 }
4290
4291 static int
4292 winreg_dissect_element_SaveKeyEx_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
4293 {
4294         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, di, drep, hf_winreg_winreg_SaveKeyEx_handle, 0);
4295
4296         return offset;
4297 }
4298
4299 static int
4300 winreg_dissect_element_SaveKeyEx_filename(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
4301 {
4302         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_SaveKeyEx_filename_, NDR_POINTER_REF, "Pointer to Filename (winreg_String)",hf_winreg_winreg_SaveKeyEx_filename);
4303
4304         return offset;
4305 }
4306
4307 static int
4308 winreg_dissect_element_SaveKeyEx_filename_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
4309 {
4310         offset=cnf_dissect_winreg_String(tvb, offset, pinfo, tree, di, drep, 0, hf_winreg_winreg_SaveKeyEx_filename);
4311
4312         return offset;
4313 }
4314
4315 static int
4316 winreg_dissect_element_SaveKeyEx_sec_attrib(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
4317 {
4318         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_SaveKeyEx_sec_attrib_, NDR_POINTER_UNIQUE, "Pointer to Sec Attrib (KeySecurityAttribute)",hf_winreg_winreg_SaveKeyEx_sec_attrib);
4319
4320         return offset;
4321 }
4322
4323 static int
4324 winreg_dissect_element_SaveKeyEx_sec_attrib_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
4325 {
4326         offset = winreg_dissect_struct_KeySecurityAttribute(tvb,offset,pinfo,tree,di,drep,hf_winreg_winreg_SaveKeyEx_sec_attrib,0);
4327
4328         return offset;
4329 }
4330
4331 static int
4332 winreg_dissect_element_SaveKeyEx_flags(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
4333 {
4334         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, di, drep, hf_winreg_winreg_SaveKeyEx_flags, 0);
4335
4336         return offset;
4337 }
4338
4339 /* IDL: WERROR winreg_SaveKeyEx( */
4340 /* IDL: [in] [ref] policy_handle *handle, */
4341 /* IDL: [in] [ref] winreg_String *filename, */
4342 /* IDL: [unique(1)] [in] KeySecurityAttribute *sec_attrib, */
4343 /* IDL: [in] uint32 flags */
4344 /* IDL: ); */
4345
4346 static int
4347 winreg_dissect_SaveKeyEx_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
4348 {
4349         guint32 status;
4350
4351         di->dcerpc_procedure_name="SaveKeyEx";
4352         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_winreg_werror, &status);
4353
4354         if (status != 0)
4355                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
4356
4357         return offset;
4358 }
4359
4360 static int
4361 winreg_dissect_SaveKeyEx_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
4362 {
4363         di->dcerpc_procedure_name="SaveKeyEx";
4364         offset = winreg_dissect_element_SaveKeyEx_handle(tvb, offset, pinfo, tree, di, drep);
4365         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
4366         offset = winreg_dissect_element_SaveKeyEx_filename(tvb, offset, pinfo, tree, di, drep);
4367         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
4368         offset = winreg_dissect_element_SaveKeyEx_sec_attrib(tvb, offset, pinfo, tree, di, drep);
4369         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
4370         offset = winreg_dissect_element_SaveKeyEx_flags(tvb, offset, pinfo, tree, di, drep);
4371         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
4372         return offset;
4373 }
4374
4375 static int
4376 winreg_dissect_element_OpenHKPT_system_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
4377 {
4378         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_OpenHKPT_system_name_, NDR_POINTER_UNIQUE, "Pointer to System Name (uint16)",hf_winreg_system_name);
4379
4380         return offset;
4381 }
4382
4383 static int
4384 winreg_dissect_element_OpenHKPT_system_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
4385 {
4386         offset = PIDL_dissect_uint16(tvb, offset, pinfo, tree, di, drep, hf_winreg_system_name, 0);
4387
4388         return offset;
4389 }
4390
4391 static int
4392 winreg_dissect_element_OpenHKPT_access_mask(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
4393 {
4394         offset = winreg_dissect_bitmap_AccessMask(tvb, offset, pinfo, tree, di, drep, hf_winreg_access_mask, 0);
4395
4396         return offset;
4397 }
4398
4399 static int
4400 winreg_dissect_element_OpenHKPT_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
4401 {
4402         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_OpenHKPT_handle_, NDR_POINTER_REF, "Pointer to Handle (policy_handle)",hf_winreg_handle);
4403
4404         return offset;
4405 }
4406
4407 static int
4408 winreg_dissect_element_OpenHKPT_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
4409 {
4410         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, di, drep, hf_winreg_handle, PIDL_POLHND_OPEN);
4411
4412         return offset;
4413 }
4414
4415 /* IDL: WERROR winreg_OpenHKPT( */
4416 /* IDL: [unique(1)] [in] uint16 *system_name, */
4417 /* IDL: [in] winreg_AccessMask access_mask, */
4418 /* IDL: [out] [ref] policy_handle *handle */
4419 /* IDL: ); */
4420
4421 static int
4422 winreg_dissect_OpenHKPT_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
4423 {
4424         guint32 status;
4425
4426         di->dcerpc_procedure_name="OpenHKPT";
4427         offset = winreg_dissect_element_OpenHKPT_handle(tvb, offset, pinfo, tree, di, drep);
4428         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
4429
4430         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_winreg_werror, &status);
4431
4432         if (status != 0)
4433                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
4434
4435         return offset;
4436 }
4437
4438 static int
4439 winreg_dissect_OpenHKPT_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
4440 {
4441         di->dcerpc_procedure_name="OpenHKPT";
4442         offset = winreg_dissect_element_OpenHKPT_system_name(tvb, offset, pinfo, tree, di, drep);
4443         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
4444         offset = winreg_dissect_element_OpenHKPT_access_mask(tvb, offset, pinfo, tree, di, drep);
4445         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
4446         return offset;
4447 }
4448
4449 static int
4450 winreg_dissect_element_OpenHKPN_system_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
4451 {
4452         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_OpenHKPN_system_name_, NDR_POINTER_UNIQUE, "Pointer to System Name (uint16)",hf_winreg_system_name);
4453
4454         return offset;
4455 }
4456
4457 static int
4458 winreg_dissect_element_OpenHKPN_system_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
4459 {
4460         offset = PIDL_dissect_uint16(tvb, offset, pinfo, tree, di, drep, hf_winreg_system_name, 0);
4461
4462         return offset;
4463 }
4464
4465 static int
4466 winreg_dissect_element_OpenHKPN_access_mask(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
4467 {
4468         offset = winreg_dissect_bitmap_AccessMask(tvb, offset, pinfo, tree, di, drep, hf_winreg_access_mask, 0);
4469
4470         return offset;
4471 }
4472
4473 static int
4474 winreg_dissect_element_OpenHKPN_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
4475 {
4476         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_OpenHKPN_handle_, NDR_POINTER_REF, "Pointer to Handle (policy_handle)",hf_winreg_handle);
4477
4478         return offset;
4479 }
4480
4481 static int
4482 winreg_dissect_element_OpenHKPN_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
4483 {
4484         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, di, drep, hf_winreg_handle, PIDL_POLHND_OPEN);
4485
4486         return offset;
4487 }
4488
4489 /* IDL: WERROR winreg_OpenHKPN( */
4490 /* IDL: [unique(1)] [in] uint16 *system_name, */
4491 /* IDL: [in] winreg_AccessMask access_mask, */
4492 /* IDL: [out] [ref] policy_handle *handle */
4493 /* IDL: ); */
4494
4495 static int
4496 winreg_dissect_OpenHKPN_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
4497 {
4498         guint32 status;
4499
4500         di->dcerpc_procedure_name="OpenHKPN";
4501         offset = winreg_dissect_element_OpenHKPN_handle(tvb, offset, pinfo, tree, di, drep);
4502         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
4503
4504         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_winreg_werror, &status);
4505
4506         if (status != 0)
4507                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
4508
4509         return offset;
4510 }
4511
4512 static int
4513 winreg_dissect_OpenHKPN_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
4514 {
4515         di->dcerpc_procedure_name="OpenHKPN";
4516         offset = winreg_dissect_element_OpenHKPN_system_name(tvb, offset, pinfo, tree, di, drep);
4517         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
4518         offset = winreg_dissect_element_OpenHKPN_access_mask(tvb, offset, pinfo, tree, di, drep);
4519         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
4520         return offset;
4521 }
4522
4523 static int
4524 winreg_dissect_element_QueryMultipleValues2_key_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
4525 {
4526         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_QueryMultipleValues2_key_handle_, NDR_POINTER_REF, "Pointer to Key Handle (policy_handle)",hf_winreg_winreg_QueryMultipleValues2_key_handle);
4527
4528         return offset;
4529 }
4530
4531 static int
4532 winreg_dissect_element_QueryMultipleValues2_key_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
4533 {
4534         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, di, drep, hf_winreg_winreg_QueryMultipleValues2_key_handle, 0);
4535
4536         return offset;
4537 }
4538
4539 static int
4540 winreg_dissect_element_QueryMultipleValues2_values_in(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
4541 {
4542         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_QueryMultipleValues2_values_in_, NDR_POINTER_REF, "Pointer to Values In (QueryMultipleValue)",hf_winreg_winreg_QueryMultipleValues2_values_in);
4543
4544         return offset;
4545 }
4546
4547 static int
4548 winreg_dissect_element_QueryMultipleValues2_values_in_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
4549 {
4550         offset = dissect_ndr_ucvarray(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_QueryMultipleValues2_values_in__);
4551
4552         return offset;
4553 }
4554
4555 static int
4556 winreg_dissect_element_QueryMultipleValues2_values_in__(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
4557 {
4558         offset = winreg_dissect_struct_QueryMultipleValue(tvb,offset,pinfo,tree,di,drep,hf_winreg_winreg_QueryMultipleValues2_values_in,0);
4559
4560         return offset;
4561 }
4562
4563 static int
4564 winreg_dissect_element_QueryMultipleValues2_values_out(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
4565 {
4566         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_QueryMultipleValues2_values_out_, NDR_POINTER_REF, "Pointer to Values Out (QueryMultipleValue)",hf_winreg_winreg_QueryMultipleValues2_values_out);
4567
4568         return offset;
4569 }
4570
4571 static int
4572 winreg_dissect_element_QueryMultipleValues2_values_out_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
4573 {
4574         offset = dissect_ndr_ucvarray(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_QueryMultipleValues2_values_out__);
4575
4576         return offset;
4577 }
4578
4579 static int
4580 winreg_dissect_element_QueryMultipleValues2_values_out__(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
4581 {
4582         offset = winreg_dissect_struct_QueryMultipleValue(tvb,offset,pinfo,tree,di,drep,hf_winreg_winreg_QueryMultipleValues2_values_out,0);
4583
4584         return offset;
4585 }
4586
4587 static int
4588 winreg_dissect_element_QueryMultipleValues2_num_values(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
4589 {
4590         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, di, drep, hf_winreg_winreg_QueryMultipleValues2_num_values, 0);
4591
4592         return offset;
4593 }
4594
4595 static int
4596 winreg_dissect_element_QueryMultipleValues2_buffer(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
4597 {
4598         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_QueryMultipleValues2_buffer_, NDR_POINTER_UNIQUE, "Pointer to Buffer (uint8)",hf_winreg_winreg_QueryMultipleValues2_buffer);
4599
4600         return offset;
4601 }
4602
4603 static int
4604 winreg_dissect_element_QueryMultipleValues2_buffer_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
4605 {
4606         offset = dissect_ndr_ucvarray(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_QueryMultipleValues2_buffer__);
4607
4608         return offset;
4609 }
4610
4611 static int
4612 winreg_dissect_element_QueryMultipleValues2_buffer__(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
4613 {
4614         offset = PIDL_dissect_uint8(tvb, offset, pinfo, tree, di, drep, hf_winreg_winreg_QueryMultipleValues2_buffer, 0);
4615
4616         return offset;
4617 }
4618
4619 static int
4620 winreg_dissect_element_QueryMultipleValues2_offered(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
4621 {
4622         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_QueryMultipleValues2_offered_, NDR_POINTER_REF, "Pointer to Offered (uint32)",hf_winreg_winreg_QueryMultipleValues2_offered);
4623
4624         return offset;
4625 }
4626
4627 static int
4628 winreg_dissect_element_QueryMultipleValues2_offered_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
4629 {
4630         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, di, drep, hf_winreg_winreg_QueryMultipleValues2_offered, 0);
4631
4632         return offset;
4633 }
4634
4635 static int
4636 winreg_dissect_element_QueryMultipleValues2_needed(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
4637 {
4638         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_QueryMultipleValues2_needed_, NDR_POINTER_REF, "Pointer to Needed (uint32)",hf_winreg_winreg_QueryMultipleValues2_needed);
4639
4640         return offset;
4641 }
4642
4643 static int
4644 winreg_dissect_element_QueryMultipleValues2_needed_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
4645 {
4646         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, di, drep, hf_winreg_winreg_QueryMultipleValues2_needed, 0);
4647
4648         return offset;
4649 }
4650
4651 /* IDL: WERROR winreg_QueryMultipleValues2( */
4652 /* IDL: [in] [ref] policy_handle *key_handle, */
4653 /* IDL: [in] [ref] [length_is(num_values)] [size_is(num_values)] QueryMultipleValue *values_in, */
4654 /* IDL: [out] [ref] [length_is(num_values)] [size_is(num_values)] QueryMultipleValue *values_out, */
4655 /* IDL: [in] uint32 num_values, */
4656 /* IDL: [out] [unique(1)] [in] [length_is(*offered)] [size_is(*offered)] uint8 *buffer, */
4657 /* IDL: [in] [ref] uint32 *offered, */
4658 /* IDL: [out] [ref] uint32 *needed */
4659 /* IDL: ); */
4660
4661 static int
4662 winreg_dissect_QueryMultipleValues2_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
4663 {
4664         guint32 status;
4665
4666         di->dcerpc_procedure_name="QueryMultipleValues2";
4667         offset = winreg_dissect_element_QueryMultipleValues2_values_out(tvb, offset, pinfo, tree, di, drep);
4668         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
4669
4670         offset = winreg_dissect_element_QueryMultipleValues2_buffer(tvb, offset, pinfo, tree, di, drep);
4671         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
4672
4673         offset = winreg_dissect_element_QueryMultipleValues2_needed(tvb, offset, pinfo, tree, di, drep);
4674         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
4675
4676         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_winreg_werror, &status);
4677
4678         if (status != 0)
4679                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
4680
4681         return offset;
4682 }
4683
4684 static int
4685 winreg_dissect_QueryMultipleValues2_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
4686 {
4687         di->dcerpc_procedure_name="QueryMultipleValues2";
4688         offset = winreg_dissect_element_QueryMultipleValues2_key_handle(tvb, offset, pinfo, tree, di, drep);
4689         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
4690         offset = winreg_dissect_element_QueryMultipleValues2_values_in(tvb, offset, pinfo, tree, di, drep);
4691         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
4692         offset = winreg_dissect_element_QueryMultipleValues2_num_values(tvb, offset, pinfo, tree, di, drep);
4693         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
4694         offset = winreg_dissect_element_QueryMultipleValues2_buffer(tvb, offset, pinfo, tree, di, drep);
4695         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
4696         offset = winreg_dissect_element_QueryMultipleValues2_offered(tvb, offset, pinfo, tree, di, drep);
4697         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
4698         return offset;
4699 }
4700
4701 static int
4702 winreg_dissect_element_DeleteKeyEx_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
4703 {
4704         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_DeleteKeyEx_handle_, NDR_POINTER_REF, "Pointer to Handle (policy_handle)",hf_winreg_winreg_DeleteKeyEx_handle);
4705
4706         return offset;
4707 }
4708
4709 static int
4710 winreg_dissect_element_DeleteKeyEx_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
4711 {
4712         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, di, drep, hf_winreg_winreg_DeleteKeyEx_handle, 0);
4713
4714         return offset;
4715 }
4716
4717 static int
4718 winreg_dissect_element_DeleteKeyEx_key(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
4719 {
4720         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, winreg_dissect_element_DeleteKeyEx_key_, NDR_POINTER_REF, "Pointer to Key (winreg_String)",hf_winreg_winreg_DeleteKeyEx_key);
4721
4722         return offset;
4723 }
4724
4725 static int
4726 winreg_dissect_element_DeleteKeyEx_key_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
4727 {
4728         offset=cnf_dissect_winreg_String(tvb, offset, pinfo, tree, di, drep, 0, hf_winreg_winreg_DeleteKeyEx_key);
4729
4730         return offset;
4731 }
4732
4733 static int
4734 winreg_dissect_element_DeleteKeyEx_access_mask(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
4735 {
4736         offset = winreg_dissect_bitmap_AccessMask(tvb, offset, pinfo, tree, di, drep, hf_winreg_winreg_DeleteKeyEx_access_mask, 0);
4737
4738         return offset;
4739 }
4740
4741 static int
4742 winreg_dissect_element_DeleteKeyEx_reserved(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
4743 {
4744         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, di, drep, hf_winreg_winreg_DeleteKeyEx_reserved, 0);
4745
4746         return offset;
4747 }
4748
4749 /* IDL: WERROR winreg_DeleteKeyEx( */
4750 /* IDL: [in] [ref] policy_handle *handle, */
4751 /* IDL: [in] [ref] winreg_String *key, */
4752 /* IDL: [in] winreg_AccessMask access_mask, */
4753 /* IDL: [in] uint32 reserved */
4754 /* IDL: ); */
4755
4756 static int
4757 winreg_dissect_DeleteKeyEx_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
4758 {
4759         guint32 status;
4760
4761         di->dcerpc_procedure_name="DeleteKeyEx";
4762         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_winreg_werror, &status);
4763
4764         if (status != 0)
4765                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
4766
4767         return offset;
4768 }
4769
4770 static int
4771 winreg_dissect_DeleteKeyEx_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
4772 {
4773         di->dcerpc_procedure_name="DeleteKeyEx";
4774         offset = winreg_dissect_element_DeleteKeyEx_handle(tvb, offset, pinfo, tree, di, drep);
4775         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
4776         offset = winreg_dissect_element_DeleteKeyEx_key(tvb, offset, pinfo, tree, di, drep);
4777         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
4778         offset = winreg_dissect_element_DeleteKeyEx_access_mask(tvb, offset, pinfo, tree, di, drep);
4779         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
4780         offset = winreg_dissect_element_DeleteKeyEx_reserved(tvb, offset, pinfo, tree, di, drep);
4781         offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
4782         return offset;
4783 }
4784
4785
4786 static dcerpc_sub_dissector winreg_dissectors[] = {
4787         { 0, "OpenHKCR",
4788            winreg_dissect_OpenHKCR_request, winreg_dissect_OpenHKCR_response},
4789         { 1, "OpenHKCU",
4790            winreg_dissect_OpenHKCU_request, winreg_dissect_OpenHKCU_response},
4791         { 2, "OpenHKLM",
4792            winreg_dissect_OpenHKLM_request, winreg_dissect_OpenHKLM_response},
4793         { 3, "OpenHKPD",
4794            winreg_dissect_OpenHKPD_request, winreg_dissect_OpenHKPD_response},
4795         { 4, "OpenHKU",
4796            winreg_dissect_OpenHKU_request, winreg_dissect_OpenHKU_response},
4797         { 5, "CloseKey",
4798            winreg_dissect_CloseKey_request, winreg_dissect_CloseKey_response},
4799         { 6, "CreateKey",
4800            winreg_dissect_CreateKey_request, winreg_dissect_CreateKey_response},
4801         { 7, "DeleteKey",
4802            winreg_dissect_DeleteKey_request, winreg_dissect_DeleteKey_response},
4803         { 8, "DeleteValue",
4804            winreg_dissect_DeleteValue_request, winreg_dissect_DeleteValue_response},
4805         { 9, "EnumKey",
4806            winreg_dissect_EnumKey_request, winreg_dissect_EnumKey_response},
4807         { 10, "EnumValue",
4808            winreg_dissect_EnumValue_request, winreg_dissect_EnumValue_response},
4809         { 11, "FlushKey",
4810            winreg_dissect_FlushKey_request, winreg_dissect_FlushKey_response},
4811         { 12, "GetKeySecurity",
4812            winreg_dissect_GetKeySecurity_request, winreg_dissect_GetKeySecurity_response},
4813         { 13, "LoadKey",
4814            winreg_dissect_LoadKey_request, winreg_dissect_LoadKey_response},
4815         { 14, "NotifyChangeKeyValue",
4816            winreg_dissect_NotifyChangeKeyValue_request, winreg_dissect_NotifyChangeKeyValue_response},
4817         { 15, "OpenKey",
4818            winreg_dissect_OpenKey_request, winreg_dissect_OpenKey_response},
4819         { 16, "QueryInfoKey",
4820            winreg_dissect_QueryInfoKey_request, winreg_dissect_QueryInfoKey_response},
4821         { 17, "QueryValue",
4822            winreg_dissect_QueryValue_request, winreg_dissect_QueryValue_response},
4823         { 18, "ReplaceKey",
4824            winreg_dissect_ReplaceKey_request, winreg_dissect_ReplaceKey_response},
4825         { 19, "RestoreKey",
4826            winreg_dissect_RestoreKey_request, winreg_dissect_RestoreKey_response},
4827         { 20, "SaveKey",
4828            winreg_dissect_SaveKey_request, winreg_dissect_SaveKey_response},
4829         { 21, "SetKeySecurity",
4830            winreg_dissect_SetKeySecurity_request, winreg_dissect_SetKeySecurity_response},
4831         { 22, "SetValue",
4832            winreg_dissect_SetValue_request, winreg_dissect_SetValue_response},
4833         { 23, "UnLoadKey",
4834            winreg_dissect_UnLoadKey_request, winreg_dissect_UnLoadKey_response},
4835         { 24, "InitiateSystemShutdown",
4836            winreg_dissect_InitiateSystemShutdown_request, winreg_dissect_InitiateSystemShutdown_response},
4837         { 25, "AbortSystemShutdown",
4838            winreg_dissect_AbortSystemShutdown_request, winreg_dissect_AbortSystemShutdown_response},
4839         { 26, "GetVersion",
4840            winreg_dissect_GetVersion_request, winreg_dissect_GetVersion_response},
4841         { 27, "OpenHKCC",
4842            winreg_dissect_OpenHKCC_request, winreg_dissect_OpenHKCC_response},
4843         { 28, "OpenHKDD",
4844            winreg_dissect_OpenHKDD_request, winreg_dissect_OpenHKDD_response},
4845         { 29, "QueryMultipleValues",
4846            winreg_dissect_QueryMultipleValues_request, winreg_dissect_QueryMultipleValues_response},
4847         { 30, "InitiateSystemShutdownEx",
4848            winreg_dissect_InitiateSystemShutdownEx_request, winreg_dissect_InitiateSystemShutdownEx_response},
4849         { 31, "SaveKeyEx",
4850            winreg_dissect_SaveKeyEx_request, winreg_dissect_SaveKeyEx_response},
4851         { 32, "OpenHKPT",
4852            winreg_dissect_OpenHKPT_request, winreg_dissect_OpenHKPT_response},
4853         { 33, "OpenHKPN",
4854            winreg_dissect_OpenHKPN_request, winreg_dissect_OpenHKPN_response},
4855         { 34, "QueryMultipleValues2",
4856            winreg_dissect_QueryMultipleValues2_request, winreg_dissect_QueryMultipleValues2_response},
4857         { 35, "DeleteKeyEx",
4858            winreg_dissect_DeleteKeyEx_request, winreg_dissect_DeleteKeyEx_response},
4859         { 0, NULL, NULL, NULL }
4860 };
4861
4862 void proto_register_dcerpc_winreg(void)
4863 {
4864         static hf_register_info hf[] = {
4865         { &hf_winreg_winreg_AccessMask_KEY_ENUMERATE_SUB_KEYS,
4866                 { "Key Enumerate Sub Keys", "winreg.winreg_AccessMask.KEY_ENUMERATE_SUB_KEYS", FT_BOOLEAN, 32, TFS(&winreg_AccessMask_KEY_ENUMERATE_SUB_KEYS_tfs), ( 0x00008 ), NULL, HFILL }},
4867         { &hf_winreg_winreg_NotifyChangeKeyValue_string2,
4868                 { "String2", "winreg.winreg_NotifyChangeKeyValue.string2", FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }},
4869         { &hf_winreg_winreg_InitiateSystemShutdown_message,
4870                 { "Message", "winreg.winreg_InitiateSystemShutdown.message", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
4871         { &hf_winreg_winreg_String_name,
4872                 { "Name", "winreg.winreg_String.name", FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }},
4873         { &hf_winreg_winreg_InitiateSystemShutdownEx_message,
4874                 { "Message", "winreg.winreg_InitiateSystemShutdownEx.message", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
4875         { &hf_winreg_winreg_EnumValue_enum_index,
4876                 { "Enum Index", "winreg.winreg_EnumValue.enum_index", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
4877         { &hf_winreg_access_mask,
4878                 { "Access Mask", "winreg.access_mask", FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL }},
4879         { &hf_winreg_winreg_CreateKey_options,
4880                 { "Options", "winreg.winreg_CreateKey.options", FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL }},
4881         { &hf_winreg_winreg_InitiateSystemShutdownEx_timeout,
4882                 { "Timeout", "winreg.winreg_InitiateSystemShutdownEx.timeout", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
4883         { &hf_winreg_handle,
4884                 { "Handle", "winreg.handle", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
4885         { &hf_winreg_winreg_QueryInfoKey_max_valnamelen,
4886                 { "Max Valnamelen", "winreg.winreg_QueryInfoKey.max_valnamelen", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
4887         { &hf_winreg_winreg_SecBuf_length,
4888                 { "Length", "winreg.winreg_SecBuf.length", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
4889         { &hf_winreg_winreg_InitiateSystemShutdown_do_reboot,
4890                 { "Do Reboot", "winreg.winreg_InitiateSystemShutdown.do_reboot", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
4891         { &hf_winreg_winreg_DeleteKeyEx_handle,
4892                 { "Handle", "winreg.winreg_DeleteKeyEx.handle", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
4893         { &hf_winreg_winreg_QueryMultipleValues_buffer_size,
4894                 { "Buffer Size", "winreg.winreg_QueryMultipleValues.buffer_size", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
4895         { &hf_winreg_winreg_CreateKey_new_handle,
4896                 { "New Handle", "winreg.winreg_CreateKey.new_handle", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
4897         { &hf_winreg_winreg_QueryMultipleValues2_needed,
4898                 { "Needed", "winreg.winreg_QueryMultipleValues2.needed", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
4899         { &hf_winreg_QueryMultipleValue_ve_valuelen,
4900                 { "Ve Valuelen", "winreg.QueryMultipleValue.ve_valuelen", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
4901         { &hf_winreg_KeySecurityAttribute_sec_data,
4902                 { "Sec Data", "winreg.KeySecurityAttribute.sec_data", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
4903         { &hf_winreg_winreg_GetKeySecurity_sec_info,
4904                 { "Sec Info", "winreg.winreg_GetKeySecurity.sec_info", FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL }},
4905         { &hf_winreg_winreg_SaveKeyEx_handle,
4906                 { "Handle", "winreg.winreg_SaveKeyEx.handle", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
4907         { &hf_winreg_winreg_KeyOptions_REG_OPTION_VOLATILE,
4908                 { "Reg Option Volatile", "winreg.winreg_KeyOptions.REG_OPTION_VOLATILE", FT_BOOLEAN, 32, TFS(&winreg_KeyOptions_REG_OPTION_VOLATILE_tfs), ( 0x00000001 ), NULL, HFILL }},
4909         { &hf_winreg_winreg_QueryMultipleValues2_num_values,
4910                 { "Num Values", "winreg.winreg_QueryMultipleValues2.num_values", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
4911         { &hf_winreg_winreg_SetKeySecurity_sec_info,
4912                 { "Sec Info", "winreg.winreg_SetKeySecurity.sec_info", FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL }},
4913         { &hf_winreg_winreg_StringBuf_size,
4914                 { "Size", "winreg.winreg_StringBuf.size", FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
4915         { &hf_winreg_winreg_SecBuf_sd,
4916                 { "Sd", "winreg.winreg_SecBuf.sd", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
4917         { &hf_winreg_winreg_QueryInfoKey_secdescsize,
4918                 { "Secdescsize", "winreg.winreg_QueryInfoKey.secdescsize", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
4919         { &hf_winreg_winreg_NotifyChangeType_REG_NOTIFY_CHANGE_SECURITY,
4920                 { "Reg Notify Change Security", "winreg.winreg_NotifyChangeType.REG_NOTIFY_CHANGE_SECURITY", FT_BOOLEAN, 32, TFS(&winreg_NotifyChangeType_REG_NOTIFY_CHANGE_SECURITY_tfs), ( 0x00000008 ), NULL, HFILL }},
4921         { &hf_winreg_winreg_SetValue_name,
4922                 { "Name", "winreg.winreg_SetValue.name", FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }},
4923         { &hf_winreg_winreg_RestoreKey_flags,
4924                 { "Flags", "winreg.winreg_RestoreKey.flags", FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL }},
4925         { &hf_winreg_QueryMultipleValue_ve_type,
4926                 { "Ve Type", "winreg.QueryMultipleValue.ve_type", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
4927         { &hf_winreg_winreg_CreateKey_secdesc,
4928                 { "Secdesc", "winreg.winreg_CreateKey.secdesc", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
4929         { &hf_winreg_winreg_DeleteKeyEx_reserved,
4930                 { "Reserved", "winreg.winreg_DeleteKeyEx.reserved", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
4931         { &hf_winreg_winreg_InitiateSystemShutdownEx_force_apps,
4932                 { "Force Apps", "winreg.winreg_InitiateSystemShutdownEx.force_apps", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
4933         { &hf_winreg_winreg_SetValue_type,
4934                 { "Type", "winreg.winreg_SetValue.type", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
4935         { &hf_winreg_opnum,
4936                 { "Operation", "winreg.opnum", FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
4937         { &hf_winreg_winreg_EnumValue_name,
4938                 { "Name", "winreg.winreg_EnumValue.name", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
4939         { &hf_winreg_winreg_LoadKey_filename,
4940                 { "Filename", "winreg.winreg_LoadKey.filename", FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }},
4941         { &hf_winreg_winreg_AccessMask_KEY_CREATE_LINK,
4942                 { "Key Create Link", "winreg.winreg_AccessMask.KEY_CREATE_LINK", FT_BOOLEAN, 32, TFS(&winreg_AccessMask_KEY_CREATE_LINK_tfs), ( 0x00020 ), NULL, HFILL }},
4943         { &hf_winreg_winreg_DeleteValue_value,
4944                 { "Value", "winreg.winreg_DeleteValue.value", FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }},
4945         { &hf_winreg_winreg_QueryMultipleValues2_offered,
4946                 { "Offered", "winreg.winreg_QueryMultipleValues2.offered", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
4947         { &hf_winreg_winreg_QueryMultipleValues_values_in,
4948                 { "Values In", "winreg.winreg_QueryMultipleValues.values_in", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
4949         { &hf_winreg_winreg_AccessMask_KEY_NOTIFY,
4950                 { "Key Notify", "winreg.winreg_AccessMask.KEY_NOTIFY", FT_BOOLEAN, 32, TFS(&winreg_AccessMask_KEY_NOTIFY_tfs), ( 0x00010 ), NULL, HFILL }},
4951         { &hf_winreg_winreg_OpenKey_parent_handle,
4952                 { "Parent Handle", "winreg.winreg_OpenKey.parent_handle", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
4953         { &hf_winreg_winreg_QueryInfoKey_num_subkeys,
4954                 { "Num Subkeys", "winreg.winreg_QueryInfoKey.num_subkeys", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
4955         { &hf_winreg_winreg_AccessMask_KEY_WOW64_32KEY,
4956                 { "Key Wow64 32key", "winreg.winreg_AccessMask.KEY_WOW64_32KEY", FT_BOOLEAN, 32, TFS(&winreg_AccessMask_KEY_WOW64_32KEY_tfs), ( 0x00200 ), NULL, HFILL }},
4957         { &hf_winreg_winreg_SaveKeyEx_sec_attrib,
4958                 { "Sec Attrib", "winreg.winreg_SaveKeyEx.sec_attrib", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
4959         { &hf_winreg_winreg_QueryInfoKey_last_changed_time,
4960                 { "Last Changed Time", "winreg.winreg_QueryInfoKey.last_changed_time", FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0, NULL, HFILL }},
4961         { &hf_winreg_winreg_KeyOptions_REG_OPTION_OPEN_LINK,
4962                 { "Reg Option Open Link", "winreg.winreg_KeyOptions.REG_OPTION_OPEN_LINK", FT_BOOLEAN, 32, TFS(&winreg_KeyOptions_REG_OPTION_OPEN_LINK_tfs), ( 0x00000008 ), NULL, HFILL }},
4963         { &hf_winreg_winreg_OpenHKPD_access_mask,
4964                 { "Access Mask", "winreg.winreg_OpenHKPD.access_mask", FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL }},
4965         { &hf_winreg_winreg_AbortSystemShutdown_server,
4966                 { "Server", "winreg.winreg_AbortSystemShutdown.server", FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
4967         { &hf_winreg_winreg_QueryValue_type,
4968                 { "Type", "winreg.winreg_QueryValue.type", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
4969         { &hf_winreg_sd_actual_size,
4970                 { "Actual Size", "winreg.sd.actual_size", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
4971         { &hf_winreg_winreg_RestoreKeyFlags_REG_FORCE_RESTORE,
4972                 { "Reg Force Restore", "winreg.winreg_RestoreKeyFlags.REG_FORCE_RESTORE", FT_BOOLEAN, 32, TFS(&winreg_RestoreKeyFlags_REG_FORCE_RESTORE_tfs), ( 0x00000008 ), NULL, HFILL }},
4973         { &hf_winreg_winreg_SecBuf_inherit,
4974                 { "Inherit", "winreg.winreg_SecBuf.inherit", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
4975         { &hf_winreg_winreg_SetValue_size,
4976                 { "Size", "winreg.winreg_SetValue.size", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
4977         { &hf_winreg_winreg_SaveKey_handle,
4978                 { "Handle", "winreg.winreg_SaveKey.handle", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
4979         { &hf_winreg_winreg_NotifyChangeType_REG_NOTIFY_CHANGE_LAST_SET,
4980                 { "Reg Notify Change Last Set", "winreg.winreg_NotifyChangeType.REG_NOTIFY_CHANGE_LAST_SET", FT_BOOLEAN, 32, TFS(&winreg_NotifyChangeType_REG_NOTIFY_CHANGE_LAST_SET_tfs), ( 0x00000004 ), NULL, HFILL }},
4981         { &hf_winreg_winreg_ReplaceKey_handle,
4982                 { "Handle", "winreg.winreg_ReplaceKey.handle", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
4983         { &hf_winreg_winreg_GetVersion_version,
4984                 { "Version", "winreg.winreg_GetVersion.version", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
4985         { &hf_winreg_winreg_ReplaceKey_old_file,
4986                 { "Old File", "winreg.winreg_ReplaceKey.old_file", FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }},
4987         { &hf_winreg_winreg_AccessMask_KEY_QUERY_VALUE,
4988                 { "Key Query Value", "winreg.winreg_AccessMask.KEY_QUERY_VALUE", FT_BOOLEAN, 32, TFS(&winreg_AccessMask_KEY_QUERY_VALUE_tfs), ( 0x00001 ), NULL, HFILL }},
4989         { &hf_winreg_winreg_CreateKey_action_taken,
4990                 { "Action Taken", "winreg.winreg_CreateKey.action_taken", FT_UINT32, BASE_DEC, VALS(winreg_winreg_CreateAction_vals), 0, NULL, HFILL }},
4991         { &hf_winreg_winreg_QueryInfoKey_num_values,
4992                 { "Num Values", "winreg.winreg_QueryInfoKey.num_values", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
4993         { &hf_winreg_winreg_RestoreKeyFlags_REG_WHOLE_HIVE_VOLATILE,
4994                 { "Reg Whole Hive Volatile", "winreg.winreg_RestoreKeyFlags.REG_WHOLE_HIVE_VOLATILE", FT_BOOLEAN, 32, TFS(&winreg_RestoreKeyFlags_REG_WHOLE_HIVE_VOLATILE_tfs), ( 0x00000001 ), NULL, HFILL }},
4995         { &hf_winreg_winreg_NotifyChangeType_REG_NOTIFY_CHANGE_NAME,
4996                 { "Reg Notify Change Name", "winreg.winreg_NotifyChangeType.REG_NOTIFY_CHANGE_NAME", FT_BOOLEAN, 32, TFS(&winreg_NotifyChangeType_REG_NOTIFY_CHANGE_NAME_tfs), ( 0x00000001 ), NULL, HFILL }},
4997         { &hf_winreg_winreg_AccessMask_KEY_SET_VALUE,
4998                 { "Key Set Value", "winreg.winreg_AccessMask.KEY_SET_VALUE", FT_BOOLEAN, 32, TFS(&winreg_AccessMask_KEY_SET_VALUE_tfs), ( 0x00002 ), NULL, HFILL }},
4999         { &hf_winreg_winreg_EnumKey_enum_index,
5000                 { "Enum Index", "winreg.winreg_EnumKey.enum_index", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
5001         { &hf_winreg_winreg_RestoreKey_handle,
5002                 { "Handle", "winreg.winreg_RestoreKey.handle", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
5003         { &hf_winreg_winreg_SetValue_data,
5004                 { "Data", "winreg.winreg_SetValue.data", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
5005         { &hf_winreg_winreg_InitiateSystemShutdown_force_apps,
5006                 { "Force Apps", "winreg.winreg_InitiateSystemShutdown.force_apps", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
5007         { &hf_winreg_winreg_NotifyChangeKeyValue_string1,
5008                 { "String1", "winreg.winreg_NotifyChangeKeyValue.string1", FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }},
5009         { &hf_winreg_winreg_SaveKeyEx_flags,
5010                 { "Flags", "winreg.winreg_SaveKeyEx.flags", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
5011         { &hf_winreg_winreg_QueryMultipleValues_buffer,
5012                 { "Buffer", "winreg.winreg_QueryMultipleValues.buffer", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
5013         { &hf_winreg_winreg_QueryInfoKey_classname,
5014                 { "Classname", "winreg.winreg_QueryInfoKey.classname", FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }},
5015         { &hf_winreg_winreg_AccessMask_KEY_WOW64_64KEY,
5016                 { "Key Wow64 64key", "winreg.winreg_AccessMask.KEY_WOW64_64KEY", FT_BOOLEAN, 32, TFS(&winreg_AccessMask_KEY_WOW64_64KEY_tfs), ( 0x00100 ), NULL, HFILL }},
5017         { &hf_winreg_winreg_ReplaceKey_subkey,
5018                 { "Subkey", "winreg.winreg_ReplaceKey.subkey", FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }},
5019         { &hf_winreg_sd_max_size,
5020                 { "Max Size", "winreg.sd.max_size", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
5021         { &hf_winreg_winreg_QueryInfoKey_max_classlen,
5022                 { "Max Classlen", "winreg.winreg_QueryInfoKey.max_classlen", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
5023         { &hf_winreg_winreg_ValNameBuf_length,
5024                 { "Length", "winreg.winreg_ValNameBuf.length", FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
5025         { &hf_winreg_winreg_NotifyChangeKeyValue_notify_filter,
5026                 { "Notify Filter", "winreg.winreg_NotifyChangeKeyValue.notify_filter", FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL }},
5027         { &hf_winreg_winreg_UnLoadKey_subkey,
5028                 { "Subkey", "winreg.winreg_UnLoadKey.subkey", FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }},
5029         { &hf_winreg_winreg_ReplaceKey_new_file,
5030                 { "New File", "winreg.winreg_ReplaceKey.new_file", FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }},
5031         { &hf_winreg_winreg_SaveKeyEx_filename,
5032                 { "Filename", "winreg.winreg_SaveKeyEx.filename", FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }},
5033         { &hf_winreg_QueryMultipleValue_ve_valuename,
5034                 { "Ve Valuename", "winreg.QueryMultipleValue.ve_valuename", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
5035         { &hf_winreg_winreg_QueryMultipleValues2_key_handle,
5036                 { "Key Handle", "winreg.winreg_QueryMultipleValues2.key_handle", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
5037         { &hf_winreg_KeySecurityData_size,
5038                 { "Size", "winreg.KeySecurityData.size", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
5039         { &hf_winreg_winreg_KeyOptions_REG_OPTION_BACKUP_RESTORE,
5040                 { "Reg Option Backup Restore", "winreg.winreg_KeyOptions.REG_OPTION_BACKUP_RESTORE", FT_BOOLEAN, 32, TFS(&winreg_KeyOptions_REG_OPTION_BACKUP_RESTORE_tfs), ( 0x00000004 ), NULL, HFILL }},
5041         { &hf_winreg_winreg_EnumKey_name,
5042                 { "Name", "winreg.winreg_EnumKey.name", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
5043         { &hf_winreg_winreg_LoadKey_keyname,
5044                 { "Keyname", "winreg.winreg_LoadKey.keyname", FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }},
5045         { &hf_winreg_winreg_QueryMultipleValues_key_handle,
5046                 { "Key Handle", "winreg.winreg_QueryMultipleValues.key_handle", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
5047         { &hf_winreg_winreg_EnumValue_type,
5048                 { "Type", "winreg.winreg_EnumValue.type", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
5049         { &hf_winreg_winreg_EnumKey_last_changed_time,
5050                 { "Last Changed Time", "winreg.winreg_EnumKey.last_changed_time", FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0, NULL, HFILL }},
5051         { &hf_winreg_winreg_EnumValue_size,
5052                 { "Size", "winreg.winreg_EnumValue.size", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
5053         { &hf_winreg_winreg_SaveKey_sec_attrib,
5054                 { "Sec Attrib", "winreg.winreg_SaveKey.sec_attrib", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
5055         { &hf_winreg_sd,
5056                 { "KeySecurityData", "winreg.sd", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
5057         { &hf_winreg_winreg_KeyOptions_REG_OPTION_CREATE_LINK,
5058                 { "Reg Option Create Link", "winreg.winreg_KeyOptions.REG_OPTION_CREATE_LINK", FT_BOOLEAN, 32, TFS(&winreg_KeyOptions_REG_OPTION_CREATE_LINK_tfs), ( 0x00000002 ), NULL, HFILL }},
5059         { &hf_winreg_winreg_OpenKey_options,
5060                 { "Options", "winreg.winreg_OpenKey.options", FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL }},
5061         { &hf_winreg_winreg_SaveKey_filename,
5062                 { "Filename", "winreg.winreg_SaveKey.filename", FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }},
5063         { &hf_winreg_winreg_QueryValue_data,
5064                 { "Data", "winreg.winreg_QueryValue.data", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
5065         { &hf_winreg_winreg_QueryMultipleValues2_buffer,
5066                 { "Buffer", "winreg.winreg_QueryMultipleValues2.buffer", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
5067         { &hf_winreg_winreg_InitiateSystemShutdown_hostname,
5068                 { "Hostname", "winreg.winreg_InitiateSystemShutdown.hostname", FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
5069         { &hf_winreg_winreg_UnLoadKey_handle,
5070                 { "Handle", "winreg.winreg_UnLoadKey.handle", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
5071         { &hf_winreg_winreg_QueryMultipleValues_values_out,
5072                 { "Values Out", "winreg.winreg_QueryMultipleValues.values_out", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
5073         { &hf_winreg_KeySecurityData_data,
5074                 { "Data", "winreg.KeySecurityData.data", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
5075         { &hf_winreg_winreg_OpenKey_access_mask,
5076                 { "Access Mask", "winreg.winreg_OpenKey.access_mask", FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL }},
5077         { &hf_winreg_winreg_OpenKey_keyname,
5078                 { "Keyname", "winreg.winreg_OpenKey.keyname", FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }},
5079         { &hf_winreg_winreg_InitiateSystemShutdownEx_do_reboot,
5080                 { "Do Reboot", "winreg.winreg_InitiateSystemShutdownEx.do_reboot", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
5081         { &hf_winreg_winreg_NotifyChangeKeyValue_watch_subtree,
5082                 { "Watch Subtree", "winreg.winreg_NotifyChangeKeyValue.watch_subtree", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
5083         { &hf_winreg_winreg_DeleteKeyEx_access_mask,
5084                 { "Access Mask", "winreg.winreg_DeleteKeyEx.access_mask", FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL }},
5085         { &hf_winreg_winreg_DeleteKeyEx_key,
5086                 { "Key", "winreg.winreg_DeleteKeyEx.key", FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }},
5087         { &hf_winreg_winreg_QueryValue_data_length,
5088                 { "Data Length", "winreg.winreg_QueryValue.data_length", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
5089         { &hf_winreg_KeySecurityData_len,
5090                 { "Len", "winreg.KeySecurityData.len", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
5091         { &hf_winreg_winreg_ValNameBuf_size,
5092                 { "Size", "winreg.winreg_ValNameBuf.size", FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
5093         { &hf_winreg_winreg_CreateKey_name,
5094                 { "Name", "winreg.winreg_CreateKey.name", FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }},
5095         { &hf_winreg_winreg_NotifyChangeType_REG_NOTIFY_CHANGE_ATTRIBUTES,
5096                 { "Reg Notify Change Attributes", "winreg.winreg_NotifyChangeType.REG_NOTIFY_CHANGE_ATTRIBUTES", FT_BOOLEAN, 32, TFS(&winreg_NotifyChangeType_REG_NOTIFY_CHANGE_ATTRIBUTES_tfs), ( 0x00000002 ), NULL, HFILL }},
5097         { &hf_winreg_winreg_String_name_len,
5098                 { "Name Len", "winreg.winreg_String.name_len", FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
5099         { &hf_winreg_winreg_DeleteKey_key,
5100                 { "Key", "winreg.winreg_DeleteKey.key", FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }},
5101         { &hf_winreg_winreg_QueryValue_data_size,
5102                 { "Data Size", "winreg.winreg_QueryValue.data_size", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
5103         { &hf_winreg_system_name,
5104                 { "System Name", "winreg.system_name", FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
5105         { &hf_winreg_QueryMultipleValue_ve_valueptr,
5106                 { "Ve Valueptr", "winreg.QueryMultipleValue.ve_valueptr", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
5107         { &hf_winreg_KeySecurityAttribute_data_size,
5108                 { "Data Size", "winreg.KeySecurityAttribute.data_size", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
5109         { &hf_winreg_winreg_QueryMultipleValues_num_values,
5110                 { "Num Values", "winreg.winreg_QueryMultipleValues.num_values", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
5111         { &hf_winreg_winreg_StringBuf_name,
5112                 { "Name", "winreg.winreg_StringBuf.name", FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
5113         { &hf_winreg_winreg_NotifyChangeKeyValue_unknown2,
5114                 { "Unknown2", "winreg.winreg_NotifyChangeKeyValue.unknown2", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
5115         { &hf_winreg_sd_offset,
5116                 { "Offset", "winreg.sd.offset", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
5117         { &hf_winreg_winreg_ValNameBuf_name,
5118                 { "Name", "winreg.winreg_ValNameBuf.name", FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
5119         { &hf_winreg_winreg_StringBuf_length,
5120                 { "Length", "winreg.winreg_StringBuf.length", FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
5121         { &hf_winreg_winreg_QueryMultipleValues2_values_in,
5122                 { "Values In", "winreg.winreg_QueryMultipleValues2.values_in", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
5123         { &hf_winreg_winreg_String_name_size,
5124                 { "Name Size", "winreg.winreg_String.name_size", FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
5125         { &hf_winreg_winreg_NotifyChangeKeyValue_unknown,
5126                 { "Unknown", "winreg.winreg_NotifyChangeKeyValue.unknown", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
5127         { &hf_winreg_winreg_AccessMask_KEY_CREATE_SUB_KEY,
5128                 { "Key Create Sub Key", "winreg.winreg_AccessMask.KEY_CREATE_SUB_KEY", FT_BOOLEAN, 32, TFS(&winreg_AccessMask_KEY_CREATE_SUB_KEY_tfs), ( 0x00004 ), NULL, HFILL }},
5129         { &hf_winreg_winreg_RestoreKey_filename,
5130                 { "Filename", "winreg.winreg_RestoreKey.filename", FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }},
5131         { &hf_winreg_winreg_RestoreKeyFlags_REG_REFRESH_HIVE,
5132                 { "Reg Refresh Hive", "winreg.winreg_RestoreKeyFlags.REG_REFRESH_HIVE", FT_BOOLEAN, 32, TFS(&winreg_RestoreKeyFlags_REG_REFRESH_HIVE_tfs), ( 0x00000002 ), NULL, HFILL }},
5133         { &hf_winreg_winreg_QueryInfoKey_max_valbufsize,
5134                 { "Max Valbufsize", "winreg.winreg_QueryInfoKey.max_valbufsize", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
5135         { &hf_winreg_winreg_InitiateSystemShutdownEx_reason,
5136                 { "Reason", "winreg.winreg_InitiateSystemShutdownEx.reason", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
5137         { &hf_winreg_winreg_EnumValue_length,
5138                 { "Length", "winreg.winreg_EnumValue.length", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
5139         { &hf_winreg_winreg_QueryInfoKey_max_subkeylen,
5140                 { "Max Subkeylen", "winreg.winreg_QueryInfoKey.max_subkeylen", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
5141         { &hf_winreg_winreg_InitiateSystemShutdown_timeout,
5142                 { "Timeout", "winreg.winreg_InitiateSystemShutdown.timeout", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
5143         { &hf_winreg_winreg_InitiateSystemShutdownEx_hostname,
5144                 { "Hostname", "winreg.winreg_InitiateSystemShutdownEx.hostname", FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
5145         { &hf_winreg_KeySecurityAttribute_inherit,
5146                 { "Inherit", "winreg.KeySecurityAttribute.inherit", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
5147         { &hf_winreg_werror,
5148                 { "Windows Error", "winreg.werror", FT_UINT32, BASE_HEX, VALS(WERR_errors), 0, NULL, HFILL }},
5149         { &hf_winreg_winreg_QueryMultipleValues2_values_out,
5150                 { "Values Out", "winreg.winreg_QueryMultipleValues2.values_out", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
5151         { &hf_winreg_winreg_EnumKey_keyclass,
5152                 { "Keyclass", "winreg.winreg_EnumKey.keyclass", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
5153         { &hf_winreg_winreg_CreateKey_keyclass,
5154                 { "Keyclass", "winreg.winreg_CreateKey.keyclass", FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }},
5155         { &hf_winreg_winreg_EnumValue_value,
5156                 { "Value", "winreg.winreg_EnumValue.value", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
5157         { &hf_winreg_winreg_OpenHKCU_access_mask,
5158                 { "Access Mask", "winreg.winreg_OpenHKCU.access_mask", FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL }},
5159         { &hf_winreg_winreg_QueryValue_value_name,
5160                 { "Value Name", "winreg.winreg_QueryValue.value_name", FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }},
5161         { &hf_winreg_winreg_RestoreKeyFlags_REG_NO_LAZY_FLUSH,
5162                 { "Reg No Lazy Flush", "winreg.winreg_RestoreKeyFlags.REG_NO_LAZY_FLUSH", FT_BOOLEAN, 32, TFS(&winreg_RestoreKeyFlags_REG_NO_LAZY_FLUSH_tfs), ( 0x00000004 ), NULL, HFILL }},
5163         };
5164
5165
5166         static gint *ett[] = {
5167                 &ett_dcerpc_winreg,
5168                 &ett_winreg_security_secinfo,
5169                 &ett_winreg_winreg_AccessMask,
5170                 &ett_winreg_winreg_String,
5171                 &ett_winreg_KeySecurityData,
5172                 &ett_winreg_winreg_SecBuf,
5173                 &ett_winreg_winreg_KeyOptions,
5174                 &ett_winreg_winreg_StringBuf,
5175                 &ett_winreg_winreg_ValNameBuf,
5176                 &ett_winreg_winreg_NotifyChangeType,
5177                 &ett_winreg_winreg_RestoreKeyFlags,
5178                 &ett_winreg_KeySecurityAttribute,
5179                 &ett_winreg_QueryMultipleValue,
5180         };
5181
5182         proto_dcerpc_winreg = proto_register_protocol("Remote Registry Service", "WINREG", "winreg");
5183         proto_register_field_array(proto_dcerpc_winreg, hf, array_length (hf));
5184         proto_register_subtree_array(ett, array_length(ett));
5185 }
5186
5187 void proto_reg_handoff_dcerpc_winreg(void)
5188 {
5189         dcerpc_init_uuid(proto_dcerpc_winreg, ett_dcerpc_winreg,
5190                 &uuid_dcerpc_winreg, ver_dcerpc_winreg,
5191                 winreg_dissectors, hf_winreg_opnum);
5192 }