Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Finding export information

freak52freak52 Member Posts: 4
Hi!

I have following question:

I have a dll, created and compiled with Delphi, but I don't have the source of it.

Now, I'm trying to rebuilt the dll using the export table of the original.

I succesfully rebuilt some function calls but I still have one more problem.
in the dll there is no information about function/procedure , calling convention , parameters and so on..

There is a call that should be get data from exe, but I can't find it where it's located.

Here is the function:

;------------------------------------------------------------------------------
Align 4
_DMXWrite:
push ebp
mov ebp,esp
push ebx
mov ebx,[ebp+08h]
cmp ebx,00000200h
jle L00401FF8
mov ebx,00000200h
L00401FF8:
push ebx
push 00000000h
push 00000000h
call SUB_L0040212C
add esp,0000000Ch
test al,al
jz L00402018
mov eax,[ebp+0Ch]
push eax
push ebx
call SUB_L004022C4
add esp,00000008h
jmp L0040201D
L00402018:
xor eax,eax
pop ebx
pop ebp
retn
;------------------------------------------------------------------------------
L0040201D:
mov eax,ebx
pop ebx
pop ebp
retn
;------------------------------------------------------------------------------
SUB_L0040212C:
push ebp
mov ebp,esp
push ebx
mov dx,[ebp+10h]
mov eax,[ebp+08h]
mov [L00417600],al
not al
mov [L00417601],al
mov ax,[ebp+0Ch]
push L00417600
mov [L00417602],ax
push 00000006h
mov [L00417604],dx
call SUB_L004021F4
add esp,00000008h
mov ebx,eax
mov [L004175FE],bl
test bl,bl
jz L00402174
mov al,01h
pop ebx
pop ebp
retn
;------------------------------------------------------------------------------
SUB_L004022C4:
push ebp
mov ebp,esp
push ebx
push esi
mov esi,[ebp+08h]



_DMXWrite is the function call that i'm looking for. Someone could tell me where it get its data from and plz give the Delphi code
This is what I thought and doesnt work:

procedure _DMXWrite (a,b :Pansistring) Stdcall;
begin

Messagebox(0,b ,a,MB_OK);

End;

messagebox for testing purpose
Sign In or Register to comment.