Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <idc.idc>
- // built on cloverleafswag3s original code
- // modded by X41
- // references:
- // http://www.psdevwiki.com/ps4/Syscalls
- // http://fxr.watson.org/fxr/source/kern/syscalls.master
- static getSyscallName(number) {
- auto funcName;
- funcName = form("syscall_%i", number);
- // haha x360_imports.numberc has good numbereas
- if(number == 0) funcName = "nosys";
- else if(number == 1) funcName = "sys_exit";
- else if(number == 2) funcName = "fork";
- else if(number == 3) funcName = "read";
- else if(number == 4) funcName = "write";
- else if(number == 5) funcName = "open";
- else if(number == 6) funcName = "close";
- else if(number == 7) funcName = "wait4";
- else if(number == 8) funcName = "creat";
- else if(number == 9) funcName = "link";
- else if(number == 10) funcName = "unlink";
- else if(number == 11) funcName = "execv";
- else if(number == 12) funcName = "chdir";
- else if(number == 13) funcName = "fchdir";
- else if(number == 14) funcName = "mkd";
- else if(number == 15) funcName = "chmod";
- else if(number == 16) funcName = "chown";
- else if(number == 17) funcName = "obreak";
- else if(number == 18) funcName = "getfsstat";
- else if(number == 19) funcName = "lseek";
- else if(number == 20) funcName = "getpid";
- else if(number == 21) funcName = "mount";
- else if(number == 22) funcName = "unmount";
- else if(number == 23) funcName = "setuid";
- else if(number == 24) funcName = "getuid";
- else if(number == 25) funcName = "geteuid";
- else if(number == 26) funcName = "ptrace";
- else if(number == 27) funcName = "recvmsg";
- else if(number == 28) funcName = "sendmsg";
- else if(number == 29) funcName = "recvfrom";
- else if(number == 30) funcName = "accept";
- else if(number == 31) funcName = "getpeername";
- else if(number == 32) funcName = "getsockname";
- else if(number == 33) funcName = "access";
- else if(number == 34) funcName = "chflags";
- else if(number == 35) funcName = "fchflags";
- else if(number == 36) funcName = "sync";
- else if(number == 37) funcName = "kill";
- else if(number == 38) funcName = "stat";
- else if(number == 39) funcName = "getppid";
- else if(number == 40) funcName = "lstat";
- else if(number == 41) funcName = "dup";
- else if(number == 42) funcName = "pipe";
- else if(number == 43) funcName = "getegid";
- else if(number == 44) funcName = "profil";
- else if(number == 45) funcName = "ktrace";
- else if(number == 46) funcName = "sigaction";
- else if(number == 47) funcName = "getgid";
- else if(number == 48) funcName = "sigprocmask";
- else if(number == 49) funcName = "getlogin";
- else if(number == 50) funcName = "setlogin";
- else if(number == 51) funcName = "acct";
- else if(number == 52) funcName = "sigpending";
- else if(number == 53) funcName = "sigaltstack";
- else if(number == 54) funcName = "ioctl";
- else if(number == 55) funcName = "reboot";
- else if(number == 56) funcName = "revoke";
- else if(number == 57) funcName = "symlink";
- else if(number == 58) funcName = "readlink";
- else if(number == 59) funcName = "execve";
- else if(number == 60) funcName = "umask";
- else if(number == 61) funcName = "chroot";
- else if(number == 62) funcName = "fstat";
- else if(number == 63) funcName = "getkerninfo";
- else if(number == 64) funcName = "getpagesize";
- else if(number == 65) funcName = "msync";
- else if(number == 66) funcName = "vfork";
- else if(number == 67) funcName = "vread";
- else if(number == 68) funcName = "vwrite";
- else if(number == 69) funcName = "sbrk";
- else if(number == 70) funcName = "sstk";
- else if(number == 71) funcName = "mmap";
- else if(number == 72) funcName = "ovadvise";
- else if(number == 73) funcName = "munmap";
- else if(number == 74) funcName = "mprotect";
- else if(number == 75) funcName = "madvise";
- else if(number == 76) funcName = "vhangup";
- else if(number == 77) funcName = "vlimit";
- else if(number == 78) funcName = "mincore";
- else if(number == 79) funcName = "getgroups";
- else if(number == 80) funcName = "setgroups";
- else if(number == 81) funcName = "getpgrp";
- else if(number == 82) funcName = "setpgid";
- else if(number == 83) funcName = "setitimer";
- else if(number == 84) funcName = "wait";
- else if(number == 85) funcName = "swapon";
- else if(number == 86) funcName = "getitimer";
- else if(number == 87) funcName = "gethostname";
- else if(number == 88) funcName = "sethostname";
- else if(number == 89) funcName = "getdtablesize";
- else if(number == 90) funcName = "dup2";
- else if(number == 91) funcName = "getdopt";
- else if(number == 92) funcName = "fcntl";
- else if(number == 93) funcName = "select";
- else if(number == 94) funcName = "setdopt";
- else if(number == 95) funcName = "fsync";
- else if(number == 96) funcName = "setpriority";
- else if(number == 97) funcName = "socket";
- else if(number == 98) funcName = "connect";
- else if(number == 99) funcName = "accept";
- else if(number == 100) funcName = "getpriority";
- else if(number == 101) funcName = "send";
- else if(number == 102) funcName = "recv";
- else if(number == 103) funcName = "sigreturn";
- else if(number == 104) funcName = "bind";
- else if(number == 105) funcName = "setsockopt";
- else if(number == 106) funcName = "listen";
- else if(number == 107) funcName = "vtimes";
- else if(number == 108) funcName = "sigvec";
- else if(number == 109) funcName = "sigblock";
- else if(number == 110) funcName = "sigsetmask";
- else if(number == 111) funcName = "sigsuspend";
- else if(number == 112) funcName = "sigstack";
- else if(number == 113) funcName = "recvmsg";
- else if(number == 114) funcName = "sendmsg";
- else if(number == 115) funcName = "vtrace";
- else if(number == 116) funcName = "gettimeofday";
- else if(number == 117) funcName = "getrusage";
- else if(number == 118) funcName = "getsockopt";
- else if(number == 119) funcName = "resuba";
- else if(number == 120) funcName = "readv";
- else if(number == 121) funcName = "writev";
- else if(number == 122) funcName = "settimeofday";
- else if(number == 123) funcName = "fchown";
- else if(number == 124) funcName = "fchmod";
- else if(number == 125) funcName = "recvfrom";
- else if(number == 126) funcName = "setreuid";
- else if(number == 127) funcName = "setregid";
- else if(number == 128) funcName = "rename";
- else if(number == 129) funcName = "truncate";
- else if(number == 130) funcName = "ftruncate";
- else if(number == 131) funcName = "flock";
- else if(number == 132) funcName = "mkfifo";
- else if(number == 133) funcName = "sendto";
- else if(number == 134) funcName = "shutdown";
- else if(number == 135) funcName = "socketpair";
- else if(number == 136) funcName = "mkdir";
- else if(number == 137) funcName = "rmdir";
- else if(number == 138) funcName = "utimes";
- else if(number == 139) funcName = "sigreturn";
- else if(number == 140) funcName = "adjtime";
- else if(number == 141) funcName = "getpeername";
- else if(number == 142) funcName = "gethostid";
- else if(number == 143) funcName = "sethostid";
- else if(number == 144) funcName = "getrlimit";
- else if(number == 145) funcName = "setrlimit";
- else if(number == 146) funcName = "killpg";
- else if(number == 147) funcName = "setsid";
- else if(number == 148) funcName = "quotactl";
- else if(number == 149) funcName = "quota";
- else if(number == 150) funcName = "getsockname";
- else if(number == 151) funcName = "sem_lock";
- else if(number == 152) funcName = "sem_wakeup";
- else if(number == 153) funcName = "asyncdaemon";
- else if(number == 154) funcName = "nlm_syscall";
- else if(number == 155) funcName = "nfssvc";
- else if(number == 156) funcName = "getdirentries";
- else if(number == 157) funcName = "statfs";
- else if(number == 158) funcName = "fstatfs";
- else if(number == 160) funcName = "lgetfh";
- else if(number == 161) funcName = "getfh";
- else if(number == 162) funcName = "getdomainname";
- else if(number == 163) funcName = "setdomainname";
- else if(number == 164) funcName = "uname";
- else if(number == 165) funcName = "sysarch";
- else if(number == 166) funcName = "rtprio";
- else if(number == 169) funcName = "semsys";
- else if(number == 170) funcName = "msgsys";
- else if(number == 171) funcName = "shmsys";
- else if(number == 173) funcName = "pread";
- else if(number == 174) funcName = "pwrite";
- else if(number == 175) funcName = "setfib";
- else if(number == 176) funcName = "ntp_adjtime";
- else if(number == 177) funcName = "sfork";
- else if(number == 178) funcName = "getdescriptor";
- else if(number == 179) funcName = "setdescriptor";
- else if(number == 181) funcName = "setgid";
- else if(number == 182) funcName = "setegid";
- else if(number == 183) funcName = "seteuid";
- else if(number == 184) funcName = "lfs_bmapv";
- else if(number == 185) funcName = "lfs_markv";
- else if(number == 186) funcName = "lfs_segclean";
- else if(number == 187) funcName = "lfs_segwait";
- else if(number == 188) funcName = "stat";
- else if(number == 189) funcName = "fstat";
- else if(number == 190) funcName = "lstat";
- else if(number == 191) funcName = "pathconf";
- else if(number == 192) funcName = "fpathconf";
- else if(number == 194) funcName = "getrlimit";
- else if(number == 195) funcName = "setrlimit";
- else if(number == 196) funcName = "getdirentries";
- else if(number == 197) funcName = "mmap";
- else if(number == 198) funcName = "nosys";
- else if(number == 199) funcName = "lseek";
- else if(number == 200) funcName = "truncate";
- else if(number == 201) funcName = "ftruncate";
- else if(number == 202) funcName = "sysctl";
- else if(number == 203) funcName = "mlock";
- else if(number == 204) funcName = "munlock";
- else if(number == 205) funcName = "undelete";
- else if(number == 206) funcName = "futimes";
- else if(number == 207) funcName = "getpgid";
- else if(number == 208) funcName = "newreboot";
- else if(number == 209) funcName = "poll";
- else if(number == 220) funcName = "semctl";
- else if(number == 221) funcName = "semget";
- else if(number == 222) funcName = "semop";
- else if(number == 223) funcName = "semconfig";
- else if(number == 224) funcName = "msgctl";
- else if(number == 225) funcName = "msgget";
- else if(number == 226) funcName = "msgsnd";
- else if(number == 227) funcName = "msgrcv";
- else if(number == 228) funcName = "shmat";
- else if(number == 229) funcName = "shmctl";
- else if(number == 230) funcName = "shmdt";
- else if(number == 231) funcName = "shmget";
- else if(number == 232) funcName = "clock_gettime";
- else if(number == 233) funcName = "clock_settime";
- else if(number == 234) funcName = "clock_getres";
- else if(number == 235) funcName = "ktimer_create";
- else if(number == 236) funcName = "ktimer_delete";
- else if(number == 237) funcName = "ktimer_settime";
- else if(number == 238) funcName = "ktimer_gettime";
- else if(number == 239) funcName = "ktimer_getoverrun";
- else if(number == 240) funcName = "nasleep";
- else if(number == 241) funcName = "ffclock_getcounter";
- else if(number == 242) funcName = "ffclock_setestimate";
- else if(number == 243) funcName = "ffclock_getestimate";
- else if(number == 247) funcName = "clock_getcpuclockid2";
- else if(number == 248) funcName = "ntp_gettime";
- else if(number == 250) funcName = "minherit";
- else if(number == 251) funcName = "rfork";
- else if(number == 252) funcName = "openbsd_poll";
- else if(number == 253) funcName = "issetugid";
- else if(number == 254) funcName = "lchown";
- else if(number == 255) funcName = "aio_read";
- else if(number == 256) funcName = "aio_write";
- else if(number == 257) funcName = "lio_listio";
- else if(number == 272) funcName = "getdents";
- else if(number == 274) funcName = "lchmod";
- else if(number == 275) funcName = "lchown";
- else if(number == 276) funcName = "lutimes";
- else if(number == 277) funcName = "msync";
- else if(number == 278) funcName = "nstat";
- else if(number == 279) funcName = "nfstat";
- else if(number == 280) funcName = "nlstat";
- else if(number == 289) funcName = "preadv";
- else if(number == 290) funcName = "pwritev";
- else if(number == 297) funcName = "fhstatfs";
- else if(number == 298) funcName = "fhopen";
- else if(number == 299) funcName = "fhstat";
- else if(number == 300) funcName = "modnext";
- else if(number == 301) funcName = "modstat";
- else if(number == 302) funcName = "modfnext";
- else if(number == 303) funcName = "modfind";
- else if(number == 304) funcName = "kldload";
- else if(number == 305) funcName = "kldunload";
- else if(number == 306) funcName = "kldfind";
- else if(number == 307) funcName = "kldnext";
- else if(number == 308) funcName = "kldstat";
- else if(number == 309) funcName = "kldfirstmod";
- else if(number == 310) funcName = "getsid";
- else if(number == 311) funcName = "setresuid";
- else if(number == 312) funcName = "setresgid";
- else if(number == 313) funcName = "signasleep";
- else if(number == 314) funcName = "aio_return";
- else if(number == 315) funcName = "aio_suspend";
- else if(number == 316) funcName = "aio_cancel";
- else if(number == 317) funcName = "aio_error";
- else if(number == 318) funcName = "aio_read";
- else if(number == 319) funcName = "aio_write";
- else if(number == 320) funcName = "lio_listio";
- else if(number == 321) funcName = "yield";
- else if(number == 322) funcName = "thr_sleep";
- else if(number == 323) funcName = "thr_wakeup";
- else if(number == 324) funcName = "mlockall";
- else if(number == 325) funcName = "munlockall";
- else if(number == 326) funcName = "getcwd";
- else if(number == 327) funcName = "sched_setparam";
- else if(number == 328) funcName = "sched_getparam";
- else if(number == 329) funcName = "sched_setscheduler";
- else if(number == 330) funcName = "sched_getscheduler";
- else if(number == 331) funcName = "sched_yield";
- else if(number == 332) funcName = "sched_get_priority_max";
- else if(number == 333) funcName = "sched_get_priority_min";
- else if(number == 334) funcName = "sched_rr_get_interval";
- else if(number == 335) funcName = "utrace";
- else if(number == 336) funcName = "sendfile";
- else if(number == 337) funcName = "kldsym";
- else if(number == 338) funcName = "jail";
- else if(number == 339) funcName = "nnpfs_syscall";
- else if(number == 340) funcName = "sigprocmask";
- else if(number == 341) funcName = "sigsuspend";
- else if(number == 342) funcName = "sigaction";
- else if(number == 343) funcName = "sigpending";
- else if(number == 344) funcName = "sigreturn";
- else if(number == 345) funcName = "sigtimedwait";
- else if(number == 346) funcName = "sigwaitinfo";
- else if(number == 347) funcName = "acl_get_file";
- else if(number == 348) funcName = "acl_set_file";
- else if(number == 349) funcName = "acl_get_fd";
- else if(number == 350) funcName = "acl_set_fd";
- else if(number == 351) funcName = "acl_delete_file";
- else if(number == 352) funcName = "acl_delete_fd";
- else if(number == 353) funcName = "acl_aclcheck_file";
- else if(number == 354) funcName = "acl_aclcheck_fd";
- else if(number == 355) funcName = "extattrctl";
- else if(number == 356) funcName = "extattr_set_file";
- else if(number == 357) funcName = "extattr_get_file";
- else if(number == 358) funcName = "extattr_delete_file";
- else if(number == 359) funcName = "aio_waitcomplete";
- else if(number == 360) funcName = "getresuid";
- else if(number == 361) funcName = "getresgid";
- else if(number == 362) funcName = "kqueue";
- else if(number == 363) funcName = "kevent";
- else if(number == 364) funcName = "cap_get_proc";
- else if(number == 365) funcName = "cap_set_proc";
- else if(number == 366) funcName = "cap_get_fd";
- else if(number == 367) funcName = "cap_get_file";
- else if(number == 368) funcName = "cap_set_fd";
- else if(number == 369) funcName = "cap_set_file";
- else if(number == 371) funcName = "extattr_set_fd";
- else if(number == 372) funcName = "extattr_get_fd";
- else if(number == 373) funcName = "extattr_delete_fd";
- else if(number == 374) funcName = "setugid";
- else if(number == 375) funcName = "nfsclnt";
- else if(number == 376) funcName = "eaccess";
- else if(number == 377) funcName = "afs3_syscall";
- else if(number == 378) funcName = "nmount";
- else if(number == 379) funcName = "kse_exit";
- else if(number == 380) funcName = "kse_wakeup";
- else if(number == 381) funcName = "kse_create";
- else if(number == 382) funcName = "kse_thr_interrupt";
- else if(number == 383) funcName = "kse_release";
- else if(number == 384) funcName = "mac_get_proc";
- else if(number == 385) funcName = "mac_set_proc";
- else if(number == 386) funcName = "mac_get_fd";
- else if(number == 387) funcName = "mac_get_file";
- else if(number == 388) funcName = "mac_set_fd";
- else if(number == 389) funcName = "mac_set_file";
- else if(number == 390) funcName = "kenv";
- else if(number == 391) funcName = "lchflags";
- else if(number == 392) funcName = "uuidgen";
- else if(number == 393) funcName = "sendfile";
- else if(number == 394) funcName = "mac_syscall";
- else if(number == 395) funcName = "getfsstat";
- else if(number == 396) funcName = "statfs";
- else if(number == 397) funcName = "fstatfs";
- else if(number == 398) funcName = "fhstatfs";
- else if(number == 400) funcName = "ksem_close";
- else if(number == 401) funcName = "ksem_post";
- else if(number == 402) funcName = "ksem_wait";
- else if(number == 403) funcName = "ksem_trywait";
- else if(number == 404) funcName = "ksem_init";
- else if(number == 405) funcName = "ksem_open";
- else if(number == 406) funcName = "ksem_unlink";
- else if(number == 407) funcName = "ksem_getvalue";
- else if(number == 408) funcName = "ksem_destroy";
- else if(number == 409) funcName = "mac_get_pid";
- else if(number == 410) funcName = "mac_get_link";
- else if(number == 411) funcName = "mac_set_link";
- else if(number == 412) funcName = "extattr_set_link";
- else if(number == 413) funcName = "extattr_get_link";
- else if(number == 414) funcName = "extattr_delete_link";
- else if(number == 415) funcName = "mac_execve";
- else if(number == 416) funcName = "sigaction";
- else if(number == 417) funcName = "sigreturn";
- else if(number == 418) funcName = "xstat";
- else if(number == 419) funcName = "xfstat";
- else if(number == 420) funcName = "xlstat";
- else if(number == 421) funcName = "getcontext";
- else if(number == 422) funcName = "setcontext";
- else if(number == 423) funcName = "swapcontext";
- else if(number == 424) funcName = "swapoff";
- else if(number == 425) funcName = "acl_get_link";
- else if(number == 426) funcName = "acl_set_link";
- else if(number == 427) funcName = "acl_delete_link";
- else if(number == 428) funcName = "acl_aclcheck_link";
- else if(number == 429) funcName = "sigwait";
- else if(number == 430) funcName = "thr_create";
- else if(number == 431) funcName = "thr_exit";
- else if(number == 432) funcName = "thr_self";
- else if(number == 433) funcName = "thr_kill";
- else if(number == 436) funcName = "jail_attach";
- else if(number == 437) funcName = "extattr_list_fd";
- else if(number == 438) funcName = "extattr_list_file";
- else if(number == 439) funcName = "extattr_list_link";
- else if(number == 440) funcName = "kse_switchin";
- else if(number == 441) funcName = "ksem_timedwait";
- else if(number == 442) funcName = "thr_suspend";
- else if(number == 443) funcName = "thr_wake";
- else if(number == 444) funcName = "kldunloadf";
- else if(number == 445) funcName = "audit";
- else if(number == 446) funcName = "auditon";
- else if(number == 447) funcName = "getauid";
- else if(number == 448) funcName = "setauid";
- else if(number == 449) funcName = "getaudit";
- else if(number == 450) funcName = "setaudit";
- else if(number == 451) funcName = "getaudit_addr";
- else if(number == 452) funcName = "setaudit_addr";
- else if(number == 453) funcName = "auditctl";
- else if(number == 454) funcName = "umtx_op";
- else if(number == 455) funcName = "thr_new";
- else if(number == 456) funcName = "sigqueue";
- else if(number == 457) funcName = "kmq_open";
- else if(number == 458) funcName = "kmq_setattr";
- else if(number == 459) funcName = "kmq_timedreceive";
- else if(number == 460) funcName = "kmq_timedsend";
- else if(number == 461) funcName = "kmq_tify";
- else if(number == 462) funcName = "kmq_unlink";
- else if(number == 463) funcName = "abort2";
- else if(number == 464) funcName = "thr_set_name";
- else if(number == 465) funcName = "aio_fsync";
- else if(number == 466) funcName = "rtprio_thread";
- else if(number == 469) funcName = "getpath_fromfd";
- else if(number == 470) funcName = "getpath_fromaddr";
- else if(number == 471) funcName = "sctp_peeloff";
- else if(number == 472) funcName = "sctp_generic_sendmsg";
- else if(number == 473) funcName = "sctp_generic_sendmsg_iov";
- else if(number == 474) funcName = "sctp_generic_recvmsg";
- else if(number == 475) funcName = "pread";
- else if(number == 476) funcName = "pwrite";
- else if(number == 477) funcName = "mmap";
- else if(number == 478) funcName = "lseek";
- else if(number == 479) funcName = "truncate";
- else if(number == 480) funcName = "ftruncate";
- else if(number == 481) funcName = "thr_kill2";
- else if(number == 482) funcName = "shm_open";
- else if(number == 483) funcName = "shm_unlink";
- else if(number == 484) funcName = "cpuset";
- else if(number == 485) funcName = "cpuset_setid";
- else if(number == 486) funcName = "cpuset_getid";
- else if(number == 487) funcName = "cpuset_getaffinity";
- else if(number == 488) funcName = "cpuset_setaffinity";
- else if(number == 489) funcName = "faccessat";
- else if(number == 490) funcName = "fchmodat";
- else if(number == 491) funcName = "fchownat";
- else if(number == 492) funcName = "fexecve";
- else if(number == 493) funcName = "fstatat";
- else if(number == 494) funcName = "futimesat";
- else if(number == 495) funcName = "linkat";
- else if(number == 496) funcName = "mkdirat";
- else if(number == 497) funcName = "mkfifoat";
- else if(number == 498) funcName = "mkdat";
- else if(number == 499) funcName = "openat";
- else if(number == 500) funcName = "readlinkat";
- else if(number == 501) funcName = "renameat";
- else if(number == 502) funcName = "symlinkat";
- else if(number == 503) funcName = "unlinkat";
- else if(number == 504) funcName = "posix_openpt";
- else if(number == 505) funcName = "gssd_syscall";
- else if(number == 506) funcName = "jail_get";
- else if(number == 507) funcName = "jail_set";
- else if(number == 508) funcName = "jail_remove";
- else if(number == 509) funcName = "closefrom";
- else if(number == 510) funcName = "semctl";
- else if(number == 511) funcName = "msgctl";
- else if(number == 512) funcName = "shmctl";
- else if(number == 513) funcName = "lpathconf";
- else if(number == 514) funcName = "cap_new";
- else if(number == 515) funcName = "cap_rights_get";
- else if(number == 516) funcName = "cap_enter";
- else if(number == 517) funcName = "cap_getmode";
- else if(number == 518) funcName = "pdfork";
- else if(number == 519) funcName = "pdkill";
- else if(number == 520) funcName = "pdgetpid";
- else if(number == 521) funcName = "pdwait4";
- else if(number == 522) funcName = "pselect";
- else if(number == 523) funcName = "getloginclass";
- else if(number == 524) funcName = "setloginclass";
- else if(number == 525) funcName = "rctl_get_racct";
- else if(number == 526) funcName = "rctl_get_rules";
- else if(number == 527) funcName = "rctl_get_limits";
- else if(number == 528) funcName = "rctl_add_rule";
- else if(number == 529) funcName = "rctl_remove_rule";
- else if(number == 530) funcName = "posix_fallocate";
- else if(number == 531) funcName = "posix_fadvise";
- else if(number == 532) funcName = "sys_regmgr_call";
- else if(number == 533) funcName = "sys_jitshm_create";
- else if(number == 534) funcName = "sys_jitshm_alias";
- else if(number == 535) funcName = "sys_dl_get_list";
- else if(number == 536) funcName = "sys_dl_get_info";
- else if(number == 537) funcName = "sys_dl_notify_event";
- else if(number == 538) funcName = "sys_evf_create";
- else if(number == 539) funcName = "sys_evf_delete";
- else if(number == 540) funcName = "sys_evf_open";
- else if(number == 541) funcName = "sys_evf_close";
- else if(number == 542) funcName = "sys_evf_wait";
- else if(number == 543) funcName = "sys_evf_trywait";
- else if(number == 544) funcName = "sys_evf_set";
- else if(number == 545) funcName = "sys_evf_clear";
- else if(number == 546) funcName = "sys_evf_cancel";
- else if(number == 547) funcName = "sys_query_memory_protection";
- else if(number == 548) funcName = "sys_batch_map";
- else if(number == 549) funcName = "sys_osem_create";
- else if(number == 550) funcName = "sys_osem_delete";
- else if(number == 551) funcName = "sys_osem_open";
- else if(number == 552) funcName = "sys_osem_close";
- else if(number == 553) funcName = "sys_osem_wait";
- else if(number == 554) funcName = "sys_osem_trywait";
- else if(number == 555) funcName = "sys_osem_post";
- else if(number == 556) funcName = "sys_osem_cancel";
- else if(number == 557) funcName = "sys_namedobj_create";
- else if(number == 558) funcName = "sys_namedobj_delete";
- else if(number == 559) funcName = "sys_set_vm_container";
- else if(number == 560) funcName = "sys_debug_init";
- else if(number == 561) funcName = "sys_suspend_process";
- else if(number == 562) funcName = "sys_resume_process";
- else if(number == 563) funcName = "sys_opmc_enable";
- else if(number == 564) funcName = "sys_opmc_disable";
- else if(number == 565) funcName = "sys_opmc_set_ctl";
- else if(number == 566) funcName = "sys_opmc_set_ctr";
- else if(number == 567) funcName = "sys_opmc_get_ctr";
- else if(number == 568) funcName = "sys_budget_create";
- else if(number == 569) funcName = "sys_budget_delete";
- else if(number == 570) funcName = "sys_budget_get";
- else if(number == 571) funcName = "sys_budget_set";
- else if(number == 572) funcName = "sys_virtual_query";
- else if(number == 573) funcName = "sys_mdbg_call";
- else if(number == 574) funcName = "sys_sblock_create";
- else if(number == 575) funcName = "sys_sblock_delete";
- else if(number == 576) funcName = "sys_sblock_enter";
- else if(number == 577) funcName = "sys_sblock_exit";
- else if(number == 578) funcName = "sys_sblock_xenter";
- else if(number == 579) funcName = "sys_sblock_xexit";
- else if(number == 580) funcName = "sys_eport_create";
- else if(number == 581) funcName = "sys_eport_delete";
- else if(number == 582) funcName = "sys_eport_trigger";
- else if(number == 583) funcName = "sys_eport_open";
- else if(number == 584) funcName = "sys_eport_close";
- else if(number == 585) funcName = "sys_is_in_sandbox";
- else if(number == 586) funcName = "sys_dmem_container";
- else if(number == 587) funcName = "sys_get_authinfo";
- else if(number == 588) funcName = "sys_mname";
- else if(number == 589) funcName = "sys_dynlib_dlopen";
- else if(number == 590) funcName = "sys_dynlib_dlclose";
- else if(number == 591) funcName = "sys_dynlib_dlsym";
- else if(number == 592) funcName = "sys_dynlib_get_list";
- else if(number == 593) funcName = "sys_dynlib_get_info";
- else if(number == 594) funcName = "sys_dynlib_load_prx";
- else if(number == 595) funcName = "sys_dynlib_unload_prx";
- else if(number == 596) funcName = "sys_dynlib_do_copy_relocations";
- else if(number == 597) funcName = "sys_dynlib_prepare_dlclose";
- else if(number == 598) funcName = "sys_dynlib_get_proc_param";
- else if(number == 599) funcName = "sys_dynlib_process_needed_and_relocate";
- else if(number == 600) funcName = "sys_sandbox_path";
- else if(number == 601) funcName = "sys_mdbg_service";
- else if(number == 602) funcName = "sys_randomized_path";
- else if(number == 603) funcName = "sys_rdup";
- else if(number == 604) funcName = "sys_dl_get_metadata";
- else if(number == 605) funcName = "sys_workaround8849";
- else if(number == 606) funcName = "sys_is_development_mode";
- else if(number == 607) funcName = "sys_get_self_auth_info";
- else if(number == 608) funcName = "sys_dynlib_get_info_ex";
- else if(number == 609) funcName = "sys_budget_getid";
- else if(number == 610) funcName = "sys_budget_get_ptype";
- else if(number == 611) funcName = "sys_get_paging_stats_of_all_threads";
- else if(number == 612) funcName = "sys_get_proc_type_info";
- else if(number == 613) funcName = "sys_get_resident_count";
- else if(number == 614) funcName = "sys_prepare_to_suspend_process";
- else if(number == 615) funcName = "sys_get_resident_fmem_count";
- else if(number == 616) funcName = "sys_thr_get_name";
- else if(number == 617) funcName = "sys_set_gpo";
- else if(number == 618) funcName = "sys_get_paging_stats_of_all_objects";
- else if(number == 619) funcName = "sys_test_debug_rwmem";
- else if(number == 620) funcName = "sys_free_stack";
- else if(number == 621) funcName = "sys_suspend_system";
- else if(number == 622) funcName = "sys_ipmimgr_call";
- else if(number == 623) funcName = "sys_get_gpo";
- else if(number == 624) funcName = "sys_get_vm_map_timestamp";
- else if(number == 625) funcName = "sys_opmc_set_hw";
- else if(number == 626) funcName = "sys_opmc_get_hw";
- else if(number == 627) funcName = "sys_get_cpu_usage_all";
- else if(number == 628) funcName = "sys_mmap_dmem";
- else if(number == 629) funcName = "sys_physhm_open";
- else if(number == 630) funcName = "sys_physhm_unlink";
- else if(number == 631) funcName = "sys_resume_internal_hdd";
- else if(number == 632) funcName = "sys_thr_suspend_ucontext";
- else if(number == 633) funcName = "sys_thr_resume_ucontext";
- else if(number == 634) funcName = "sys_thr_get_ucontext";
- else if(number == 635) funcName = "sys_thr_set_ucontext";
- else if(number == 636) funcName = "sys_set_timezone_info";
- else if(number == 637) funcName = "sys_set_phys_fmem_limit";
- else if(number == 638) funcName = "sys_utc_to_localtime";
- else if(number == 639) funcName = "sys_localtime_to_utc";
- else if(number == 640) funcName = "sys_set_uevt";
- else if(number == 641) funcName = "sys_get_cpu_usage_proc";
- else if(number == 642) funcName = "sys_get_map_statistics";
- else if(number == 643) funcName = "sys_set_chicken_switches";
- else if(number == 644) funcName = "sys_#644";
- else if(number == 645) funcName = "sys_#645";
- else if(number == 646) funcName = "sys_get_kernel_mem_statistics";
- else if(number == 647) funcName = "sys_get_sdk_compiled_version";
- else if(number == 648) funcName = "sys_app_state_change";
- else if(number == 649) funcName = "sys_dynlib_get_obj_member";
- else if(number == 650) funcName = "sys_budget_get_ptype_of_budget";
- else if(number == 651) funcName = "sys_prepare_to_resume_process";
- else if(number == 652) funcName = "sys_process_terminate";
- else if(number == 653) funcName = "sys_blockpool_open";
- else if(number == 654) funcName = "sys_blockpool_map";
- else if(number == 655) funcName = "sys_blockpool_unmap";
- else if(number == 656) funcName = "sys_dynlib_get_info_for_libdbg";
- else if(number == 657) funcName = "sys_blockpool_batch";
- else if(number == 658) funcName = "sys_fdatasync";
- else if(number == 659) funcName = "sys_dynlib_get_list2";
- else if(number == 660) funcName = "sys_dynlib_get_info2";
- else if(number == 661) funcName = "sys_aio_submit";
- else if(number == 662) funcName = "sys_aio_multi_delete";
- else if(number == 663) funcName = "sys_aio_multi_wait";
- else if(number == 664) funcName = "sys_aio_multi_poll";
- else if(number == 665) funcName = "sys_aio_get_data";
- else if(number == 666) funcName = "sys_aio_multi_cancel";
- else if(number == 667) funcName = "sys_get_bio_usage_all";
- else if(number == 668) funcName = "sys_aio_create";
- else if(number == 669) funcName = "sys_aio_submit_cmd";
- else if(number == 670) funcName = "sys_aio_init";
- else if(number == 671) funcName = "sys_get_page_table_stats";
- else if(number == 672) funcName = "sys_dynlib_get_list_for_libdbg";
- return funcName;
- }
- static main() {
- auto i, address, syscall;
- Message("[syscall syscall] created by cloverleafswag3\n");
- address = FindBinary(0, SEARCH_DOWN, "48 C7 C0 ?? ?? 00 00 49 89 CA 0F 05");
- syscall = Dword(address + 3);
- // Word function is not working! ill use Dword & 0xFFFFF, clear upper 16 bits
- // check if valnumber
- if(syscall < 1000 && ((Dword(address + 0x0A) & 0xFFFF) == 0x050F)) {
- Message("[syscall syscall] address: 0x%X syscall: %i\n", address, syscall);
- MakeNameEx(address, getSyscallName(syscall), 0);
- MakeFunction(address, address + 0x18);
- MakeQword(address + 0x18); // the nops
- }
- // we should have less than 1k syscalls, so just do this a few times
- for(i = 0; i < 1000; i = i + 1) {
- address = FindBinary(address, 3, "48 C7 C0 ?? ?? 00 00 49 89 CA 0F 05");
- if(address == 0xFFFFFFFFFFFFFFFF){ return;} // untill we hit the bottom, then just fuckin' quit
- syscall = Dword(address + 3);
- // Word function is not working! ill use Dword & 0xFFFFF, clear upper 16 bits
- // check if valnumber
- if(syscall < 1000 && ((Dword(address + 0x0A) & 0xFFFF) == 0x050F)) {
- Message("[syscall syscall] address: 0x%X syscall: %i\n", address, syscall);
- MakeNameEx(address, getSyscallName(syscall), 0);
- MakeFunction(address, address + 0x18);
- MakeQword(address + 0x18); // the nops
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement