-
Notifications
You must be signed in to change notification settings - Fork 22
/
svcHelper.py
103 lines (101 loc) · 3.01 KB
/
svcHelper.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
#!/usr/bin/env python
SVCNameMap = {
0x01: "svcSetHeapSize",
0x02: "svcSetMemoryPermission",
0x03: "svcSetMemoryAttribute",
0x04: "svcMapMemory",
0x05: "svcUnmapMemory",
0x06: "svcQueryMemory",
0x07: "svcExitProcess",
0x08: "svcCreateThread",
0x09: "svcStartThread",
0x0A: "svcExitThread",
0x0B: "svcSleepThread",
0x0C: "svcGetThreadPriority",
0x0D: "svcSetThreadPriority",
0x0E: "svcGetThreadCoreMask",
0x0F: "svcSetThreadCoreMask",
0x10: "svcGetCurrentProcessorNumber",
0x11: "svcSignalEvent",
0x12: "svcClearEvent",
0x13: "svcMapSharedMemory",
0x14: "svcUnmapSharedMemory",
0x15: "svcCreateTransferMemory",
0x16: "svcCloseHandle",
0x17: "svcResetSignal",
0x18: "svcWaitSynchronization",
0x19: "svcCancelSynchronization",
0x1A: "svcArbitrateLock",
0x1B: "svcArbitrateUnlock",
0x1C: "svcWaitProcessWideKeyAtomic",
0x1D: "svcSignalProcessWideKey",
0x1E: "svcGetSystemTick",
0x1F: "svcConnectToNamedPort",
0x20: "svcSendSyncRequestLight",
0x21: "svcSendSyncRequest",
0x22: "svcSendSyncRequestWithUserBuffer",
0x23: "svcSendAsyncRequestWithUserBuffer",
0x25: "svcGetThreadId",
0x26: "svcBreak",
0x27: "svcOutputDebugString",
0x28: "svcReturnFromException",
0x29: "svcGetInfo",
0x2A: "svcFlushEntireDataCache",
0x2C: "svcMapPhysicalMemory",
0x2D: "svcUnmapPhysicalMemory",
0x2E: "svcUnknown(2E)",
0x30: "svcGetResourceLimitLimitValue",
0x32: "svcSetThreadActivity",
0x34: "svcUnknown(34)",
0x36: "svcUnknown(36)",
0x38: "svcUnknown(38)",
0x3A: "svcUnknown(3A)",
0x3C: "svcDumpInfo",
0x3E: "svcUnknown(3E)",
0x40: "svcCreateSession",
0x41: "svcAcceptSession",
0x42: "svcReplyAndReceiveLight",
0x43: "svcReplyAndReceive",
0x44: "svcReplyAndReceiveWithUserBuffer",
0x45: "svcCreateEvent",
0x46: "svcUnknown(46)",
0x48: "svcUnknown(48)",
0x4A: "svcUnknown(4A)",
0x4C: "svcUnknown(4C)",
0x4E: "svcReadWriteRegister",
0x4F: "svcSetProcessActivity",
0x51: "svcMapTransferMemory",
0x52: "svcUnmapTransferMemory",
0x53: "svcCreateInterruptEvent",
0x54: "svcQueryPhysicalAddress",
0x56: "svcCreateDeviceAddressSpace",
0x57: "svcAttachDeviceAddressSpace",
0x58: "svcDetachDeviceAddressSpace",
0x59: "svcMapDeviceAddressSpaceByForce",
0x5A: "svcMapDeviceAddressSpaceAligned",
0x5C: "svcUnmapDeviceAddressSpace",
0x5E: "svcStoreProcessDataCache",
0x60: "svcDebugActiveProcess",
0x62: "svcTerminateDebugProcess",
0x64: "svcContinueDebugEvent",
0x66: "svcGetThreadList",
0x68: "svcSetDebugThreadContext",
0x6A: "svcReadDebugProcessMemory",
0x6C: "svcSetHardwareBreakPoint",
0x6E: "svcUnknown(6E)",
0x70: "svcCreatePort",
0x72: "svcConnectToPort",
0x74: "svcMapProcessMemory",
0x75: "svcUnmapProcessMemory",
0x76: "svcQueryProcessMemory",
0x78: "svcUnmapProcessCodeMemory",
0x79: "svcCreateProcess",
0x7B: "svcTerminateProcess",
0x7D: "svcCreateResourceLimit",
0x7F: "svcCallSecureMonitor"
}
def svcToName(code):
if code in SVCNameMap:
return SVCNameMap[code]
else:
return "svcUnknown(0x%02x)" %code