本帖最后由 shane007 于 2023-8-26 16:32 编辑 ) Y" x, I/ ^& G* S8 {
6 X7 m$ q+ D) t" h! D" @这个游戏以前分析过,这次再写仔细些,6 Q/ x8 M# s8 F* j/ D
CreateDevice应该就是以下这处了,我用ida pro的F5功能看了一下伪代码,更确定了。
4 ]4 w$ z& G# }- N( V$ b2 q R这游戏构造比较简单,CreateDevice是在exe文件内完成的。dxwnd窗口化成功。
, f( M0 z4 @+ i4 }( T$ g+ Y. W1 @
7 u3 d) H0 ]' s# R- .text:0041641A push ecx. F$ d' y, i+ Q% |1 d5 T' _
- .text:0041641B mov [esi+90Dh], dl
9 Z) S& t: C9 ^ - .text:00416421 mov ecx, hWnd; a+ Q- g6 |9 Z! c: ^
- .text:00416427 mov edx, [eax]
; r& ?3 i: |( ], | - .text:00416429 mov edx, [edx+40h]
/ c! h; k6 V* S+ i2 C - .text:0041642C push 40h
4 _ B* k" w d+ m - .text:0041642E push ecx( P- U% I5 C5 }% j7 H6 ~1 i' Z
- .text:0041642F push 1+ h6 w8 q- F" S- {2 @" Q
- .text:00416431 push ebx( D2 m- y1 L* M4 D& V/ f! J
- .text:00416432 push eax
3 P! o1 b2 l/ K6 P - .text:00416433 call edx
复制代码- . }7 L( E4 r& i/ L( `$ i8 |9 b+ V! W
- int __thiscall sub_415FF0(char *this)+ X% [$ a( d- y4 j' P* _# N
- {. O: v# d$ u! n, c7 K; G
- char *v1; // esi
; Y+ G5 U _7 m' ?, j, {7 d - FILE *v2; // eax3 v/ T( w- S% A$ M+ i7 I
- IDirect3D9 *v3; // eax" N% G2 x6 _: D9 C3 A
- const char *v4; // ecx% {6 F) E s5 K
- const char *v5; // edi
8 z! p+ A u- O8 ^) u' G' `( t- K - const char *v6; // edx
/ v7 A4 T# j# v% X$ z - const char *v7; // eax
( C4 l! F _( `. G4 x - FILE *v8; // eax
- { B8 {- a& w0 i* u9 P# x8 {% K - signed int v9; // ebp- d7 J/ ^* ?; k1 I0 g5 a5 ?. N7 [
- const char **v10; // eax! m" C' ]& w( w) }% ?+ v- ]
- double v11; // st7
+ ~1 q0 [2 \. X# I2 {0 j. u - double v12; // st6
! b$ [' @ b) P; A - const char *v13; // ecx4 a0 Z" g9 T* N v' g) t$ M+ x( B
- FILE *v14; // eax: E0 o1 \# b# Z2 I6 O3 O
- unsigned int v15; // eax+ Z. f' b: ~8 e. m: I$ J: g
- int v16; // ecx# {8 G7 i0 r5 \6 M. s
- FILE *v17; // eax# F+ B/ V1 r& z) O
- int v18; // eax; E7 {# D# p+ L! V9 H8 d" x
- bool v19; // zf
( c. u5 ]9 N8 `& u) `( o - int v20; // eax
! w7 P E$ D) @% X9 ~0 R - unsigned int v21; // edx
" h3 ~! z& G% Z9 Z/ m - bool v22; // sf; C4 F9 V7 \! p8 K8 V
- int v23; // eax
2 U9 A1 j; i" G - int v24; // eax
) p" D/ P, N7 c) }; g- Z L" t0 z - int v25; // ecx
2 f; s" p# G, W% R# Z - int v26; // eax
" P3 A' d# `. s' T# m1 o+ [9 ` - int v27; // ecx
2 k* @( p- T' S0 v/ h0 P# P - const char *v28; // eax7 t4 W) g3 G0 Q4 Q) N8 G2 ? p k
- const char *v29; // edx* O' }* O7 G2 J3 B$ k, N$ T
- FILE *v30; // eax
# u. [* p7 j) E9 j - void *v31; // eax3 P2 _9 J' l' k. B
- double v32; // st7- a% j8 u7 |; f2 d/ m
- _DWORD *v33; // esi
' T2 z. g3 D0 @& i, }! U" H5 o - float *v34; // eax
3 ]" }% \' Z: }( m4 ?) ?% B - float v35; // ecx
7 [' F: C3 y: L - float v36; // edx
* t) s8 D$ c/ _$ Q - float v37; // ecx x3 p) w* v+ [! W# B/ v
- float v38; // edx
D( P& U+ S" q+ n9 I) K) q - float v39; // ecx9 z: ^: u# Z" Z8 @4 l
- float *v40; // eax
( }. Y2 s! I* U# D- d - float v41; // edx+ V- T& B" e; Q
- float v42; // ecx1 c5 C' `( A9 P
- float v43; // edx, v! V3 {! `7 a+ ]/ R6 }* p
- float *v44; // eax
; G# e0 T4 O* M3 h% t - float v45; // ecx$ E3 R# j5 k- b& T# f5 `
- const char *v47; // ecx) N. P e l0 O6 M
- const char *v48; // ecx2 c, Y O4 }, M. s
- signed int v49; // [esp+A0h] [ebp-5Ch]
1 E/ e5 i. f$ r1 _ - const char *v50; // [esp+A4h] [ebp-58h]
# @4 w3 ]! k: }1 E - const char *v51; // [esp+A8h] [ebp-54h]; R% a6 D, g7 U/ {8 z& @' M+ e
- const char *v52; // [esp+ACh] [ebp-50h]
9 w+ ?& g4 L/ f ^ - _DWORD *v53; // [esp+C4h] [ebp-38h]- b( I, U7 s7 ?5 z5 F8 |
- const char **v54; // [esp+C8h] [ebp-34h]5 d' i! V+ Q& \7 a4 r
- float v55; // [esp+CCh] [ebp-30h]( A0 }1 }1 e) u4 G c6 _
- const char *v56; // [esp+D0h] [ebp-2Ch], R9 K v" Y6 C& h! D9 _
- float v57; // [esp+D4h] [ebp-28h]
+ x6 Z$ P+ N9 p/ }8 o - float v58; // [esp+D8h] [ebp-24h]; s" Y# u% c7 Q' ~. V( v% s" r7 k
- float v59; // [esp+DCh] [ebp-20h]: t9 [; P. |: Y$ d7 ~
- char v60; // [esp+E0h] [ebp-1Ch]" t6 I, |9 Y" y8 n D: ~: b9 H
- int v61; // [esp+ECh] [ebp-10h]
d/ m3 d) W# }3 |' m" N- Z - int v62; // [esp+F8h] [ebp-4h]
3 D9 @, r% _) p5 {/ @7 ^5 t8 J' x
$ `6 m0 p; k$ P! g$ d l- v1 = this;# C* d% F* u' H6 L8 Z% s
- v2 = (FILE *)sub_4D7E8F("Initializing graphics...\n");
1 Z% V% C( N+ X7 d& t% p& @$ t - fprintf(v2 + 1, v52);( ^- o+ @) Y5 x$ H- M; _# G
- *((_DWORD *)v1 + 492) = 0;0 J, u" R# [0 `1 s* r1 e
- *((_DWORD *)v1 + 609) = 0;* B7 K8 o6 @9 I" c$ N( g
- *((_DWORD *)v1 + 611) = 0;
_. p* `0 L `6 }) J* D+ z& w - *((_DWORD *)v1 + 610) = 0;
3 r7 H4 U3 Y: I" f" D$ o% I - *((_DWORD *)v1 + 613) = 0;( p' O0 T5 s; c! q- I, I7 X
- *((_DWORD *)v1 + 612) = 0;' k' t1 Y: @$ y* b3 L/ q
- *((_DWORD *)v1 + 614) = 0;0 E% U5 a9 v1 {1 ?& \+ V! t x7 a
- *((_DWORD *)v1 + 601) = 0;7 p) A: S2 I, C( ~" I
- *((_DWORD *)v1 + 600) = 0;1 a1 l( |/ z& o1 }# ?0 Q
- *((_DWORD *)v1 + 615) = 0;
- Z1 |, B! ?& a1 e x5 g5 N% @ - *((_DWORD *)v1 + 395) = 0;3 X% M9 ]. e8 ^8 A, T
- *((_DWORD *)v1 + 488) = 0;0 z/ {+ f. v- m3 z+ B l, W/ j5 ?
- *((_DWORD *)v1 + 486) = 0;
0 b$ _6 ^# I& ?, ]5 L7 J - *((_DWORD *)v1 + 487) = 0;
3 P$ `( j, r4 k. e6 ? - *((_DWORD *)v1 + 489) = 0;# X% ^4 f! ^6 d, W# `, M
- *((_DWORD *)v1 + 491) = 0;
; {: J5 D4 a5 u. p. J - *((_DWORD *)v1 + 514) = 0;: I0 A- f d9 e/ j! n
- *((_DWORD *)v1 + 597) = 0;7 r. ~. [- \1 k' i! |
- v53 = v1 + 1968;0 B* q4 G' \/ ]4 l! d# F2 `7 [
- *((_DWORD *)v1 + 498) = 0;. m! L3 d4 w4 {$ H! y
- *((_DWORD *)v1 + 499) = 0;
. \5 \: w( l' Z3 j - *((_DWORD *)v1 + 500) = 0;
( \+ l& K9 D% r - *((_DWORD *)v1 + 501) = 0;
0 Y- C. g' I8 i$ a& A) A - *((_DWORD *)v1 + 502) = 0;
; L. X6 X% j& I) D( J - v52 = (const char *)32;
2 r# {- F$ A5 ~( Y - *((_DWORD *)v1 + 578) = 0;
& Q9 V" Y+ ^6 U$ n - v1[2316] = 1;
3 R& U$ x+ M. S+ Y - v1[2476] = 0;* R6 q& N; q, m0 ?# G7 l
- v3 = Direct3DCreate9((UINT)v52);
3 d2 M/ J$ T; B* y) a1 Q - *((_DWORD *)v1 + 384) = v3;4 j. L6 W' T1 l
- if ( !v3 ) p& p2 \1 o% J
- {9 |$ N) @0 y2 A4 T! s7 T( v
- v5 = v56;
' h% }+ ]. H/ Z2 ~) b - goto LABEL_27;2 ~1 f: { I( ~3 z/ U p; p
- }+ n$ N7 u' _5 L# D. X* l. E
- v5 = (const char *)v3->lpVtbl->GetAdapterDisplayMode(v3, 0, (D3DDISPLAYMODE *)&v60);
: r; I, d/ h) g - if ( (signed int)v5 < 0 )7 ]3 F8 t+ f- i( S; ]0 }* T
- goto LABEL_27;* U7 m+ T) O( g2 J& l& G
- (*(void (__stdcall **)(_DWORD, _DWORD, signed int, char *))(**((_DWORD **)v1 + 384) + 56))(/ m" @1 u: m/ b
- *((_DWORD *)v1 + 384),
( J; C% ?! M; R7 @0 H - 0,
" o! Y* c. Y; M r1 R4 W/ f - 1,& H3 R1 `. M2 Z0 W6 V
- v1 + 1640);8 \% z1 \6 \( t4 }* |
- memset(v1 + 1584, 0, 0x38u);
8 j' w% }# g3 L& J) T - *((_DWORD *)v1 + 404) = 0;
6 c. W* z2 R# ?3 h# m! s - *((_DWORD *)v1 + 402) = 1;
: ?: u6 n) _& ] b# ^3 `. W" N - *((_DWORD *)v1 + 403) = hWnd;2 ?5 y2 x1 F/ Y9 l1 D
- *((_DWORD *)v1 + 407) = 0;( I5 w# s$ _ m% B6 C+ R
- *((_DWORD *)v1 + 399) = 1;/ c6 G/ W5 s5 h; x* [3 E1 x' P0 @2 G
- *((_DWORD *)v1 + 398) = 21;# F+ d. f2 @( |8 u# [5 I: i1 \. o
- *((_DWORD *)v1 + 405) = 0;
6 X& C1 O! M8 e/ K4 `) K4 i! R - *((_DWORD *)v1 + 522) = (unsigned __int16)word_558176;, n" ^5 U. N# S2 Z) l: d( p
- v6 = (const char *)word_558174;3 e( X* o, o5 S* U
- *((_DWORD *)v1 + 523) = word_558174;6 _; w$ o" n- h7 D* A: G- G* K
- v7 = (const char *)*((_DWORD *)v1 + 522);
2 Y& j$ W2 m$ F% {( ~7 h - v52 = v6;- |! i+ R" f t: L: z \
- v51 = v7;
; @' t+ a* d" [/ c - v50 = "Screen resolution is %d x %d.\n";
# j& b3 E o, i" ~6 x+ z - v1[2076] = *(_DWORD *)&word_558174 == 67109632;2 w1 @; b+ H" X$ d% D+ {4 Q* {
- v8 = (FILE *)sub_4D7E8F(v50);
, s' v" r5 G9 }7 S \9 C - fprintf(v8 + 1, v50);
: ]- T- \7 C8 m( f7 I - v9 = *((_DWORD *)v1 + 522);
" U4 ?6 A2 q' Z; a4 [; q1 N. Z - v54 = (const char **)*((_DWORD *)v1 + 523);+ ]4 o% M1 }4 H# ], n
- v10 = v54;
) V7 W& w8 O& `! Q d - *((_DWORD *)v1 + 396) = v9;2 D+ y/ X7 {& R H! M& p0 e
- *((_DWORD *)v1 + 397) = v10;& b' U3 A: D1 {, x: Z, U7 u- h
- v55 = (double)v9 * 0.0009765625;
: m* i$ H, P; M) n5 _2 I - v11 = v55;
; u4 x) O9 ]. r0 b L - *((float *)v1 + 520) = v55;
2 f* I+ J' }) F3 t2 ` ~ - v55 = (double)(signed int)v54 / 768.0;" T' ]/ `& i2 A' }0 \/ e# _
- v12 = v55;
% I/ Z4 z/ j+ ^: q" b: C - *((float *)v1 + 521) = v55;
; Z% d9 u7 u3 ]3 o3 f7 ?+ @; M - *((_DWORD *)v1 + 524) = (signed int)(v11 * 1024.0);- W8 ~. h, m" Y7 N+ ~3 }; o7 ^, b
- v52 = (const char *)1;
( b" J* j; Z- Z" d; P5 ? - v51 = (const char *)(v54 + 11);
) E$ ~3 R$ |! J3 K8 ? - v50 = (const char *)(v9 + 6);
& E, j8 r) o% |8 u3 f+ ^! n" H8 G - *((_DWORD *)v1 + 525) = (signed int)(v12 * 512.0);
2 n6 O3 A2 |: C - *((_DWORD *)v1 + 515) = 0;
6 X; l& `) Q7 ^/ S; b - *((_DWORD *)v1 + 517) = 1024;
& d7 x J% L+ k- r$ i( i - *((_DWORD *)v1 + 516) = 128;
& S6 w* U4 w. Q; v; i9 _# g. n - *((_DWORD *)v1 + 518) = 640;
e/ |# K1 S# A/ _$ h& x0 N# f9 w - MoveWindow(hWnd, 0, 0, (int)v50, (int)v51, (BOOL)v52);, A/ s: [5 v6 }3 P0 C- x" ^6 F
- if ( (*(int (__stdcall **)(_DWORD, _DWORD, signed int, int, signed int, signed int))(**((_DWORD **)v1 + 384) + 48))(
6 k" b" P8 p8 M2 @1 @ - *((_DWORD *)v1 + 384),
2 ^- M3 }9 A5 z \: I - 0,
- I" x; z! G& t" j - 1,* _+ E( G$ S( m. J! J
- v61,% c6 `. J( J w1 m; x4 |9 I ^. z
- 21,
! f8 d" `2 A, ], D A6 i - 75) < 0 )
2 z) C0 G( a. o. ^7 |* d$ X! P - {' t0 J+ k6 Y% L
- v52 = v5;
4 p* [8 P1 Z+ I/ v& g - v51 = v13;
" L- E' Y1 a- u$ I0 [" E2 U! a% G - v55 = COERCE_FLOAT(&v51);, `' W9 f9 H S" R2 g2 Z; P
- sub_456DD0("Direct3D initialization failed. No appropriate Depth/Stencil-Buffer-Format found.");
4 s k9 U4 d. T - v50 = v47;7 k& E: T: x1 e6 T9 H& I
- v54 = &v50;- D, M+ B. G" E' ]
- v62 = 0;
- o3 d) I v+ t5 {4 I. `) Y% ?& L - sub_456DD0("cCougarGraphics::cCougarGraphics");
; j, E r2 V( O; A - v49 = 118;8 U9 D3 F0 E: X( {. R
- goto LABEL_28;' h& e' h/ a0 H5 n
- }; r l! D$ J, l Q4 S0 H. [5 X, Q# V# O
- v52 = "Depth/Stencil Buffer is D24S8.\n";
( B- [. w- e# ` - *((_DWORD *)v1 + 576) = 24;
+ ?9 F3 [" b2 w b - *((_DWORD *)v1 + 577) = 8;. d) U. {5 O" {* h. @: L
- *((_DWORD *)v1 + 406) = 75;
& O$ A! D6 `9 A6 J/ X9 @ - v14 = (FILE *)sub_4D7E8F(v52);! k6 x( c/ @0 {: x( J- {" V4 [% v
- fprintf(v14 + 1, v52);
/ l1 v& S* S+ D - *((_DWORD *)v1 + 409) = 1;0 o9 B& C: _: M
- if ( dword_558178 != 45 q$ y( Y" M2 W7 ?
- || (*(int (__stdcall **)(_DWORD, _DWORD, signed int, signed int, _DWORD, signed int, _DWORD))(**((_DWORD **)v1 + 384)0 H* d3 I2 u9 e
- + 44))(7 k, A0 K. J9 Z4 Z$ R K& K
- *((_DWORD *)v1 + 384),
1 @/ `: I, o Y1 n - 0,
) i9 F4 l* X( X- B! w - 1,' a1 [$ ]4 r/ H5 E( I$ C
- 21,- X `3 S/ V1 B' q) Z2 m- {& n
- *((_DWORD *)v1 + 404),
7 S7 L8 {/ B9 k. h7 y# t4 { - 4,8 H: `* m. `7 c3 M1 p M
- 0) )
: R: b- m8 _5 R, e7 h2 Z - {: K( g7 n8 T" K( F3 W
- if ( dword_558178 != 2; e6 F8 w% ]8 w9 L6 q
- || (*(int (__stdcall **)(_DWORD, _DWORD, signed int, signed int, _DWORD, signed int, _DWORD))(**((_DWORD **)v1 + 384)
; w4 C. G* H0 Y# o ] - + 44))(9 ~0 n& r/ Z- {- i. Y
- *((_DWORD *)v1 + 384),
* x. [1 s) ?+ U - 0,3 l' C! O4 h5 A$ P2 F! O& Q' v
- 1,
, Y3 V' _2 H4 d - 21,
' H: Y2 t: |; f, t @ - *((_DWORD *)v1 + 404),; ~1 s. y& V% M9 {8 i, Z) ]& N" R
- 2,5 p/ f% g q6 N u3 k; }) K
- 0) )6 L$ Z( ^5 t3 K; c
- {
. w( g9 x! p& Z - if ( (unsigned int)dword_558178 > 0
$ ?: J& o) P5 J$ @. J - && !(*(int (__stdcall **)(_DWORD, _DWORD, signed int, signed int, _DWORD, signed int, const char **))(**((_DWORD **)v1 + 384) + 44))(/ u8 S4 G: s4 _! M
- *((_DWORD *)v1 + 384),
! ~4 \, i7 P) |! u - 0,/ R5 U7 O1 j& l3 j# z+ B2 r, a
- 1,4 O5 O# e# E- X" r1 P$ {
- 21,) o9 U% x# Q' _3 b" f6 w+ U
- *((_DWORD *)v1 + 404),
: V) Q4 L0 x+ A2 j4 ?" E& ` - 1,6 M! j# A* ? j7 j
- &v56) )" r! K+ |7 ^8 U, @
- {& r1 G' Z1 D& \9 Q
- v15 = (unsigned int)v56;4 a$ i# w9 s$ g: @
- *((_DWORD *)v1 + 400) = 1;4 j3 p1 j k, ^. e. {" |9 D5 n
- v16 = dword_558178;
u; h: E; O0 i0 ]( c- M - if ( dword_558178 >= v15 )
( m3 \( M8 @9 W a+ f+ { - v16 = v15;- r" ]8 B- `/ o `, I, Y0 d4 k
- *((_DWORD *)v1 + 401) = v16 - 1;& g+ \- f' S; j& l. w6 h9 |7 n
- if ( dword_558178 < v15 )
( o# q, N- c& y# @ - v15 = dword_558178;& e; G" G3 W |. s, F) S. ?
- *((_DWORD *)v1 + 578) = v15;/ D8 ]( }3 ]8 W
- }7 A& [; C7 _+ T E0 u: U- v) H
- }" E1 C+ f7 J( n& K! h
- else
7 i T8 [5 l/ ]3 \. W2 ? - {
4 g# E. u$ X! c" M, \, u0 x: N7 ? - *((_DWORD *)v1 + 400) = 2;/ I; W8 d6 x3 n) e! W+ ]! W
- *((_DWORD *)v1 + 578) = 2;
' b) B# f7 @7 h( a$ h - }
; ?* E0 `: M8 b( a6 X - }/ Y( k8 J: C! f, D/ E( B7 e2 a
- else
: g# _, Q. {1 p. }# P - {; x1 m @+ A8 B, \# a1 W
- *((_DWORD *)v1 + 400) = 4;. a& }4 B. f% J, u
- *((_DWORD *)v1 + 578) = 4;
; s& e; k# c7 a* a - }
) X2 D: |- @* Y( t - v52 = (const char *)*((_DWORD *)v1 + 578);
; ^. ?" r& I: a* T! w; |3 h - v17 = (FILE *)sub_4D7E8F("AntiAliasing is %d.\n");
; J. r1 t: j' p/ s6 [9 Q* I - fprintf(v17 + 1, v51);, D! G5 F& b2 M* Y
- v18 = *((_DWORD *)v1 + 384);
& k# O# v* g! Y* m8 d. ?! Q - v19 = *((_DWORD *)v1 + 578) == 0;1 F; R% y l/ O' ^" p" w
- v52 = (const char *)827611204;* b4 x, S. @0 k" a4 U: U7 O
- v51 = (const char *)3;! D6 a) i* a( }! F9 P
- v50 = 0;
2 t8 O8 Y- N2 ?$ K1 k( y9 l8 m - *((_DWORD *)v1 + 402) = 2 * v19 + 1;
# J" i- X# A2 K - v20 = (*(int (__stdcall **)(int, _DWORD, signed int, int, const char *, const char *, const char *))(*(_DWORD *)v18 + 40))(! I' t: U; X, b- `) b
- v18,
( ~, I7 b% _! k5 G0 w" Q% K/ C - 0,
5 F6 f S5 H/ j- G* k! ]7 m - 1,& V8 Z8 w: I( _* Q- Q- b
- v61,
! f _4 _+ t. H8 ` - v50,7 ?+ X6 `$ p$ @! y5 F A! ~. v
- v51,1 p( [4 g3 V4 r+ U$ L' i8 `
- v52);
0 n. z# k5 P' k/ }) ~- g2 ~ - v21 = *((_DWORD *)v1 + 425);
. S0 v, Z- L5 V! u - v22 = v20 < 0;
2 o$ L5 M! a7 ?+ t - v23 = *((_DWORD *)v1 + 384);2 N7 @/ D, [* n6 C; C
- v1[2316] = !v22;+ F( d4 c. b1 `) J
- v52 = v1 + 1540;4 g4 e) X- _; S- C! [% ?0 n
- v51 = v1 + 1584; g2 Q0 C7 z$ w$ t7 R
- v1[2317] = (v21 >> 14) & 1;. a5 g0 e: M9 ]! a
- v5 = (const char *)(*(int (__stdcall **)(int, _DWORD, signed int, HWND, signed int, const char *, const char *))(*(_DWORD *)v23 + 64))(1 g8 |( s( G+ o# s2 Y6 B
- v23,
! a; ?. I2 `; F0 U1 k3 p: x, J - 0,: k2 l* q! x0 A# U$ c! k
- 1,- M/ {6 w+ R* L0 w. r
- hWnd,% m& u# Y0 P0 _7 I+ K5 V
- 64,# Z! b' P. h0 C0 f. t, L8 X* y/ X# q
- v51,
6 h, t2 ^0 `# P6 N - v52);9 B( _( y, U- f0 p9 n
- if ( (signed int)v5 < 0 )4 y- ^$ S: d( b5 L6 n( }; Y c& K1 j
- goto LABEL_27;6 l! I J0 E; V) l+ T- y$ I
- if ( dword_558180 && ((v24 = *((_DWORD *)v1 + 425), v24 & 2) || v24 & 0x100) )
$ j" t* D( r { - {
& T; y! A! [4 n. k; S/ U - v25 = *((_DWORD *)v1 + 609);
1 r. {; _$ r7 I) \0 a% E - v26 = sub_418670(*((_DWORD *)v1 + 522));
^4 |( \6 Q4 C - v52 = (const char *)*((_DWORD *)v1 + 523);
' T1 u3 l3 `: P$ ?5 d4 w - v27 = *((_DWORD *)v1 + 609);" T6 }# `1 ^# K# J- }
- *((_DWORD *)v1 + 496) = v26;0 Y$ j( J) V J, w$ c" \
- v28 = (const char *)sub_418670(v52);
( q' R, t) `* Y: c9 w - }
v7 V \( b: m; I4 M X - else
; s7 D7 H, Y- x8 P* L) X - {1 l$ b4 J5 V. L f1 K
- v28 = (const char *)*((_DWORD *)v1 + 523);
( i) e( ?! s) J5 D; U8 t+ j - *((_DWORD *)v1 + 496) = *((_DWORD *)v1 + 522);
" O* [/ r6 [ X- d: e; N E- q8 Q - }# _/ Q$ u0 u7 O
- v29 = (const char *)*((_DWORD *)v1 + 496);
: H( P7 F" @3 ]$ K - v52 = v28;7 y5 x9 N7 E7 w! n* h8 X' U" K
- v51 = v29;; b& Z& j. Z7 y% n& y5 i0 |
- v50 = "PostProcess Surface is %d x %d.\n";
7 O+ Z' {, `0 {6 b - *((_DWORD *)v1 + 497) = v28;; x1 H& ]( }7 H6 T" z$ @
- v30 = (FILE *)sub_4D7E8F(v50);( I3 m% Q5 A# l; \4 f
- fprintf(v30 + 1, v50);" ~9 q' I* n" g# ]
- (*(void (__stdcall **)(_DWORD, _DWORD, char *))(**((_DWORD **)v1 + 385) + 88))(*((_DWORD *)v1 + 385), 0, v1);! q5 ^' c8 h6 b2 J
- sub_413100(v1);0 @* \; T! h- D' B# N+ q' z
- sub_411D60(v1);
; c7 L: {( R+ q* J6 O& j - v31 = malloc(0x78u);
2 ~: G6 b/ {9 m# ~ J: M% ^4 Q9 m - v32 = -0.5 / (double)*((signed int *)v1 + 522);
( A6 _- ]% k& h p9 T) h - *((_DWORD *)v1 + 599) = v31;5 [1 |! C) I& \4 I0 p
- *((_DWORD *)v1 + 600) = 0;) S' t$ f$ s4 x
- *((float *)v1 + 526) = v32;
q/ J+ \! F3 m; R9 ~" s, D' P - *((float *)v1 + 527) = -0.5 / (double)*((signed int *)v1 + 523);% w* G; S L: s' I
- sub_411CC0(v1);
" ?; F: s2 a$ F7 y) @ - v33 = v53;% S' J$ [1 {2 `1 _8 `
- v5 = (const char *)(*(int (__stdcall **)(int, signed int, signed int, signed int, signed int, _DWORD *, _DWORD))(*(_DWORD *)dword_559B7C + 104))(
6 O. |3 r* _ ]. _& d - dword_559B7C,3 L' }9 z( L& ?4 f* P
- 80,
' t) {. T- }, t+ X) E - 8,
/ C" c2 W# z, D% Q% h) t - 258,
% Z) o ~$ F) r, s; h, ~& T/ T - 1,
/ Q5 c3 f# p+ g) Q - v53,9 i% s$ n5 D7 _% t2 w
- 0);
) H/ Q& ?. H8 @" ] - if ( (signed int)v5 < 0 )
1 s5 ~& \! R6 P- ~8 j! v9 D; | - {2 c$ o/ K g2 h+ D% R
- LABEL_27:" z7 k1 n4 k* J3 v/ b
- v52 = v5;
2 f F H. h. |8 W: L* v - v51 = v4;
, [ i' [; c& }3 J( H5 N - v55 = COERCE_FLOAT(&v51);0 f) W+ ]% O, z; U3 z
- sub_456DD0("Direct3D initialization failed.");
t' E( O4 A: T% f8 r) L; s - v50 = v48;% g7 _( h, l7 R n7 w# y1 k& Z4 ?
- v54 = &v50;
* j, ^- U( e6 N1 e' K2 J2 } - v62 = 1;2 ^$ \9 {8 r- R, l
- sub_456DD0("cCougarGraphics::cCougarGraphics");- m$ o. C! ?5 @) k# e: w7 R$ A6 O( W
- v49 = 205;: N) l# X! x. Z1 S7 Z
- LABEL_28:
* G* A# d" V* O7 x/ v; |6 @4 L - v62 = -1;! X7 O7 k# l5 z/ F' T; ?
- sub_40CB30(1, ".\\source\\class_graphics.cpp", v49, (char)v50, (char)v51, v52);1 p! u" a$ h3 p1 \+ `" o; l$ i* A
- }
# e8 L6 k( D2 V4 t - (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD, _DWORD **, _DWORD))(*(_DWORD *)*v53 + 44))(*v53, 0, 0, &v53, 0);
. _( ~# E% \" ]( [ - v58 = -1.0;
* I r( K9 z7 q: \4 e - *(float *)v53 = -1.0;8 S( A# ~" C- @
- v59 = 1.0;1 K& \/ B& }) }0 @/ T: v' i: u
- *((float *)v53 + 1) = v58;! m6 A# k0 }* w# m) m
- v57 = -1.0;
. R4 Z1 c/ H- B. j - v58 = 1.0;
3 b! t& a6 f; Y0 N/ s - *((float *)v53 + 2) = v59;
. M5 _4 Q6 R& z% L7 w% o) E3 [. Q - v59 = 1.0;
* Q' p# \5 V4 `* V6 u* b) W - v34 = (float *)v53;
- B! A6 S2 F6 _- W" { - v35 = v57;
4 p6 R7 {& Y. k, h5 T; r. C - v57 = 1.0;/ U1 z! Y+ f2 k) C" s; x
- v36 = v58;% u6 L4 w8 b }6 N# O! C2 h, b
- *((float *)v53 + 5) = v35;0 n! h7 M* P0 d
- v37 = v59;, _2 G8 V0 Y3 D: _
- v59 = 1.0;, k/ o# U* t; t7 M; a* Q; d/ F
- v34[6] = v36;/ Q% y. X, v( N2 f
- v38 = v57;3 p5 Y6 Z$ N& Y1 K' k0 ?
- v58 = -1.0;
- D$ L0 o, p( S" D, o - v34[7] = v37;" F) l8 B h7 b+ N m
- v39 = v58;
3 C5 X! m/ b. c( y5 s! I0 L - v57 = 1.0;
' Q8 W. t K/ t9 B" p% S - v58 = 1.0;
O- F+ ]+ k. y. T5 H' H6 i - v40 = (float *)v53;$ C% q% L0 o I- k2 H
- *((float *)v53 + 10) = v38;: V* E" ~; M, S" U
- v41 = v59;- H" h1 a: f+ D! R/ K0 U
- v59 = 1.0;. S7 |9 V. h+ _: @
- v40[11] = v39;' `4 l4 {& n* Q; r6 _
- v42 = v57;
6 w- R$ u& L4 z9 ~1 G/ W: n - v40[12] = v41;( a8 r3 |! A/ o
- v43 = v58;; ~, F: V2 J n* e9 r) V
- v44 = (float *)v53;$ m G7 w: P7 a3 `
- *((float *)v53 + 15) = v42;1 d. v4 Y" I8 t3 E
- v45 = v59;
" s/ i8 e! H" U) n# { - v44[16] = v43;& k! h! D! c6 e; u
- v44[17] = v45;8 R2 C8 g, [/ g7 K1 Q
- *((float *)v53 + 3) = 0.000099999997;
5 Z. A& b* v/ Q z q- G9 W u - *((float *)v53 + 4) = 1.0001;
5 Y" u: ]( x9 Q+ F3 z) a - *((float *)v53 + 8) = 0.000099999997;
( _% y- ^; M" q5 u% s. M - *((float *)v53 + 9) = 0.000099999997;
- H5 s9 s" J8 G- N; ~. y3 y& S: Z - *((float *)v53 + 13) = 1.0001;0 J& W" i" v. b* U
- *((float *)v53 + 14) = 1.0001;8 c/ m0 j9 e8 r6 }4 d& N- m7 k
- *((float *)v53 + 18) = 1.0001;
5 y! O; c6 E8 K/ J0 c; P* q3 v - *((float *)v53 + 19) = 0.000099999997;) Z6 v$ |+ J& F. P6 U c; d2 C
- (*(void (__stdcall **)(_DWORD))(*(_DWORD *)*v33 + 48))(*v33);
' X; l; T4 N" c - return 0;
3 f3 [& a& _& U* `! i6 q- p4 [ - }
复制代码 # r+ v" h& F/ i. t+ e5 n2 m" [
用Cheatengin寻找一个字幕之后,在以下地方断下
' a3 |# b0 J/ ?- <div>ocd.exe+425B9 - 0FB6 D9 - movzx ebx,cl</div><div>004425B9</div>
复制代码
1 i- U" ]8 a6 l( b0 h
( t/ U) I+ l2 D" u0 k在ida pro下查看,是这个函数,从代码看a2字符像是索引号。; X# q. |# X2 a+ O# ?) c% v
稍后需要仔细分析。字幕显示函数应该在本函数上下。
7 K- K: u! b5 z/ d4 J- int __thiscall sub_442510(unsigned __int8 **this, int a2)
复制代码 * g; {' _7 R* d X* r
( R p; B9 M% b; x2 I4 v0 w
$ V: W5 r7 _" E* S7 H/ Z |