Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [ENABLE]
- aobscan(DoNOTStarve_AOB,8B 4D 00 8B 44 24 24 89 08 8b 55 04 5f 5e)
- label(DoNOTStarve)
- registersymbol(DoNOTStarve)
- alloc(newmem,2048)
- label(returnhere)
- label(originalcode)
- label(exit)
- // used for "search mechanism"
- label(str_current_First) // 'current' found (first)
- label(str_DoDelta) // 'DoDelta' found
- label(str_hungerrate) // 'hungerrate' found
- label(str_period) // 'period' found
- label(str_current_Second) // 'current' found (second)
- label(C_str_current_First)
- label(C_str_DoDelta)
- label(C_str_hungerrate)
- label(C_str_period)
- label(C_str_current_Second)
- label(str_currenthealth_1) // 'currenthealth' found
- label(str_GetPercent_ForHealth) // 'GetPercent' found
- label(str_currenthealth_2) // 'currenthealth' found
- label(str_maxhealth) // 'maxhealth' found
- label(str_currenthealth_3) // 'currenthealth' found
- label(C_str_currenthealth_1)
- label(C_str_GetPercent_ForHealth)
- label(C_str_currenthealth_2)
- label(C_str_maxhealth)
- label(C_str_currenthealth_3)
- label(str_Use) // 'Use' found
- label(str_SetUses) // 'SetUses' found
- label(str_current_uses) // 'current' found // one time // previous three times
- label(counterForStrCurrent_uses)
- label(C_str_Use)
- label(C_str_SetUses)
- label(C_str_current_uses)
- label(str_stackable_1) // 'stackable' found
- label(str_components_stacksize) // 'components' found
- label(str_stackable_2) // 'stackable' found
- label(str_StackSize_1) // 'StackSize' found
- label(str_stacksize_2) // 'stacksize' found
- label(C_str_stackable_1)
- label(C_str_components_stacksize)
- label(C_str_stackable_2)
- label(C_str_StackSize_1)
- label(C_str_stacksize_2)
- label(str_maxfuel) // 'maxfuel' found
- label(str_currentfuel_1) // 'currentfuel' found
- label(C_str_maxfuel)
- label(C_str_currentfuel_1)
- label(str_owner_Sanity) // 'owner' found
- label(str_components_Sanity) // 'components' found
- label(str_sanity) // 'sanity' found
- label(str_GetPercent_Sanity) // 'GetPercent' found
- label(str_current_Sanity) // 'current' found
- label(C_str_owner_Sanity)
- label(C_str_components_Sanity)
- label(C_str_sanity)
- label(C_str_GetPercent_Sanity)
- label(C_str_current_Sanity)
- label(resetSearchMechanism)
- /////////////////////////////////////////////////////
- // notes
- //
- // maximumHealth address = health address -0x1C0
- // penalty address = health address -0xA0
- // inst address = health address -0x80
- // health address
- //
- // maxfuel address = currentfuel -20
- // currentfuel address
- //
- // stomach address
- // inst address = stomach address +20
- // stomachMaximum address = stomach address +60
- //
- // sanity address
- // inst address = sanity address +20
- // sanityMaximum address = sanity address +60
- //
- //
- label(ValueTen)
- label(ValueSeventeen)
- label(oneHundred)
- label(veryHighValue)
- label(Zero)
- label(storedMaxFuel)
- label(storedInst)
- label(hungerrateAddress)
- registersymbol(hungerrateAddress)
- label(StomachAlwaysFull)
- registersymbol(StomachAlwaysFull)
- label(HealthAlwaysFull)
- registersymbol(HealthAlwaysFull)
- label(Always10UsesLeft)
- registersymbol(Always10UsesLeft)
- label(StackFreeze)
- registersymbol(StackFreeze)
- label(InfiniteFuel)
- registersymbol(InfiniteFuel)
- label(InfiniteSanity)
- registersymbol(InfiniteSanity)
- newmem:
- pushfd
- pushad
- //can we even start anything ?
- lea eax,[ebp+18]
- push 00000004
- push eax
- call isbadreadptr
- cmp eax,0
- jne originalcode
- ////////////////////////
- cmp dword ptr [ebp+18],04 // lua_tstring ???????
- jne originalcode
- mov eax,[ebp+10]
- //
- push 00000004
- push eax
- call isbadreadptr
- cmp eax,0
- jne originalcode
- ////////////////////////
- mov eax,[ebp+10]
- cmp dword ptr [eax+0C],02 // all used strings are bigger than 2 chars, check that
- jle originalcode
- cmp byte ptr [str_GetPercent_Sanity],1
- je C_str_current_Sanity
- cmp byte ptr [str_sanity],1
- je C_str_GetPercent_Sanity
- cmp byte ptr [str_components_Sanity],1
- je C_str_sanity
- cmp byte ptr [str_owner_Sanity],1
- je C_str_components_Sanity
- cmp byte ptr [str_maxfuel],1
- je C_str_currentfuel_1
- cmp byte ptr [str_StackSize_1],1
- je C_str_stacksize_2
- cmp byte ptr [str_stackable_2],1
- je C_str_StackSize_1
- cmp byte ptr [str_components_stacksize],1
- je C_str_stackable_2
- cmp byte ptr [str_stackable_1],1
- je C_str_components_stacksize
- cmp byte ptr [str_SetUses],1
- je C_str_current_uses
- cmp byte ptr [str_Use],1
- je C_str_SetUses
- cmp byte ptr [str_maxhealth],1
- je C_str_currenthealth_3
- cmp byte ptr [str_currenthealth_2],1
- je C_str_maxhealth
- cmp byte ptr [str_GetPercent_ForHealth],1
- je C_str_currenthealth_2
- cmp byte ptr [str_currenthealth_1],1
- je C_str_GetPercent_ForHealth
- cmp byte ptr [str_period],1
- je C_str_current_Second
- cmp byte ptr [str_hungerrate],1
- je C_str_period
- cmp byte ptr [str_DoDelta],1
- je C_str_hungerrate
- cmp byte ptr [str_current_First],1
- je C_str_DoDelta
- C_str_current_First:
- cmp dword ptr [eax+10],'curr'
- jne C_str_currenthealth_1
- cmp dword ptr [eax+14],'ent'
- jne C_str_currenthealth_1
- mov byte ptr [str_current_First],1
- jmp originalcode
- C_str_DoDelta:
- cmp dword ptr [eax+10],'DoDe'
- jne resetSearchMechanism
- cmp dword ptr [eax+14],'lta'
- jne resetSearchMechanism
- mov byte ptr [str_DoDelta],1
- jmp originalcode
- C_str_hungerrate:
- cmp dword ptr [eax+10],'hung'
- jne resetSearchMechanism
- cmp dword ptr [eax+14],'erra'
- jne resetSearchMechanism
- cmp word ptr [eax+18],'te'
- jne resetSearchMechanism
- mov byte ptr [str_hungerrate],1
- mov [hungerrateAddress],ebp // we have hungerrate address now ( value = 0.13(8) )
- jmp originalcode
- C_str_period:
- cmp dword ptr [eax+10],'peri'
- jne resetSearchMechanism
- cmp word ptr [eax+14],'od'
- jne resetSearchMechanism
- mov byte ptr [str_period],1
- jmp originalcode
- C_str_current_Second:
- cmp dword ptr [eax+10],'curr'
- jne resetSearchMechanism
- cmp dword ptr [eax+14],'ent'
- jne resetSearchMechanism
- mov byte ptr [str_current_Second],1
- // we have current "stomach happines", value = (0.0 - 100.0)
- // store handy "inst"
- mov ebx,[ebp+20]
- mov [storedInst],ebx
- cmp [StomachAlwaysFull],0
- je resetSearchMechanism
- //change "stomach happines"
- movsd xmm0,[ebp+60] // get maxium
- cvttsd2si ebx,xmm0
- inc ebx
- cvtsi2sd xmm0,ebx
- movsd [ebp],xmm0
- jmp resetSearchMechanism
- C_str_currenthealth_1:
- cmp dword ptr [eax+10],'curr'
- jne C_str_Use
- cmp dword ptr [eax+14],'enth'
- jne C_str_Use
- cmp dword ptr [eax+18],'ealt'
- jne C_str_Use
- mov byte ptr [str_currenthealth_1],1
- jmp originalcode
- C_str_GetPercent_ForHealth:
- cmp dword ptr [eax+10],'GetP'
- jne resetSearchMechanism
- cmp dword ptr [eax+14],'erce'
- jne resetSearchMechanism
- cmp word ptr [eax+18],'nt'
- jne resetSearchMechanism
- mov byte ptr [str_GetPercent_ForHealth],1
- jmp originalcode
- C_str_currenthealth_2:
- cmp dword ptr [eax+10],'curr'
- jne resetSearchMechanism
- cmp dword ptr [eax+14],'enth'
- jne resetSearchMechanism
- cmp dword ptr [eax+18],'ealt'
- jne resetSearchMechanism
- mov byte ptr [str_currenthealth_2],1
- jmp originalcode
- C_str_maxhealth:
- cmp dword ptr [eax+10],'maxh'
- jne resetSearchMechanism
- cmp dword ptr [eax+14],'ealt'
- jne resetSearchMechanism
- cmp word ptr [eax+18],'h'
- jne resetSearchMechanism
- mov byte ptr [str_maxhealth],1
- jmp originalcode
- C_str_currenthealth_3:
- cmp dword ptr [eax+10],'curr'
- jne resetSearchMechanism
- cmp dword ptr [eax+14],'enth'
- jne resetSearchMechanism
- cmp dword ptr [eax+18],'ealt'
- jne resetSearchMechanism
- mov ebx,[storedInst]
- cmp [ebp-80],ebx // check "inst"
- jne resetSearchMechanism
- mov byte ptr [str_currenthealth_3],1
- // here we have current health address, value (0.0 - 100.0) by default
- //
- // maxhealth is 0x1c0 bytes before currenthealth (risky)
- //
- cmp [HealthAlwaysFull],0
- je resetSearchMechanism
- mov ebx,[veryHighValue] // risky, probably it will crash on another game update
- mov [ebp-1C0],ebx
- mov [ebp],ebx
- mov ebx,[veryHighValue+4]
- mov [ebp-1BC],ebx
- mov [ebp+4],ebx
- xor ebx,ebx
- cvtsi2sd xmm0,ebx
- movsd [ebp-A0],xmm0 // penalty
- jmp resetSearchMechanism
- C_str_Use:
- cmp dword ptr [eax+10],'Use'
- jne C_str_stackable_1
- mov byte ptr [str_Use],1
- jmp originalcode
- C_str_SetUses:
- cmp dword ptr [eax+10],'SetU'
- jne resetSearchMechanism
- cmp dword ptr [eax+14],'ses'
- jne resetSearchMechanism
- mov byte ptr [str_SetUses],1
- jmp originalcode
- C_str_current_uses:
- cmp dword ptr [eax+10],'curr'
- jne resetSearchMechanism
- cmp dword ptr [eax+14],'ent'
- jne resetSearchMechanism
- inc byte ptr [counterForStrCurrent_uses] // one time // previous three times
- cmp byte ptr [counterForStrCurrent_uses],01 //
- jne originalcode
- mov byte ptr [str_current_uses],1
- // here we have current "uses left" address, set 10.0 uses
- cmp [Always10UsesLeft],0
- je resetSearchMechanism
- mov ebx,[ValueTen]
- mov [ebp],ebx
- mov ebx,[ValueTen+4]
- mov [ebp+4],ebx
- jmp resetSearchMechanism
- C_str_stackable_1:
- cmp dword ptr [eax+10],'stac'
- jne C_str_maxfuel
- cmp dword ptr [eax+14],'kabl'
- jne C_str_maxfuel
- cmp word ptr [eax+18],'e'
- jne C_str_maxfuel
- mov byte ptr [str_stackable_1],1
- jmp originalcode
- C_str_components_stacksize:
- cmp dword ptr [eax+10],'comp'
- jne resetSearchMechanism
- cmp dword ptr [eax+14],'onen'
- jne resetSearchMechanism
- cmp word ptr [eax+18],'ts'
- jne resetSearchMechanism
- mov byte ptr [str_components_stacksize],1
- jmp originalcode
- C_str_stackable_2:
- cmp dword ptr [eax+10],'stac'
- jne resetSearchMechanism
- cmp dword ptr [eax+14],'kabl'
- jne resetSearchMechanism
- cmp word ptr [eax+18],'e'
- jne resetSearchMechanism
- mov byte ptr [str_stackable_2],1
- jmp originalcode
- C_str_StackSize_1:
- cmp dword ptr [eax+10],'Stac'
- jne resetSearchMechanism
- cmp dword ptr [eax+14],'kSiz'
- jne resetSearchMechanism
- cmp word ptr [eax+18],'e'
- jne resetSearchMechanism
- mov byte ptr [str_StackSize_1],1
- jmp originalcode
- C_str_stacksize_2:
- cmp dword ptr [eax+10],'stac'
- jne resetSearchMechanism
- cmp dword ptr [eax+14],'ksiz'
- jne resetSearchMechanism
- cmp word ptr [eax+18],'e'
- jne resetSearchMechanism
- mov byte ptr [str_stacksize_2],1
- // we have current "stack size", value = (0.0 - XXX.0)
- cmp [StackFreeze],0
- je resetSearchMechanism
- mov ebx,[ValueSeventeen]
- mov [ebp],ebx
- mov ebx,[ValueSeventeen+4]
- mov [ebp+4],ebx
- jmp resetSearchMechanism
- C_str_maxfuel:
- cmp dword ptr [eax+10],'maxf'
- jne C_str_owner_Sanity
- cmp dword ptr [eax+14],'uel'
- jne C_str_owner_Sanity
- mov byte ptr [str_maxfuel],1
- mov ebx,[ebp]
- mov [storedMaxFuel],ebx
- mov ebx,[ebp+4]
- mov [storedMaxFuel+4],ebx
- jmp originalcode
- C_str_currentfuel_1:
- cmp dword ptr [eax+10],'curr'
- jne resetSearchMechanism
- cmp dword ptr [eax+14],'entf'
- jne resetSearchMechanism
- cmp dword ptr [eax+18],'uel'
- jne resetSearchMechanism
- mov byte ptr [str_currentfuel_1],1
- // we have current "fuel", value = (fire pit has values from 0.0 to 360.0 )
- cmp [InfiniteFuel],0
- je resetSearchMechanism
- mov ebx,[storedMaxFuel]
- mov [ebp],ebx
- mov ebx,[storedMaxFuel+4]
- mov [ebp+4],ebx
- jmp resetSearchMechanism
- C_str_owner_Sanity:
- cmp dword ptr [eax+10],'owne'
- jne originalcode
- cmp word ptr [eax+14],'r'
- jne originalcode
- mov byte ptr [str_owner_Sanity],1
- jmp originalcode
- C_str_components_Sanity:
- cmp dword ptr [eax+10],'comp'
- jne resetSearchMechanism
- cmp dword ptr [eax+14],'onen'
- jne resetSearchMechanism
- cmp word ptr [eax+18],'ts'
- jne resetSearchMechanism
- mov byte ptr [str_components_Sanity],1
- jmp originalcode
- C_str_sanity:
- cmp dword ptr [eax+10],'sani'
- jne resetSearchMechanism
- cmp word ptr [eax+14],'ty'
- jne resetSearchMechanism
- mov byte ptr [str_sanity],1
- jmp originalcode
- C_str_GetPercent_Sanity:
- cmp dword ptr [eax+10],'GetP'
- jne resetSearchMechanism
- cmp dword ptr [eax+14],'erce'
- jne resetSearchMechanism
- cmp word ptr [eax+18],'nt'
- jne resetSearchMechanism
- mov byte ptr [str_GetPercent_Sanity],1
- jmp originalcode
- C_str_current_Sanity:
- cmp dword ptr [eax+10],'curr'
- jne resetSearchMechanism
- cmp dword ptr [eax+14],'ent'
- jne resetSearchMechanism
- mov byte ptr [str_current_Sanity],1
- // we have current "sanity"
- cmp [InfiniteSanity],0
- je resetSearchMechanism
- mov ebx,[ebp+60]
- mov [ebp],ebx
- mov ebx,[ebp+64]
- mov [ebp+4],ebx
- jmp resetSearchMechanism
- resetSearchMechanism:
- mov byte ptr [str_current_First],0
- mov byte ptr [str_DoDelta],0
- mov byte ptr [str_hungerrate],0
- mov byte ptr [str_period],0
- mov byte ptr [str_current_Second],0
- mov byte ptr [str_currenthealth_1],0
- mov byte ptr [str_GetPercent_ForHealth],0
- mov byte ptr [str_currenthealth_2],0
- mov byte ptr [str_maxhealth],0
- mov byte ptr [str_currenthealth_3],0
- mov byte ptr [str_Use],0
- mov byte ptr [str_SetUses],0
- mov byte ptr [str_current_uses],0
- mov byte ptr [counterForStrCurrent_uses],0
- mov byte ptr [str_stackable_1],0
- mov byte ptr [str_components_stacksize],0
- mov byte ptr [str_stackable_2],0
- mov byte ptr [str_StackSize_1],0
- mov byte ptr [str_stacksize_2],0
- mov byte ptr [str_maxfuel],0
- mov byte ptr [str_currentfuel_1],0
- mov byte ptr [str_owner_Sanity],0
- mov byte ptr [str_components_Sanity],0
- mov byte ptr [str_sanity],0
- mov byte ptr [str_GetPercent_Sanity],0
- mov byte ptr [str_current_Sanity],0
- originalcode:
- popad
- popfd
- mov ecx,[ebp+00]
- mov eax,[esp+24]
- exit:
- jmp returnhere
- //check chain
- str_current_First:
- db 0
- str_DoDelta:
- db 0
- str_hungerrate:
- db 0
- str_period:
- db 0
- str_current_Second:
- db 0
- str_currenthealth_1:
- db 0
- str_GetPercent_ForHealth:
- db 0
- str_currenthealth_2:
- db 0
- str_maxhealth:
- db 0
- str_currenthealth_3:
- db 0
- str_Use:
- db 0
- str_SetUses:
- db 0
- str_current_uses:
- db 0
- counterForStrCurrent_uses:
- db 0
- str_stackable_1:
- db 0
- str_components_stacksize:
- db 0
- str_stackable_2:
- db 0
- str_StackSize_1:
- db 0
- str_stacksize_2:
- db 0
- str_maxfuel:
- db 0
- str_currentfuel_1:
- db 0
- str_owner_Sanity:
- db 0
- str_components_Sanity:
- db 0
- str_sanity:
- db 0
- str_GetPercent_Sanity:
- db 0
- str_current_Sanity:
- db 0
- // constants variables
- ValueTen:
- dq (double)0011.00
- ValueSeventeen:
- dq (double)0017.00
- oneHundred:
- dq (double)0101.00
- veryHighValue:
- dq (double)0300.00
- Zero:
- dq (double)0000.00
- // variables
- storedMaxFuel:
- dq (double)0.0
- storedInst:
- dd 0
- //available outside AA script
- hungerrateAddress:
- dd 0
- StomachAlwaysFull:
- dd 0
- HealthAlwaysFull:
- dd 0
- Always10UsesLeft:
- dd 0
- StackFreeze:
- dd 0
- InfiniteFuel:
- dd 0
- InfiniteSanity:
- dd 0
- //"dontstarve_steam.exe"+C78FB:
- DoNOTStarve_AOB:
- DoNOTStarve:
- jmp newmem
- nop
- nop
- returnhere:
- "dontstarve_steam.exe"+500:
- dd 01
- "dontstarve_steam.exe"+508:
- dd DoNOTStarve
- [DISABLE]
- //"dontstarve_steam.exe"+C78FB:
- DoNOTStarve:
- //Alt: mov ecx,[ebp+00]
- //Alt: mov eax,[esp+24]
- db 8B 4D 00 8B 44 24 24
- "dontstarve_steam.exe"+500:
- db 00
- unregistersymbol(hungerrateAddress)
- unregistersymbol(StomachAlwaysFull)
- unregistersymbol(HealthAlwaysFull)
- unregistersymbol(Always10UsesLeft)
- unregistersymbol(StackFreeze)
- unregistersymbol(InfiniteFuel)
- unregistersymbol(InfiniteSanity)
- unregistersymbol(DoNOTStarve)
- dealloc(newmem)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement