Example #1
0
  @Override
  public void execute() {
    long t1 = this.params.get(0);
    long t2 = this.params.get(1);

    HWND hWnd = new HWND(new Pointer(t1));
    POINT lpPoint = new POINT();
    lpPoint.x =
        (int)
            ((LongValue) memory.getDoubleWordMemoryValue(new X86MemoryOperand(DataType.INT32, t2)))
                .getValue();
    lpPoint.y =
        (int)
            ((LongValue)
                    memory.getDoubleWordMemoryValue(new X86MemoryOperand(DataType.INT32, t2 + 4)))
                .getValue();

    BOOL ret = User32DLL.INSTANCE.ClientToScreen(hWnd, lpPoint);

    register.mov("eax", new LongValue(ret.longValue()));

    memory.setDoubleWordMemoryValue(
        new X86MemoryOperand(DataType.INT32, t2), new LongValue(lpPoint.x));
    memory.setDoubleWordMemoryValue(
        new X86MemoryOperand(DataType.INT32, t2 + 4), new LongValue(lpPoint.y));
  }
Example #2
0
  @Override
  public void execute() {
    long t1 = this.params.get(0);

    int ret = User32DLL.INSTANCE.GetSystemMetrics((int) t1);

    register.mov("eax", new LongValue(ret));
  }
Example #3
0
  @Override
  public void execute() {
    long x = this.params.get(0);

    int nIndex = (int) x;
    HBRUSH ret = User32DLL.INSTANCE.GetSysColorBrush(nIndex);

    long value = (ret == null) ? 0 : Pointer.nativeValue(ret.getPointer());
    register.mov("eax", new LongValue(value));
    System.out.println("Return Value: " + value);
  }