Topic: Binary UIFILE-resources in Win8 +

Studying the Author: 463C21E2 Date: 21.04 11:04 (8 +) Windows, faced with new (for me) types of resources, including UIFILE. Unfortunately, traditional tools of type Resource Hacker or Restorator not  them, displaying simply in hex'. And it would be desirable to be able to glance inside. Here that was possible to understand. It is not assured that all (or at least something!) I understood correctly. If you know better, or  at you is stronger, or I in three pines MSDN' lost the way and passed by section with the documentation, do not swear, please, and correct me or stick a muzzle in links So... Very long time ago, still in WinXP, the mechanism similar CSS has been entered. It was used for creation  by that (themes). Was specific, in resources there was a new type - UIFILE which looked somehow so: button [id=atom (header)] {background: rcbmp (110,6,#FF00FF,0,0,1,0); borderthickness: rect (2,2,2,0); foreground: white; fontweight: rcint (10); padding: rect (10,0,0,0); animation: rectanglev | s | fast;} there are some details here: https://www.codeproject.com/articles/72 … bar#UIFILE Documentation on all this business in MSDN were not. At some instant (Vista?) the file format became XML-based (and replaced a title on DUIXML?) . Anyway, if to open resources shellstyle.dll from Win7, in group UIFILE there will be the resource beginning with: <duixml> <stylesheets> <style resid = "main">... A few rummaged, it is possible to find a piece corresponding XP-shnomu easily: <if id = "atom (header)"> <Element Background = "argb (0, 0, 0, 0)" Font = "gtf (TextStyle, 1, 0)" Foreground = "gtc (TextStyle, 1, 0, 3803)" Overhang = "false" Padding = "rect (0rp, 0rp, 0rp, 6rp)"/> </if> Documentation on all this business in MSDN did not appear. PROBABLY, somewhere on the way XML became XAML'. Anyway, one of few places in MSDN where I found mention UIFILE - . https://msdn.microsoft.com/en-us/librar … 85%29.aspx https://msdn.microsoft.com/en-us/librar … 63530.aspx In particular, IUIFramework:: LoadUI (the component certain Ribbon Framework) loads a template (?)  from UIFILE about which it is explicitly told that it (running forward - before transformation in ) was XAML'. Beginning whether with Win8, whether with Win8.1, this format made binary (and replaced its title on BML? Either DUIB? Or UIB?) . Now not that it is necessary to study not documentary properties, process of editing became complicated! Designers began to yell: https://superuser.com/questions/517786/ … ed-uifiles In Windows 7 it was quite easy to modify resource files such as DLLs to make changes to the Windows interface. This was done by editing the UIFILE's using a program like Resource Hacker. However, now in Windows 8 it seems like some of the UIFILE's are encrypted and are no longer in plain text form and editable in Resource Hacker like they were before. Behind them engineers began to yell, but essentially is more silent: http://fw.hardijzer.nl/?p=10 With Windows Live Messenger 9 Wave 3, Microsoft abandoned the XML-like UIFile format to describe their user-interface layout. Instead, a new proprietary binary format was introduced named UIB (named after the first three bytes in the files), which TheSteve and I are now reverse engineering. What bothers me is that somehow people have misinterpreted this move, and are labeling it "protection", insinuating that Microsoft did this intentionally to block skins and patches. So allow me to clear that up. First of all, the new format is not actually a protection. The format is, once you figure out how it works, rather simple and elegant, in no way designed to mislead anyone trying to understand it. I personally think that the developers at Microsoft made the switch to a proprietary format because parsing XML for each and every window is just slow and quite a resource hog. Switching to their own optimized-for-this-purpose format allows them to make it faster and more memory efficient, and also smaller. As you can see, admit even that it not encrypted, and optimized (And, by the way, in interesting me Taskmgr.exe which I took from 8.1, the first 4 bytes of both resources UIFILE (from two available) - duib, instead of the first 3 bytes - uib. Therefore and the format name can be not UIB, and DUIB). If to consider such questions: https://superuser.com/questions/494878/ … of-a-file, it appears that a binary format in Windows not everywhere. I checked up: in same 8.1 in shell32.dll in section of resources UIFILE it is stored DUIXML, while in Taskmgr.exe - DUIB... Either UIB... Or BML... , more shortly! Assuming that XAML about which it is told in mentioned above  documentation, and DUIXML - same, we receive that DUIB it is result of compilation DUIXML/XAML: Binding the BML Resource to the Executable The only way to initialize a Ribbon control with the markup information is to call the IUIFramework:: LoadUI method and pass the name of an UIFILE resource bound to the executable. To do this you must compile the XAML to produce a BML file and bind this to the executable. The tool to compile the XAML to BML is called uicc.exe and is provided as part of the Windows 7 Software Development Kit (SDK). This tool produces three outputs: the BML file that contains the markup information, a header file that contains the symbols that identify the commands, and a resource script that describes the string tables, bitmaps and the UIFILE resource for the BML file. The assumption it is based only that received  should turn on in resources as UIFILE. If it is true, it is necessary to find the utility, reverse uicc.exe (). Still can be that DUIXML it DirectUI XML. DirectUI it as write, a certain internal library in MS, but those source codes which I found on different githabah-kodepleksah, about duib do not know anything. Generally, about this DirectUI 90 % of materials and repositories are presented by hieroglyphs. Anyway, it would be desirable to have the utility, reformative UIFILE in XML. Unfortunately, anything, except the above-stated, it was not possible to find. Special thanks Qt (There "uifile" something means the, permanently gets to search results). If who knows, how or than this UIFILE to read - in advance thanks.