<?xml version="1.0" encoding="utf-8"?>
<CheatTable CheatEngineTableVersion="29">
  <CheatEntries>
    <CheatEntry>
      <ID>88</ID>
      <Description>"God Mode plus 5k dmg"</Description>
      <LastState Activated="1"/>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>[ENABLE]
aobscanmodule(dmg,IWD2.exe,66 29 86 C0 05 00 00) // should be unique
alloc(newmem,$1000)

label(code)
label(return)

newmem:
  cmp ebx,0
  je code
  jmp return
code:
  mov ax,#5000
  sub [esi+000005C0],ax
  jmp return

dmg:
  jmp newmem
  nop 2
return:
registersymbol(dmg)

[DISABLE]

dmg:
  db 66 29 86 C0 05 00 00

unregistersymbol(dmg)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: "IWD2.exe"+A83B1

"IWD2.exe"+A8394: 8B 44 24 2C                    -  mov eax,[esp+2C]
"IWD2.exe"+A8398: 83 F8 03                       -  cmp eax,03
"IWD2.exe"+A839B: 77 6F                          -  ja IWD2.exe+A840C
"IWD2.exe"+A839D: FF 24 85 C8 8D 4A 00           -  jmp dword ptr [eax*4+IWD2.exe+A8DC8]
"IWD2.exe"+A83A4: 8B 17                          -  mov edx,[edi]
"IWD2.exe"+A83A6: 55                             -  push ebp
"IWD2.exe"+A83A7: 56                             -  push esi
"IWD2.exe"+A83A8: 8B CF                          -  mov ecx,edi
"IWD2.exe"+A83AA: FF 52 28                       -  call dword ptr [edx+28]
"IWD2.exe"+A83AD: 66 8B 47 18                    -  mov ax,[edi+18]
// ---------- INJECTING HERE ----------
"IWD2.exe"+A83B1: 66 29 86 C0 05 00 00           -  sub [esi+000005C0],ax
// ---------- DONE INJECTING  ----------
"IWD2.exe"+A83B8: EB 52                          -  jmp IWD2.exe+A840C
"IWD2.exe"+A83BA: 0F BF 8E 7C 17 00 00           -  movsx ecx,word ptr [esi+0000177C]
"IWD2.exe"+A83C1: 8B 57 18                       -  mov edx,[edi+18]
"IWD2.exe"+A83C4: 3B D1                          -  cmp edx,ecx
"IWD2.exe"+A83C6: 0F BF 86 C0 05 00 00           -  movsx eax,word ptr [esi+000005C0]
"IWD2.exe"+A83CD: 7D 02                          -  jnl IWD2.exe+A83D1
"IWD2.exe"+A83CF: 8B CA                          -  mov ecx,edx
"IWD2.exe"+A83D1: 66 89 8E C0 05 00 00           -  mov [esi+000005C0],cx
"IWD2.exe"+A83D8: 2B 47 18                       -  sub eax,[edi+18]
"IWD2.exe"+A83DB: 8B 17                          -  mov edx,[edi]
}
</AssemblerScript>
    </CheatEntry>
    <CheatEntry>
      <ID>87</ID>
      <Description>"Gain 100.000xp for each kill"</Description>
      <LastState Activated="1"/>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>[ENABLE]
aobscanmodule(experience,IWD2.exe,01 90 B4 05 00 00) // should be unique
alloc(newmem,$1000)

label(code)
label(return)

newmem:
  mov edx,#100000
code:
  add [eax+000005B4],edx
  jmp return

experience:
  jmp newmem
  nop
return:
registersymbol(experience)

[DISABLE]

experience:
  db 01 90 B4 05 00 00

unregistersymbol(experience)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: "IWD2.exe"+B7BF9

"IWD2.exe"+B7BD6: 8B C6                          -  mov eax,esi
"IWD2.exe"+B7BD8: C7 81 10 01 00 00 00 00 00 00  -  mov [ecx+00000110],00000000
"IWD2.exe"+B7BE2: 5E                             -  pop esi
"IWD2.exe"+B7BE3: C2 04 00                       -  ret 0004
"IWD2.exe"+B7BE6: 8B 41 20                       -  mov eax,[ecx+20]
"IWD2.exe"+B7BE9: 8B 51 18                       -  mov edx,[ecx+18]
"IWD2.exe"+B7BEC: BE 01 00 00 00                 -  mov esi,00000001
"IWD2.exe"+B7BF1: 3B C6                          -  cmp eax,esi
"IWD2.exe"+B7BF3: 8B 44 24 0C                    -  mov eax,[esp+0C]
"IWD2.exe"+B7BF7: 75 19                          -  jne IWD2.exe+B7C12
// ---------- INJECTING HERE ----------
"IWD2.exe"+B7BF9: 01 90 B4 05 00 00              -  add [eax+000005B4],edx
// ---------- DONE INJECTING  ----------
"IWD2.exe"+B7BFF: 5F                             -  pop edi
"IWD2.exe"+B7C00: 89 B1 14 01 00 00              -  mov [ecx+00000114],esi
"IWD2.exe"+B7C06: 89 B1 10 01 00 00              -  mov [ecx+00000110],esi
"IWD2.exe"+B7C0C: 8B C6                          -  mov eax,esi
"IWD2.exe"+B7C0E: 5E                             -  pop esi
"IWD2.exe"+B7C0F: C2 04 00                       -  ret 0004
"IWD2.exe"+B7C12: 01 90 34 26 00 00              -  add [eax+00002634],edx
"IWD2.exe"+B7C18: 5F                             -  pop edi
"IWD2.exe"+B7C19: 8B C6                          -  mov eax,esi
"IWD2.exe"+B7C1B: C7 81 10 01 00 00 00 00 00 00  -  mov [ecx+00000110],00000000
}
</AssemblerScript>
    </CheatEntry>
    <CheatEntry>
      <ID>108</ID>
      <Description>"Get 100g if you buy something"</Description>
      <LastState Activated="1"/>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>[ENABLE]

aobscanmodule(gold,IWD2.exe,89 91 38 42 00 00) // should be unique
alloc(newmem,$1000)

label(code)
label(return)

newmem:
  mov edx,[ecx+00004238]
  add edx,#100
code:
  mov [ecx+00004238],edx
  jmp return

gold:
  jmp newmem
  nop
return:
registersymbol(gold)

[DISABLE]

gold:
  db 89 91 38 42 00 00

unregistersymbol(gold)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: "IWD2.exe"+1031EA

"IWD2.exe"+1031BE: 76 0C                          -  jna IWD2.exe+1031CC
"IWD2.exe"+1031C0: C7 81 38 42 00 00 00 00 00 00  -  mov [ecx+00004238],00000000
"IWD2.exe"+1031CA: EB 24                          -  jmp IWD2.exe+1031F0
"IWD2.exe"+1031CC: 8B 8A 54 1C 00 00              -  mov ecx,[edx+00001C54]
"IWD2.exe"+1031D2: 8B 91 38 42 00 00              -  mov edx,[ecx+00004238]
"IWD2.exe"+1031D8: 03 D0                          -  add edx,eax
"IWD2.exe"+1031DA: EB 0E                          -  jmp IWD2.exe+1031EA
"IWD2.exe"+1031DC: A1 DC F6 8C 00                 -  mov eax,[IWD2.exe+4CF6DC]
"IWD2.exe"+1031E1: 8B 88 54 1C 00 00              -  mov ecx,[eax+00001C54]
"IWD2.exe"+1031E7: 8B 56 0C                       -  mov edx,[esi+0C]
// ---------- INJECTING HERE ----------
"IWD2.exe"+1031EA: 89 91 38 42 00 00              -  mov [ecx+00004238],edx
// ---------- DONE INJECTING  ----------
"IWD2.exe"+1031F0: A1 DC F6 8C 00                 -  mov eax,[IWD2.exe+4CF6DC]
"IWD2.exe"+1031F5: 8B 88 C4 03 00 00              -  mov ecx,[eax+000003C4]
"IWD2.exe"+1031FB: 85 C9                          -  test ecx,ecx
"IWD2.exe"+1031FD: 5E                             -  pop esi
"IWD2.exe"+1031FE: 74 08                          -  je IWD2.exe+103208
"IWD2.exe"+103200: 8B 11                          -  mov edx,[ecx]
"IWD2.exe"+103202: FF A2 0C 01 00 00              -  jmp dword ptr [edx+0000010C]
"IWD2.exe"+103208: C3                             -  ret 
"IWD2.exe"+103209: 90                             -  nop 
"IWD2.exe"+10320A: 90                             -  nop 
}
</AssemblerScript>
    </CheatEntry>
    <CheatEntry>
      <ID>106</ID>
      <Description>"Pointers for editing at levelup"</Description>
      <LastState Value="" RealAddress="00000000"/>
      <GroupHeader>1</GroupHeader>
      <CheatEntries>
        <CheatEntry>
          <ID>102</ID>
          <Description>"Available Attribute Points"</Description>
          <LastState Value="0" RealAddress="028B99C8"/>
          <VariableType>2 Bytes</VariableType>
          <Address>"IWD2.exe"+001E17D4</Address>
          <Offsets>
            <Offset>1778</Offset>
            <Offset>6C</Offset>
          </Offsets>
        </CheatEntry>
        <CheatEntry>
          <ID>103</ID>
          <Description>"Available Skill Points"</Description>
          <LastState Value="0" RealAddress="028B89E8"/>
          <VariableType>2 Bytes</VariableType>
          <Address>"IWD2.exe"+001E17D4</Address>
          <Offsets>
            <Offset>798</Offset>
            <Offset>6C</Offset>
          </Offsets>
        </CheatEntry>
        <CheatEntry>
          <ID>105</ID>
          <Description>"Available Talent Points"</Description>
          <LastState Value="0" RealAddress="028B8896"/>
          <VariableType>2 Bytes</VariableType>
          <Address>"IWD2.exe"+001E17D4</Address>
          <Offsets>
            <Offset>646</Offset>
            <Offset>6C</Offset>
          </Offsets>
        </CheatEntry>
      </CheatEntries>
    </CheatEntry>
  </CheatEntries>
  <CheatCodes>
    <CodeEntry>
      <Description>Change of sub [ebx+00000438],ax</Description>
      <AddressString>icewind.exe+177F85</AddressString>
      <Before>
        <Byte>FF</Byte>
        <Byte>66</Byte>
        <Byte>8B</Byte>
        <Byte>46</Byte>
        <Byte>18</Byte>
      </Before>
      <Actual>
        <Byte>66</Byte>
        <Byte>29</Byte>
        <Byte>83</Byte>
        <Byte>38</Byte>
        <Byte>04</Byte>
        <Byte>00</Byte>
        <Byte>00</Byte>
      </Actual>
      <After>
        <Byte>EB</Byte>
        <Byte>71</Byte>
        <Byte>0F</Byte>
        <Byte>BF</Byte>
        <Byte>83</Byte>
      </After>
    </CodeEntry>
  </CheatCodes>
  <UserdefinedSymbols/>
</CheatTable>
