windowsdlls
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
windowsdlls [2009/05/04 14:13] – add device 0xb7 marcus | windowsdlls [2009/11/06 22:56] – megadiscman | ||
---|---|---|---|
Line 124: | Line 124: | ||
</ | </ | ||
+ | ===== OpenMG Secure Module - Implementation Architecture ===== | ||
+ | |||
+ | * References: | ||
+ | Sony Patent EP1 496 439 A1, Fig.6 there is a diagram illustrating the functional structure of the client. | ||
+ | |||
+ | Note: Patent diagram says following: | ||
+ | |||
+ | Security Module: | ||
+ | |||
+ | [0047] A security module 53 performs processing relating | ||
+ | to data security, such as encryption of the modules. | ||
+ | A request for the security-related processing generated | ||
+ | in the modules is sent to the security module 53, | ||
+ | and the security module 53 performs encryption or the like | ||
+ | in response to the request. | ||
+ | |||
+ | DRM Module: | ||
+ | |||
+ | [0043] Fig. 6 shows an example of the functional | ||
+ | structure of the client 1. A DRM (Digital Right Management) | ||
+ | module 51 communicates the content, right data, | ||
+ | etc., or manages the right data. | ||
+ | |||
+ | Comparision with the implementation: | ||
+ | |||
+ | Playback module, write module, read module, lcm module all communicate directly to | ||
+ | the DRM module or Security Module. These modules would be OmgNetMD.dll, | ||
+ | |||
+ | Modules in the plugin-layer at the top would communicate with these " | ||
+ | they never directly communicate with salwrap/ | ||
+ | There are tough, exceptions, a couple of functions can be used in pfcom trough COM. Its also possible to use SAL (salExec0) using COM (omgmisc.dll DLL link to salwrap.dll salExec0). | ||
+ | |||
+ | < | ||
+ | .................................................................................................... + UI | ||
+ | SonicStage | ||
+ | .................................................................................................... | ||
+ | ^ ^ | ||
+ | | | | ||
+ | | COM | ||
+ | v v | ||
+ | .................................................................................................... Plug-in layer (AVLib) | ||
+ | + CheckOut +Playback | ||
+ | + CheckIn +Convert | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | NetMDAPI.dll | ||
+ | | ||
+ | | ||
+ | NetMDUSB.dll | ||
+ | | ||
+ | .................................................................................................... OpenMG | ||
+ | ^ | ||
+ | | COM | ||
+ | DLL | ||
+ | ----------------------- | ||
+ | pfcom.dll | ||
+ | | | ||
+ | | | ||
+ | | ||
+ | | ||
+ | | | ||
+ | | ||
+ | | | ||
+ | | | ||
+ | ----------------------- | ||
+ | ^ | ||
+ | | | ||
+ | v | ||
+ | | ||
+ | | ||
+ | maclist1.dat, | ||
+ | [License information] | ||
+ | OMGKEY\salomgid.dat | ||
+ | < | ||
+ | | ||
+ | |||
+ | |||
+ | .................................................................................................... Secure Applications | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | | ||
+ | SAL Runtime | ||
+ | | ||
+ | |||
+ | .................................................................................................... | ||
+ | </ | ||
+ | |||
+ | |||
===== The ocm-files ===== | ===== The ocm-files ===== | ||
Line 131: | Line 223: | ||
* [[http:// | * [[http:// | ||
* [[http:// | * [[http:// | ||
+ | |||
+ | OCM handling code is stored in a private git repository (run using [[http:// | ||
+ | |||
+ | < | ||
+ | Hostname z6.physik.fu-berlin.de | ||
+ | IdentityFile ~/ | ||
+ | </ | ||
+ | |||
+ | After that, you can clone the repo by using | ||
+ | < | ||
+ | git-clone gitosis@z6.physik.fu-berlin.de:/ | ||
+ | </ | ||
The OCM files (except for init.ocm which contains an extra layer of packing) are interpreted as [[OCMBytecode]] | The OCM files (except for init.ocm which contains an extra layer of packing) are interpreted as [[OCMBytecode]] | ||
- | Here is a decode | + | Here is a decoder |
* It does not name imports from salwrap, it just puts offsets into the import table into a generic name. Check here for some name [[OCMSalwrapExports]] | * It does not name imports from salwrap, it just puts offsets into the import table into a generic name. Check here for some name [[OCMSalwrapExports]] | ||
* It is unable to parse named exports | * It is unable to parse named exports | ||
Line 141: | Line 245: | ||
The output of the program is an assembler source file (completely unreadable) that is intended to be compiled by the GNU assembler (Win32 port or cross-assembler in linux) and then loaded into a good disassembler, | The output of the program is an assembler source file (completely unreadable) that is intended to be compiled by the GNU assembler (Win32 port or cross-assembler in linux) and then loaded into a good disassembler, | ||
- | [[codeblockparser]] | + | [[codeblockparser]] |
Some info about analysing an OCM file can be found in this part of chat log: | Some info about analysing an OCM file can be found in this part of chat log: | ||
Line 147: | Line 251: | ||
[[ocmchatlog1]] | [[ocmchatlog1]] | ||
- | These new pages could be created | + | These pages show internals of some modules |
* Netmd.ocm: [[netmdocm]] | * Netmd.ocm: [[netmdocm]] | ||
* Device.sal: [[devicesal]] | * Device.sal: [[devicesal]] | ||
- | Start for device.sal (arguments as on stack, last one top of stack): | + | ===== Links ===== |
- | < | + | * [[http://newgre.net/antire]] |
- | int | + | |
- | dev_0x01 (block_t someblock, bool_t somebool) | + | |
- | { | + | |
- | int res; | + | |
- | + | ||
- | if (somebool == 1) | + | |
- | { | + | |
- | res = dev_0x00 (someblock); | + | |
- | if (res != 0) | + | |
- | return res; | + | |
- | } | + | |
- | int some_nr = (unsigned) SubBlock (someblock, 0, 4); | + | |
- | int some_nr2 = (unsigned) dev_0xd1 (some_nr); | + | |
- | res = " | + | |
- | | + | |
- | + | ||
- | if (res != 0) | + | |
- | return; | + | |
- | + | ||
- | block_t someblock2; | + | |
- | + | ||
- | int some_nr3 = (signed) SubBlock (someblock2, | + | |
- | vector< | + | |
- | do | + | |
- | { | + | |
- | vec.append (SubBlock (some_nr3 * 16, 24)); | + | |
- | } | + | |
- | while (some_nr3-- >= 0); | + | |
- | + | ||
- | + | ||
- | int some_nr3 = (signed) SubBlock (someblock2, | + | |
- | res = dev_0xc1 (some_nr3); | + | |
- | if (res != 0) | + | |
- | | + | |
- | + | ||
- | int some_nr4 = (signed) SubBlock (someblock2, | + | |
- | if (some_nr3 == some_nr4) | + | |
- | return 0; | + | |
- | else | + | |
- | return 8; | + | |
- | + | ||
- | // is vec returned as well? it's still on the stack. | + | |
- | } | + | |
- | + | ||
- | + | ||
- | int | + | |
- | dev_oxb7 (any_t thing) | + | |
- | { | + | |
- | if (get_type (thing) != TYPE_BLOB) | + | |
- | return 0; | + | |
- | if (thing[2] == 0x31) | + | |
- | return 2; | + | |
- | else | + | |
- | { | + | |
- | if (! strncmp (thing, " | + | |
- | return 1; | + | |
- | else | + | |
- | return 0; | + | |
- | } | + | |
- | } | + | |
- | + | ||
- | block_t | + | |
- | dev_0xd1 (int nr) | + | |
- | { | + | |
- | if (nr > 1) | + | |
- | { | + | |
- | 0x80 (" | + | |
- | return 0; | + | |
- | } | + | |
- | else | + | |
- | { | + | |
- | return 00 81 00 00 00 00 00 00; | + | |
- | } | + | |
- | } | + | |
- | </ | + | |
- | | + |
windowsdlls.txt · Last modified: 2010/04/29 14:48 by megadiscman