In my perspective of with, the PE import adress table is some array (I
never worked with that thus sorry for possible misunderstanding) so
you can use call which reads the memory location, true?
For example imagine code like this:
struct A
{
void* pointerToFunctionA;
void* pointerToFunctionB;
... etc.
};
A a;
The you can create call something like that:
mov ecx, address of a
call [ecx + offset of the function]
if you know the address of a function in run-time (it's highly
probably that you know it) then you can simply do:
Assembler a;
a.call(imm(address));
or:
Compiler r;
c.call(imm(address));
// imm create an immediate operand.
Is this what you talked about?
Best regards
Petr Kobalicek
in that case you can use the ptr(), for example:
Assembler a;
a.call(ptr(eax));
or
Assembler a;
a.call(ptr_abs((void*)(sysint_t)0x12345678));
if you know the address of the table / memory location where the
function is stored. It matches the intel syntax, for example:
call [eax]
call [0x12345678]
Best regards
Petr Kobalicek
Label L_1 = a.newLabel();
a.lea(eax, ptr(L_1));
Will load the address of L_1 into the eax. I will add direct support
into the TODO list, it's usable.
It is also possible to embed the label address into the assembler
stream, for example:
a.embedLabel(L_1);
Hope that helps
Petr Kobalicek