Home > other >  Three consecutive "push eax" game items trading call how to call?
Three consecutive "push eax" game items trading call how to call?

Time:09-16



Prawns, please have a look at the OD screenshots, I listed according to the logic, call the script as shown below, only successful trading food/water/wood/shells, other goods and ships have no deal, so want to ask, where is the problem?

Dm. AsmClear
Dm. AsmAdd "mov ebp, esp
"
Dm. AsmAdd "push 0 xa" stack address//simulation environment
Dm. AsmAdd stack address "push 0 x6"//simulation environment, submit item types (such as 1, 2)
Dm. AsmAdd "push 0 x00df0100"//have to submit the serial number of items, number of ID, pointer
Dm. AsmAdd "push 0 x00e95898"//have to submit items data identification
Dm. AsmAdd "mov eax, esp
"
Dm. AsmAdd "push 0 x0" stack address//simulation environment
Dm. AsmAdd "push 0 x0" stack address//simulation environment, submitted to the types of vessels (such as 1, 2)
Dm. AsmAdd "push 0 x0"//have to submit the serial number of ships, ID pointer
Dm. AsmAdd "push 0 x00fa3d98"//of the vessel to submit data identification
Dm. AsmAdd "mov eax, esp
"
Dm. AsmAdd "push 0 x78" stack address//simulation environment
Dm. AsmAdd "push 0 x0" stack address//simulation environment
Dm. AsmAdd "push 0 x00010002"//wood, the number of shells
Dm. AsmAdd "push 0 x00030004"//food, the amount of water

Dm. AsmAdd "mov eax, esp
"
Dm. AsmAdd "push eax"
Dm. AsmAdd "push eax"
Dm. AsmAdd "push eax"

Dm. AsmAdd "mov ecx, eax
"Dm. AsmAdd call "0 x004d4ca0

Dm. AsmAdd "mov esp, ebp
"Dm_ret=dm. AsmCall (HWND, 1)

CodePudding user response:

They not have lea eax respectively, in front of the instruction, what should be a local variable storage content, their address, so, you also have to address related to the past, direct push eax may not, the address should be:
; Below 0 x38=0 xc8 instruction, in front of the local. 14 should be a local variable (dword) 14 14 * 4=56=0 x38
Lea eax, [ebp x38] 0
Push eax
Lea eax, [ebp 0 x60]
Push eax
Lea eax, [ebp x1c] 0
Push eax
Lea ecx, [ebp x24] 0
The call...

CodePudding user response:

Thank you for your bosses to give directions, according to the method to write, or make a mistake, I don't know what reason be? Is the desert plug-in does not support this assembly instruction?

Dm. AsmClear
Dm. AsmAdd "mov ebp, esp
"

//dm. AsmAdd "push 0 x0" can need not
Dm. AsmAdd "push 0 xa" stack address//simulation environment
Dm. AsmAdd stack address "push 0 x6"//simulation environment, submit item types (such as 1, 2)
Dm. AsmAdd "push 0 x00df0100"//have to submit the serial number of items, number of ID, pointer
Dm. AsmAdd "push 0 x00e95898"//have to submit items data identification
Dm. AsmAdd "lea eax, [ebp x38] 0"
Dm. AsmAdd "push eax"

Dm. AsmAdd "push 0 x0" stack address//simulation environment
Dm. AsmAdd "push 0 x0" stack address//simulation environment, submitted to the types of vessels (such as 1, 2)
Dm. AsmAdd "push 0 x0"//have to submit the serial number of ships, ID pointer
Dm. AsmAdd "push 0 x00fa3d98"//of the vessel to submit data identification
Dm. AsmAdd "lea eax, [ebp 0 x60]"
Dm. AsmAdd "push eax"

Dm. AsmAdd "push 0 x78" stack address//simulation environment
Dm. AsmAdd "push 0 x0" stack address//simulation environment
Dm. AsmAdd "push 0 x00010002"//wood, the number of shells
Dm. AsmAdd "push 0 x00030004"//food, the amount of water
Dm. AsmAdd "lea eax, [ebp x1c] 0"
Dm. AsmAdd "push eax"

Dm. AsmAdd "push 0 x0" stack address//simulation environment
Dm. AsmAdd "push 0 x000186a0"//the number of money
Dm. AsmAdd "lea ecx, [ebp x24] 0"
Dm. AsmAdd "call 0 x004d4ca0
"
Dm. AsmAdd "mov esp, ebp
"Dm_ret=dm. AsmCall (HWND, 1)
  • Related