冒险解谜游戏中文网 ChinaAVG
标题:
【Directx9游戏汉化 #4】 记忆过载 (Overclocked) 寻找CreateDevice
[打印本页]
作者:
shane007
时间:
2023-8-25 17:45
标题:
【Directx9游戏汉化 #4】 记忆过载 (Overclocked) 寻找CreateDevice
本帖最后由 shane007 于 2023-8-26 16:32 编辑
4 ~+ h2 J3 |* f" B; c8 Z( c) v% F5 Z* e$ e
" x7 g6 D& F9 B t4 D' ^
这个游戏以前分析过,这次再写仔细些,
1 H- ] o# j+ O! i" [" x. Y
CreateDevice应该就是以下这处了,我用ida pro的F5功能看了一下伪代码,更确定了。
5 S; i5 h- n& v x! A
这游戏构造比较简单,CreateDevice是在exe文件内完成的。dxwnd窗口化成功。
- Q" s$ w2 J8 l$ O4 R
/ w8 L0 K, I$ f- v, l- b# v7 K
.text:0041641A push ecx
" l! i9 I9 T. G2 X
.text:0041641B mov [esi+90Dh], dl
1 G' _; G& ~1 l K# U7 Z
.text:00416421 mov ecx, hWnd
l X. C' @) L% e( h
.text:00416427 mov edx, [eax]
5 [ J- x* r; [: D! q
.text:00416429 mov edx, [edx+40h]
Z0 N, p+ b' \7 u* c" |0 g
.text:0041642C push 40h
( t, S& k" c4 }+ I2 Z7 d" o
.text:0041642E push ecx
% B# H+ K9 V3 [5 n
.text:0041642F push 1
& M8 {' H0 c; u/ F
.text:00416431 push ebx
0 ^* t& o# x/ ~+ E1 ]5 o3 ]
.text:00416432 push eax
) |( `% U i6 b6 ?# G6 i4 X& u5 y
.text:00416433 call edx
复制代码
& w0 k3 g/ q% ?. e
int __thiscall sub_415FF0(char *this)
0 B6 q1 P7 N. k& m1 p2 X! r5 x
{
! A4 b! s/ M: A5 \: E* Y& k
char *v1; // esi
* }9 Y/ G$ P/ e W: k
FILE *v2; // eax
7 U: F. L- a* } b1 W' c4 Q( ~
IDirect3D9 *v3; // eax
1 M1 ^5 [' k7 |$ {9 y0 N, M
const char *v4; // ecx
: V5 s! V8 U2 w2 M0 W+ P0 Y
const char *v5; // edi
) q9 {. {5 r4 K f
const char *v6; // edx
4 J4 g& L9 ], g
const char *v7; // eax
' j. R/ _! M+ w% G0 Q1 e% }
FILE *v8; // eax
1 R! f4 {& S% w
signed int v9; // ebp
. g! L$ P) i8 h0 }) x' n7 Q$ N
const char **v10; // eax
, U( H" X! z8 e1 P% Y2 s. M
double v11; // st7
% l: H7 ^' N0 O) F# v' n
double v12; // st6
" \. v i) M, x2 K1 q P) K* g6 F
const char *v13; // ecx
L ~8 F% B& s: ~0 Z5 h
FILE *v14; // eax
( u$ ?" x$ h5 f* j
unsigned int v15; // eax
& w% \/ M. s$ k) g7 j) z
int v16; // ecx
E1 W2 R' T3 v0 a% Z
FILE *v17; // eax
$ S/ k# J. O4 Y
int v18; // eax
" U" ], J2 _* D
bool v19; // zf
1 B( i0 q8 m9 \0 p
int v20; // eax
( M+ a9 U" ]" @3 M/ Y9 A
unsigned int v21; // edx
3 x3 ]+ p9 h6 q
bool v22; // sf
7 \- h# h6 \! d* l# p
int v23; // eax
" z4 U! ?" {) Q7 ^5 l- L- r+ \
int v24; // eax
9 j i% h% f7 r$ v0 D
int v25; // ecx
# X z( V6 }* o6 M
int v26; // eax
( I7 R$ \5 E# j* F. F
int v27; // ecx
3 j& v( v4 t7 z& r: ]& V4 ^
const char *v28; // eax
7 I& e5 I: S* Q1 }6 M5 i
const char *v29; // edx
# Z& I8 u, q9 P' _6 c
FILE *v30; // eax
1 g% v9 h: C- w6 L; b! d8 h
void *v31; // eax
- _ u% @4 I6 I2 c' q
double v32; // st7
) O r& a, S" r( E7 M |
_DWORD *v33; // esi
9 _6 t; Y2 v9 d$ Z. b2 _
float *v34; // eax
/ G2 [/ k% ]5 f# K9 f& f
float v35; // ecx
0 {: f7 f, U% q' E& A
float v36; // edx
3 n j. j5 Y0 ]' ~* T
float v37; // ecx
i' Y) g0 \* U
float v38; // edx
G- R& N9 O8 |$ B" d9 w7 D
float v39; // ecx
: D, b* i( L6 q$ z
float *v40; // eax
, Z5 y# H0 G% S& E& j! q
float v41; // edx
0 j$ b8 I. k: I) M$ Z
float v42; // ecx
) I6 Q; Q9 i/ }& e* q' g+ Q
float v43; // edx
( I x* p! e/ q* f+ B$ K
float *v44; // eax
% D1 S2 |2 R) k: G
float v45; // ecx
1 P' A3 X8 [6 t% x0 \
const char *v47; // ecx
! y* e; W$ J% l
const char *v48; // ecx
. e: T" C. J# H% ?& \, G( e
signed int v49; // [esp+A0h] [ebp-5Ch]
1 ?( [* h' a( O4 O5 ` N- ~
const char *v50; // [esp+A4h] [ebp-58h]
. U/ T8 z% Q0 [+ c) ~ E# g, ^
const char *v51; // [esp+A8h] [ebp-54h]
$ ^) Y6 d% Z: [, D; a8 L1 W( P
const char *v52; // [esp+ACh] [ebp-50h]
" ^/ ]2 ~" i; g) ^# S9 v
_DWORD *v53; // [esp+C4h] [ebp-38h]
/ }6 q, ^3 `6 I7 w0 `/ F4 N
const char **v54; // [esp+C8h] [ebp-34h]
. u j% d+ n, O3 O1 M2 ]
float v55; // [esp+CCh] [ebp-30h]
3 d& }' t- T- ~* x1 B( X
const char *v56; // [esp+D0h] [ebp-2Ch]
. R$ E ~; v* J S- m' |
float v57; // [esp+D4h] [ebp-28h]
9 h/ m* J3 f( m. n0 q# f2 t. ^2 c0 `0 Z
float v58; // [esp+D8h] [ebp-24h]
& U: U& D% D$ `! ~- \2 w
float v59; // [esp+DCh] [ebp-20h]
1 v2 n$ v1 Y- w8 N ]+ l' c
char v60; // [esp+E0h] [ebp-1Ch]
. d }" q8 b2 g
int v61; // [esp+ECh] [ebp-10h]
6 u5 t, H, t! G3 H0 }
int v62; // [esp+F8h] [ebp-4h]
7 @. ~) K5 U+ k( S- a
/ I) a9 ]$ s( a4 b6 y% x: b- _; E
v1 = this;
# q h6 I7 E& b* I4 d
v2 = (FILE *)sub_4D7E8F("Initializing graphics...\n");
+ o- ^7 t9 a0 l$ e: @! u
fprintf(v2 + 1, v52);
. d1 B$ Q/ Y( I, J3 V, `
*((_DWORD *)v1 + 492) = 0;
: l1 G% @- t/ k6 E( t y
*((_DWORD *)v1 + 609) = 0;
1 i: m7 \ d" B7 Q( D4 n
*((_DWORD *)v1 + 611) = 0;
! p+ e- z, g) C
*((_DWORD *)v1 + 610) = 0;
p5 @+ G5 P6 O- ~5 z1 o( O
*((_DWORD *)v1 + 613) = 0;
3 b- \$ B0 r3 g- ^& f
*((_DWORD *)v1 + 612) = 0;
4 T$ D, g+ A# |" e z# E# r7 A$ @
*((_DWORD *)v1 + 614) = 0;
9 Z5 k9 b; ?3 ~) h! b
*((_DWORD *)v1 + 601) = 0;
3 ~' W- A- V8 f2 j9 v5 V
*((_DWORD *)v1 + 600) = 0;
: k& m7 m$ ]4 y4 @+ f* h
*((_DWORD *)v1 + 615) = 0;
" c6 x2 ]3 l( J+ h3 o# u
*((_DWORD *)v1 + 395) = 0;
0 l: ?: T5 Z& ]- \/ b+ X
*((_DWORD *)v1 + 488) = 0;
8 _, o# H% ~4 a& a# d4 R, h
*((_DWORD *)v1 + 486) = 0;
% |# e2 @3 k' _! r& z
*((_DWORD *)v1 + 487) = 0;
+ o6 D" n1 E* E/ H" j) f5 V. f
*((_DWORD *)v1 + 489) = 0;
' ~( y+ O8 i) u7 U- h5 V' f9 {
*((_DWORD *)v1 + 491) = 0;
1 } Z* G9 e `$ o8 t; \. u% E
*((_DWORD *)v1 + 514) = 0;
; _! d8 ], y1 }7 V
*((_DWORD *)v1 + 597) = 0;
7 P7 F4 V, y) I$ S4 E ~
v53 = v1 + 1968;
) B ^; ?2 U" {8 o* M2 n
*((_DWORD *)v1 + 498) = 0;
! M+ x& V4 N/ t/ ^( P5 ?
*((_DWORD *)v1 + 499) = 0;
/ z) _. G \1 J. j8 Y# j
*((_DWORD *)v1 + 500) = 0;
/ y, S% x. M; u& Z1 L( G8 D
*((_DWORD *)v1 + 501) = 0;
9 x! V( d0 W1 v7 A; a; y. G
*((_DWORD *)v1 + 502) = 0;
* k7 ~% M. z0 H8 n0 v6 G
v52 = (const char *)32;
& @5 @4 s7 G, z9 j6 F2 @
*((_DWORD *)v1 + 578) = 0;
+ v+ Z5 t; A) W8 [& ?' b
v1[2316] = 1;
, A( ~) o! i# q/ G9 D
v1[2476] = 0;
& p& l& H4 S7 ]3 e
v3 = Direct3DCreate9((UINT)v52);
; t( ~1 K# m4 k" w
*((_DWORD *)v1 + 384) = v3;
/ V T* ]! O* M
if ( !v3 )
6 T% [( T7 V: \' y' L6 m
{
( |& Y. S" u% Z: L
v5 = v56;
# u1 w+ p. q, a
goto LABEL_27;
3 q* m5 h- C3 B% _
}
0 |4 @* I% g* V* a) r# b
v5 = (const char *)v3->lpVtbl->GetAdapterDisplayMode(v3, 0, (D3DDISPLAYMODE *)&v60);
8 ~& S( ]: d) V8 p
if ( (signed int)v5 < 0 )
# [" w8 ^9 T2 x) d& J* S
goto LABEL_27;
4 }- s# B& `! ~1 e" Z; r
(*(void (__stdcall **)(_DWORD, _DWORD, signed int, char *))(**((_DWORD **)v1 + 384) + 56))(
8 w2 i' c; S: \+ Z2 s& m
*((_DWORD *)v1 + 384),
; w C3 B X9 }( _( M1 `( X2 y! d
0,
( I: _9 L# g8 ?! O2 P7 D3 U( f
1,
4 V+ y) K, t" v, X; \
v1 + 1640);
: i4 U# G( Q' f$ ~
memset(v1 + 1584, 0, 0x38u);
' Q2 S f, Q" `. D5 ^% c# n
*((_DWORD *)v1 + 404) = 0;
* i4 w* w% X* q$ S1 n
*((_DWORD *)v1 + 402) = 1;
) Q. B% [) _/ |. _
*((_DWORD *)v1 + 403) = hWnd;
: U/ I0 Q" M4 z0 A) h
*((_DWORD *)v1 + 407) = 0;
! ~& j! w- O3 j/ I! T
*((_DWORD *)v1 + 399) = 1;
i' {6 v6 S( z
*((_DWORD *)v1 + 398) = 21;
' u" C x( o' H2 L$ v7 E7 W3 C5 E# x6 B
*((_DWORD *)v1 + 405) = 0;
3 Q& V7 O/ S% R3 P* R6 F- d0 f& r
*((_DWORD *)v1 + 522) = (unsigned __int16)word_558176;
( A% |2 S% w# X! d
v6 = (const char *)word_558174;
3 j7 T2 e: }- A6 x" l% \, [" @
*((_DWORD *)v1 + 523) = word_558174;
& B# z' ?6 H V; X5 H M1 Q: [
v7 = (const char *)*((_DWORD *)v1 + 522);
" L( u |, T/ Q1 ^7 ~: t
v52 = v6;
r+ U/ k- r2 n) c3 U
v51 = v7;
" }# F" r% E* k a8 P# v
v50 = "Screen resolution is %d x %d.\n";
7 z) }2 I1 N7 a- }7 h9 U
v1[2076] = *(_DWORD *)&word_558174 == 67109632;
; L5 i# }# x. O" E0 x# L3 ~
v8 = (FILE *)sub_4D7E8F(v50);
/ ^# [- q7 U) L8 y3 [
fprintf(v8 + 1, v50);
; D4 T7 t/ G2 b# x+ {/ h5 S9 X
v9 = *((_DWORD *)v1 + 522);
0 T S' K% @: c
v54 = (const char **)*((_DWORD *)v1 + 523);
/ ^5 E/ Q- A2 H' F" ^1 ]. H
v10 = v54;
6 y8 W* ?1 Q- b% o+ g3 Y* z4 B
*((_DWORD *)v1 + 396) = v9;
8 ]2 Y, @8 ^3 p6 Z" F$ ^
*((_DWORD *)v1 + 397) = v10;
" T+ S U/ }& Q) ~& D# r
v55 = (double)v9 * 0.0009765625;
0 s- m0 B3 m! e* ^1 B
v11 = v55;
2 q& s0 i* d( T+ e* D) e
*((float *)v1 + 520) = v55;
' L2 ]4 a, \* _) w0 U9 l+ f$ @
v55 = (double)(signed int)v54 / 768.0;
& j' w3 @* N( H
v12 = v55;
" q, ~4 d% p9 `
*((float *)v1 + 521) = v55;
9 W, ^+ _* E( c
*((_DWORD *)v1 + 524) = (signed int)(v11 * 1024.0);
' P" ^% @: e# ]+ G
v52 = (const char *)1;
) V I! T' q& p
v51 = (const char *)(v54 + 11);
) W8 Y( Y' T0 r1 b" }# U: g- d
v50 = (const char *)(v9 + 6);
, G) V: c: L$ x
*((_DWORD *)v1 + 525) = (signed int)(v12 * 512.0);
6 }, G% j/ @5 b' i/ u& F& o
*((_DWORD *)v1 + 515) = 0;
7 X1 U. I% j2 o' U' G" c
*((_DWORD *)v1 + 517) = 1024;
# e2 s3 ]" e6 Y9 E: o
*((_DWORD *)v1 + 516) = 128;
; d, E; Y/ k* b: Q1 E( b& A
*((_DWORD *)v1 + 518) = 640;
9 [) x% C2 w; f* Z* \. [/ l
MoveWindow(hWnd, 0, 0, (int)v50, (int)v51, (BOOL)v52);
* Z' ^: L( K* L# Y6 M
if ( (*(int (__stdcall **)(_DWORD, _DWORD, signed int, int, signed int, signed int))(**((_DWORD **)v1 + 384) + 48))(
4 w; R9 u0 q: C Z+ n
*((_DWORD *)v1 + 384),
0 U& u, z' O! H7 `5 K
0,
, x. T3 n) z9 W; }! s+ b
1,
/ r- h8 I& S3 W7 [1 \. Q' U3 B1 P
v61,
( @! q7 |- G' g
21,
0 L; x7 `* B" j5 `
75) < 0 )
# \( }1 L3 ^7 E, f1 E8 S1 }1 L
{
, f' ^, m' E8 _7 G& G: ]. K
v52 = v5;
+ B" O/ J8 t/ K5 Z4 t* S
v51 = v13;
& q: V% t* v) Q1 J# P& J: T* M) y4 E
v55 = COERCE_FLOAT(&v51);
5 ]/ F$ M% w3 g; j4 q# d4 p" r
sub_456DD0("Direct3D initialization failed. No appropriate Depth/Stencil-Buffer-Format found.");
& r- i7 e! a2 a& A7 T7 ^6 D/ I( l
v50 = v47;
F, u5 F7 N3 h7 d; B( I v
v54 = &v50;
7 j, Z0 |- {7 Z- S) q! q; y! [
v62 = 0;
: B) ?/ p5 p, o( G8 X; C1 w
sub_456DD0("cCougarGraphics::cCougarGraphics");
0 [" F6 Z$ |6 j# N) k- `0 J
v49 = 118;
: b e& D( t' b' b! N6 T6 G9 ?
goto LABEL_28;
- B" ^ p. D8 Q. Y4 J' _0 U
}
( M; C' }: a0 E& Z+ { o8 a2 o
v52 = "Depth/Stencil Buffer is D24S8.\n";
$ }7 _7 a1 e$ k* E( H4 R- u
*((_DWORD *)v1 + 576) = 24;
. I1 {! n1 \% D* c# T
*((_DWORD *)v1 + 577) = 8;
& R- `' ?! j. C# ^
*((_DWORD *)v1 + 406) = 75;
+ ]( j4 p/ {: R0 W' E0 k7 F Y
v14 = (FILE *)sub_4D7E8F(v52);
% \3 z: s0 q+ N( y; O; T( c
fprintf(v14 + 1, v52);
4 S( t1 s. t# q7 b) u5 {# S- B
*((_DWORD *)v1 + 409) = 1;
4 l* w' ]$ `1 V) m
if ( dword_558178 != 4
" b, O$ {' w9 V4 x
|| (*(int (__stdcall **)(_DWORD, _DWORD, signed int, signed int, _DWORD, signed int, _DWORD))(**((_DWORD **)v1 + 384)
4 j. }' M ^' H. n4 y
+ 44))(
' J' `4 y) g3 i, M+ u
*((_DWORD *)v1 + 384),
/ e6 `* ^9 d! a9 ? \6 w% k9 D# G. t
0,
* [0 h- ^: C! i1 d
1,
! N# ^+ x& f; l; @
21,
! j m0 C" v1 d; D4 N# a
*((_DWORD *)v1 + 404),
% `* _& I5 \1 Y+ C. U; F1 ~9 L
4,
; J) [+ U7 K5 V1 m
0) )
; ~" N6 _: x( d* a l, _; E
{
6 V& q0 M1 f' L* P
if ( dword_558178 != 2
! S( K; {' Y/ `5 [
|| (*(int (__stdcall **)(_DWORD, _DWORD, signed int, signed int, _DWORD, signed int, _DWORD))(**((_DWORD **)v1 + 384)
% N$ t" s8 Y* {5 J {
+ 44))(
`5 [5 V/ Y7 Z" a6 E
*((_DWORD *)v1 + 384),
; V$ Q4 c5 {- ^- e6 k: \" p& f
0,
8 R& ?3 |/ Y, [" U7 @4 S5 R
1,
0 g% u' X9 n% F9 r( w: X8 A8 R
21,
& Q! K' N! |& ]' Y
*((_DWORD *)v1 + 404),
) P# G- v4 ?0 D5 D2 L8 [' A# L
2,
7 j, C: s! R+ k. d; G ]
0) )
9 `2 S$ m( `. r8 u1 C
{
: [5 G { ~' o) ~+ E; v9 x
if ( (unsigned int)dword_558178 > 0
5 e1 ?0 x* N6 e5 w
&& !(*(int (__stdcall **)(_DWORD, _DWORD, signed int, signed int, _DWORD, signed int, const char **))(**((_DWORD **)v1 + 384) + 44))(
" W* Y$ ]* v: M% b
*((_DWORD *)v1 + 384),
5 T$ J+ n2 I* e3 k* d0 i' _. h
0,
7 w- M9 o# n; o& M$ i) B0 O" M
1,
6 t" ~, h7 {. l" q. S
21,
" X* j0 S o2 z0 k# e
*((_DWORD *)v1 + 404),
+ C( c2 h8 P( K1 S T' p, t4 c
1,
9 `; D0 e2 \8 B. S
&v56) )
) ~" x* ^# R7 h2 u2 o) ]3 H
{
. ]5 y3 g0 U6 j/ z$ m: ]" n
v15 = (unsigned int)v56;
# Z/ @: B3 Y! Z; b
*((_DWORD *)v1 + 400) = 1;
# R& `. b9 t0 D/ l3 ^) u" Z1 r, S
v16 = dword_558178;
/ \/ o s$ w5 A( H
if ( dword_558178 >= v15 )
# D( r3 @ Q/ @
v16 = v15;
5 S- `/ f9 s# R @; }7 K* T' w; T
*((_DWORD *)v1 + 401) = v16 - 1;
8 G5 i. s* m7 @) `( n3 X* o
if ( dword_558178 < v15 )
4 A* }! Q0 D% I( ~! V1 o: ~& {7 d+ w- v
v15 = dword_558178;
' q! e* c: o) Y+ L X- d0 f( {
*((_DWORD *)v1 + 578) = v15;
( m; ~) E- W& J- F
}
6 F& }0 x- c$ _- L% A
}
3 e. v* e0 @1 s% c( B: m7 d7 J
else
; o1 X" R X. W* n" D8 O- L
{
% U: P" |* a, h6 c% g
*((_DWORD *)v1 + 400) = 2;
7 x; L! E$ l/ h( x
*((_DWORD *)v1 + 578) = 2;
1 K( _2 I8 d3 e; B8 f- t, s. I
}
5 r9 g8 |' ^' \3 v
}
m9 W& Q6 D3 n1 Q! J
else
9 A. `( \+ w0 ?! R
{
, E4 e0 c; v9 ?
*((_DWORD *)v1 + 400) = 4;
& s3 k; _, a8 Y( ^# U j8 s
*((_DWORD *)v1 + 578) = 4;
0 O: f7 B( |2 z7 q6 O9 U
}
- p7 o# k" h; F
v52 = (const char *)*((_DWORD *)v1 + 578);
7 E* d* `8 s+ ?! c H& y
v17 = (FILE *)sub_4D7E8F("AntiAliasing is %d.\n");
4 d6 L; D" W# m& J
fprintf(v17 + 1, v51);
7 B3 V. ~5 h- l F4 x
v18 = *((_DWORD *)v1 + 384);
. K6 `% C1 |6 E a# [
v19 = *((_DWORD *)v1 + 578) == 0;
Z4 Z3 Z6 V, B2 L8 H$ f
v52 = (const char *)827611204;
) H. W! `: s8 |, I
v51 = (const char *)3;
) k# f9 r) i* r$ b
v50 = 0;
" y8 {, r9 I+ ^6 I9 y
*((_DWORD *)v1 + 402) = 2 * v19 + 1;
c1 S1 m3 x& J" o1 X$ N
v20 = (*(int (__stdcall **)(int, _DWORD, signed int, int, const char *, const char *, const char *))(*(_DWORD *)v18 + 40))(
* X8 I3 i- ^$ Q3 i& R
v18,
t/ s: j2 n, ~8 @6 @7 L
0,
, B. h& W; h0 o( p, I' K" H
1,
- `% y( {# B# I( T0 @" E, \
v61,
* b, f a# X% O, a2 h1 @
v50,
, v( e) {2 L. j0 m- d, M3 X- @: c( D
v51,
0 D$ U8 E( r: P, `3 j
v52);
" @- e9 y; }9 Y8 h* i
v21 = *((_DWORD *)v1 + 425);
5 f+ X Y6 }( q9 Q, E7 V- E
v22 = v20 < 0;
' S3 L9 m% I Z' |( m9 i
v23 = *((_DWORD *)v1 + 384);
# }; d- ]! y# J7 X* R' V! c
v1[2316] = !v22;
5 a4 f8 P( g4 p6 n( |
v52 = v1 + 1540;
1 E' }( {: K' H$ F5 ^# \
v51 = v1 + 1584;
! j# Y. W$ T6 R4 _
v1[2317] = (v21 >> 14) & 1;
- X& K, X, ~$ U: C4 M) _; ^, i
v5 = (const char *)(*(int (__stdcall **)(int, _DWORD, signed int, HWND, signed int, const char *, const char *))(*(_DWORD *)v23 + 64))(
, ^; W6 a" l9 T/ v2 @& V6 u
v23,
3 m; T/ x6 m7 E
0,
. D9 a4 x( `+ w4 F! N" ^. P
1,
9 ?- `5 _8 t* T! x
hWnd,
3 W0 c: x1 O, r9 t6 Z- g' s
64,
: O: a0 @' J$ ^! d# V& f6 o$ [, a
v51,
; d1 r5 y9 W$ h2 y$ I
v52);
7 u' H1 ?) p9 ~
if ( (signed int)v5 < 0 )
& N# y2 d' d- O2 T, t) ~* A: Z
goto LABEL_27;
3 v; F4 Z o4 l9 Q! q: X: E+ ~
if ( dword_558180 && ((v24 = *((_DWORD *)v1 + 425), v24 & 2) || v24 & 0x100) )
- g7 F+ I. H* R& `7 J* N
{
. I$ a( N# b0 ]8 C! }
v25 = *((_DWORD *)v1 + 609);
2 P( M7 }% j8 L7 Y6 @4 ^7 B7 y
v26 = sub_418670(*((_DWORD *)v1 + 522));
2 d$ L q" s& \
v52 = (const char *)*((_DWORD *)v1 + 523);
3 s* \' C8 i: J% C7 Q' {
v27 = *((_DWORD *)v1 + 609);
* P7 M% P5 G0 W6 h
*((_DWORD *)v1 + 496) = v26;
0 I$ Z) _3 L0 ]! K/ n) y
v28 = (const char *)sub_418670(v52);
- H# R( y/ j$ S: @4 h: G( c
}
1 k. [; l& s4 G" }
else
) r F8 {. t8 b' n1 n) `4 G
{
' Y& M5 w% I+ `. k) K, l4 e6 Z
v28 = (const char *)*((_DWORD *)v1 + 523);
. _& X$ L# `& }
*((_DWORD *)v1 + 496) = *((_DWORD *)v1 + 522);
2 {) h. }; x1 O, Z# ~
}
2 G/ ~ \( u& s7 {
v29 = (const char *)*((_DWORD *)v1 + 496);
7 y2 E, O5 Y# u8 N7 a- E
v52 = v28;
+ b) L( r3 @9 G w N
v51 = v29;
* x- p5 F N; L7 g: S
v50 = "PostProcess Surface is %d x %d.\n";
! @8 I2 e( ]: l) k' j* b# e8 Q
*((_DWORD *)v1 + 497) = v28;
- ` \: r* l. s
v30 = (FILE *)sub_4D7E8F(v50);
9 w9 @) n0 I8 K* i9 L
fprintf(v30 + 1, v50);
$ V2 B ~. r5 [7 V; t( A. l1 o9 H
(*(void (__stdcall **)(_DWORD, _DWORD, char *))(**((_DWORD **)v1 + 385) + 88))(*((_DWORD *)v1 + 385), 0, v1);
' S* ^$ W# Y. n) X
sub_413100(v1);
' x5 f8 g) h& o$ ?! O
sub_411D60(v1);
t8 q+ g- p6 z1 `
v31 = malloc(0x78u);
) I3 f2 F2 ^% l. ~/ v' f" k+ y
v32 = -0.5 / (double)*((signed int *)v1 + 522);
7 j8 s' }- t* M) o: L( v
*((_DWORD *)v1 + 599) = v31;
- J, N Y5 k+ L) K: t8 S D1 R
*((_DWORD *)v1 + 600) = 0;
2 [: Q: ?! S6 P( ], W2 G* b7 r% a3 t
*((float *)v1 + 526) = v32;
7 Q- E% M( M; k
*((float *)v1 + 527) = -0.5 / (double)*((signed int *)v1 + 523);
# M( f8 D9 U8 a w6 t$ c2 l
sub_411CC0(v1);
2 s9 L" F# q M C
v33 = v53;
/ g2 G/ @! d& S# n
v5 = (const char *)(*(int (__stdcall **)(int, signed int, signed int, signed int, signed int, _DWORD *, _DWORD))(*(_DWORD *)dword_559B7C + 104))(
! @9 N+ }: r7 U" f
dword_559B7C,
$ a. u+ O3 \5 j9 S8 B4 T
80,
# A# X. ^1 {& P! ~3 \
8,
6 ]& f: W/ p$ o8 O! Y
258,
4 f/ B' ?3 N8 C; U: I
1,
. v9 c- u; M4 n
v53,
# z( \' w9 ]! n
0);
3 p+ D, [' h& M4 _$ h
if ( (signed int)v5 < 0 )
4 a5 Y* P; f4 S( y
{
% b) y% `) z F. j- p$ n
LABEL_27:
4 b& ?7 `' Y1 S. J) H
v52 = v5;
' f& I' W B# ?$ D* k. p
v51 = v4;
9 N4 m! G5 s8 P+ E& C; \
v55 = COERCE_FLOAT(&v51);
/ _: `- [, n5 j5 F, E3 d" a
sub_456DD0("Direct3D initialization failed.");
9 U+ ~1 Y4 J; m( V4 x; {
v50 = v48;
: R/ g& }/ y) A2 ?6 k. e7 u( H A9 Z! i
v54 = &v50;
R5 F% r' D9 ~1 m8 q4 J3 k
v62 = 1;
% J) u7 L/ U8 [* L- W; h* C7 Q Y
sub_456DD0("cCougarGraphics::cCougarGraphics");
. R5 N- d) L# q
v49 = 205;
' l' x' r% G. z8 I" w
LABEL_28:
& P9 y. F8 `" O% G, Y2 l* E
v62 = -1;
+ w. U* `, w' c+ v# J6 Y
sub_40CB30(1, ".\\source\\class_graphics.cpp", v49, (char)v50, (char)v51, v52);
5 o2 ?+ D- s7 E9 R! k$ v7 a6 ^% r' d0 R
}
/ {3 v/ z/ o, J3 Q
(*(void (__stdcall **)(_DWORD, _DWORD, _DWORD, _DWORD **, _DWORD))(*(_DWORD *)*v53 + 44))(*v53, 0, 0, &v53, 0);
9 j2 L ~/ u6 w5 @( N
v58 = -1.0;
' a/ Q5 z1 p. J. ^0 E
*(float *)v53 = -1.0;
' y& i% E& R1 m& v+ ?' j* [; t
v59 = 1.0;
/ n3 ?9 R# Y7 q- _/ L! t
*((float *)v53 + 1) = v58;
9 D* S- }) M: q
v57 = -1.0;
2 p$ p+ o: H L! r. S( a( R
v58 = 1.0;
9 s. u+ t6 \: n" R6 U8 ~
*((float *)v53 + 2) = v59;
$ `* s) ?. o" V9 W3 @/ ?. l
v59 = 1.0;
% N) r$ f$ o) Q- K+ r7 K3 B, o( X
v34 = (float *)v53;
, t3 x2 f( i: d% w
v35 = v57;
3 S! [! A( B; @( }8 ]/ I& x
v57 = 1.0;
D4 @' O* z! P; D/ o5 k
v36 = v58;
) C" A' p+ K2 `; T% r
*((float *)v53 + 5) = v35;
3 N0 m$ @# _, C
v37 = v59;
0 t! N" U' ? g7 k& W
v59 = 1.0;
' ?( Y# V! R) [+ ?( k8 i+ @" y
v34[6] = v36;
3 V& f- ]; o) S# ^7 c% Q: J
v38 = v57;
" u0 _( E# e) b
v58 = -1.0;
/ \" a7 Y, J" o4 F& |$ G8 M
v34[7] = v37;
6 X/ B3 @, _5 z" |
v39 = v58;
- j s) d0 l; H' e( ]/ z7 u, P4 D
v57 = 1.0;
" H9 h* g9 p6 ~
v58 = 1.0;
; h- s5 D$ t. A" {5 u% k% e
v40 = (float *)v53;
6 {. s6 p4 Q. h D6 N$ l
*((float *)v53 + 10) = v38;
, @4 W1 W- }3 v) v# L
v41 = v59;
^: q6 |$ L( r
v59 = 1.0;
& R! V& x; `! ?' m3 V, x# O
v40[11] = v39;
. g4 l8 C: u% m5 [, V; f' l
v42 = v57;
) F9 m# {+ I3 E* D2 i9 a% V# o2 Y
v40[12] = v41;
6 R2 N3 U: C, k. s7 h2 f( }
v43 = v58;
2 s' V5 |' o/ r4 X6 T
v44 = (float *)v53;
0 E0 B/ ~2 X" o# I% N" p
*((float *)v53 + 15) = v42;
9 L1 j9 I o1 Y' E, s% L
v45 = v59;
! R: n7 k8 j2 B2 s
v44[16] = v43;
. l5 c5 _$ l, r8 }0 _- x; H. i4 R
v44[17] = v45;
# X9 @; g( r2 u# _9 ` {, \
*((float *)v53 + 3) = 0.000099999997;
5 }- w R4 k+ N9 a J) p
*((float *)v53 + 4) = 1.0001;
) @, d! S d( |
*((float *)v53 + 8) = 0.000099999997;
" D) d5 }( ~. Y2 D% ?- C" b
*((float *)v53 + 9) = 0.000099999997;
+ b( z; f- V, k- }' A/ y1 n# t4 \
*((float *)v53 + 13) = 1.0001;
+ z$ w5 v; U: L% k$ M& j' ]2 a
*((float *)v53 + 14) = 1.0001;
, E G8 \5 D6 j3 o* x9 Y, H
*((float *)v53 + 18) = 1.0001;
! Q/ [' `* }- ?+ h# E8 H ?. r
*((float *)v53 + 19) = 0.000099999997;
% w) @6 C7 R, }& [9 n
(*(void (__stdcall **)(_DWORD))(*(_DWORD *)*v33 + 48))(*v33);
: I/ K2 ^1 P- T- {- _. r: q
return 0;
/ h* w4 \5 \# V% i$ d
}
复制代码
9 Y! d7 X2 o$ ~. v
用Cheatengin寻找一个字幕之后,在以下地方断下
- n U! l+ G4 t
<div>ocd.exe+425B9 - 0FB6 D9 - movzx ebx,cl</div><div>004425B9</div>
复制代码
4 z* {; }( \) n- ]0 N
5 p/ k% V+ ?& \# b K' \
在ida pro下查看,是这个函数,从代码看a2字符像是索引号。
' }' ~8 N$ u) o, T) }+ X$ }: ~
稍后需要仔细分析。字幕显示函数应该在本函数上下。
$ @- P. l- w; u# b
int __thiscall sub_442510(unsigned __int8 **this, int a2)
复制代码
" B- m+ s$ A! P$ i
* v/ \( j& r' g
4 M7 Q7 B8 ]0 o1 v7 d
欢迎光临 冒险解谜游戏中文网 ChinaAVG (https://chinaavg.com/)
Powered by Discuz! X3.2