summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIru Cai <mytbk920423@gmail.com>2021-05-10 23:39:54 +0800
committerIru Cai <mytbk920423@gmail.com>2021-05-10 23:39:54 +0800
commit93dac59fbe6f8d4b9b83e05fba6fc0cfdca1a4ee (patch)
treee67610c3ad5a63f04a168859065d7b8e46e2db48
parent06c370edeb1944a9743a4a87fb92ea61b379b727 (diff)
downloadrich4-93dac59fbe6f8d4b9b83e05fba6fc0cfdca1a4ee.tar.xz
use player_stocks C global data
-rw-r--r--asm/rich4.asm171
1 files changed, 82 insertions, 89 deletions
diff --git a/asm/rich4.asm b/asm/rich4.asm
index 9d31559..5013b6f 100644
--- a/asm/rich4.asm
+++ b/asm/rich4.asm
@@ -136,6 +136,7 @@ extern _card_strings
;; extern _card_table
extern _game_stocks
+extern _player_stocks
section .text
db 0xcc
@@ -2553,7 +2554,7 @@ add esp, 0x10
push edi
push 0x30
push 8
-push ref_004971a0 ; push 0x4971a0
+push _player_stocks ; push 0x4971a0
call fcn_004576d0 ; call 0x4576d0
add esp, 0x10
push edi
@@ -2962,7 +2963,7 @@ add esp, 0x10
push ebx
push 0x30
push 8
-push ref_004971a0 ; push 0x4971a0
+push _player_stocks ; push 0x4971a0
call fcn_00457ada ; call 0x457ada
add esp, 0x10
push ebx
@@ -8490,7 +8491,7 @@ call fcn_00456f60 ; call 0x456f60
add esp, 0xc
push 0x180
push 0
-push ref_004971a0 ; push 0x4971a0
+push _player_stocks ; push 0x4971a0
call fcn_00456f60 ; call 0x456f60
add esp, 0xc
push 0x24
@@ -16314,7 +16315,7 @@ shl eax, 5
mov edx, ebx
shl edx, 3
add eax, edx
-mov edi, dword [eax + ref_004971a0] ; mov edi, dword [eax + 0x4971a0]
+mov edi, dword [eax + _player_stocks] ; mov edi, dword [eax + 0x4971a0]
test edi, edi
je short loc_0040d147 ; je 0x40d147
push 0
@@ -28735,9 +28736,9 @@ shl eax, 5
mov edx, ebx
shl edx, 3
add edx, eax
-cmp dword [edx + ref_004971a0], 0 ; cmp dword [edx + 0x4971a0], 0
+cmp dword [edx + _player_stocks], 0 ; cmp dword [edx + 0x4971a0], 0
je short loc_0041647e ; je 0x41647e
-fild dword [edx + ref_004971a0] ; fild dword [edx + 0x4971a0]
+fild dword [edx + _player_stocks] ; fild dword [edx + 0x4971a0]
fstp dword [esp + 0xa0]
mov eax, ebx
shl eax, 3
@@ -28752,7 +28753,7 @@ fadd dword [esp + 0xa4]
call fcn_00457dbc ; call 0x457dbc
fistp dword [esp + 0xac]
fld dword [esp + 0xa0]
-fmul dword [edx + ref_004971a4] ; fmul dword [edx + 0x4971a4]
+fmul dword [edx + (_player_stocks + 4)] ; fmul dword [edx + 0x4971a4]
mov eax, dword [esp + 0xa8]
mov dword [esp + 0xa4], eax
fild dword [esp + 0xa4]
@@ -41979,8 +41980,8 @@ shl eax, 2
sub eax, edx
shl eax, 5
mov edx, ebx
-fild dword [eax + edx*8 + ref_004971a0] ; fild dword [eax + edx*8 + 0x4971a0]
-fmul dword [eax + edx*8 + ref_004971a4] ; fmul dword [eax + edx*8 + 0x4971a4]
+fild dword [eax + edx*8 + _player_stocks] ; fild dword [eax + edx*8 + 0x4971a0]
+fmul dword [eax + edx*8 + (_player_stocks + 4)] ; fmul dword [eax + edx*8 + 0x4971a4]
call fcn_00457dbc ; call 0x457dbc
fistp dword [esp]
cmp esi, dword [esp]
@@ -42089,8 +42090,8 @@ sub eax, edi
shl eax, 5
mov ecx, ebx
shl ecx, 3
-fild dword [ecx + eax + ref_004971a0] ; fild dword [ecx + eax + 0x4971a0]
-fmul dword [ecx + eax + ref_004971a4] ; fmul dword [ecx + eax + 0x4971a4]
+fild dword [ecx + eax + _player_stocks] ; fild dword [ecx + eax + 0x4971a0]
+fmul dword [ecx + eax + (_player_stocks + 4)] ; fmul dword [ecx + eax + 0x4971a4]
call fcn_00457dbc ; call 0x457dbc
fistp dword [esp + 0xc]
cmp esi, dword [esp + 0xc]
@@ -42108,7 +42109,7 @@ mov eax, edx
shl eax, 2
sub eax, edx
shl eax, 5
-cmp dword [ecx + eax + ref_004971a0], 0 ; cmp dword [ecx + eax + 0x4971a0], 0
+cmp dword [ecx + eax + _player_stocks], 0 ; cmp dword [ecx + eax + 0x4971a0], 0
jne short loc_0042017c ; jne 0x42017c
push ebx
call fcn_004295ea ; call 0x4295ea
@@ -42143,8 +42144,8 @@ sub eax, edi
shl eax, 5
mov ecx, ebx
shl ecx, 3
-fild dword [ecx + eax + ref_004971a0] ; fild dword [ecx + eax + 0x4971a0]
-fmul dword [ecx + eax + ref_004971a4] ; fmul dword [ecx + eax + 0x4971a4]
+fild dword [ecx + eax + _player_stocks] ; fild dword [ecx + eax + 0x4971a0]
+fmul dword [ecx + eax + (_player_stocks + 4)] ; fmul dword [ecx + eax + 0x4971a4]
call fcn_00457dbc ; call 0x457dbc
fistp dword [esp + 0xc]
cmp esi, dword [esp + 0xc]
@@ -42159,7 +42160,7 @@ mov eax, edx
shl eax, 2
sub eax, edx
shl eax, 5
-cmp dword [ecx + eax + ref_004971a0], 0 ; cmp dword [ecx + eax + 0x4971a0], 0
+cmp dword [ecx + eax + _player_stocks], 0 ; cmp dword [ecx + eax + 0x4971a0], 0
jne short loc_00420224 ; jne 0x420224
push ebx
call fcn_004295ea ; call 0x4295ea
@@ -46505,7 +46506,7 @@ sub eax, edx
mov edx, eax
shl edx, 5
mov eax, ebx
-fild dword [edx + eax*8 + ref_004971a0] ; fild dword [edx + eax*8 + 0x4971a0]
+fild dword [edx + eax*8 + _player_stocks] ; fild dword [edx + eax*8 + 0x4971a0]
shl eax, 3
add eax, ebx
fmul dword [eax*4 + ref_00496994] ; fmul dword [eax*4 + 0x496994]
@@ -46907,7 +46908,7 @@ shl eax, 2
sub eax, edx
shl eax, 5
mov ebp, ebx
-mov edx, dword [eax + ebp*8 + ref_004971a0] ; mov edx, dword [eax + ebp*8 + 0x4971a0]
+mov edx, dword [eax + ebp*8 + _player_stocks] ; mov edx, dword [eax + ebp*8 + 0x4971a0]
push edx
lea eax, [esp + 4]
push eax
@@ -46928,7 +46929,7 @@ mov eax, edx
shl eax, 2
sub eax, edx
shl eax, 5
-fild dword [eax + ebp*8 + ref_004971a0] ; fild dword [eax + ebp*8 + 0x4971a0]
+fild dword [eax + ebp*8 + _player_stocks] ; fild dword [eax + ebp*8 + 0x4971a0]
fmul dword [edi + ref_00496994] ; fmul dword [edi + 0x496994]
call fcn_00457dbc ; call 0x457dbc
fistp dword [esp + 0x80]
@@ -46987,7 +46988,7 @@ shl ecx, 2
sub ecx, ebx
shl ecx, 5
mov eax, edx
-fild dword [ecx + eax*8 + ref_004971a0] ; fild dword [ecx + eax*8 + 0x4971a0]
+fild dword [ecx + eax*8 + _player_stocks] ; fild dword [ecx + eax*8 + 0x4971a0]
shl eax, 3
add eax, edx
fmul dword [eax*4 + ref_00496994] ; fmul dword [eax*4 + 0x496994]
@@ -48295,7 +48296,7 @@ shl edx, 5
add edx, dword [esp]
mov ax, word [eax + ref_004967e8] ; mov ax, word [eax + 0x4967e8]
and eax, 0xffff
-cmp eax, dword [edx + ref_004971a0] ; cmp eax, dword [edx + 0x4971a0]
+cmp eax, dword [edx + _player_stocks] ; cmp eax, dword [edx + 0x4971a0]
jle near loc_004249ad ; jle 0x4249ad
jmp near loc_00424955 ; jmp 0x424955
@@ -49561,23 +49562,23 @@ sub eax, edx
shl eax, 5
mov edi, ecx
shl edi, 3
-fild dword [edi + eax + ref_004971a0] ; fild dword [edi + eax + 0x4971a0]
-fmul dword [edi + eax + ref_004971a4] ; fmul dword [edi + eax + 0x4971a4]
+fild dword [edi + eax + _player_stocks] ; fild dword [edi + eax + 0x4971a0]
+fmul dword [edi + eax + (_player_stocks + 4)] ; fmul dword [edi + eax + 0x4971a4]
call fcn_00457dbc ; call 0x457dbc
fistp dword [esp]
xor edx, edx
mov dx, word [ebx + ref_004967e8] ; mov dx, word [ebx + 0x4967e8]
-add dword [edi + eax + ref_004971a0], edx ; add dword [edi + eax + 0x4971a0], edx
+add dword [edi + eax + _player_stocks], edx ; add dword [edi + eax + 0x4971a0], edx
mov eax, esi
shl eax, 2
sub eax, esi
shl eax, 5
add eax, edi
-mov edi, dword [eax + ref_004971a0] ; mov edi, dword [eax + 0x4971a0]
+mov edi, dword [eax + _player_stocks] ; mov edi, dword [eax + 0x4971a0]
sub edi, edx
-mov dword [eax + ref_004971a0], edi ; mov dword [eax + 0x4971a0], edi
+mov dword [eax + _player_stocks], edi ; mov dword [eax + 0x4971a0], edi
jne short loc_004256c2 ; jne 0x4256c2
-mov dword [eax + ref_004971a4], edi ; mov dword [eax + 0x4971a4], edi
+mov dword [eax + (_player_stocks + 4)], edi ; mov dword [eax + 0x4971a4], edi
loc_004256c2:
imul ebx, esi, 0x54
@@ -49598,12 +49599,12 @@ shl eax, 5
mov edx, ecx
shl edx, 3
add edx, eax
-fild dword [edx + ref_004971a0] ; fild dword [edx + 0x4971a0]
+fild dword [edx + _player_stocks] ; fild dword [edx + 0x4971a0]
mov eax, edi
mov dword [esp + 4], edi
fild dword [esp + 4]
fdivrp st1 ; fdivrp st(1)
-fstp dword [edx + ref_004971a4] ; fstp dword [edx + 0x4971a4]
+fstp dword [edx + (_player_stocks + 4)] ; fstp dword [edx + 0x4971a4]
xor eax, edi
mov ax, word [ebx + ref_004967e2] ; mov ax, word [ebx + 0x4967e2]
push eax
@@ -49857,7 +49858,7 @@ mov edx, ebx
shl edx, 3
mov dword [esp + 0xd4], edx
add eax, edx
-cmp dword [eax + ref_004971a0], 0 ; cmp dword [eax + 0x4971a0], 0
+cmp dword [eax + _player_stocks], 0 ; cmp dword [eax + 0x4971a0], 0
je short loc_004259da ; je 0x4259da
push 2
push esi
@@ -49877,7 +49878,7 @@ shl eax, 2
sub eax, edx
shl eax, 5
add eax, dword [esp + 0xd4]
-mov ecx, dword [eax + ref_004971a0] ; mov ecx, dword [eax + 0x4971a0]
+mov ecx, dword [eax + _player_stocks] ; mov ecx, dword [eax + 0x4971a0]
push ecx
lea eax, [esp + 4]
push eax
@@ -49897,7 +49898,7 @@ shl eax, 2
sub eax, edx
shl eax, 5
add eax, dword [esp + 0xd4]
-fild dword [eax + ref_004971a0] ; fild dword [eax + 0x4971a0]
+fild dword [eax + _player_stocks] ; fild dword [eax + 0x4971a0]
fmul dword [edi + ref_00496994] ; fmul dword [edi + 0x496994]
call fcn_00457dbc ; call 0x457dbc
fistp dword [esp + 0xd8]
@@ -53936,20 +53937,20 @@ shl eax, 5
mov edx, dword [esp + 0x20]
shl edx, 3
add edx, eax
-fild dword [edx + ref_004971a0] ; fild dword [edx + 0x4971a0]
-fmul dword [edx + ref_004971a4] ; fmul dword [edx + 0x4971a4]
+fild dword [edx + _player_stocks] ; fild dword [edx + 0x4971a0]
+fmul dword [edx + (_player_stocks + 4)] ; fmul dword [edx + 0x4971a4]
call fcn_00457dbc ; call 0x457dbc
fistp dword [esp]
-add dword [edx + ref_004971a0], esi ; add dword [edx + 0x4971a0], esi
+add dword [edx + _player_stocks], esi ; add dword [edx + 0x4971a0], esi
mov eax, dword [esp + 4]
mov ebx, dword [esp]
add ebx, eax
mov dword [esp], ebx
-fild dword [edx + ref_004971a0] ; fild dword [edx + 0x4971a0]
+fild dword [edx + _player_stocks] ; fild dword [edx + 0x4971a0]
mov dword [esp + 8], ebx
fild dword [esp + 8]
fdivrp st1 ; fdivrp st(1)
-fstp dword [edx + ref_004971a4] ; fstp dword [edx + 0x4971a4]
+fstp dword [edx + (_player_stocks + 4)] ; fstp dword [edx + 0x4971a4]
mov esi, dword [esp + 0x20]
push esi
mov edi, dword [esp + 0x20]
@@ -53976,11 +53977,11 @@ shl edx, 5
mov eax, dword [esp + 0x18]
shl eax, 3
add eax, edx
-mov edx, dword [eax + ref_004971a0] ; mov edx, dword [eax + 0x4971a0]
+mov edx, dword [eax + _player_stocks] ; mov edx, dword [eax + 0x4971a0]
sub edx, ecx
-mov dword [eax + ref_004971a0], edx ; mov dword [eax + 0x4971a0], edx
+mov dword [eax + _player_stocks], edx ; mov dword [eax + 0x4971a0], edx
jne short loc_00428e5b ; jne 0x428e5b
-mov dword [eax + ref_004971a4], edx ; mov dword [eax + 0x4971a4], edx
+mov dword [eax + (_player_stocks + 4)], edx ; mov dword [eax + 0x4971a4], edx
loc_00428e5b:
mov edx, dword [esp + 0x18]
@@ -54594,7 +54595,7 @@ shl eax, 2
sub eax, edx
shl eax, 5
mov edi, dword [esp + 0x1c]
-mov edi, dword [eax + edi*8 + ref_004971a0] ; mov edi, dword [eax + edi*8 + 0x4971a0]
+mov edi, dword [eax + edi*8 + _player_stocks] ; mov edi, dword [eax + edi*8 + 0x4971a0]
test edi, edi
je short loc_004295c0 ; je 0x4295c0
mov ecx, 2
@@ -54624,7 +54625,7 @@ sub edx, esi
mov esi, edx
shl esi, 5
mov edx, dword [esp + 0x1c]
-mov edx, dword [esi + edx*8 + ref_004971a0] ; mov edx, dword [esi + edx*8 + 0x4971a0]
+mov edx, dword [esi + edx*8 + _player_stocks] ; mov edx, dword [esi + edx*8 + 0x4971a0]
cmp edx, edi
jl short loc_00429579 ; jl 0x429579
inc ecx
@@ -55111,7 +55112,7 @@ shl eax, 5
mov ebx, esi
shl ebx, 3
add eax, ebx
-mov ecx, dword [eax + ref_004971a0] ; mov ecx, dword [eax + 0x4971a0]
+mov ecx, dword [eax + _player_stocks] ; mov ecx, dword [eax + 0x4971a0]
test ecx, ecx
je short loc_00429b5f ; je 0x429b5f
push ecx
@@ -55132,7 +55133,7 @@ mov eax, edx
shl eax, 2
sub eax, edx
shl eax, 5
-fld dword [ebx + eax + ref_004971a4] ; fld dword [ebx + eax + 0x4971a4]
+fld dword [ebx + eax + (_player_stocks + 4)] ; fld dword [ebx + eax + 0x4971a4]
sub esp, 8
fstp qword [esp]
push ref_00463f64 ; push 0x463f64
@@ -55184,7 +55185,7 @@ shl edx, 2
sub edx, ebx
shl edx, 5
mov eax, esi
-mov ecx, dword [edx + eax*8 + ref_004971a0] ; mov ecx, dword [edx + eax*8 + 0x4971a0]
+mov ecx, dword [edx + eax*8 + _player_stocks] ; mov ecx, dword [edx + eax*8 + 0x4971a0]
push ecx
lea eax, [esp + 4]
push eax
@@ -55865,7 +55866,7 @@ mov edx, eax
shl edx, 5
xor eax, eax
mov al, byte [ref_0048c2e4] ; mov al, byte [0x48c2e4]
-fild dword [edx + eax*8 + ref_004971a0] ; fild dword [edx + eax*8 + 0x4971a0]
+fild dword [edx + eax*8 + _player_stocks] ; fild dword [edx + eax*8 + 0x4971a0]
fdiv dword [ref_00464020] ; fdiv dword [0x464020]
fstp dword [esp + 0xe4]
fldz
@@ -57758,10 +57759,10 @@ shl esi, 3
add esi, eax
mov eax, ebx
shl eax, 2
-mov edi, dword [esi + ref_004971a0] ; mov edi, dword [esi + 0x4971a0]
+mov edi, dword [esi + _player_stocks] ; mov edi, dword [esi + 0x4971a0]
test edi, edi
je short loc_0042bc64 ; je 0x42bc64
-fild dword [esi + ref_004971a0] ; fild dword [esi + 0x4971a0]
+fild dword [esi + _player_stocks] ; fild dword [esi + 0x4971a0]
mov dword [esp + 0xb0], ebp
fild dword [esp + 0xb0]
fdivp st1 ; fdivp st(1)
@@ -57888,7 +57889,7 @@ mov eax, ebx
shl eax, 2
sub eax, ebx
shl eax, 5
-add ebp, dword [eax + esi*8 + ref_004971a0] ; add ebp, dword [eax + esi*8 + 0x4971a0]
+add ebp, dword [eax + esi*8 + _player_stocks] ; add ebp, dword [eax + esi*8 + 0x4971a0]
loc_0042bdec:
inc ebx
@@ -58052,9 +58053,9 @@ shl edx, 5
mov eax, dword [esp + 0xe0]
shl eax, 3
add eax, edx
-cmp dword [eax + ref_004971a0], 0 ; cmp dword [eax + 0x4971a0], 0
+cmp dword [eax + _player_stocks], 0 ; cmp dword [eax + 0x4971a0], 0
je short loc_0042bf80 ; je 0x42bf80
-fild dword [eax + ref_004971a0] ; fild dword [eax + 0x4971a0]
+fild dword [eax + _player_stocks] ; fild dword [eax + 0x4971a0]
mov edx, dword [esp + 0xe0]
mov eax, edx
shl eax, 3
@@ -58198,7 +58199,7 @@ shl eax, 5
mov esi, dword [esp + 0xe0]
shl esi, 3
lea ebx, [eax + esi]
-cmp dword [ebx + ref_004971a0], 0x1388 ; cmp dword [ebx + 0x4971a0], 0x1388
+cmp dword [ebx + _player_stocks], 0x1388 ; cmp dword [ebx + 0x4971a0], 0x1388
jge near loc_0042c2e7 ; jge 0x42c2e7
mov edx, dword [esp + 0xe0]
mov eax, edx
@@ -58226,7 +58227,7 @@ cmp ebp, dword [esp + 0xe4]
je near loc_0042c2e7 ; je 0x42c2e7
mov dx, word [edx + ref_00496988] ; mov dx, word [edx + 0x496988]
and edx, 0xffff
-add edx, dword [ebx + ref_004971a0] ; add edx, dword [ebx + 0x4971a0]
+add edx, dword [ebx + _player_stocks] ; add edx, dword [ebx + 0x4971a0]
mov ebp, dword [ecx + 0x30]
add ebp, edx
mov ebx, dword [esp + 0xcc]
@@ -58235,7 +58236,7 @@ mov edx, ebx
shl edx, 2
sub edx, ebx
shl edx, 5
-cmp ebp, dword [edx + esi + ref_004971a0] ; cmp ebp, dword [edx + esi + 0x4971a0]
+cmp ebp, dword [edx + esi + _player_stocks] ; cmp ebp, dword [edx + esi + 0x4971a0]
jle short loc_0042c285 ; jle 0x42c285
inc dword [esp + eax + 0x80]
@@ -58253,7 +58254,7 @@ shl eax, 3
add eax, edx
mov ax, word [eax*4 + ref_0049698a] ; mov ax, word [eax*4 + 0x49698a]
and eax, 0xffff
-mov ebx, dword [ebx + ref_004971a0] ; mov ebx, dword [ebx + 0x4971a0]
+mov ebx, dword [ebx + _player_stocks] ; mov ebx, dword [ebx + 0x4971a0]
add ebx, eax
xor edx, edx
mov dl, byte [ecx + 0x18]
@@ -58262,7 +58263,7 @@ mov eax, edx
shl eax, 2
sub eax, edx
shl eax, 5
-cmp ebx, dword [esi + eax + ref_004971a0] ; cmp ebx, dword [esi + eax + 0x4971a0]
+cmp ebx, dword [esi + eax + _player_stocks] ; cmp ebx, dword [esi + eax + 0x4971a0]
jle short loc_0042c2e7 ; jle 0x42c2e7
mov eax, dword [esp + 0xe0]
add dword [esp + eax*4 + 0x80], 2
@@ -58701,7 +58702,7 @@ mov eax, edx
shl eax, 2
sub eax, edx
shl eax, 5
-mov eax, dword [edi + eax + ref_004971a0] ; mov eax, dword [edi + eax + 0x4971a0]
+mov eax, dword [edi + eax + _player_stocks] ; mov eax, dword [edi + eax + 0x4971a0]
add dword [esp + 0xf4], eax
inc edx
jmp short loc_0042c87b ; jmp 0x42c87b
@@ -58711,7 +58712,7 @@ mov eax, ebp
shl eax, 2
sub eax, ebp
shl eax, 5
-fild dword [edi + eax + ref_004971a0] ; fild dword [edi + eax + 0x4971a0]
+fild dword [edi + eax + _player_stocks] ; fild dword [edi + eax + 0x4971a0]
mov eax, dword [esp + 0xf4]
mov dword [esp + 0xf8], eax
fild dword [esp + 0xf8]
@@ -58761,7 +58762,7 @@ shl edx, 2
sub edx, ebp
shl edx, 5
mov eax, ebx
-fld dword [edx + eax*8 + ref_004971a4] ; fld dword [edx + eax*8 + 0x4971a4]
+fld dword [edx + eax*8 + (_player_stocks + 4)] ; fld dword [edx + eax*8 + 0x4971a4]
fmul qword [ref_0046420c] ; fmul qword [0x46420c]
shl eax, 3
add eax, ebx
@@ -58812,7 +58813,7 @@ shl eax, 2
sub eax, ebp
shl eax, 5
mov ecx, ebx
-fld dword [eax + ecx*8 + ref_004971a4] ; fld dword [eax + ecx*8 + 0x4971a4]
+fld dword [eax + ecx*8 + (_player_stocks + 4)] ; fld dword [eax + ecx*8 + 0x4971a4]
fmul qword [ref_00464214] ; fmul qword [0x464214]
fld dword [edx + ref_00496994] ; fld dword [edx + 0x496994]
fcompp
@@ -58849,7 +58850,7 @@ shl edx, 2
xor eax, eax
mov ax, word [edx + ref_00496988] ; mov ax, word [edx + 0x496988]
mov dword [esp + 0xf8], eax
-mov eax, dword [ecx + ref_004971a0] ; mov eax, dword [ecx + 0x4971a0]
+mov eax, dword [ecx + _player_stocks] ; mov eax, dword [ecx + 0x4971a0]
add eax, dword [esp + 0xf8]
add eax, dword [esi + 0x30]
mov dword [esp + 0xf8], eax
@@ -58860,11 +58861,11 @@ sub eax, edi
shl eax, 5
add eax, dword [esp + 0xc4]
mov edi, dword [esp + 0xf8]
-cmp edi, dword [eax + ref_004971a0] ; cmp edi, dword [eax + 0x4971a0]
+cmp edi, dword [eax + _player_stocks] ; cmp edi, dword [eax + 0x4971a0]
jge short loc_0042cad1 ; jge 0x42cad1
cmp dword [esi + 0x28], 0
jg short loc_0042cad1 ; jg 0x42cad1
-fld dword [ecx + ref_004971a4] ; fld dword [ecx + 0x4971a4]
+fld dword [ecx + (_player_stocks + 4)] ; fld dword [ecx + 0x4971a4]
fmul qword [ref_00464224] ; fmul qword [0x464224]
fld dword [edx + ref_00496994] ; fld dword [edx + 0x496994]
fcompp
@@ -58889,7 +58890,7 @@ shl ecx, 2
sub ecx, ebp
shl ecx, 5
mov eax, ebx
-fld dword [ecx + eax*8 + ref_004971a4] ; fld dword [ecx + eax*8 + 0x4971a4]
+fld dword [ecx + eax*8 + (_player_stocks + 4)] ; fld dword [ecx + eax*8 + 0x4971a4]
fmul dword [ref_004641f4] ; fmul dword [0x4641f4]
fcomp dword [edx + ref_00496994] ; fcomp dword [edx + 0x496994]
fnstsw ax
@@ -58923,7 +58924,7 @@ shl eax, 2
sub eax, ebp
shl eax, 5
mov ecx, ebx
-fld dword [eax + ecx*8 + ref_004971a4] ; fld dword [eax + ecx*8 + 0x4971a4]
+fld dword [eax + ecx*8 + (_player_stocks + 4)] ; fld dword [eax + ecx*8 + 0x4971a4]
fmul dword [ref_0046422c] ; fmul dword [0x46422c]
fcomp dword [edx + ref_00496994] ; fcomp dword [edx + 0x496994]
fnstsw ax
@@ -58949,7 +58950,7 @@ jmp near loc_0042cf4d ; jmp 0x42cf4d
loc_0042cbc1:
fld dword [esi + ref_00496994] ; fld dword [esi + 0x496994]
-fdiv dword [edi + ref_004971a4] ; fdiv dword [edi + 0x4971a4]
+fdiv dword [edi + (_player_stocks + 4)] ; fdiv dword [edi + 0x4971a4]
fstp dword [esp + 0xe4]
xor edx, edx
mov dword [esp + 0xe8], 0x461c4000
@@ -59107,7 +59108,7 @@ shl eax, 2
sub eax, ebp
shl eax, 5
mov edx, ebx
-fld dword [eax + edx*8 + ref_004971a4] ; fld dword [eax + edx*8 + 0x4971a4]
+fld dword [eax + edx*8 + (_player_stocks + 4)] ; fld dword [eax + edx*8 + 0x4971a4]
fmul qword [ref_004641ec] ; fmul qword [0x4641ec]
fld dword [esp + 0xdc]
fcompp
@@ -59243,7 +59244,7 @@ shl eax, 5
mov edi, ebx
shl edi, 3
add edi, eax
-cmp dword [edi + ref_004971a0], 0 ; cmp dword [edi + 0x4971a0], 0
+cmp dword [edi + _player_stocks], 0 ; cmp dword [edi + 0x4971a0], 0
je short loc_0042cf4d ; je 0x42cf4d
mov esi, ebx
shl esi, 3
@@ -59284,7 +59285,7 @@ shl eax, 2
sub eax, ebp
shl eax, 5
mov ebx, edi
-mov ebx, dword [eax + ebx*8 + ref_004971a0] ; mov ebx, dword [eax + ebx*8 + 0x4971a0]
+mov ebx, dword [eax + ebx*8 + _player_stocks] ; mov ebx, dword [eax + ebx*8 + 0x4971a0]
push 1
push ebx
push edi
@@ -59443,7 +59444,7 @@ mov dl, byte [esp + 0x20]
sub byte [ecx + eax + ref_0049915b], dl ; sub byte [ecx + eax + 0x49915b], dl
cmp ecx, 8
jg short loc_0042d22f ; jg 0x42d22f
-add byte [ecx + ref_0049731f], dl ; add byte [ecx + 0x49731f], dl
+add byte [ecx + (ref_00497320 - 1)], dl ; add byte [ecx + 0x49731f], dl
loc_0042d22f:
mov eax, ebx
@@ -91198,12 +91199,12 @@ cmp byte [edx + eax + ref_0049915b], 9 ; cmp byte [edx + eax + 0x49915b], 9
jae short loc_00445aa0 ; jae 0x445aa0
cmp edx, 8
jg short loc_00445a87 ; jg 0x445a87
-mov bh, byte [edx + ref_0049731f] ; mov bh, byte [edx + 0x49731f]
+mov bh, byte [edx + (ref_00497320 - 1)] ; mov bh, byte [edx + 0x49731f]
test bh, bh
je short loc_00445aa0 ; je 0x445aa0
mov cl, bh
dec cl
-mov byte [edx + ref_0049731f], cl ; mov byte [edx + 0x49731f], cl
+mov byte [edx + (ref_00497320 - 1)], cl ; mov byte [edx + 0x49731f], cl
loc_00445a87:
mov ecx, dword [esp + 8]
@@ -91237,7 +91238,7 @@ dec dh
mov byte [eax + ref_0049915b], dh ; mov byte [eax + 0x49915b], dh
cmp ecx, 8
jg short loc_00445ad9 ; jg 0x445ad9
-inc byte [ecx + ref_0049731f] ; inc byte [ecx + 0x49731f]
+inc byte [ecx + (ref_00497320 - 1)] ; inc byte [ecx + 0x49731f]
loc_00445ad9:
ret
@@ -94638,7 +94639,7 @@ push eax
call _memcpy ; call 0x456de8
add esp, 0xc
push 0x180
-push ref_004971a0 ; push 0x4971a0
+push _player_stocks ; push 0x4971a0
mov edx, dword [ref_0049910c] ; mov edx, dword [0x49910c]
mov eax, edx
shl eax, 3
@@ -95034,7 +95035,7 @@ add eax, edx
add eax, ref_0048cb80 ; add eax, 0x48cb80
add eax, 0x21ec
push eax
-push ref_004971a0 ; push 0x4971a0
+push _player_stocks ; push 0x4971a0
call _memcpy ; call 0x456de8
add esp, 0xc
push 0x1b0
@@ -95596,7 +95597,7 @@ shl ecx, 2
sub ecx, ebx
shl ecx, 5
mov eax, edx
-cmp dword [ecx + eax*8 + ref_004971a0], 0 ; cmp dword [ecx + eax*8 + 0x4971a0], 0
+cmp dword [ecx + eax*8 + _player_stocks], 0 ; cmp dword [ecx + eax*8 + 0x4971a0], 0
je short loc_00448dbf ; je 0x448dbf
mov esi, 1
@@ -96861,7 +96862,7 @@ shl eax, 2
sub eax, esi
shl eax, 5
mov ebx, ecx
-mov eax, dword [eax + ebx*8 + ref_004971a0] ; mov eax, dword [eax + ebx*8 + 0x4971a0]
+mov eax, dword [eax + ebx*8 + _player_stocks] ; mov eax, dword [eax + ebx*8 + 0x4971a0]
add dword [esp + esi*4 + 0x94], eax
inc ecx
cmp ecx, 0xc
@@ -97276,9 +97277,9 @@ shl eax, 5
mov edx, dword [esp + 0xa4]
shl edx, 3
add eax, edx
-cmp dword [eax + ref_004971a0], 0 ; cmp dword [eax + 0x4971a0], 0
+cmp dword [eax + _player_stocks], 0 ; cmp dword [eax + 0x4971a0], 0
je short loc_0044a0b2 ; je 0x44a0b2
-fild dword [eax + ref_004971a0] ; fild dword [eax + 0x4971a0]
+fild dword [eax + _player_stocks] ; fild dword [eax + 0x4971a0]
mov ecx, dword [esp + 0xa4]
mov eax, ecx
shl eax, 3
@@ -99636,7 +99637,7 @@ sub eax, edx
mov edx, eax
shl edx, 5
mov eax, ebx
-cmp dword [edx + eax*8 + ref_004971a0], 0 ; cmp dword [edx + eax*8 + 0x4971a0], 0
+cmp dword [edx + eax*8 + _player_stocks], 0 ; cmp dword [edx + eax*8 + 0x4971a0], 0
je short loc_0044bc88 ; je 0x44bc88
jmp near loc_0044be0f ; jmp 0x44be0f
@@ -100639,7 +100640,7 @@ sub eax, edx
mov edx, eax
shl edx, 5
mov eax, ebx
-fild dword [edx + eax*8 + ref_004971a0] ; fild dword [edx + eax*8 + 0x4971a0]
+fild dword [edx + eax*8 + _player_stocks] ; fild dword [edx + eax*8 + 0x4971a0]
fmul dword [esp + 0x84]
call fcn_00457dbc ; call 0x457dbc
fistp dword [esp + 0x80]
@@ -100737,7 +100738,7 @@ shl eax, 5
mov edx, ebx
shl edx, 3
add eax, edx
-mov esi, dword [eax + ref_004971a0] ; mov esi, dword [eax + 0x4971a0]
+mov esi, dword [eax + _player_stocks] ; mov esi, dword [eax + 0x4971a0]
test esi, esi
je short loc_0044c9ba ; je 0x44c9ba
push 1
@@ -180182,14 +180183,6 @@ resb 2
ref_0049719e:
resb 2
-ref_004971a0:
-resb 4
-
-ref_004971a4:
-resb 379
-
-ref_0049731f:
-resb 1
ref_00497320:
resb 1