请分析下这个函数的入参出参

时间:2022-02-14 21:10:26
exe部分

                               mov     eax, [esi+46h]
.text:005B6319                 push    0
.text:005B631B                 movsx   dx, byte ptr [eax+0ECh]
.text:005B6323                 push    edx
.text:005B6324                 push    eax
.text:005B6325                 call    ds:func1

dll部分

public func1
.text:003C7420 func1     proc near
.text:003C7420
.text:003C7420 var_4           = dword ptr -4
.text:003C7420 arg_0           = dword ptr  4
.text:003C7420 arg_1454        = dword ptr  1458h
.text:003C7420
.text:003C7420                 mov     eax, 1458h
.text:003C7425                 call    sub_3C7D50
.text:003C742A                 call    sub_3C7BB7
.text:003C742F                 push    eax
.text:003C7430                 lea     ecx, [esp+4]
.text:003C7434                 call    MFC42_6467
.text:003C7439                 mov     ecx, dword_3CD3C8
.text:003C743F                 test    ecx, ecx
.text:003C7441                 jz      short loc_3C7473
.text:003C7443                 mov     edx, [esp+4+arg_1454]
.text:003C744A                 lea     eax, [esp+4+arg_0]
.text:003C744E                 push    64h
.text:003C7450                 push    eax
.text:003C7451                 push    edx
.text:003C7452                 call    sub_3C1BF0
.text:003C7457                 test    ax, ax
.text:003C745A                 jle     short loc_3C7473
.text:003C745C                 mov     eax, [esp+4]
.text:003C7460                 mov     ecx, [esp+4+var_4]
.text:003C7464                 mov     [eax+4], ecx
.text:003C7467                 mov     eax, 1
.text:003C746C                 add     esp, 1458h
.text:003C7472                 retn
.text:003C7473 ; ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
.text:003C7473
.text:003C7473 loc_3C7473:                             ; CODE XREF: func1+21j
.text:003C7473                                         ; func1+3Aj
.text:003C7473                 mov     edx, [esp+4]
.text:003C7477                 mov     eax, [esp+4+var_4]
.text:003C747B                 mov     [edx+4], eax
.text:003C747E                 xor     eax, eax
.text:003C7480                 add     esp, 1458h
.text:003C7486                 retn
.text:003C7486 func1           endp ; sp =  1454h

5 个解决方案

#1


就是func1

#2


.text:003C7420                mov    eax, 1458h ?

.text:003C7480                add    esp, 1458h 

貌似代码堆栈不平衡 

#3


是啊,不过我试了下,用(byte *arg1,DWORD arg2,int arg3) 就可以了

#4


把dll和测试代码传到临时网站吧 

#5


回帖是一种美德~~~

#1


就是func1

#2


.text:003C7420                mov    eax, 1458h ?

.text:003C7480                add    esp, 1458h 

貌似代码堆栈不平衡 

#3


是啊,不过我试了下,用(byte *arg1,DWORD arg2,int arg3) 就可以了

#4


把dll和测试代码传到临时网站吧 

#5


回帖是一种美德~~~