Click here to Skip to main content
15,907,149 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I reverse a program a get this part of the code.
I need to know if this code is creating a Dir. and what is the attibute (0) is Hidden?


v5 = GetTempPathA(0x104u, &Buffer);
v19 = v5;
if ( v5 && v19 <= 0x104 )
  v20 = &Buffer;
else
  v20 = "C:\\";
v6 = std__basic_string_char_std__char_traits_char__std__allocator_char____basic_string_char_std__char_traits_char__std__allocator_char__( &v21,v20, &v22);
v23 = v6;
v24 = v6;
LOBYTE(v11) = 3;
std__operator_(&v25, v6, "DOC\\");
LOBYTE(v11) = 5;
std__basic_string_char_std__char_traits_char__std__allocator_char_____basic_string_char_std__char_traits_char__std__allocator_char__(&v21);
v7 = std__basic_string_char_std__char_traits_char__std__allocator_char____c_str(&v25);
if ( GetFileAttributesA((LPCSTR)v7) == -1 )
{
     v8 = std__basic_string_char_std__char_traits_char__std__allocator_char____c_str(&v25);
      CreateDirectoryA((LPCSTR)v8, 0);
}
Posted
Updated 14-Apr-11 10:00am
v2
Comments
Sergey Alexandrovich Kryukov 14-Apr-11 16:53pm    
The code doesn't have to look so obfuscated... :-)
--SA

1 solution

Yes, but only if the folder doesn't already exist. The 0 parameter means that the folder is to have the default filesystem security attribute.
 
Share this answer
 
v2
Comments
TheCodeVB 14-Apr-11 16:44pm    
Yes, the folder dosn't exist.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900