How to fix request quote buying & selling.
First u need to a new case in "Func _($aASM)"
Code:
Local $lBuffer
Local $lOpCode
Select
Case StringInStr($aASM, " -> ")
Local $split = StringSplit($aASM, " -> ", 1)
$lOpCode = StringReplace($split[2], " ", "")
$mASMSize += 0.5 * StringLen($lOpCode)
$mASMString &= $lOpCode
Case StringRight($aASM, 1) = ':'
Then replace the old code with the following
Code:
$lTemp = GetScannedAddress('ScanTraderHook', -0x2F)
SetValue('TraderHookStart', '0x' & Hex($lTemp, 8))
SetValue('TraderHookReturn', '0x' & Hex($lTemp + 5, 8))
SetValue('RequestQuoteFunction', '0x' & Hex(GetScannedAddress('ScanRequestQuoteFunction', 0x3B), 8)) ;-2
SetValue('TraderFunction', '0x' & Hex(GetScannedAddress('ScanTraderFunction', -0x1E), 8))
_('ScanRequestQuoteFunction:')
AddPattern('83C4245B8BE55D')
_('ScanTraderFunction:')
AddPattern('83FF10761468AC210000')
_('ScanTraderHook:')
AddPattern('50516A466A06')
_('CommandRequestQuote:')
_('mov dword[TraderCostID],0')
_('mov dword[TraderCostValue],0')
_('mov esi,eax')
_('add esi,4')
_('push esi')
_('push 1')
_('push 0')
_('push 0')
_('push 0')
_('push 0')
_('push 0')
_('push C')
_('mov ecx,0')
_('mov edx,2')
_('call RequestQuoteFunction')
_('add esp,20')
_('ljmp CommandReturn')
_('CommandRequestQuoteSell:')
_('mov dword[TraderCostID],0')
_('mov dword[TraderCostValue],0')
_('push 0')
_('push 0')
_('push 0')
_('add eax,4')
_('push eax')
_('push 1')
_('push 0')
_('push 0')
_('push D')
_('xor edx,edx')
_('call RequestQuoteFunction')
_('add esp,20')
_('ljmp CommandReturn')
_('CommandTraderBuy:')
_('push 0')
_('push TraderCostID')
_('push 1')
_('push 0')
_('push 0')
_('push 0')
_('push 0')
_('mov edx,dword[TraderCostValue]')
_('push edx')
_('push c')
_('call TraderFunction')
_('add esp,24')
_('mov dword[TraderCostID],0')
_('mov dword[TraderCostValue],0')
_('ljmp CommandReturn')
_('CommandTraderSell:')
_('push 0')
_('push 0')
_('push 0')
_('push dword[TraderCostValue]')
_('push 0')
_('push TraderCostID')
_('push 1')
_('push 0')
_('push D')
_('mov ecx,d')
_('xor edx,edx')
_('call TraderFunction')
_('add esp,24')
_('mov dword[TraderCostID],0')
_('mov dword[TraderCostValue],0')
_('ljmp CommandReturn')
Func CreateTraderHook()
_('TraderHookProc:')
_('push eax')
_('mov eax,dword[ebx+28] -> 8b 43 28')
_('mov eax,[eax] -> 8b 00')
_('mov dword[TraderCostID],eax')
_('mov eax,dword[ebx+28] -> 8b 43 28')
_('mov eax,[eax+4] -> 8b 40 04')
_('mov dword[TraderCostValue],eax')
_('pop eax')
_('mov ebx,dword[ebp+C] -> 8B 5D 0C') ; Original bytes
_('mov esi,eax') ; Original bytes
_('push eax')
_('mov eax,dword[TraderQuoteID]')
_('inc eax')
_('cmp eax,200')
_('jnz TraderSkipReset')
_('xor eax,eax')
_('TraderSkipReset:')
_('mov dword[TraderQuoteID],eax')
_('pop eax')
_('ljmp TraderHookReturn')
EndFunc ;==>CreateTraderHook
It's possible that i forgot something in my post here. Try it, let me know if it works. Enjoy.