-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdetours.yaml
More file actions
993 lines (911 loc) · 20.6 KB
/
detours.yaml
File metadata and controls
993 lines (911 loc) · 20.6 KB
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
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
functions:
- name: GL_BuildPolygonFromSurface
module: RefDll
identifier: "0x00016390"
return_type: void
calling_convention: __cdecl
detour_len: 0
params:
- type: void*
name: msurface_s
- name: R_BlendLightmaps
module: RefDll
identifier: "0x00015440"
return_type: void
calling_convention: __cdecl
detour_len: 0
params: []
- name: IN_MouseMove
module: SofExe
identifier: "0x0004A1F0"
return_type: void
calling_convention: __cdecl
detour_len: 0
params:
- type: void*
name: cmd
- name: VID_CheckChanges
module: SofExe
identifier: "0x00670C0"
return_type: void
calling_convention: __cdecl
detour_len: 0
params: []
- name: FS_InitFilesystem
module: SofExe
identifier: "0x20026980"
return_type: void
calling_convention: __cdecl
detour_len: 0
params: []
- name: FS_LoadFile
module: SofExe
identifier: "0x20025370"
return_type: int
calling_convention: __cdecl
detour_len: 0
params:
- type: char*
name: path
- type: void**
name: buffer
- type: bool
name: override_pak
- name: FS_FreeFile
module: SofExe
identifier: "0x25420"
return_type: void
calling_convention: __cdecl
detour_len: 0
params:
- type: void*
name: buffer
- name: Z_Malloc
module: SofExe
identifier: "0x1F120"
return_type: void*
calling_convention: __cdecl
detour_len: 0
params:
- type: int
name: size
- name: SCR_UpdateScreen
module: SofExe
identifier: "0x15FA0"
return_type: void
calling_convention: __cdecl
detour_len: 0
params:
- type: bool
name: force
- name: Cbuf_AddLateCommands
module: SofExe
identifier: "0x20018740"
return_type: qboolean
calling_convention: __cdecl
detour_len: 0
params: []
- name: Cmd_ExecuteString
module: SofExe
identifier: "0x194F0"
return_type: void
calling_convention: __cdecl
detour_len: 0
params:
- type: const char*
name: text
# Engine globals (pointer-only; resolved via core/pointers.json + RegisterPointerOnlyFunctions_SofExe)
- name: Cvar_Get
module: SofExe
identifier: "0x20021AE0"
return_type: cvar_t*
calling_convention: __cdecl
detour_len: 0
params:
- type: const char*
name: name
- type: const char*
name: value
- type: int
name: flags
- type: cvarcommand_t
name: command
- name: Cvar_Set2
module: SofExe
identifier: "0x20021D70"
return_type: cvar_t*
calling_convention: __cdecl
detour_len: 0
params:
- type: char*
name: var_name
- type: char*
name: value
- type: qboolean
name: force
- name: Cvar_SetInternal
module: SofExe
identifier: "0x200216C0"
return_type: void
calling_convention: __cdecl
detour_len: 0
params:
- type: bool
name: active
- name: Com_Printf
module: SofExe
identifier: "0x2001C6E0"
return_type: void
calling_convention: __cdecl
detour_len: 0
variadic: true
params:
- type: const char*
name: msg
- name: Com_DPrintf
module: SofExe
identifier: "0x2001C8E0"
return_type: void
calling_convention: __cdecl
detour_len: 0
variadic: true
params:
- type: const char*
name: fmt
- name: Qcommon_Init
module: SofExe
identifier: "0x2001F390"
return_type: void
calling_convention: __cdecl
detour_len: 0
params:
- type: int
name: argc
- type: char**
name: argv
- name: Cmd_AddCommand
module: SofExe
identifier: "0x20019130"
return_type: void
calling_convention: __cdecl
detour_len: 0
params:
- type: char*
name: cmd_name
- type: xcommand_t
name: function
- name: Cmd_Argc
module: SofExe
identifier: "0x20018D20"
return_type: int
calling_convention: __cdecl
detour_len: 0
params: []
- name: Cmd_Argv
module: SofExe
identifier: "0x20018D30"
return_type: char*
calling_convention: __cdecl
detour_len: 0
params:
- type: int
name: i
- name: Z_Free
module: SofExe
identifier: "0x0001EB00"
return_type: void
calling_convention: __cdecl
detour_len: 0
params:
- type: void*
name: v
# SoF.exe.json: rva 125648 (0x1EA90); function before Z_Free in map — verify if cvar string ops misbehave
- name: CopyString
module: SofExe
identifier: "0x0001EA90"
return_type: char*
calling_convention: __cdecl
detour_len: 0
params:
- type: char*
name: in
- name: Qcommon_Frame
module: SofExe
identifier: "0x2001F720"
return_type: void
calling_convention: __cdecl
detour_len: 10
params:
- type: int
name: msec
- name: CL_Precache_f
module: SofExe
identifier: "0x00112F0"
return_type: void
calling_convention: __cdecl
detour_len: 6
params: []
- name: Reconnect_f
module: SofExe
identifier: "0x0000BCC0"
return_type: void
calling_convention: __cdecl
detour_len: 5
params: []
# Trampoline: first insn is E8 rel32 -> M_ForceMenuOff_f; detours.cpp retargets rel for trampoline.
- name: SCR_BeginLoadingPlaque
module: SofExe
identifier: "0x00013A50"
return_type: void
calling_convention: __cdecl
detour_len: 5
params:
- type: qboolean
name: noPlaque
- name: CL_ParseConfigString
module: SofExe
identifier: "0x000E690"
return_type: void
calling_convention: __cdecl
detour_len: 11
params: []
- name: CL_Shutdown
module: SofExe
identifier: "0x000DDE0"
return_type: void
calling_convention: __cdecl
detour_len: 0
params: []
- name: SV_ShutdownGameProgs
module: SofExe
identifier: "0x005CD70"
return_type: void
calling_convention: __cdecl
detour_len: 0
params: []
- name: Con_DrawNotify
module: SofExe
identifier: "0x00020D70"
return_type: void
calling_convention: __cdecl
detour_len: 0
params: []
- name: Con_DrawConsole
module: SofExe
identifier: "0x00020F90"
return_type: void
calling_convention: __cdecl
detour_len: 0
params:
- type: float
name: frac
- name: SCR_DrawPlayerInfo
module: SofExe
identifier: "0x00015B10"
return_type: void
calling_convention: __cdecl
detour_len: 0
params: []
- name: Con_CheckResize
module: SofExe
identifier: "0x00020880"
return_type: void
calling_convention: __cdecl
detour_len: 0
params: []
- name: Con_Init
module: SofExe
identifier: "0x000208E0"
return_type: void
calling_convention: __cdecl
detour_len: 0
params: []
- name: SCR_ExecuteLayoutString
module: SofExe
identifier: "0x00014510"
return_type: void
calling_convention: __cdecl
detour_len: 0
params:
- type: char*
name: text
- name: SCR_CenterPrint
module: SofExe
identifier: "0x00012DB0"
return_type: void
calling_convention: __cdecl
detour_len: 0
params:
- type: char*
name: str
- name: cInventory2_And_cGunAmmo2_Draw
module: SofExe
identifier: "0x00008430"
return_type: void
calling_convention: __thiscall
detour_len: 0
params:
- type: void*
name: self
- name: cHealthArmor2_Draw
module: SofExe
identifier: "0x00008C60"
return_type: void
calling_convention: __thiscall
detour_len: 0
params:
- type: void*
name: self
- name: cDMRanking_Draw
module: SofExe
identifier: "0x00007B30"
return_type: void
calling_convention: __thiscall
detour_len: 0
params:
- type: void*
name: self
- name: cCtfFlag_Draw
module: SofExe
identifier: "0x00006920"
return_type: void
calling_convention: __thiscall
detour_len: 0
params:
- type: void*
name: self
- name: Draw_StretchPic
module: RefDll
identifier: "0x00001D10"
return_type: void
calling_convention: __cdecl
detour_len: 5
params:
- type: int
name: x
- type: int
name: y
- type: int
name: w
- type: int
name: h
- type: int
name: palette
- type: char*
name: name
- type: int
name: flags
- name: Draw_Pic
module: RefDll
identifier: "0x00001ED0"
return_type: void
calling_convention: __cdecl
detour_len: 7
params:
- type: int
name: x
- type: int
name: y
- type: char const*
name: imgname
- type: int
name: palette
- name: GL_FindImage
module: RefDll
identifier: "0x00007380"
return_type: void*
calling_convention: __cdecl
detour_len: 6
params:
- type: char*
name: filename
- type: int
name: imagetype
- type: char
name: mimap
- type: char
name: allowPicmip
- name: Draw_PicOptions
module: RefDll
identifier: "0x00002080"
return_type: void
calling_convention: __cdecl
detour_len: 6
params:
- type: int
name: x
- type: int
name: y
- type: float
name: w_scale
- type: float
name: h_scale
- type: int
name: palette
- type: char*
name: name
- name: Draw_CroppedPicOptions
module: RefDll
identifier: "0x00002240"
return_type: void
calling_convention: __cdecl
detour_len: 5
params:
- type: int
name: x
- type: int
name: y
- type: int
name: c1x
- type: int
name: c1y
- type: int
name: c2x
- type: int
name: c2y
- type: int
name: palette
- type: char*
name: name
# ---------------------------------------------------------------------------
# Entity visualizer support helpers (SoF.exe + gamex86.dll)
# ---------------------------------------------------------------------------
- name: MSG_WriteByte
module: SofExe
identifier: "0x2001CB00"
return_type: void
calling_convention: __cdecl
detour_len: 0
params:
- type: void*
name: sb
- type: int
name: c
- name: MSG_WritePos
module: SofExe
identifier: "0x2001CE00"
return_type: void
calling_convention: __cdecl
detour_len: 0
params:
- type: void*
name: sb
- type: float*
name: pos
- name: MSG_WriteLong
module: SofExe
identifier: "0x2001CBF0"
return_type: void
calling_convention: __cdecl
detour_len: 0
params:
- type: void*
name: sb
- type: int
name: c
- name: SV_Multicast
module: SofExe
identifier: "0x20061A80"
return_type: void
calling_convention: __cdecl
detour_len: 5
params:
- type: float*
name: origin
- type: int
name: to
- type: int
name: thirdunknown
- name: SV_FindIndex
module: SofExe
identifier: "0x2005D320"
return_type: int
calling_convention: __cdecl
detour_len: 0
params:
- type: char*
name: name
- type: int
name: start
- type: int
name: max
- type: int
name: create
- type: char*
name: type
- name: FXRunner_Exec
module: GameDll
identifier: "0x000852E0"
return_type: void
calling_convention: __thiscall
detour_len: 0
params:
- type: void*
name: self
- type: int
name: effectID
- type: float*
name: pos
- type: int
name: castType
- type: void*
name: ignoreClient
# Client FX (same path as HandleTestLine / TE_TEST_LINE) — pointer-only (optional wireframe feature).
- name: FX_AllocNewQuad
module: SofExe
identifier: "0x2003B170"
return_type: int
calling_convention: __cdecl
detour_len: 0
params:
- type: void**
name: out_quad
- name: FX_SetQuadAsLine
module: SofExe
identifier: "0x200390A0"
return_type: void
calling_convention: __cdecl
detour_len: 0
params:
- type: void*
name: quad
- type: float*
name: pos_a
- type: float*
name: pos_b
- type: unsigned char
name: red
- type: unsigned char
name: green
- type: unsigned char
name: blue
- type: unsigned char
name: alpha
- type: float
name: scale
- name: FX_SetQuadLineGenericInfo
module: SofExe
identifier: "0x20038F70"
return_type: void
calling_convention: __cdecl
detour_len: 0
params:
- type: void*
name: quad
- type: float*
name: p0
- type: float*
name: p1
- type: float*
name: p2
- type: float*
name: p3
- type: float
name: f0
- type: float
name: f1
- type: float
name: f2
- type: int
name: flags
# Resets quads/mark/debris pools (IDA: FX_ClearQuads__Fv @ 0x2003B360, Windows IDB) — pointer-only (wireframe redraw budget).
- name: FX_ClearQuads
module: SofExe
identifier: "0x2003B360"
return_type: void
calling_convention: __cdecl
detour_len: 0
params: []
# ---------------------------------------------------------------------------
# Entity visualizer feature
# ---------------------------------------------------------------------------
- name: ClientThink
module: GameDll
identifier: "0x000F53A0"
return_type: void
calling_convention: __cdecl
detour_len: 0
params:
- type: void*
name: ent
- type: void*
name: ucmd
# g_spawn.cpp — ED_CallSpawn(edict_t *); VA 0x500BD570 → RVA 0xBD570 when gamex86 preferred base 0x50000000
# detour_len 0 = auto (required): a fixed length can split instructions and make the hook never run correctly.
- name: ED_CallSpawn
module: GameDll
identifier: "0x000BD570"
return_type: void
calling_convention: __cdecl
detour_len: 0
params:
- type: void*
name: ent
# g_utils.cpp — G_FreeEdict(edict_t *); VA 0x500C3880 → RVA 0xC3880 when game.dll @ 0x50000000
- name: G_FreeEdict
module: GameDll
identifier: "0x000C3880"
return_type: void
calling_convention: __cdecl
detour_len: 0
params:
- type: void*
name: ed
# qcommon/mathlib.h — engine AngleVectors; same address as (void*)0x20054B30 with default exe base.
- name: AngleVectors
module: SofExe
identifier: "0x54B30"
return_type: void
calling_convention: __cdecl
detour_len: 0
params:
- type: float*
name: angles
- type: float*
name: forward
- type: float*
name: right
- type: float*
name: up
# game q_shared / cbuf — intersect feedback (matches orig_Cbuf_AddText in gamex86.dll).
- name: Cbuf_AddText
module: SofExe
identifier: "0x18180"
return_type: void
calling_convention: __cdecl
detour_len: 0
params:
- type: const char*
name: text
- name: R_DrawFont
module: RefDll
identifier: "0x000045B0"
return_type: void
calling_convention: __cdecl
detour_len: 6
params:
- type: int
name: screenX
- type: int
name: screenY
- type: char*
name: text
- type: int
name: colorPalette
- type: char*
name: font
- type: bool
name: rememberLastColor
- name: drawTeamIcons
module: RefDll
identifier: "0x00003040"
return_type: void
calling_convention: __cdecl
detour_len: 6
params:
- type: float*
name: targetPlayerOrigin
- type: char*
name: playerName
- type: char*
name: imageNameTeamIcon
- type: int
name: redOrBlue
- name: M_PushMenu
module: SofExe
identifier: "0x200C7630"
return_type: void
calling_convention: __cdecl
detour_len: 0
params:
- type: char const*
name: menu_file
- type: char const*
name: parentFrame
- type: bool
name: lock_input
- name: CinematicFreeze
module: GameDll
identifier: "0x75190"
return_type: void
calling_convention: __cdecl
detour_len: 0
params:
- type: bool
name: bEnable
- name: Sys_Milliseconds
module: SofExe
identifier: "0x00055930"
return_type: int
calling_convention: __cdecl
detour_len: 0
params: []
- name: VID_LoadRefresh
module: SofExe
identifier: "0x00066E10"
return_type: qboolean
calling_convention: __cdecl
detour_len: 0
params:
- type: char const*
name: name
- name: Sys_GetGameApi
module: SofExe
identifier: "0x00065F20"
return_type: void*
calling_convention: __cdecl
detour_len: 0
params:
- type: void*
name: imports
- name: Sys_SendKeyEvents
module: SofExe
identifier: "0x00065CF0"
return_type: void
calling_convention: __cdecl
detour_len: 0
params: []
- name: SV_Shutdown
module: SofExe
identifier: "0x0005FEC0"
return_type: void
calling_convention: __cdecl
detour_len: 0
params:
- type: char*
name: finalmsg
- type: int
name: reconnect
- name: Sys_QuitPath
module: SofExe
identifier: "0x00065D71"
return_type: void
calling_convention: __cdecl
detour_len: 0
params: []
- name: AdjustTexCoords
module: RefDll
identifier: "0x00014C30"
return_type: void
calling_convention: __cdecl
detour_len: 0
params:
- type: float*
name: player_pos
- type: float*
name: vertex
- type: float*
name: in_normal
- type: float*
name: in_tangent
- type: float*
name: in_bitangent
- type: float*
name: out_new_s_t
- name: glTexParameterf
module: Unknown
identifier: "glTexParameterf"
return_type: void
calling_convention: __stdcall
detour_len: 0
params:
- type: int
name: target_tex
- type: int
name: param_name
- type: float
name: value
- name: glBlendFunc
module: Unknown
identifier: "glBlendFunc"
return_type: void
calling_convention: __stdcall
detour_len: 0
params:
- type: unsigned int
name: sfactor
- type: unsigned int
name: dfactor
- name: glTexCoord2f
module: Unknown
identifier: "glTexCoord2f"
return_type: void
calling_convention: __stdcall
detour_len: 0
params:
- type: float
name: s
- type: float
name: t
- name: glVertex3f
module: Unknown
identifier: "glVertex3f"
return_type: void
calling_convention: __stdcall
detour_len: 0
params:
- type: float
name: x
- type: float
name: y
- type: float
name: z
- name: glBegin
module: Unknown
identifier: "glBegin"
return_type: void
calling_convention: __stdcall
detour_len: 0
params:
- type: unsigned int
name: mode
- name: glEnd
module: Unknown
identifier: "glEnd"
return_type: void
calling_convention: __stdcall
detour_len: 0
params: []
- name: glColor3f
module: Unknown
identifier: "glColor3f"
return_type: void
calling_convention: __stdcall
detour_len: 0
params:
- type: float
name: r
- type: float
name: g
- type: float
name: b
- name: GetCursorPos
module: Unknown
identifier: "GetCursorPos"
return_type: BOOL
calling_convention: __stdcall
detour_len: 0
params:
- type: LPPOINT
name: lpPoint
- name: DispatchMessageA
module: Unknown
identifier: "DispatchMessageA"
return_type: LRESULT
calling_convention: __stdcall
detour_len: 0
params:
- type: const MSG*
name: msg
- name: PeekMessageA
module: Unknown
identifier: "PeekMessageA"
return_type: BOOL
calling_convention: __stdcall
detour_len: 0
params:
- type: LPMSG
name: lpMsg
- type: HWND
name: hWnd
- type: UINT
name: wMsgFilterMin
- type: UINT
name: wMsgFilterMax
- type: UINT
name: wRemoveMsg
- name: GetMessageA
module: Unknown
identifier: "GetMessageA"
return_type: BOOL
calling_convention: __stdcall
detour_len: 0
params:
- type: LPMSG
name: lpMsg
- type: HWND
name: hWnd
- type: UINT
name: wMsgFilterMin
- type: UINT
name: wMsgFilterMax