本帖最后由 shane007 于 2023-8-26 16:32 编辑
# f/ {# t' u1 k S6 p: V* L1 k6 V7 @( v: O- v( E4 T/ V$ i. e
这个游戏以前分析过,这次再写仔细些, y+ ]3 _1 p; I
CreateDevice应该就是以下这处了,我用ida pro的F5功能看了一下伪代码,更确定了。
9 o/ q& I/ \& z这游戏构造比较简单,CreateDevice是在exe文件内完成的。dxwnd窗口化成功。3 U9 N6 r3 O9 |4 A/ l
" [5 d. h8 [, v0 ~7 }" f7 Y/ Q
- .text:0041641A push ecx
@9 y5 R6 v3 O0 `0 @! e# X5 i - .text:0041641B mov [esi+90Dh], dl
2 b) H: p2 c5 n2 E - .text:00416421 mov ecx, hWnd
3 r5 K O. j; F. Q5 f9 v* l - .text:00416427 mov edx, [eax]" Y3 u; @& [4 _/ Y6 J/ l
- .text:00416429 mov edx, [edx+40h]
9 u6 Z" X" S* N/ p; F/ z& ?9 o - .text:0041642C push 40h
. ^0 i) j H2 A O1 |; R - .text:0041642E push ecx
7 y% \; }- p' S5 {7 p- @% j1 B - .text:0041642F push 1
+ y: a+ d' D* T4 Q& }" o - .text:00416431 push ebx
* T* _4 ~; }" G1 f4 n7 P7 |0 \ - .text:00416432 push eax
/ d' r8 I% Y# J$ ^. Z - .text:00416433 call edx
复制代码- * w# O& J# E5 \- {! t! ]- J
- int __thiscall sub_415FF0(char *this)
0 A. J7 |( {$ v5 U+ X5 @( g - {
- _; f5 G" w/ j. ? - char *v1; // esi
- _! ]/ z; e4 o& K* b* e - FILE *v2; // eax/ E8 H8 t- d, }
- IDirect3D9 *v3; // eax
( E% e6 p* N4 `* P s/ R+ }- A - const char *v4; // ecx1 o9 |1 o3 [) f& c* D" i, l
- const char *v5; // edi
$ r4 ~3 I+ }& e( D - const char *v6; // edx Q) H& ^- ` ?' E7 K
- const char *v7; // eax
/ F$ C @- U- Y# b; f6 x9 m - FILE *v8; // eax. B$ O+ Y* \" p3 }$ p$ Y4 }" M
- signed int v9; // ebp
, y& p( Y% U0 g! u" _ - const char **v10; // eax
6 }" ]( P% L6 N4 U$ y. B - double v11; // st7: C# i1 Y! n9 ~! T" K- B* i
- double v12; // st6& X- h/ A' T+ ~+ `: h. a' k4 v
- const char *v13; // ecx8 n( {! c* q% }8 Z
- FILE *v14; // eax4 v0 w% e" ?8 Y7 N0 Z
- unsigned int v15; // eax( z( J' q$ g+ \9 _* Z
- int v16; // ecx
% }0 C% K' U4 u8 `( @0 V - FILE *v17; // eax
; J3 g% ]# ?/ o4 [, W( E5 a - int v18; // eax
) i# J( O H! {, L; |+ [" o - bool v19; // zf
% @1 y* h1 @$ U( }. H" \ - int v20; // eax. }9 }: l, W0 v! z
- unsigned int v21; // edx; o2 i8 u: o: |: `6 V6 x4 Y8 r
- bool v22; // sf
$ {5 ?0 q, K1 T; \' ^% c - int v23; // eax7 c2 X% k9 d' M) P& s6 L/ d
- int v24; // eax
' D; b( t1 l# S) w - int v25; // ecx- W( S; k/ V) q, r0 m
- int v26; // eax
' h7 w: b3 H8 F4 j - int v27; // ecx
5 m' c, m* c& h - const char *v28; // eax
" p5 ~( D4 p/ k3 a: W! M9 U, H" C - const char *v29; // edx2 E8 u& J1 _3 `& w
- FILE *v30; // eax* X1 z& \. J& C7 N& a7 ]
- void *v31; // eax9 b3 {8 L* F) ?! s, |) i5 V! c
- double v32; // st76 u$ G# `# `; N* z: r
- _DWORD *v33; // esi
0 v& Q' Z8 F- a5 b6 V# K/ { - float *v34; // eax+ M# [4 z( T6 m- R& a
- float v35; // ecx
5 N4 x5 M! ?) W) b4 G D$ I$ Q - float v36; // edx
* H E! j3 Y! {+ L0 M, c% w' {- f - float v37; // ecx: x. I7 N5 V8 W1 n ?5 U6 U8 o; W# c
- float v38; // edx5 a1 p, {) d$ o) R7 g
- float v39; // ecx9 ^ h6 B, h2 J4 q# V- _7 I4 k
- float *v40; // eax
, h7 j9 J: [3 _! L - float v41; // edx
% `6 ?9 S# s2 k - float v42; // ecx
\& i9 ]7 n* K) f% q3 W' v4 Y! ~. C - float v43; // edx
$ Y$ Q3 ^; H# a$ x3 ]% B - float *v44; // eax
0 B8 d$ Y' c7 p) x7 Z5 _ - float v45; // ecx' u' e' ]) g" j' ]' z
- const char *v47; // ecx; l" ?& K) S/ I9 m3 N* K+ p
- const char *v48; // ecx# r2 b4 \9 @+ d
- signed int v49; // [esp+A0h] [ebp-5Ch]
- _# E- i9 h% a/ ]: I - const char *v50; // [esp+A4h] [ebp-58h]
3 S/ A, E C) ] F) ` - const char *v51; // [esp+A8h] [ebp-54h]. U) ]* K6 `: H6 y8 @6 Q) X
- const char *v52; // [esp+ACh] [ebp-50h]
! b w+ f1 k7 V4 w1 g, B# w; U - _DWORD *v53; // [esp+C4h] [ebp-38h]# Z1 V P7 c" x2 M" ?6 X% X9 k+ Z
- const char **v54; // [esp+C8h] [ebp-34h]! w$ f9 d" q; ^( L+ T
- float v55; // [esp+CCh] [ebp-30h]
# `/ f, a) L+ h - const char *v56; // [esp+D0h] [ebp-2Ch]
+ }) b& [0 p% o, D& ~ - float v57; // [esp+D4h] [ebp-28h]
0 y+ U5 H6 q2 c, X7 D - float v58; // [esp+D8h] [ebp-24h]0 W- O/ U/ {8 Q' e5 H4 H
- float v59; // [esp+DCh] [ebp-20h]2 ?6 T& e4 C* U/ M9 t
- char v60; // [esp+E0h] [ebp-1Ch]
+ q2 @/ o9 _) j/ e8 R - int v61; // [esp+ECh] [ebp-10h]
6 ]# L6 n+ S9 A$ j( v - int v62; // [esp+F8h] [ebp-4h]
" n0 q8 \. Y8 G3 u: l- `2 y' m t - 4 [; ]% v A3 N$ A
- v1 = this;
) V( J* k2 }2 l5 Z o9 F6 d - v2 = (FILE *)sub_4D7E8F("Initializing graphics...\n");7 P4 j: ^; t& o
- fprintf(v2 + 1, v52);
( i) M* [# B$ Z2 g3 K - *((_DWORD *)v1 + 492) = 0;
. {' ^- P M2 \/ F, s7 c - *((_DWORD *)v1 + 609) = 0;7 W# [; m, y. j8 t8 O$ l; N- Y `
- *((_DWORD *)v1 + 611) = 0;. N" I* G2 A: U' g
- *((_DWORD *)v1 + 610) = 0;
( T7 Q& F4 ^# [8 ~2 t8 Q) Q: m H - *((_DWORD *)v1 + 613) = 0;
6 W4 g- R5 I* ~6 a- g8 T: U - *((_DWORD *)v1 + 612) = 0;
* i+ T8 V3 |& ?8 M' U) | - *((_DWORD *)v1 + 614) = 0;
4 J5 \, G( Y0 o - *((_DWORD *)v1 + 601) = 0;
$ D+ ]$ y3 L) \5 U - *((_DWORD *)v1 + 600) = 0;$ Y) h2 k7 e; z4 w0 z
- *((_DWORD *)v1 + 615) = 0;
% W5 B1 a' ^% ^6 x+ z - *((_DWORD *)v1 + 395) = 0;0 k* t8 o& F$ \) z9 { p
- *((_DWORD *)v1 + 488) = 0;
4 W- x X a: v6 }. ^+ { - *((_DWORD *)v1 + 486) = 0;( N: w+ E0 a/ N
- *((_DWORD *)v1 + 487) = 0;
; H. i3 }+ _% h: D7 |7 f0 `3 n. c - *((_DWORD *)v1 + 489) = 0;
& y$ B6 J& C& j - *((_DWORD *)v1 + 491) = 0;
6 P* k, V5 Q' _; ~ - *((_DWORD *)v1 + 514) = 0;
" Q. E& r" g W8 G- z - *((_DWORD *)v1 + 597) = 0;" I2 A2 Y) D i! S7 W3 \* x% l3 F
- v53 = v1 + 1968;
5 K) ^4 W3 F7 J6 S# r5 G - *((_DWORD *)v1 + 498) = 0;
1 x3 R1 N( F3 Q1 h7 G+ l - *((_DWORD *)v1 + 499) = 0;* X. h. e+ k* j% {) C
- *((_DWORD *)v1 + 500) = 0;; p* l0 D2 ^- G/ @# p5 C0 g% s
- *((_DWORD *)v1 + 501) = 0;
]" N v/ q3 l7 u - *((_DWORD *)v1 + 502) = 0;% b* K* \. D6 q+ a }+ b- I/ f
- v52 = (const char *)32;
! m2 B6 e0 a! Q) e, v - *((_DWORD *)v1 + 578) = 0;
8 Q2 k3 R: c, h- k1 Q - v1[2316] = 1;" P( `9 R& N& d, V# j" i
- v1[2476] = 0;' j% g0 v3 q, Q7 l! V
- v3 = Direct3DCreate9((UINT)v52);7 l8 V' V6 ]8 l; ^' L4 Q& W i
- *((_DWORD *)v1 + 384) = v3;
% A J, J! J6 e3 N - if ( !v3 )' F8 `# \% W# _( P) B( n* K4 ?/ r. P
- {
& n: L7 L% }, d - v5 = v56;
) l& j+ C) I+ \$ }. {; a5 w/ e - goto LABEL_27;% v. Y3 c; n5 b! g1 _% M" A
- }# P% a3 Q; R+ _& n E$ g
- v5 = (const char *)v3->lpVtbl->GetAdapterDisplayMode(v3, 0, (D3DDISPLAYMODE *)&v60);8 @7 D) a y; I; C& R
- if ( (signed int)v5 < 0 )2 @( N1 l7 b1 m- B: w9 K
- goto LABEL_27;
) N- p2 B8 T7 z+ s - (*(void (__stdcall **)(_DWORD, _DWORD, signed int, char *))(**((_DWORD **)v1 + 384) + 56))($ e. |3 r7 T/ P, c `
- *((_DWORD *)v1 + 384),
+ p1 S5 n8 R. L; } - 0,+ f( i; V6 g* e2 w+ N% w
- 1, O, C6 B" s/ t5 Z1 O) R
- v1 + 1640);
& Q1 e/ L( V* D4 |% H7 n# x - memset(v1 + 1584, 0, 0x38u);
. w/ |) k4 `- Z/ |2 g& u - *((_DWORD *)v1 + 404) = 0;+ A' Z+ N! M' F% y+ F+ V$ |
- *((_DWORD *)v1 + 402) = 1;: p8 Y) y2 d2 n2 Y
- *((_DWORD *)v1 + 403) = hWnd;
2 k7 r4 F% s4 i. L: N - *((_DWORD *)v1 + 407) = 0;
8 X4 J: ~& U- S- E - *((_DWORD *)v1 + 399) = 1;- S {+ o( z& H9 P, K
- *((_DWORD *)v1 + 398) = 21; e7 h7 o& ~+ F& g% r8 e
- *((_DWORD *)v1 + 405) = 0;
: ~. K& w6 o7 `6 ]6 `* E - *((_DWORD *)v1 + 522) = (unsigned __int16)word_558176;1 M; r6 M4 H. f! N
- v6 = (const char *)word_558174;) I& a* R* q! i7 `
- *((_DWORD *)v1 + 523) = word_558174;
" j! J7 }; C/ ?& a% ^4 v0 z r; Y0 o - v7 = (const char *)*((_DWORD *)v1 + 522); H- \/ t4 Y/ W+ t. I6 _6 c% c
- v52 = v6;
+ [* G1 T, p) X/ s7 i& t+ p. v" I - v51 = v7;' C- @1 l* y1 ^/ e* N
- v50 = "Screen resolution is %d x %d.\n";
2 p1 n( D8 B. T% c) t - v1[2076] = *(_DWORD *)&word_558174 == 67109632;0 x8 H7 w4 D' L. M% m! Q, f# R' c6 N
- v8 = (FILE *)sub_4D7E8F(v50);
0 X8 e' A5 Y; A3 P* a, i& o% L8 ^ - fprintf(v8 + 1, v50);
* s* Y/ }0 i" N+ x: _ - v9 = *((_DWORD *)v1 + 522);
# D& o Q e% |) ~' _% g( R - v54 = (const char **)*((_DWORD *)v1 + 523);
. P9 K9 t" f$ t" f8 z3 }; n+ B - v10 = v54;* ? T2 @+ x' l2 d! P3 B
- *((_DWORD *)v1 + 396) = v9;' v0 A9 j5 k8 i" o B9 x+ B0 t
- *((_DWORD *)v1 + 397) = v10;
" N+ x4 G* D3 M9 i1 m c' ~ - v55 = (double)v9 * 0.0009765625;9 k# v: m; [) p
- v11 = v55;
, S$ K% h" _0 T( o/ | - *((float *)v1 + 520) = v55;
, k0 n; k8 r- H, d: X* O - v55 = (double)(signed int)v54 / 768.0;( a# z* T3 Y, e' a6 f/ O
- v12 = v55;2 F: ]" v( S! H% t9 v
- *((float *)v1 + 521) = v55;
9 P' X. _4 m1 Q+ w- J1 F3 k) o - *((_DWORD *)v1 + 524) = (signed int)(v11 * 1024.0);
7 \% f; p ~! [9 b - v52 = (const char *)1;
4 f! B9 z1 w2 y7 ` h - v51 = (const char *)(v54 + 11);, G/ r! x6 F; H6 l
- v50 = (const char *)(v9 + 6);6 |% L6 r5 Y% h
- *((_DWORD *)v1 + 525) = (signed int)(v12 * 512.0);
% E* o8 W7 j4 K - *((_DWORD *)v1 + 515) = 0;
w. n# @* h( j' i0 r - *((_DWORD *)v1 + 517) = 1024;% L8 u3 S$ i! k. O D
- *((_DWORD *)v1 + 516) = 128;
E3 r, \# i; _3 w" J& f* O! U- |" W - *((_DWORD *)v1 + 518) = 640;( X; e2 {* X5 L) X5 ~7 I! c) {
- MoveWindow(hWnd, 0, 0, (int)v50, (int)v51, (BOOL)v52);6 J* I6 d7 E$ g
- if ( (*(int (__stdcall **)(_DWORD, _DWORD, signed int, int, signed int, signed int))(**((_DWORD **)v1 + 384) + 48))(+ \* O+ [; O. k, g
- *((_DWORD *)v1 + 384),5 `9 C, `: z4 O& S" J2 A/ Q# T
- 0,; H/ n8 ~: s+ t- e H* ]5 ]
- 1,# ^& E4 A4 H$ {( B
- v61,
( r/ e! o4 z" z - 21,
" k: p3 w+ w3 K3 T - 75) < 0 )
! X# i8 @3 i. i) l, {$ i& ` - {
3 H) ^ x! U8 v; Q. h# c, E - v52 = v5;
; m6 ]3 {) ^, Y1 Z6 _* K - v51 = v13;
7 |3 m1 Z8 d! s - v55 = COERCE_FLOAT(&v51);
3 K$ Q: {7 p6 j; X1 U% o: o - sub_456DD0("Direct3D initialization failed. No appropriate Depth/Stencil-Buffer-Format found.");
* z8 f ] ^2 h - v50 = v47;8 ^9 k3 R# i0 J# O* s" w
- v54 = &v50;: }( E, T/ t5 l7 W; e* T
- v62 = 0;6 f' [% x9 I% O0 g
- sub_456DD0("cCougarGraphics::cCougarGraphics"); B- i, |# y) D+ Z
- v49 = 118;
2 ?6 n8 J9 J) G9 Y ~) N3 f" t/ N8 n - goto LABEL_28;
. @! M/ Y7 m9 Z" S9 G+ Z - }
; b% H5 [* z' m( c - v52 = "Depth/Stencil Buffer is D24S8.\n";
* Z" ]( Z* x7 L9 ~, V - *((_DWORD *)v1 + 576) = 24;
8 `1 B. w, ]! b2 z - *((_DWORD *)v1 + 577) = 8;) j* c5 z4 j g4 W% Z1 l6 F
- *((_DWORD *)v1 + 406) = 75;
6 \4 k/ h3 S5 U. C - v14 = (FILE *)sub_4D7E8F(v52); V/ R% z9 f5 ]8 M
- fprintf(v14 + 1, v52);
% R! y* u( ~$ i) G - *((_DWORD *)v1 + 409) = 1;
1 m0 b4 e4 Q7 \1 t( y! b, V4 ^% ` - if ( dword_558178 != 4! S6 V# `% S. D8 X, ~: E
- || (*(int (__stdcall **)(_DWORD, _DWORD, signed int, signed int, _DWORD, signed int, _DWORD))(**((_DWORD **)v1 + 384)( z* M% i. {. V. P
- + 44))(
7 O/ `/ d6 o' ]- j - *((_DWORD *)v1 + 384),1 s/ x) P5 N. x
- 0,
( O; R/ [9 u4 c - 1,
( d, L, q: [' s$ F7 y9 `/ b$ H - 21,+ F; L' C& D) P. @
- *((_DWORD *)v1 + 404),
* |8 A+ f( c& i" ?# \ - 4,5 X8 q9 t x8 `
- 0) )* A+ a( {4 X8 r M
- {
# r1 S0 e- } Q6 S - if ( dword_558178 != 2
" z0 k" W1 |. N: B - || (*(int (__stdcall **)(_DWORD, _DWORD, signed int, signed int, _DWORD, signed int, _DWORD))(**((_DWORD **)v1 + 384)8 a+ l) ^1 w5 ^0 c; ^
- + 44))(: _/ j6 n X F' g
- *((_DWORD *)v1 + 384),) b* B% C; w! H Y) E( i; {
- 0,3 ?1 E7 l7 U: i/ s; C
- 1,
% {. B2 n2 U) G+ t6 X$ J5 n - 21,- w u& h: k, n1 f# W/ R U
- *((_DWORD *)v1 + 404),
" r# O- b) y, S9 f - 2,
6 c6 q# Z5 J5 Z. X - 0) )8 p: h: z' J/ L4 O7 c" d# U
- {
6 _' y1 y3 |! l4 d( ] - if ( (unsigned int)dword_558178 > 0% `& [! Z1 w/ }$ u/ |
- && !(*(int (__stdcall **)(_DWORD, _DWORD, signed int, signed int, _DWORD, signed int, const char **))(**((_DWORD **)v1 + 384) + 44))(
8 I+ f5 X4 l/ ~( q. l0 ]: X2 v - *((_DWORD *)v1 + 384),
: U3 H, F3 x5 X N' X4 _: r2 f - 0,+ s6 s- b3 c/ P! j1 m" Z O
- 1,+ S- Z T( u6 `9 h0 \
- 21,
, `0 H k4 S6 m1 A7 h2 q3 \8 R) l, P0 n - *((_DWORD *)v1 + 404),! E# N3 l7 V9 b* ~
- 1,. y u) A% S2 y' a% t
- &v56) )
' P) V! [ E* l) L! ^4 J0 m% ` - {
I1 f3 K( @* \+ v2 o - v15 = (unsigned int)v56;& o( Q. k( T5 P& B4 o
- *((_DWORD *)v1 + 400) = 1;& j# v% ]% x& q+ a4 j: \8 G
- v16 = dword_558178;
2 Z# Y& t4 }6 m% _5 P! d- b6 h - if ( dword_558178 >= v15 ) p; R0 N# p7 R! C# k% q" u
- v16 = v15;+ X1 v+ C6 I2 P0 F1 o
- *((_DWORD *)v1 + 401) = v16 - 1;5 Y! U$ M0 _6 ?+ F
- if ( dword_558178 < v15 )
) C* s& w1 p/ E - v15 = dword_558178;* O7 Z+ `4 E8 l2 ?4 S
- *((_DWORD *)v1 + 578) = v15;) w7 x& {! }/ q& p* } L
- }
0 W8 |2 d8 k: h - }
; h1 Y- W) k1 b- _ - else
: k6 b% k, I# E3 ]& q0 y5 r - {' ~6 V& E0 Z3 T* [0 z8 d4 m
- *((_DWORD *)v1 + 400) = 2;
' y8 E6 N0 j- X- Z/ B - *((_DWORD *)v1 + 578) = 2;$ Y! C% O0 Q6 A* O
- }
1 a( F* m3 K0 w9 S2 D' N - }0 c( e3 A+ f; ]
- else
2 y [7 N- e% |% P0 G9 r& V1 J - {# I% w" f5 @/ H5 k# u; |
- *((_DWORD *)v1 + 400) = 4;# S. R( M l1 T$ i) B, \+ m
- *((_DWORD *)v1 + 578) = 4;: G# B- f: K5 I t: l
- }- Q: f) w% M" Q( v' u! T8 |
- v52 = (const char *)*((_DWORD *)v1 + 578);
# z9 L- u6 R& Y1 ~2 d - v17 = (FILE *)sub_4D7E8F("AntiAliasing is %d.\n");
8 }" s @, ^+ i" f/ Q - fprintf(v17 + 1, v51);
" _: z' |& `3 D/ _. j5 u* ? - v18 = *((_DWORD *)v1 + 384);
5 b9 P& W+ h( e3 B4 c# A" W - v19 = *((_DWORD *)v1 + 578) == 0;! h3 s [4 s* }) m
- v52 = (const char *)827611204;' h9 {3 e' }4 b" A8 p% ]3 `! f
- v51 = (const char *)3;
% z& [ R0 n4 u% ]' D - v50 = 0;+ I1 Z# y( X, s
- *((_DWORD *)v1 + 402) = 2 * v19 + 1;
2 E3 }! l( N U' Q- _6 r - v20 = (*(int (__stdcall **)(int, _DWORD, signed int, int, const char *, const char *, const char *))(*(_DWORD *)v18 + 40))(" @0 `& B8 Z1 p5 B
- v18,. a8 [; n8 h) C6 _* |) b
- 0,
* X& b; u% A! a/ s, u6 o, D7 }* Q - 1,
1 y/ z1 v/ g6 a, ? - v61,6 Y( m9 Q# ?% V
- v50, ?2 q- o& s7 a) `* z3 m- q
- v51,
3 C& r% D6 G) s: P# l& _$ U - v52); C- R4 s* @( y
- v21 = *((_DWORD *)v1 + 425);
' ]+ o; m# M% o2 w' Z: b - v22 = v20 < 0;
! h8 N+ d5 E$ J# ?; G, |$ W1 L4 U - v23 = *((_DWORD *)v1 + 384);" N* J2 a4 {4 J+ w/ [7 H7 S
- v1[2316] = !v22;. W6 T8 X4 |& s) X
- v52 = v1 + 1540;
) B* R) _: `- P0 A - v51 = v1 + 1584;! g. c# \ H+ G/ t/ i0 J9 Q3 s
- v1[2317] = (v21 >> 14) & 1;
/ I+ @* I. x H9 [# Q6 O5 R - v5 = (const char *)(*(int (__stdcall **)(int, _DWORD, signed int, HWND, signed int, const char *, const char *))(*(_DWORD *)v23 + 64))() }! w' u, D/ Q- L+ M
- v23,$ ?; H) T% b8 @4 D( U# k8 c
- 0,
; t7 H- L. D; u+ y* H - 1,
" ~& I" }7 F9 V: ~' | - hWnd,, D; Z u/ o' }: Q& A2 o( N& d
- 64,
! D8 b2 v8 \5 V' m T5 i - v51,
: i: J/ o+ k/ d: z6 ]! [" X - v52);, i/ H' d! U2 Z$ j" q9 h- r
- if ( (signed int)v5 < 0 )
1 }9 e. _+ Y6 E, H' f- T - goto LABEL_27;
) x: X1 }) |. E0 e6 i: ^ - if ( dword_558180 && ((v24 = *((_DWORD *)v1 + 425), v24 & 2) || v24 & 0x100) )
( g0 y; |% \/ y0 c - {9 ]0 {" k' F/ o0 X7 d) X0 {
- v25 = *((_DWORD *)v1 + 609);
* y- {; d- C/ f" J4 r* ? - v26 = sub_418670(*((_DWORD *)v1 + 522));" J) A& k7 T! _! _
- v52 = (const char *)*((_DWORD *)v1 + 523);
1 e3 s: L) o$ u l9 p. f - v27 = *((_DWORD *)v1 + 609);) \9 L" s) ?0 H$ N- J3 S
- *((_DWORD *)v1 + 496) = v26;
) G5 B, f ~9 O. K' u) E8 G9 M - v28 = (const char *)sub_418670(v52);
. V* F; u6 @# g: t: w& H* ? - }% D) O0 U$ Q( B* ~# S) v* |
- else
: `# }5 b% O$ t Y% c - {) T5 l; B* z9 ~( k% e% O$ V, J1 ~6 e# t
- v28 = (const char *)*((_DWORD *)v1 + 523);+ Q/ g9 n m9 h z9 m8 n
- *((_DWORD *)v1 + 496) = *((_DWORD *)v1 + 522);/ J5 G1 F' t' n# l! _2 s1 a: g
- }3 C7 U+ E- L% C% Z2 ?, g6 M
- v29 = (const char *)*((_DWORD *)v1 + 496);
' k# f* z& M% _. } - v52 = v28;$ ^; d+ l- r* P1 t
- v51 = v29;
# {3 A. ~) j5 a# u# }, y - v50 = "PostProcess Surface is %d x %d.\n";
- y! J8 o; k# J1 o8 P7 S - *((_DWORD *)v1 + 497) = v28;: F0 ~& S+ r" U- }2 n
- v30 = (FILE *)sub_4D7E8F(v50);
& R& \: E+ z7 P: m/ r9 [ - fprintf(v30 + 1, v50);
- w2 O. W3 T4 a/ w A6 z - (*(void (__stdcall **)(_DWORD, _DWORD, char *))(**((_DWORD **)v1 + 385) + 88))(*((_DWORD *)v1 + 385), 0, v1);
; {6 F3 [" L: U7 z - sub_413100(v1);; @' n" v' b+ D) c
- sub_411D60(v1);
, [ g: {' N7 [5 s- }5 H. S - v31 = malloc(0x78u);2 \) x* P4 r) _1 b! W+ Y8 r" h; H
- v32 = -0.5 / (double)*((signed int *)v1 + 522);
% W2 `6 ?9 t! X7 R- ^+ ? - *((_DWORD *)v1 + 599) = v31;/ c5 C6 P5 e$ K5 }% K1 W
- *((_DWORD *)v1 + 600) = 0;4 W/ g3 U' M/ `9 J7 K3 m
- *((float *)v1 + 526) = v32;" n' V3 d4 T' D! j! Y0 W& g
- *((float *)v1 + 527) = -0.5 / (double)*((signed int *)v1 + 523);
2 X: ^6 W3 |0 a) E& L; V - sub_411CC0(v1);0 x4 W; F' R* P4 b' f$ _& ]" q
- v33 = v53;
, q8 l+ A: C: h$ V. |: z, c - v5 = (const char *)(*(int (__stdcall **)(int, signed int, signed int, signed int, signed int, _DWORD *, _DWORD))(*(_DWORD *)dword_559B7C + 104))( u. f) R0 j6 f* O; e6 T
- dword_559B7C,4 M6 Z" u h; F
- 80,0 x, r d9 J# j l* H A: f) s( a
- 8,! m d6 ^9 i1 i6 ?
- 258,
: u' G6 b' w3 ]: Y - 1,
# h7 X; j* q9 r) v4 y - v53,
# x8 m& a9 ?' H* w7 c - 0);
, Y- I. r7 Q2 }6 o( }- y - if ( (signed int)v5 < 0 )4 s$ T7 I$ G9 X& @, t, |" X
- {) }. A5 V% u" e
- LABEL_27:
. f g, P4 L; ?. N1 M - v52 = v5;
8 q/ F% Q* {8 {$ c. y - v51 = v4;( j1 L, f9 t' L
- v55 = COERCE_FLOAT(&v51);
6 t: [' i q' y. |) k& d4 V, G - sub_456DD0("Direct3D initialization failed.");
5 y/ {4 U3 P% X* }# R3 c - v50 = v48;! K+ d6 S4 `- t" u' y
- v54 = &v50;! M- c2 }1 d# ]$ X9 [
- v62 = 1;6 ^' t2 v9 M% F! f, c
- sub_456DD0("cCougarGraphics::cCougarGraphics");
$ Z5 i v' i: @& N! G2 i - v49 = 205;3 v0 g& ?1 b! O* u% r
- LABEL_28:5 _% P! J# v" C1 D& j4 ~
- v62 = -1;2 W- _: U& D) j6 T8 ], w5 u
- sub_40CB30(1, ".\\source\\class_graphics.cpp", v49, (char)v50, (char)v51, v52);$ c$ U; s; {+ ?. e3 H3 X
- }' v a, r! O, o! P9 S
- (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD, _DWORD **, _DWORD))(*(_DWORD *)*v53 + 44))(*v53, 0, 0, &v53, 0);% i* m7 I* o. O5 M# t. W- z
- v58 = -1.0;
+ E- o e1 c7 ~! U - *(float *)v53 = -1.0;9 Y' Q9 }/ k( O$ |8 _
- v59 = 1.0;$ t8 G; C2 A: P3 {* }6 X
- *((float *)v53 + 1) = v58;
. ], O# C2 i% @0 _/ B& r - v57 = -1.0;
! R; x) k, g" ^ - v58 = 1.0;" t; ], G$ G7 r6 |" t4 Z% m
- *((float *)v53 + 2) = v59;
' i- N, Q" D' C. D, T5 f - v59 = 1.0;# n( D, @" o6 Z2 `
- v34 = (float *)v53;
3 R8 G: `! t ]! X/ T1 p - v35 = v57;! x$ @9 L* I9 H/ `8 a- j# t1 y7 H) Q
- v57 = 1.0;" {8 C; A4 H7 {, C+ n# {$ Z
- v36 = v58;
" t3 V# g4 o8 L3 I6 z z. D! q - *((float *)v53 + 5) = v35; {. \: Q' u, H& N H- h
- v37 = v59;
. ~. l+ r2 }. Q8 M% P! @- s - v59 = 1.0;8 O7 @# X+ q6 H' ?) W
- v34[6] = v36;# L: n: y9 Y* ^ k# M( _* H2 d
- v38 = v57;
, K# s$ y) Z" y7 F* ^$ W5 _- O' R - v58 = -1.0;
' D u$ w3 y5 U- _ - v34[7] = v37;; O) h+ N7 G- ~: t C/ g# A
- v39 = v58;
+ y7 g: ~/ K3 b, v/ Q+ ~: c7 f - v57 = 1.0;
# s; x# {$ b7 S% a- ?/ N4 ^% x - v58 = 1.0;
# R2 h( T- ?0 J8 s - v40 = (float *)v53;
& L" \0 `1 E/ B5 S - *((float *)v53 + 10) = v38;8 Q* d7 o+ b1 `, H
- v41 = v59;
" z) g4 n& j7 Y - v59 = 1.0;, `. \7 _' G) S5 f/ ?
- v40[11] = v39;, t- x+ q' k! Q( N6 [+ k8 v% ]- |
- v42 = v57;
# M7 u2 A$ r, q - v40[12] = v41;
9 `* L9 u% L* n: [0 u6 g - v43 = v58;6 q; G, r5 y% e7 V$ O* u6 |* Z
- v44 = (float *)v53;
! T4 x; Q; ^) x1 v$ @ - *((float *)v53 + 15) = v42;
3 _& x; ~9 x) B* Y' N$ j. [7 O7 g - v45 = v59;
* T' v2 d$ T. p) F% O - v44[16] = v43;/ v2 A7 _) Y" R4 v+ r9 f
- v44[17] = v45;
6 l, ^3 y9 C% W5 U - *((float *)v53 + 3) = 0.000099999997;
7 ^% w1 I: z& x. L9 i4 w- D - *((float *)v53 + 4) = 1.0001;8 e8 E; o0 t) z7 `9 A1 e3 k+ A
- *((float *)v53 + 8) = 0.000099999997;
. a6 S1 R: F/ A, X$ t3 ~ - *((float *)v53 + 9) = 0.000099999997;! `9 e& I' c, I2 Y
- *((float *)v53 + 13) = 1.0001;& [: n! ^& X5 n' D: X8 n' F4 t5 v! ^, `
- *((float *)v53 + 14) = 1.0001;5 G k1 D) ?5 {
- *((float *)v53 + 18) = 1.0001;
# x! M) Y1 s6 C - *((float *)v53 + 19) = 0.000099999997;
( w' j# a! W. ~0 \ - (*(void (__stdcall **)(_DWORD))(*(_DWORD *)*v33 + 48))(*v33);
2 ?; U* x6 N9 W# I; o; @$ O/ V - return 0;
- [3 P) s2 N d0 b% P. \ - }
复制代码 0 K! X% N& i1 g b7 ?' e3 f% {5 x3 { v
用Cheatengin寻找一个字幕之后,在以下地方断下
/ P! Y! k7 c3 Q2 E4 R6 x) J- <div>ocd.exe+425B9 - 0FB6 D9 - movzx ebx,cl</div><div>004425B9</div>
复制代码 0 Z2 M$ Z+ I$ t2 k9 f# z7 A6 c
$ e s; z3 C0 J0 e2 m在ida pro下查看,是这个函数,从代码看a2字符像是索引号。
' B! `, K) o, V3 K8 d$ b- X3 L稍后需要仔细分析。字幕显示函数应该在本函数上下。
+ |' x; b7 x; v- int __thiscall sub_442510(unsigned __int8 **this, int a2)
复制代码 ! I7 e) Q# G; y8 k3 g5 N
% u: X8 o2 r: {$ V& H
' [& R" [# `9 Z' C* u- G# t, }3 f0 n |