This commit is contained in:
6arelyFuture 2022-03-22 23:50:09 +00:00
parent 2ed98145da
commit d839ad1b7d
No known key found for this signature in database
GPG Key ID: E883E2BC9657D955
2 changed files with 33 additions and 34 deletions

View File

@ -12,45 +12,45 @@ game::dvar_t* cl_EnableCheats;
__declspec(naked) void draw_red_box_stub() { __declspec(naked) void draw_red_box_stub() {
__asm { __asm {
push eax push eax
mov eax, cl_EnableCheats mov eax, cl_EnableCheats
cmp byte ptr [eax + 12], 1 cmp byte ptr [eax + 12], 1
pop eax pop eax
je draw je draw
test byte ptr ds:0x8FF110, 0x10 test byte ptr ds:0x8FF110, 0x10
push 0x430568 push 0x430568
retn retn
draw: draw:
push 0x43056A push 0x43056A
retn retn
} }
} }
__declspec(naked) void blind_eye_check_stub() { __declspec(naked) void blind_eye_check_stub() {
__asm { __asm {
push eax push eax
mov eax, cl_EnableCheats mov eax, cl_EnableCheats
cmp byte ptr [eax + 12], 1 cmp byte ptr [eax + 12], 1
pop eax pop eax
je draw je draw
test byte ptr [esi], 0x20 test byte ptr [esi], 0x20
jnz skip_because_blindeye jnz skip_because_blindeye
jmp draw jmp draw
skip_because_blindeye: skip_because_blindeye:
push 0x5AA5A2 push 0x5AA5A2
retn retn
draw: draw:
push 0x05AA529 push 0x05AA529
retn retn
} }
} }

View File

@ -44,17 +44,16 @@ void cl_check_user_info(int _a1, const int force) {
} }
__declspec(naked) void cl_check_user_info_stub() { __declspec(naked) void cl_check_user_info_stub() {
__asm __asm {
{ pushad
pushad
push 0 push 0
push esi push esi
call cl_check_user_info call cl_check_user_info
add esp, 8 add esp, 8
popad popad
ret ret
} }
} }
} // namespace } // namespace