forked from FAForever/FA-Binary-Patches
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBuildUnit.cpp
36 lines (35 loc) · 840 Bytes
/
BuildUnit.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
char _sCQUEMOV[] = "CQUEMOV";
char** _pCQUEMOV = (char**)&_sCQUEMOV;
void BuildUnit()
{
asm(
"PUSH 0x00E19824;"
"JMP BU_L1;"
"BU_L2:;"
);
asm(
"PUSH %[_pCQUEMOV];"
"MOV EDX,SS:[ESP-0x80];"
"MOV ECX,SS:[ESP];"
"MOV EDX,SS:[EDX];"
"MOV ECX,SS:[ECX];"
"CMP EDX,ECX;"
"JE 0x006EFACE;"
"MOV SS:[ESP+0x20],EAX;"
"BU_L1:;"
"LEA ECX,SS:[ESP+0x44];"
"CALL 0x00405550;"
"MOV BYTE PTR SS:[ESP+0x36C],1;"
"MOV EBX,1;"
"LEA ECX,DS:[EDI+8];"
"LEA EAX,SS:[ESP+0x40];"
"MOV SS:[ESP+0x18],EBX;"
"CALL 0x0067B050;"
"TEST AL,AL;"
"JNE 0x006EFAF8;"
"JMP BU_L2;"
:
: [_pCQUEMOV] "d" (_pCQUEMOV)
:
);
}