; RDP Wrapper Library configuration
; for Windows RT (ARMv7)

; This is experimental file

[Main]
Updated=2016-03-07
LogFile=\rdpwrap.txt

[SLPolicy]
TerminalServices-RemoteConnectionManager-AllowRemoteConnections=1
TerminalServices-RemoteConnectionManager-AllowMultipleSessions=1
TerminalServices-RemoteConnectionManager-AllowAppServerMode=1
TerminalServices-RemoteConnectionManager-AllowMultimon=1
TerminalServices-RemoteConnectionManager-MaxUserSessions=0
TerminalServices-RemoteConnectionManager-ce0ad219-4670-4988-98fb-89b14c2f072b-MaxSessions=0
TerminalServices-RemoteConnectionManager-45344fe7-00e6-4ac6-9f01-d01fd4ffadfb-MaxSessions=2
TerminalServices-RDP-7-Advanced-Compression-Allowed=1
TerminalServices-RemoteConnectionManager-45344fe7-00e6-4ac6-9f01-d01fd4ffadfb-LocalOnly=0
TerminalServices-RemoteConnectionManager-8dc86f1d-9969-4379-91c1-06fe1dc60575-MaxSessions=1000
TerminalServices-DeviceRedirection-Licenses-TSEasyPrintAllowed=1
TerminalServices-DeviceRedirection-Licenses-PnpRedirectionAllowed=1
TerminalServices-DeviceRedirection-Licenses-TSMFPluginAllowed=1
TerminalServices-RemoteConnectionManager-UiEffects-DWMRemotingAllowed=1

[PatchCodes]
Zero=00
bjmp5=05E0
CDefPolicy_Query_r3_r5=40F20013C5F8203305E0
CDefPolicy_Query_r3_r0=40F20013C0F8203305E0

[6.2.9200.16384]
; Patch CSessionArbitrationHelper::IsSingleSessionPerUserEnabled
; .text:10066DCC          MOV.W           R3, #0x11C
; .text:10066DD0          STR             R3, [SP,#0x16C+var_13C]
; .text:10066DD2          LDR             R3, =__imp_GetVersionExW
; .text:10066DD4          MOVS            R4, #1            <- 0
; .text:10066DD6          ADD             R0, SP, #0x16C+var_13C
; .text:10066DD8          LDR             R3, [R3]
SingleUserPatch.arm=1
SingleUserOffset.arm=66DD4
SingleUserCode.arm=Zero
; Patch CDefPolicy::Query
; Original
; .text:10059164          LDR.W           R2, [R5,#0x324]   ; D5 F8 24 23   ; [R5,#0x324] -> R2
; .text:10059168          LDR.W           R3, [R5,#0x320]   ; D5 F8 20 33   ; [R5,#0x320] -> R3
; .text:1005916C          CMP             R2, R3            ; 9A 42         ; compare
; .text:1005916E          BNE             loc_1005917A      ; 04 D1         ; jump if (R2 != R3)
; Changed
; .text:10059164          MOVW            R3, #0x100        ; 40 F2 00 13   ; 0x100 -> R3
; .text:10059168          STR.W           R3, [R5,#0x320]   ; C5 F8 20 33   ; R3 -> [R5,#0x320]
; .text:1005916C          B               loc_1005917A      ; 05 E0         ; jump
; .text:1005916E          BNE             loc_1005917A      ; 04 D1         ; / never executed /
DefPolicyPatch.arm=1
DefPolicyOffset.arm=59164
DefPolicyCode.arm=CDefPolicy_Query_r3_r5
; Hook SLGetWindowsInformationDWORDWrapper
SLPolicyInternal.arm=1
SLPolicyOffset.arm=5F934
SLPolicyFunc.arm=New_Win8SL

[6.3.9600.16384]
; Patch CEnforcementCore::GetInstanceOfTSLicense
; .text:1008E6C2          BL              _IsLicenseTypeLocalOnly_CSLQuery__SAJAAU_GUID__PAH_Z ; CSLQuery::IsLicenseTypeLocalOnly(_GUID &,int *)
; .text:1008E6C6          CMP             R0, #0
; .text:1008E6C8          BLT             loc_1008E6DA
; .text:1008E6CA          LDR             R3, [SP,#0x20+var_14]
; .text:1008E6CC          CBZ             R3, loc_1008E6DA  ; 2B B1         ; jump if (R3 == 0)
; Changed
; .text:1008E6CC          B               loc_1008E6DA      ; 05 E0         ; jump
LocalOnlyPatch.arm=1
LocalOnlyOffset.arm=8E6CC
LocalOnlyCode.arm=bjmp5
; Patch CSessionArbitrationHelper::IsSingleSessionPerUserEnabled
; .text:10069E74          MOV.W           R3, #0x11C
; .text:10069E78          STR             R3, [SP,#0x164+var_13C]
; .text:10069E7A          LDR             R3, =__imp_GetVersionExW
; .text:10069E7C          MOVS            R4, #1            <- 0
; .text:10069E7E          ADD             R0, SP, #0x164+var_13C
; .text:10069E80          LDR             R3, [R3]
SingleUserPatch.arm=1
SingleUserOffset.arm=69E7C
SingleUserCode.arm=Zero
; Patch CDefPolicy::Query
; Original
; .text:10064D54          LDR.W           R2, [R0,#0x324]   ; D0 F8 24 23   ; [R0,#0x324] -> R2
; .text:10064D58          LDR.W           R3, [R0,#0x320]   ; D0 F8 20 33   ; [R0,#0x320] -> R3
; .text:10064D5C          CMP             R2, R3            ; 9A 42         ; compare
; .text:10064D5E          BNE             loc_10064D6A      ; 04 D1         ; jump if (R2 != R3)
; Changed
; .text:10064D54          MOVW            R3, #0x100        ; 40 F2 00 13   ; 0x100 -> R3
; .text:10064D58          STR.W           R3, [R0,#0x320]   ; C0 F8 20 33   ; R3 -> [R0,#0x320]
; .text:10064D5C          B               loc_10064D6A      ; 05 E0         ; jump
; .text:10064D5E          BNE             loc_10064D6A      ; 04 D1         ; / never executed /
DefPolicyPatch.arm=1
DefPolicyOffset.arm=64D54
DefPolicyCode.arm=CDefPolicy_Query_r3_r0
; Hook CSLQuery::Initialize
SLInitHook.arm=1
SLInitOffset.arm=32188
SLInitFunc.arm=New_CSLQuery_Initialize

[6.3.9600.17095]
; Patch CEnforcementCore::GetInstanceOfTSLicense
; .text:1008E35A          BL              _IsLicenseTypeLocalOnly_CSLQuery__SAJAAU_GUID__PAH_Z ; CSLQuery::IsLicenseTypeLocalOnly(_GUID &,int *)
; .text:1008E35E          CMP             R0, #0
; .text:1008E360          BLT             loc_1008E372
; .text:1008E362          LDR             R3, [SP,#0x20+var_14]
; .text:1008E364          CBZ             R3, loc_1008E372  ; 2B B1         ; jump if (R3 == 0)
; Changed
; .text:1008E364          B               loc_1008E372      ; 05 E0         ; jump
LocalOnlyPatch.arm=1
LocalOnlyOffset.arm=8E364
LocalOnlyCode.arm=bjmp5
; Patch CSessionArbitrationHelper::IsSingleSessionPerUserEnabled
; .text:10069C2C          MOV.W           R3, #0x11C
; .text:10069C30          STR             R3, [SP,#0x164+var_13C]
; .text:10069C32          LDR             R3, =GetVersionExW
; .text:10069C34          MOVS            R4, #1            <- 0
; .text:10069C36          ADD             R0, SP, #0x164+var_13C
; .text:10069C38          LDR             R3, [R3]
SingleUserPatch.arm=1
SingleUserOffset.arm=69C34
SingleUserCode.arm=Zero
; Patch CDefPolicy::Query
; Original
; .text:100649E0          LDR.W           R2, [R0,#0x324]   ; D0 F8 24 23   ; [R0,#0x324] -> R2
; .text:100649E4          LDR.W           R3, [R0,#0x320]   ; D0 F8 20 33   ; [R0,#0x320] -> R3
; .text:100649E8          CMP             R2, R3            ; 9A 42         ; compare
; .text:100649EA          BNE             loc_100649F6      ; 04 D1         ; jump if (R2 != R3)
; Changed
; .text:100649E0          MOVW            R3, #0x100        ; 40 F2 00 13   ; 0x100 -> R3
; .text:100649E4          STR.W           R3, [R0,#0x320]   ; C0 F8 20 33   ; R3 -> [R0,#0x320]
; .text:100649E8          B               loc_10064D6A      ; 05 E0         ; jump
; .text:100649EA          BNE             loc_10064D6A      ; 04 D1         ; / never executed /
DefPolicyPatch.arm=1
DefPolicyOffset.arm=649E0
DefPolicyCode.arm=CDefPolicy_Query_r3_r0
; Hook CSLQuery::Initialize
SLInitHook.arm=1
SLInitOffset.arm=32E3C
SLInitFunc.arm=New_CSLQuery_Initialize

[SLInit]
bServerSku=1
bRemoteConnAllowed=1
bFUSEnabled=1
bAppServerAllowed=1
bMultimonAllowed=1
lMaxUserSessions=0
ulMaxDebugSessions=0
bInitialized=1

[6.3.9600.16384-SLInit]
bFUSEnabled.arm       =A57E0
lMaxUserSessions.arm  =A57E4
bAppServerAllowed.arm =A57E8
bInitialized.arm      =A57EC
bMultimonAllowed.arm  =A57F0
bServerSku.arm        =A57F4
ulMaxDebugSessions.arm=A57F8
bRemoteConnAllowed.arm=A57FC

[6.3.9600.17095-SLInit]
bFUSEnabled.arm       =A67E0
lMaxUserSessions.arm  =A67E4
bAppServerAllowed.arm =A67E8
bInitialized.arm      =A67EC
bMultimonAllowed.arm  =A67F0
bServerSku.arm        =A67F4
ulMaxDebugSessions.arm=A67F8
bRemoteConnAllowed.arm=A67FC
