forked from jewalky/a2mgr
-
Notifications
You must be signed in to change notification settings - Fork 3
/
resource_files_replace.cpp
157 lines (144 loc) · 2.32 KB
/
resource_files_replace.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
char *aWorld = "world.res";
char *aWorldData = "world\\data\\";
char *aWorldDataDatabin = "world\\data\\data.bin";
char *aWorldDataAireg = "world\\data\\ai.reg";
char *aWorldDataMapreg = "world\\data\\map.reg";
char *aWorldMissionScr = "world\\mission\\scr_";
char *aWorldDataItemnamebin = "world\\data\\itemname.bin";
char *aWorldDataItemnamepkt = "world\\data\\itemname.pkt";
char *aPatch = "patch.res";
char *aPatchPatchtxt = "patch\\patch.txt";
void _declspec(naked) FIL_world0()
{
// 00502C6B
__asm
{
mov dword ptr [ebp-4], 2
push aWorld
mov edx, 0x4EB741
call edx
add esp, 4
mov edx, 0x0502C7F
jmp edx
}
}
void _declspec(naked) FIL_world1()
{ // 00486DCD
__asm
{
push aWorldData
lea ecx, [ebp-0x790]
mov edx, 0x486DD8
jmp edx
}
}
void _declspec(naked) FIL_world2()
{ // 004F41F2
__asm
{
push aWorldData
lea ecx, [ebp-0x120]
mov edx, 0x4F41FD
jmp edx
}
}
void _declspec(naked) FIL_world3()
{ // 00502CF4
__asm
{
push 0x20
push aWorldDataDatabin
mov edx, 0x0502CFB
jmp edx
}
}
void _declspec(naked) FIL_world4()
{ // 00572315
__asm
{
push 0
push aWorldDataAireg
mov edx, 0x057231C
jmp edx
}
}
void _declspec(naked) FIL_world5()
{ // 0055E216
__asm
{
push 0
push aWorldDataMapreg
mov edx, 0x0055E21D
jmp edx
}
}
void _declspec(naked) FIL_world6()
{ // 0055D705
__asm
{
push 0
push aWorldDataMapreg
mov edx, 0x0055D70C
jmp edx
}
}
void _declspec(naked) FIL_world7()
{ // 0057F722
__asm
{
push aWorldMissionScr
mov eax, [ebp-0x5B4]
mov edx, 0x0057F72D
jmp edx
}
}
void _declspec(naked) FIL_world8()
{ // 004867D2
__asm
{
add esp, 4
push aWorld
mov edx, 0x004867DA
jmp edx
}
}
void _declspec(naked) FIL_world9()
{ // 00479704
__asm
{
push 0
push aWorldDataItemnamebin
mov edx, 0x0047970B
jmp edx
}
}
void _declspec(naked) FIL_worldA()
{ // 00479799
__asm
{
push 0
push aWorldDataItemnamepkt
mov edx, 0x004797A0
jmp edx
}
}
void _declspec(naked) FIL_patch0()
{ // 004867C5
__asm
{
add esp, 4
push aPatch
mov edx, 0x04867CD
jmp edx
}
}
void _declspec(naked) FIL_patch1()
{ // 00486D09
__asm
{
push aPatchPatchtxt
mov ecx, 0x0062BA40
mov edx, 0x00486D13
jmp edx
}
}