(ql: Qiling, address: int, params)
| 44 | 'pszPath' : POINTER # LPCSTR |
| 45 | }) |
| 46 | def hook_PathFindFileNameA(ql: Qiling, address: int, params): |
| 47 | pointer = params["pszPath"] |
| 48 | pathname = ql.os.utils.read_cstring(pointer) |
| 49 | #params["pszPath"] = pathname |
| 50 | |
| 51 | # return a pointer to the filename, or to the path if there is dir prefix |
| 52 | return pointer + len(f'\\{pathname}'.rsplit('\\', 1)[0]) |
| 53 | |
| 54 | # LPCSTR PathFindFileNameW( |
| 55 | # LPWSTR pszPath |
nothing calls this directly
no test coverage detected