Starting to reverse XGI app.

This commit is contained in:
Ben Vanik
2015-02-01 17:25:18 -08:00
parent 5f3ab7979f
commit 5b759d387c
6 changed files with 126 additions and 5 deletions

View File

@@ -43,13 +43,15 @@ SHIM_CALL XMsgStartIORequest_shim(PPCContext* ppc_state, KernelState* state) {
XELOGD("XMsgStartIORequest(%.8X, %.8X, %.8X, %.8X, %d)", app, message,
overlapped_ptr, buffer, buffer_length);
assert_zero(overlapped_ptr);
auto result = state->app_manager()->DispatchMessageAsync(app, message, buffer,
buffer_length);
if (result == X_ERROR_NOT_FOUND) {
XELOGE("XMsgStartIORequest: app %.8X undefined", app);
}
if (overlapped_ptr) {
state->CompleteOverlappedImmediate(overlapped_ptr, result);
result = X_ERROR_IO_PENDING;
}
SHIM_SET_RETURN_32(result);
}
@@ -64,13 +66,15 @@ SHIM_CALL XMsgStartIORequestEx_shim(PPCContext* ppc_state, KernelState* state) {
XELOGD("XMsgStartIORequestEx(%.8X, %.8X, %.8X, %.8X, %d, %.8X)", app, message,
overlapped_ptr, buffer, buffer_length, unknown_ptr);
assert_zero(overlapped_ptr);
auto result = state->app_manager()->DispatchMessageAsync(app, message, buffer,
buffer_length);
if (result == X_ERROR_NOT_FOUND) {
XELOGE("XMsgStartIORequestEx: app %.8X undefined", app);
}
if (overlapped_ptr) {
state->CompleteOverlappedImmediate(overlapped_ptr, result);
result = X_ERROR_IO_PENDING;
}
SHIM_SET_RETURN_32(result);
}