Function at 0x479fa0
Capabilities:
Encrypt data using speck
Parse pe header
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x200
mov eax, 0x3e80
push ebx
mov dword [0x85c128], eax
mov dword [0x85c124], eax
mov dword [0x85c134], eax
mov eax, 0x80
push ebp
mov dword [0x85c120], eax
mov dword [0x85c12c], eax
mov eax, dword [0x8cccd8]
test eax, eax
push esi
mov esi, dword [esp + 0x210]
push edi
mov dword [0x85c118], 1
mov dword [0x85c138], 0x4268
jne 0x479ffd
push 0x7f02
push eax
call dword [sym.imp.USER32.dll_LoadCursorA]
mov edi, eax
call dword [sym.imp.USER32.dll_GetCursor]
mov ebx, dword [sym.imp.USER32.dll_SetCursor]
mov ebp, eax
mov eax, edi
push eax
mov dword [esp + 0x54], ebp
mov dword [esp + 0x58], eax
call ebx
test esi, esi
mov dword [0x8ccaa4], esi
jne 0x47a280
push ebp
mov dword [0x7273bc], 0x40000000
call ebx
push str.Pirates___Console_Ship_Battle
mov esi, 0x8ebf58
call fcn.004f7660
mov eax, dword [0x85c268]
add esp, 4
push 0
cdq
push 0xffffffffffffffff
push 4
sub eax, edx
sar eax, 1
push 0xffffffffffffffff
push 0x96
push eax
mov eax, dword [0x85c26c]
cdq
sub eax, edx
sar eax, 1
push eax
push 0x86bb48
xor eax, eax
mov dword [0x85c11c], 0x96
call fcn.004b0b40
mov eax, dword [0x85c268]
cdq
sub eax, edx
mov edi, eax
sar edi, 1
push str.Use_L_R_arrows_to_steer_ship.
add edi, 0x20
call fcn.004f7660
mov eax, dword [0x85c11c]
add esp, 0x24
push 0
push 0xffffffffffffffff
push 4
push 0xffffffffffffffff
push eax
mov eax, dword [0x85c26c]
cdq
sub eax, edx
sar eax, 1
push edi
push eax
push 0x86bb48
xor eax, eax
call fcn.004b0b40
push str.Use_U_D_arrows_for_full_battle_sails.
add edi, 0x10
call fcn.004f7660
mov eax, dword [0x85c26c]
mov ecx, dword [0x85c11c]
add esp, 0x24
push 0
push 0xffffffffffffffff
push 4
cdq
push 0xffffffffffffffff
push ecx
sub eax, edx
sar eax, 1
push edi
push eax
push 0x86bb48
xor eax, eax
call fcn.004b0b40
push str.Press_space_to_fire_cannon.
add edi, 0x10
call fcn.004f7660
mov edx, dword [0x85c11c]
mov eax, dword [0x85c26c]
add esp, 0x24
push 0
push 0xffffffffffffffff
push 4
push 0xffffffffffffffff
push edx
push edi
cdq
sub eax, edx
sar eax, 1
push eax
push 0x86bb48
xor eax, eax
call fcn.004b0b40
push str.Wind_is_steady_from_the_East.
add edi, 0x10
call fcn.004f7660
mov eax, dword [0x85c11c]
add esp, 0x24
push 0
push 0xffffffffffffffff
push 4
push 0xffffffffffffffff
push eax
mov eax, dword [0x85c26c]
cdq
sub eax, edx
sar eax, 1
push edi
push eax
push 0x86bb48
xor eax, eax
call fcn.004b0b40
push str._right_to_left_
call fcn.004f7660
mov eax, dword [0x85c26c]
mov ecx, dword [0x85c11c]
add esp, 0x24
push 0
push 0xffffffffffffffff
push 4
cdq
push 0xffffffffffffffff
push ecx
sub eax, edx
add edi, 0x10
sar eax, 1
push edi
push eax
push 0x86bb48
xor eax, eax
call fcn.004b0b40
push 0
push 0
push 0
call fcn.004d1a40
add esp, 0x2c
push 0xffffffffffffffff
call fcn.0042c4b0
add esp, 4
push str.Pirates___Ship_Battle_Simulator._nSelect_Difficulty..._n_Argh__n_Aaargh___n_Aaaaaaaaaargh__n
call fcn.004f7660
mov eax, dword [0x85c268]
add esp, 4
push 0
push 0
push 0xffffffffffffffff
push 0
cdq
push 0
sub eax, edx
push 0xffffffffffffffff
sar eax, 1
push 0
push str.outrun.pcx
push eax
mov eax, dword [0x85c26c]
cdq
and edx, 3
add eax, edx
sar eax, 2
push eax
mov dword [0x85c158], 0
call fcn.00430160
add esp, 0x28
cmp eax, 0xffffffff
mov dword [0x85c158], eax
jne 0x47a21e
push ebp
call ebx
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x200
ret
mov esi, dword [0x72ed74]
call fcn.004e46f0
mov eax, dword [0x862ea8]
mov ecx, dword [0x862eac]
inc eax
imul eax, eax, 0x3e8
add ecx, 0xfffffffc
imul ecx, ecx, 0x3e8
mov dword [0x8bb998], eax
mov dword [0x8bb9d4], eax
mov dword [0x85c138], eax
mov eax, 0x80
mov dword [0x8bb994], ecx
mov dword [0x8bb9d0], ecx
mov dword [0x85c134], ecx
mov dword [0x85c120], eax
mov dword [0x85c12c], eax
mov dword [0x8be4c8], 4
mov edi, edi
mov edx, dword [esp + 0x54]
xor ebx, ebx
push edx
mov dword [esp + 0x48], ebx
call dword [sym.imp.USER32.dll_SetCursor]
mov dword [0x8bb9a0], ebx
mov dword [0x8bb9b0], ebx
call fcn.004809e0
mov ebp, dword [sym.imp.MSVCR71.dll_rand]
mov dword [0x8ccaa0], ebx
call ebp
cdq
mov ecx, 0x640
idiv ecx
mov eax, dword [0x85c134]
mov dword [0x8bb9a8], 0xfffffe0c
mov dword [0x8bb9c8], eax
mov dword [0x8cc9fc], edx
mov edx, dword [0x85c138]
mov dword [0x8bb9cc], edx
call ebp
cdq
mov ecx, 0x5b
idiv ecx
mov eax, 0x66666667
mov ecx, 0x780
mov edi, 0x8bc668
imul edx, edx, 0x38e38e3
add edx, 0x60000019
imul edx
xor eax, eax
rep stosd dword es:[edi], eax
sar edx, 1
mov ecx, 0x280
mov edi, 0x8bb9d8
rep stosd dword es:[edi], eax
mov esi, edx
mov ecx, 0xa0
mov edi, 0x8bc3d8
shr esi, 0x1f
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x214]
add esi, edx
cmp eax, ebx
jne 0x47a5d7
xor eax, eax
mov ecx, 0x950
mov edi, 0x8be468
rep stosd dword es:[edi], eax
mov edi, dword [0x8be4cc]
mov edx, dword [0x8be4d0]
mov eax, 0xc
or edx, 0x30
or edi, 2
mov dword [0x8be468], 1
mov dword [0x8be46c], ebx
mov dword [0x8be470], ebx
mov dword [0x8be4cc], edi
mov dword [0x8be474], esi
mov dword [0x8be478], 0x12c
mov dword [0x8be47c], ebx
mov dword [0x8be4ac], eax
mov dword [0x8be480], eax
mov dword [0x8be490], ebx
mov dword [0x8be494], ebx
mov dword [0x8be488], 4
mov dword [0x8be4d0], edx
mov dword [0x8be484], 0x2a
call ebp
cdq
mov ecx, 0x2a
idiv ecx
mov ecx, dword [0x8be484]
mov edi, dword [0x8be470]
mov eax, 0x51eb851f
imul edi, edi, 0x64
mov dword [0x8be470], edi
mov dword [0x8bf728], 2
add ecx, edx
mov dword [0x8be484], ecx
mov ecx, dword [0x8be46c]
imul ecx, ecx, 0x64
imul ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [0x85c128], eax
mov dword [0x85c138], eax
mov eax, 0x51eb851f
imul edi
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [0x8be46c], ecx
mov dword [0x85c124], eax
mov dword [0x85c134], eax
call ebp
and eax, 0x80000003
jns 0x47a444
dec eax
or eax, 0xfffffffc
inc eax
mov dword [0x8bf768], eax
call ebp
cdq
mov ecx, 5
idiv ecx
cmp edx, 4
ja case.default.0x47a45c
jmp dword [edx*4 + 0x47fc80]
mov eax, 8
mov dword [0x8bf708], 4
mov dword [0x8bf74c], eax
mov dword [0x8bf720], eax
mov edi, 0x20
mov dword [0x8bf728], 1
jmp 0x47a510
mov eax, 8
mov dword [0x8bf708], ebx
mov dword [0x8bf74c], eax
mov dword [0x8bf720], eax
mov edi, 0x30
mov dword [0x8bf728], 2
jmp 0x47a510
mov eax, 0xc
mov dword [0x8bf708], 0xb
mov dword [0x8bf74c], eax
mov dword [0x8bf720], eax
mov edi, 0x40
mov dword [0x8bf728], 3
jmp 0x47a510
mov eax, 0x10
mov dword [0x8bf708], 7
mov dword [0x8bf74c], eax
mov dword [0x8bf720], eax
mov edi, 0x60
mov dword [0x8bf728], 4
jmp 0x47a510
mov edi, dword [0x8bf724]
mov eax, 0x1770
mov ecx, esi
call fcn.004dcac0
mov dword [0x8bf70c], eax
lea ecx, [esi + 0x40000000]
mov eax, 0x1770
call fcn.004dcac0
mov ecx, dword [0x85c158]
mov dword [0x8bf710], eax
mov eax, dword [0x8bf76c]
add ecx, 2
imul ecx, edi
or eax, 2
mov dword [0x8bf76c], eax
mov eax, 0x55555556
imul ecx
mov eax, edx
shr eax, 0x1f
add esi, 0x80000000
add eax, edx
cmp eax, ebx
mov dword [0x8bf714], esi
mov dword [0x8bf718], 0xc8
mov dword [0x8bf71c], ebx
mov dword [0x8bf734], ebx
mov dword [0x8bf730], ebx
mov dword [0x8bf724], eax
mov esi, eax
jle 0x47a59c
call ebp
cdq
idiv esi
mov eax, dword [0x8bf724]
jmp 0x47a59e
xor edx, edx
mov ecx, dword [0x8bf70c]
mov esi, dword [0x8bf710]
imul ecx, ecx, 0x64
add eax, edx
imul esi, esi, 0x64
mov edx, dword [0x8bf720]
mov dword [0x8bf724], eax
mov eax, dword [0x85c158]
lea edx, [edx + eax*2]
mov dword [0x8bf720], edx
mov dword [0x8bf70c], ecx
mov dword [0x8bf710], esi
mov ebp, dword [0x8bb9d4]
mov esi, 0x8be46c
mov dword [esp + 0x40], esi
jmp 0x47a5f0
mov dword [esp + 0x1c], 2
jmp 0x47a600
test byte [esi + 0x60], 2
je 0x47a6c0
lea edi, [esi + 0x6c]
mov ebx, 0x5a
mov eax, dword [esi + 8]
mov dword [edi + 0x2d0], eax
mov eax, dword [esi + 0xc]
mov ecx, dword [esi + 8]
lea eax, [eax + eax*4]
shl eax, 1
cdq
and edx, 7
add eax, edx
sar eax, 3
call fcn.004dcac0
mov edx, dword [esi]
mov ecx, eax
add ecx, edx
mov eax, 0x51eb851f
imul ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cdq
and edx, 3
add eax, edx
sar eax, 2
add eax, ebp
mov dword [edi], eax
mov eax, dword [esi + 0xc]
mov ecx, dword [esi + 8]
lea eax, [eax + eax*4]
shl eax, 1
cdq
and edx, 7
add eax, edx
sar eax, 3
add ecx, 0x40000000
call fcn.004dcac0
mov edx, dword [esi + 4]
mov ecx, eax
add ecx, edx
mov eax, 0x51eb851f
imul ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cdq
and edx, 3
add eax, edx
mov edx, dword [0x8bb9d0]
sar eax, 2
add eax, edx
mov dword [edi + 0x168], eax
add edi, 4
dec ebx
jne 0x47a612
cmp dword [esp + 0x40], 0x8be46c
je 0x47a6c0
mov word [esi + 0x4e], 0x64
mov eax, dword [esp + 0x1c]
add esi, 0x4a8
dec eax
mov dword [esp + 0x1c], eax
jne 0x47a600
mov esi, dword [esp + 0x40]
add esi, 0x12a0
cmp esi, 0x8c09ac
mov dword [esp + 0x40], esi
jl 0x47a5f0
push 0xc0
call fcn.005354b8
mov esi, eax
add esp, 4
test esi, esi
je 0x47a746
mov eax, dword [0x8ec000]
mov edi, dword [0x729444]
xor ecx, ecx
push ecx
push ecx
push ecx
push ecx
push 0xffffffffffffffff
push ecx
push ecx
mov dword [esi + 4], ecx
push ecx
mov dword [esi], 0x6ff14c
mov dword [esi + 0x1c], ecx
push ecx
mov dword [esi + 0x64], ecx
inc edi
mov dword [esi + 0xbc], ecx
push eax
xor ebx, ebx
mov eax, str.fx_burning_smoke_sinking.nif
mov ecx, esi
mov dword [0x729444], edi
call fcn.004be370
jmp 0x47a748
xor esi, esi
mov eax, dword [0x8e8690]
cmp eax, esi
je 0x47a77f
test eax, eax
je 0x47a76c
mov edi, dword [eax + 4]
mov ecx, eax
add eax, 4
dec edi
mov edx, edi
test edx, edx
mov dword [eax], edi
jne 0x47a76c
mov edx, dword [ecx]
push 1
call dword [edx]
test esi, esi
mov eax, esi
mov dword [0x8e8690], eax
je 0x47a77f
inc dword [esi + 4]
mov eax, dword [0x8e8690]
mov dword [eax + 0x2c], 0xbf800000
mov dword [esp + 0x18], 0
mov edi, edi
mov eax, dword [esp + 0x18]
mov ebp, eax
imul ebp, ebp, 0x12a0
lea esi, [eax + eax*2]
lea esi, [esi*8 + 0x8e8664]
lea ebx, [eax*8]
add ebp, 0x8be484
mov dword [esp + 0x1c], esi
mov dword [esp + 0x40], ebx
mov dword [esp + 0x2c], 2
push 0
mov ecx, 0x8cf518
call fcn.004bbbd0
mov ecx, dword [esi - 4]
mov edi, eax
cmp ecx, edi
je 0x47a7f1
test ecx, ecx
je 0x47a7e7
dec dword [ecx + 4]
jne 0x47a7e7
mov eax, dword [ecx]
push 1
call dword [eax]
test edi, edi
mov dword [esi - 4], edi
je 0x47a7f1
inc dword [edi + 4]
push 0
mov ecx, 0x8cf5d8
call fcn.004bbbd0
mov ecx, dword [esi]
mov edi, eax
cmp ecx, edi
je 0x47a81d
test ecx, ecx
je 0x47a814
dec dword [ecx + 4]
jne 0x47a814
mov edx, dword [ecx]
push 1
call dword [edx]
test edi, edi
mov dword [esi], edi
je 0x47a81d
inc dword [edi + 4]
push 0
mov ecx, 0x8cf698
call fcn.004bbbd0
mov ecx, dword [esi + 4]
mov edi, eax
cmp ecx, edi
je 0x47a84b
test ecx, ecx
je 0x47a841
dec dword [ecx + 4]
jne 0x47a841
mov eax, dword [ecx]
push 1
call dword [eax]
test edi, edi
mov dword [esi + 4], edi
je 0x47a84b
inc dword [edi + 4]
test byte [ebp + 0x48], 2
mov dword [ebx + 0x8bc658], 0x405554ca
je 0x47acb1
mov eax, dword [ebp - 0x1c]
cdq
mov ecx, 9
idiv ecx
push 0
lea ecx, [edx + edx*2]
shl ecx, 6
add ecx, 0x8cda18
call fcn.004bbbd0
mov ecx, dword [ebx + 0x8e8694]
mov esi, eax
cmp ecx, esi
je 0x47a8a5
test ecx, ecx
je 0x47a898
dec dword [ecx + 4]
jne 0x47a898
mov edx, dword [ecx]
push 1
call dword [edx]
test esi, esi
mov dword [ebx + 0x8e8694], esi
je 0x47a8a5
inc dword [esi + 4]
mov eax, dword [ebp - 0x1c]
cdq
mov ecx, 9
idiv ecx
push 0
lea ecx, [edx + edx*2]
shl ecx, 6
add ecx, 0x8d0e98
call fcn.004bbbd0
mov ecx, dword [ebx + 0x8e86a4]
mov esi, eax
cmp ecx, esi
je 0x47a8eb
test ecx, ecx
je 0x47a8de
dec dword [ecx + 4]
jne 0x47a8de
mov edx, dword [ecx]
push 1
call dword [edx]
test esi, esi
mov dword [ebx + 0x8e86a4], esi
je 0x47a8eb
inc dword [esi + 4]
mov eax, dword [esp + 0x18]
test eax, eax
je 0x47a8ff
mov eax, dword [ebp + 0x44]
mov edi, dword [eax*4 + 0x727694]
jmp 0x47a904
mov edi, 0x700198
mov esi, dword [ebx + 0x8e86a4]
push 0
push 0
call fcn.004bceb0
mov ecx, dword [ebx + 0x8e86a4]
mov eax, dword [ebp - 0x1c]
push ecx
mov ecx, dword [ebp]
call fcn.004785f0
mov eax, dword [esp + 0x1c]
add esp, 4
test eax, eax
je 0x47a93a
cmp dword [ebp + 4], 3
jg 0x47a93a
push 0
jmp 0x47a93c
push 0x64
mov ecx, dword [ebx + 0x8e8694]
call fcn.004bc920
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebx + 0x8e8694]
call fcn.004bd130
mov eax, dword [ebp - 0x1c]
cdq
mov ecx, 9
idiv ecx
mov esi, dword [ebx + 0x8e8694]
mov ecx, dword [esi + 0xbc]
test edx, edx
setne dl
test ecx, ecx
mov byte [esp + 0x94], dl
je 0x47a989
mov eax, dword [esp + 0x94]
push eax
call fcn.004bd3d0
mov byte [esi + 0x4c], dl
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebx + 0x8e8694]
call fcn.004bd190
mov eax, dword [esp + 0x18]
test eax, eax
je 0x47a9ae
mov ecx, dword [ebp + 0x44]
mov edi, dword [ecx*4 + 0x727694]
jmp 0x47a9b3
mov edi, 0x700198
mov edx, dword [0x7277fc]
neg eax
sbb eax, eax
and eax, edx
cmp eax, 8
jl 0x47a9f5
mov ecx, eax
imul ecx, ecx, 0x45c
mov edx, dword [ecx + 0x816350]
test dh, 0x20
jne 0x47a9ee
test dh, 0x40
je 0x47a9f5
mov cx, word [ecx + 0x816330]
test cx, cx
jle 0x47a9f5
cmp cx, 0xa
jge 0x47a9f5
mov byte [esp + 0x68], 1
jmp 0x47a9fa
mov byte [esp + 0x68], 0
mov esi, dword [ebx + 0x8e8694]
cmp eax, 8
mov eax, dword [esp + 0x68]
setl dl
push edx
push eax
call fcn.004bceb0
test byte [ebp + 0x4c], 1
je 0x47aa43
mov esi, dword [ebx + 0x8e8694]
mov ecx, dword [esi + 0xbc]
test ecx, ecx
je 0x47aa2e
push 1
call fcn.004bce10
mov eax, dword [esi + 0x3c]
test al, 1
jne 0x47aa43
or eax, 1
push eax
mov ecx, esi
mov dword [esi + 0x3c], eax
call fcn.004bcc90
mov eax, dword [esp + 0x18]
test eax, eax
je 0x47ac28
mov eax, dword [ebp + 8]
imul eax, eax, 0x45c
mov ecx, dword [eax + 0x816350]
test ch, 0x40
mov byte [0x86bb48], 0
je case.default.0x47aa7f
movsx eax, word [eax + 0x816330]
dec eax
cmp eax, 8
ja case.default.0x47aa7f
jmp dword [eax*4 + 0x47fc94]
mov edx, dword [str.henrymorgan]
mov eax, dword [0x703ff8]
mov dword [0x86bb48], edx
mov edx, dword [0x703ffc]
jmp 0x47abbd
mov eax, dword [str.blackbeard]
mov edx, dword [0x701940]
mov dword [0x86bb48], eax
mov ax, word [0x701944]
mov dword [0x86bb4c], edx
mov dl, byte [0x701946]
mov word [0x86bb50], ax
mov byte [0x86bb52], dl
jmp case.default.0x47aa7f
mov eax, dword [str.williamkidd]
mov edx, dword [0x703fec]
mov dword [0x86bb48], eax
mov eax, dword [0x703ff0]
mov dword [0x86bb4c], edx
mov dword [0x86bb50], eax
jmp case.default.0x47aa7f
mov edx, dword [str.jeanlafitte]
mov eax, dword [0x703fe0]
mov dword [0x86bb48], edx
mov edx, dword [0x703fe4]
jmp 0x47abbd
mov eax, dword [str.stedebonnet]
mov edx, dword [0x703fd4]
mov dword [0x86bb48], eax
mov eax, dword [0x703fd8]
mov dword [0x86bb4c], edx
mov dword [0x86bb50], eax
jmp case.default.0x47aa7f
mov edx, dword [str.lollonnais]
mov eax, dword [0x703fc8]
mov dword [0x86bb48], edx
mov edx, dword [0x703fcc]
jmp 0x47abbd
mov eax, dword [str.rocbrasiliano]
mov edx, dword [0x703fb8]
mov dword [0x86bb48], eax
mov eax, dword [0x703fbc]
mov dword [0x86bb4c], edx
mov dx, word [0x703fc0]
mov dword [0x86bb50], eax
mov word [0x86bb54], dx
jmp case.default.0x47aa7f
mov eax, dword [str.bartroberts]
mov edx, dword [0x703fac]
mov dword [0x86bb48], eax
mov eax, dword [0x703fb0]
mov dword [0x86bb4c], edx
mov dword [0x86bb50], eax
jmp case.default.0x47aa7f
mov edx, dword [str.jackrackham]
mov eax, dword [0x703fa0]
mov dword [0x86bb48], edx
mov edx, dword [0x703fa4]
mov dword [0x86bb4c], eax
mov dword [0x86bb50], edx
test ch, 0x20
je 0x47abef
mov eax, dword [str.ubervillain]
mov ecx, dword [0x703f94]
mov edx, dword [0x703f98]
mov dword [0x86bb48], eax
mov dword [0x86bb4c], ecx
mov dword [0x86bb50], edx
mov al, byte [0x86bb48]
test al, al
je 0x47ac33
mov ebx, dword [ebx + 0x8e8694]
mov ecx, dword [ebx + 0xbc]
test ecx, ecx
je 0x47ac14
push 0xffffffffffffffff
push 0x86bb48
call fcn.004bd020
mov eax, dword [ebx + 0x1c]
push 0xffffffffffffffff
push 0x86bb48
call fcn.004c0090
add esp, 8
jmp 0x47ac33
mov edi, dword [ebx + 0x8e8694]
call fcn.004afbe0
mov eax, dword [ebp - 0x1c]
imul eax, eax, 0x44
push 1
push 0
fild dword [eax + 0x725b30]
lea ebx, [esp + 0x11c]
fstp dword [esp + 0x11c]
fild dword [eax + 0x725b34]
fstp dword [esp + 0x120]
fild dword [eax + 0x725b38]
fstp dword [esp + 0x124]
fild dword [eax + 0x725b24]
fstp dword [esp + 0x128]
fild dword [eax + 0x725b28]
fstp dword [esp + 0x12c]
fild dword [eax + 0x725b2c]
mov eax, dword [esp + 0x48]
mov ecx, dword [eax + 0x8e8694]
push ecx
lea eax, [esp + 0x12c]
fstp dword [esp + 0x134]
call fcn.004c1a30
mov esi, dword [esp + 0x1c]
mov ebx, dword [esp + 0x40]
mov eax, dword [esp + 0x2c]
add esi, 0xc
add ebx, 4
add ebp, 0x4a8
dec eax
mov dword [esp + 0x1c], esi
mov dword [esp + 0x40], ebx
mov dword [esp + 0x2c], eax
jne 0x47a7c3
mov eax, dword [esp + 0x18]
inc eax
cmp eax, 2
mov dword [esp + 0x18], eax
jl 0x47a790
test byte [0x8be4cc], 1
jne 0x47acff
mov esi, dword [0x8e8694]
mov ecx, 0x32
call fcn.004bd230
mov edx, dword [esp + 0x50]
xor ebx, ebx
or esi, 0xffffffff
push edx
mov dword [0x8bb9ac], ebx
mov dword [0x7277f8], esi
call dword [sym.imp.USER32.dll_SetCursor]
mov dword [0x727804], esi
mov dword [0x8bb998], esi
test byte [0x8ef61c], 1
mov edi, dword [esp + 0x44]
mov esi, 0x10
jne 0x47ad4b
or dword [0x8ef61c], 1
call dword [sym.imp.WINMM.dll_timeGetTime]
mov dword [0x8ef618], eax
call dword [sym.imp.WINMM.dll_timeGetTime]
sub eax, dword [0x8ef618]
mov dword [esp + 0xd8], eax
mov dword [0x8bb998], esi
mov dword [0x8bb994], esi
mov word [0x86e330], bx
call fcn.004760f0
mov eax, dword [0x8bf710]
mov esi, dword [0x8be470]
mov ecx, dword [0x8bf70c]
mov edx, dword [0x8be46c]
sub eax, esi
sub ecx, edx
jns 0x47ad95
neg ecx
cmp eax, ebx
jge 0x47ad9b
neg eax
cmp ecx, eax
jle 0x47ada4
lea eax, [eax + ecx*2]
jmp 0x47ada7
lea eax, [ecx + eax*2]
cdq
sub eax, edx
mov ecx, eax
sar ecx, 1
mov eax, 0x1b4e81b5
imul ecx
sar edx, 6
mov eax, edx
shr eax, 0x1f
lea eax, [edx + eax + 0x64]
cmp eax, 0x1f4
mov dword [esp + 0x24], ecx
jge 0x47add3
mov eax, 0x1f4
jmp 0x47addf
cmp eax, 0x2710
jle 0x47addf
mov eax, 0x2710
test byte [0x8bfc14], 2
mov dword [0x85c12c], eax
je 0x47adf5
add eax, 0x64
mov dword [0x85c12c], eax
cmp dword [0x8bb9b0], ebx
je 0x47af8a
mov eax, dword [0x8ebfd8]
push 0x47c35000
push 0x42480000
call fcn.00412840
mov ecx, dword [0x8bb9b0]
imul ecx, ecx, 0xff
mov eax, 0x4bda12f7
imul ecx
sar edx, 3
mov edi, edx
shr edi, 0x1f
add edi, edx
cmp edi, 0xff
jl 0x47ae3f
mov edi, 0xff
mov ebx, dword [0x8ccc00]
add ebx, 0x64
push 0xc0
mov dword [0x8ccc00], ebx
call fcn.005354b8
add esp, 4
test eax, eax
je 0x47ae93
mov ecx, dword [0x85c268]
mov edx, dword [0x85c26c]
push 0
push 0
push 0
push 0
shl edi, 0x18
push edi
push ecx
mov ecx, dword [0x8ec008]
push edx
push 0
push 0
push 0
push ecx
xor ebx, ebx
mov esi, eax
call fcn.004bb100
mov edi, eax
jmp 0x47ae95
xor edi, edi
mov esi, dword [esp + 0x44]
cmp esi, edi
je 0x47aebb
test esi, esi
je 0x47aeae
dec dword [esi + 4]
jne 0x47aeae
mov edx, dword [esi]
push 1
mov ecx, esi
call dword [edx]
test edi, edi
mov esi, edi
mov dword [esp + 0x44], esi
je 0x47aeea
inc dword [edi + 4]
test esi, esi
je 0x47aeea
fild dword [esi + 0x38]
push 0
push 0x42c80000
fmul dword [0x70de8c]
call fcn.005f275c
fild dword [esi + 0x34]
push eax
fmul dword [0x70de8c]
call fcn.005f275c
push eax
push esi
call fcn.004bc130
mov ecx, dword [0x8cc9fc]
mov ebp, dword [0x8ccc00]
imul ecx, ecx, 0x38e38e3
push 0x238e38e3
sub ebp, 0x64
push 0
mov eax, 0x38e38e3
mov dword [0x8ccc00], ebp
call fcn.004dcac0
mov ecx, dword [0x8be470]
cdq
sub eax, edx
mov esi, eax
mov eax, 0x51eb851f
imul ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cdq
and edx, 3
add eax, edx
mov edx, dword [0x8bb9d0]
mov ecx, eax
mov edi, dword [0x8bb9d4]
sar ecx, 2
add ecx, edx
mov edx, dword [0x8be46c]
mov eax, 0x51eb851f
imul edx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cdq
and edx, 3
add eax, edx
sar esi, 1
push 0x1f4
sar eax, 2
add esi, 0x71c71c7
add eax, edi
mov edi, dword [0x8be474]
push 0x32
push eax
mov eax, esi
jmp 0x47b2cd
cmp edi, ebx
je 0x47af9f
dec dword [edi + 4]
jne 0x47af9b
mov eax, dword [edi]
push 1
mov ecx, edi
call dword [eax]
mov dword [esp + 0x44], ebx
mov eax, dword [0x85c164]
test ah, 8
je 0x47b06d
mov eax, dword [0x8ebfd8]
push 0x461c4000
push 0x42c80000
call fcn.00412840
mov ecx, dword [0x8cc9fc]
imul ecx, ecx, 0x38e38e3
push 0x31c71c71
push 0
mov eax, 0x38e38e3
call fcn.004dcac0
mov esi, dword [0x8bf710]
mov ebx, dword [0x8bf70c]
mov edi, dword [0x8be470]
cdq
sub eax, edx
mov edx, dword [0x8be46c]
mov ebp, eax
mov eax, esi
mov ecx, ebx
sar ebp, 1
sub eax, edi
sub ecx, edx
add ebp, 0x71c71c7
call fcn.004dcb20
mov edi, eax
mov eax, 0x51eb851f
imul esi
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cdq
and edx, 3
add eax, edx
mov edx, dword [0x8bb9d0]
mov ecx, eax
mov esi, dword [0x8bb9d4]
sar ecx, 2
add ecx, edx
mov eax, 0x51eb851f
imul ebx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cdq
and edx, 3
add eax, edx
push 0x258
sar eax, 2
sub edi, 0x6aaaaaab
add eax, esi
push 0x14
push eax
mov eax, ebp
jmp 0x47b2cd
test al, 0x40
mov eax, dword [0x8ebfd8]
je 0x47b1f4
push 0x46c35000
push 0x437a0000
call fcn.00412840
mov edx, dword [0x8be46c]
mov eax, dword [0x8bf710]
mov ebp, dword [0x8be470]
mov ecx, dword [0x8bf70c]
sub eax, ebp
sub ecx, edx
call fcn.004dcb20
mov edi, dword [0x8be474]
mov esi, eax
mov ecx, esi
sub ecx, edi
mov eax, ecx
cdq
xor eax, edx
sub eax, edx
cmp eax, 0x2aaaaaaa
jge 0x47b0d4
sub edi, esi
mov eax, edi
cmp eax, ebx
cdq
sub eax, edx
mov ecx, eax
sar ecx, 1
add ecx, esi
jmp 0x47b0f1
cmp ecx, ebx
jle 0x47b0df
mov eax, 1
jmp 0x47b0e7
xor eax, eax
cmp ecx, ebx
setge al
dec eax
imul eax, eax, 0x15555555
sub esi, eax
mov ecx, esi
mov edx, dword [0x8bb9bc]
mov edi, dword [0x8bb9c0]
push 0
push 0x38e38e3
push 0x2d82d8
push edx
mov eax, edi
call fcn.004893a0
add edi, eax
mov dword [0x8bb9bc], eax
mov al, byte [0x7277f4]
add esp, 0x10
test al, al
mov dword [0x8bb9c0], edi
je 0x47b1e5
mov esi, dword [0x85c0fc]
mov eax, esi
imul eax, eax, 0x23
lea ebx, [eax + 0x384]
mov eax, 0x66666667
imul esi
sar edx, 1
mov ecx, edx
shr ecx, 0x1f
lea edx, [edx + ecx + 0xa]
mov dword [esp + 0x14], edx
push 0x31c71c71
push 0
fild dword [esp + 0x1c]
fmul qword [0x715680]
call fcn.005f275c
push eax
lea eax, [esi + esi*2 + 0x4b]
shl eax, 2
push edi
push eax
lea ecx, [edi + 0x40000000]
mov eax, ebx
call fcn.004dcac0
mov ecx, eax
mov esi, dword [0x8bb9d0]
mov eax, 0x51eb851f
imul ebp
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cdq
and edx, 3
add eax, edx
sar eax, 2
add eax, esi
sub eax, ecx
push eax
mov eax, ebx
mov ecx, edi
call fcn.004dcac0
mov ecx, eax
mov esi, dword [0x8bb9d4]
mov eax, 0x51eb851f
imul dword [0x8be46c]
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cdq
and edx, 3
add eax, edx
sar eax, 2
add eax, esi
sub eax, ecx
push eax
call fcn.004ad540
add esp, 0x1c
mov dword [0x8bb9a4], 0
jmp 0x47b2d5
push 0x47c35000
push 0x41200000
call fcn.00412840
mov edx, dword [0x8be46c]
mov eax, dword [0x8bf70c]
add eax, edx
cdq
sub eax, edx
mov ecx, eax
sar ecx, 1
mov eax, 0x51eb851f
imul ecx
mov eax, dword [0x8bf710]
sar edx, 5
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
mov edx, dword [0x8be470]
add eax, edx
cdq
sub eax, edx
mov edx, eax
sar edx, 1
mov eax, 0x51eb851f
imul edx
sar edx, 5
mov esi, edx
mov ebx, dword [0x85c12c]
mov eax, ecx
shr esi, 0x1f
add esi, edx
cdq
and edx, 3
add eax, edx
mov edx, dword [0x8bb9d4]
mov edi, eax
sar edi, 2
add edi, edx
mov eax, esi
cdq
and edx, 3
add eax, edx
mov edx, dword [0x8bb9d0]
mov dword [0x85c128], ecx
mov ecx, eax
mov al, byte [0x8bb99c]
sar ecx, 2
add ecx, edx
shl ebx, 2
test al, al
mov dword [0x85c124], esi
mov dword [0x85c138], edi
mov dword [0x85c134], ecx
je 0x47b2aa
mov eax, ebx
cdq
sub eax, edx
sar eax, 1
mov ebx, eax
mov edx, dword [0x85c0fc]
imul edx, edx, 0x32
push 0x18e38e38
add ebx, edx
push 0
push ebx
push 0
push edi
mov dword [0x85c12c], ebx
mov eax, 0x15555555
xor edi, edi
call fcn.004892c0
add esp, 0x14
test byte [0x85c164], 4
jne 0x47b314
mov esi, dword [0x727800]
mov eax, 0x14
mov ecx, esi
call fcn.004dcac0
mov edx, dword [0x8bb9cc]
sub edx, eax
lea ecx, [esi + 0x40000000]
mov eax, 0x14
mov dword [0x8bb9cc], edx
call fcn.004dcac0
add dword [0x8bb9c8], eax
mov eax, dword [0x8bb9c8]
mov ecx, dword [0x8bb9cc]
xor edi, edi
push edi
push 0xffffffffffffffff
push edi
push edi
push edi
push 0x64
push eax
push ecx
push 0x8ce498
mov edx, 0x3e8
call fcn.004bc2e0
mov eax, dword [0x72ed74]
mov edx, dword [eax + 0x28]
mov ecx, 0x32
cmp edx, ecx
je 0x47b391
mov dword [eax + 0x28], ecx
mov dword [esp + 0xdc], 0xbf800000
mov edx, dword [esp + 0xdc]
add eax, 0xe4
mov dword [eax], edx
mov dword [esp + 0xe0], 0xbf800000
mov ecx, dword [esp + 0xe0]
mov dword [esp + 0xe4], 0xbf800000
mov edx, dword [esp + 0xe4]
mov dword [eax + 4], ecx
mov dword [eax + 8], edx
mov eax, dword [0x72ed78]
mov ecx, dword [eax + 0x14]
mov edx, dword [0x8bb9d0]
mov dword [eax + 0x10], ecx
mov ecx, dword [0x8bb9d4]
push edx
push ecx
push eax
call fcn.004e91f0
mov ecx, dword [0x8be470]
mov eax, 0x51eb851f
imul ecx
mov ecx, dword [0x8bb9c8]
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
mov edx, dword [0x8be46c]
sub ecx, eax
mov eax, 0x51eb851f
imul edx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, dword [0x8bb9cc]
sub eax, edx
jns 0x47b3f1
neg eax
cmp ecx, edi
jge 0x47b3f7
neg ecx
cmp eax, ecx
jle 0x47b400
lea eax, [ecx + eax*2]
jmp 0x47b403
lea eax, [eax + ecx*2]
cdq
sub eax, edx
sar eax, 1
cmp eax, 0x1f40
jle 0x47b447
mov esi, dword [0x727800]
mov eax, 0xfa0
mov ecx, esi
call fcn.004dcac0
add eax, dword [0x85c138]
mov dword [0x8bb9cc], eax
lea ecx, [esi + 0x40000000]
mov eax, 0xfa0
call fcn.004dcac0
add eax, dword [0x85c134]
mov dword [0x8bb9c8], eax
mov dword [0x8bb9b8], edi
mov dword [esp + 0x18], edi
mov eax, dword [esp + 0x18]
test eax, eax
je 0x47b463
mov dword [0x8bb9c4], 0xf423f
mov dword [esp + 0x3c], 0
mov edi, dword [esp + 0x3c]
nop
mov ebx, dword [esp + 0x18]
lea ebp, [edi + ebx*4]
mov dword [esp + 0x40], ebp
imul ebp, ebp, 0x4a8
test byte [ebp + 0x8be4cc], 2
je 0x47e4e5
mov eax, dword [ebp + 0x8be490]
mov ecx, dword [ebp + 0x8be494]
mov edx, dword [ebp + 0x8be484]
push eax
mov eax, dword [ebp + 0x8be480]
push ecx
push edx
push eax
push str.Cannon:_NUM_Crew:_NUM_Damage_sail:_NUM____hull:_NUM_
mov esi, 0x8ebf58
call fcn.004f7660
add esp, 0x14
test ebx, ebx
je 0x47b4dc
push edi
push ebx
call fcn.00478690
add esp, 8
cmp eax, 0xffffffff
je 0x47f79e
cmp eax, 0xfffffffe
je 0x47f873
mov esi, dword [0x85c26c]
neg edi
sbb edi, edi
and edi, 0x3c
add edi, 4
test ebx, ebx
je 0x47b4fb
mov eax, esi
cdq
sub eax, edx
mov ecx, eax
sar ecx, 1
jmp 0x47b4fd
xor ecx, ecx
mov eax, esi
cdq
and edx, 3
add eax, edx
mov ebx, eax
mov eax, dword [esp + 0x18]
sar ebx, 2
add ebx, ecx
test eax, eax
mov esi, 0x8ebf58
je 0x47b536
mov ecx, dword [ebp + 0x8be468]
mov edx, dword [ebp + 0x8be4c8]
push ecx
push edx
push str._NATIONALITY__SHIPTYPE
call fcn.004f7660
add esp, 0xc
jmp 0x47b573
mov ecx, dword [0x8dd618]
mov edx, dword [0x8dd61c]
sub esp, 0xc
mov eax, esp
mov dword [eax], ecx
mov ecx, dword [0x8dd620]
mov dword [eax + 4], edx
mov edx, dword [esp + 0x48]
imul edx, edx, 0x4a8
mov dword [eax + 8], ecx
mov eax, dword [edx + 0x8be468]
push eax
push str.Pirate__SHIPTYPE__SHIPNAME
call fcn.004f7660
add esp, 0x14
mov eax, dword [0x8ccc18]
imul eax, eax, 0x64
cdq
and edx, 0x3ff
add eax, edx
sar eax, 0xa
push 0
mov dword [esp + 0x18], eax
mov eax, dword [0x8cbdd8]
push 0x86bb48
push eax
mov dword [0x85c11c], 0x64
mov dword [0x8cbde0], eax
call fcn.0050ac80
fild dword [0x72837c]
fmul st(1)
fidiv dword [0x8ccc18]
fimul dword [esp + 0x14]
fmul dword [0x715584]
call fcn.005f275c
fstp st(0)
mov esi, eax
mov eax, dword [0x85c26c]
cdq
sub eax, edx
sar eax, 1
sub eax, 0x30
cmp esi, eax
jle 0x47b650
mov edi, edi
mov ecx, dword [0x85c11c]
mov eax, dword [0x8ccc18]
sub ecx, 5
imul eax, ecx
cdq
and edx, 0x3ff
add eax, edx
sar eax, 0xa
push 0
mov dword [esp + 0x18], eax
mov eax, dword [0x8cbdd8]
push 0x86bb48
push eax
mov dword [0x85c11c], ecx
mov dword [0x8cbde0], eax
call fcn.0050ac80
fild dword [0x72837c]
fmul st(1)
fidiv dword [0x8ccc18]
fimul dword [esp + 0x14]
fmul dword [0x715584]
call fcn.005f275c
fstp st(0)
mov esi, eax
mov eax, dword [0x85c26c]
cdq
sub eax, edx
sar eax, 1
sub eax, 0x30
cmp esi, eax
jg 0x47b5e0
mov ecx, dword [0x85c11c]
push 0
push 0xffffffffffffffff
push 4
push 0xffffffffffffffff
push ecx
push edi
push ebx
push 0x86bb48
xor eax, eax
call fcn.004b0b40
mov eax, dword [esp + 0x38]
add esp, 0x20
test eax, eax
je 0x47b680
mov ecx, dword [ebp + 0x8be4c8]
jmp 0x47b685
mov ecx, 4
push 0
push 0x42780000
lea edx, [edi + 0xc]
push edx
mov eax, esi
cdq
sub eax, edx
sar eax, 1
sub ebx, eax
lea eax, [ecx + ecx*2]
shl eax, 6
sub ebx, 0xe
push ebx
add eax, 0x8d9ad8
push eax
call fcn.004bc130
mov ecx, dword [ebp + 0x8be478]
add ecx, 0x32
mov eax, 0x51eb851f
imul ecx
mov eax, dword [ebp + 0x8be480]
sar edx, 5
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
mov edx, dword [ebp + 0x8be484]
push ecx
push edx
push eax
push str._NUM_guns___NUM_crew___NUM_knots
mov esi, 0x8ebf58
add edi, 0x18
call fcn.004f7660
mov eax, dword [esp + 0x28]
mov esi, dword [0x85c26c]
add esp, 0x10
test eax, eax
mov dword [0x85c11c], 0x42
je 0x47b70f
mov eax, esi
cdq
sub eax, edx
mov ecx, eax
sar ecx, 1
jmp 0x47b711
xor ecx, ecx
push 0
push 0xffffffffffffffff
mov eax, esi
cdq
push 4
push 0xffffffffffffffff
and edx, 3
add eax, edx
push 0x42
sar eax, 2
add eax, ecx
push edi
push eax
push 0x86bb48
xor eax, eax
call fcn.004b0b40
mov eax, dword [ebp + 0x8be4d0]
or ebx, 0xffffffff
add esp, 0x20
add edi, 0x10
mov dword [esp + 0x2c], 0
mov dword [esp + 0x28], ebx
xor ecx, ecx
mov edx, 1
shl edx, cl
test eax, edx
je 0x47b75f
inc ebx
inc ecx
cmp ecx, 8
jl 0x47b753
cmp ebx, 0xffffffff
mov dword [esp + 0x28], ebx
je 0x47b86b
mov eax, dword [esp + 0x18]
test eax, eax
mov ecx, dword [0x85c26c]
je 0x47b78d
mov eax, ecx
cdq
sub eax, edx
sar eax, 1
mov dword [esp + 0x1c], eax
jmp 0x47b795
mov dword [esp + 0x1c], 0
lea esi, [ebx + 3]
lea eax, [edi + 3]
push eax
shl esi, 4
mov eax, esi
cdq
sub eax, edx
sar eax, 1
mov dword [esp + 0x18], eax
mov eax, ecx
mov ecx, dword [esp + 0x18]
cdq
and edx, 3
add eax, edx
mov edx, dword [esp + 0x20]
sar eax, 2
sub eax, ecx
add eax, edx
push eax
mov eax, 2
mov ecx, 6
mov edx, esi
call fcn.00488400
add esp, 8
xor ecx, ecx
mov dword [esp + 0x1c], ecx
mov esi, 0x8d94d8
mov eax, dword [ebp + 0x8be4d0]
mov edx, 1
shl edx, cl
test eax, edx
je 0x47b84b
mov eax, dword [esp + 0x18]
test eax, eax
je 0x47b808
mov eax, dword [0x85c26c]
cdq
sub eax, edx
mov ecx, eax
sar ecx, 1
jmp 0x47b80a
xor ecx, ecx
push 0
push 0x42480000
lea eax, [edi + 0xc]
push eax
mov eax, ebx
shl eax, 4
cdq
sub eax, edx
mov ebx, eax
mov eax, dword [0x85c26c]
cdq
and edx, 3
add eax, edx
sar eax, 2
sar ebx, 1
sub eax, ebx
mov ebx, dword [esp + 0x38]
add eax, ebx
add eax, ecx
push eax
push esi
call fcn.004bc130
add ebx, 0x10
mov dword [esp + 0x2c], ebx
mov ebx, dword [esp + 0x28]
mov ecx, dword [esp + 0x1c]
inc ecx
add esi, 0xc0
cmp esi, 0x8d9ad8
mov dword [esp + 0x1c], ecx
jl 0x47b7e1
jmp 0x47b974
push str.No_Upgrades
mov esi, 0x8ebf58
call fcn.004f7660
mov eax, dword [0x8ccc18]
imul eax, eax, 0x33
cdq
and edx, 0x3ff
add esp, 4
add eax, edx
sar eax, 0xa
push 0
mov dword [esp + 0x18], eax
mov eax, dword [0x8cbdd8]
push 0x86bb48
push eax
mov dword [0x85c11c], 0x33
mov dword [0x8cbde0], eax
call fcn.0050ac80
fild dword [0x72837c]
fmul st(1)
fidiv dword [0x8ccc18]
fimul dword [esp + 0x14]
fmul dword [0x715584]
call fcn.005f275c
fstp st(0)
mov ebx, dword [0x85c26c]
mov esi, eax
mov eax, dword [esp + 0x18]
test eax, eax
je 0x47b8f0
mov eax, ebx
cdq
sub eax, edx
mov ecx, eax
sar ecx, 1
jmp 0x47b8f2
xor ecx, ecx
add esi, 0xc
lea edx, [edi + 3]
push edx
mov eax, esi
cdq
sub eax, edx
sar eax, 1
mov dword [esp + 0x18], eax
mov eax, ebx
cdq
and edx, 3
add eax, edx
mov edx, dword [esp + 0x18]
sar eax, 2
sub eax, edx
lea eax, [eax + ecx - 4]
push eax
mov eax, 2
mov ecx, 6
mov edx, esi
call fcn.00488400
mov eax, dword [esp + 0x20]
mov esi, dword [0x85c26c]
add esp, 8
test eax, eax
je 0x47b947
mov eax, esi
cdq
sub eax, edx
mov ecx, eax
sar ecx, 1
jmp 0x47b949
xor ecx, ecx
push 0
push 0xffffffffffffffff
mov eax, esi
cdq
push 4
push 0xffffffffffffffff
and edx, 3
add eax, edx
push 0x33
sar eax, 2
add edi, 5
add eax, ecx
push edi
push eax
push 0x86bb48
xor eax, eax
call fcn.004b0b40
add esp, 0x20
mov eax, dword [ebp + 0x8be4a4]
test eax, eax
jne 0x47b99e
push str.Broadside_Ready
mov esi, 0x8ebf58
call fcn.004f7660
mov ecx, dword [ebp + 0x8be480]
add esp, 4
mov dword [ebp + 0x8be4ac], ecx
jmp 0x47b9c0
mov ecx, dword [ebp + 0x8be4a8]
mov edx, ecx
sub edx, eax
mov eax, dword [ebp + 0x8be480]
imul eax, edx
imul eax, edx
cdq
idiv ecx
cdq
idiv ecx
mov dword [ebp + 0x8be4ac], eax
mov edx, dword [ebp + 0x8be4ac]
push edx
push str._NUM_guns_loaded
mov esi, 0x8ebf58
call fcn.004f7660
mov eax, dword [esp + 0x20]
add esp, 8
test eax, eax
jne 0x47bb18
mov esi, dword [esp + 0x3c]
mov edi, dword [0x85c268]
imul esi, esi, 0x4a8
mov ecx, dword [esi + 0x8be480]
add edi, 0xffffffec
test ecx, ecx
je 0x47ba59
mov eax, dword [esi + 0x8be4ac]
imul eax, eax, 0x70
cdq
idiv ecx
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x30]
push edx
mov ebx, eax
xor eax, eax
push eax
push eax
push eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x40], eax
call fcn.004ceb00
mov edx, dword [esp + 0x30]
add esp, 0x14
push 0x100
push 0xffc00000
push 0xf
push ebx
lea ecx, [edi - 7]
push ecx
mov ecx, dword [esp + 0x40]
push 0xe
push edx
push ecx
push 0
push 0
push eax
call fcn.004af500
add esp, 0x2c
push 0
push 0x42580000
push edi
push 0x46
push 0x8d5998
call fcn.004bc130
mov edx, dword [esi + 0x8be4d0]
mov eax, dword [esi + 0x8be4b0]
shr edx, 6
and edx, 1
lea ecx, [eax + edx*4]
mov edx, dword [ecx*4 + 0x7277d4]
mov ecx, dword [0x8bb9c4]
imul edx, edx, 0x186a0
add edx, 0xc350
cmp ecx, edx
mov dword [0x85c11c], 0x43
jle 0x47baf9
mov ecx, dword [0x8ebf5c]
cmp ecx, 6
jl 0x47bace
cmp ecx, 0xb
jg 0x47bace
push eax
push str.Out_of__SHOT_range
mov esi, 0x8ebf58
call fcn.004f7660
add esp, 8
jmp 0x47bae0
push str.Out_of_range
mov esi, 0x8ebf58
call fcn.004f7660
add esp, 4
push 0
push 0xffffffffffffffff
push 4
push 0xffffffffffffffff
mov dword [0x85c11c], 0x32
push 0x32
add edi, 0xfffffffa
jmp 0x47bb06
push 0
push 0xffffffffffffffff
push 4
push 0xffffffffffffffff
push 0x43
add edi, 0xfffffff8
push edi
push 0x46
xor eax, eax
push 0x86bb48
call fcn.004b0b40
add esp, 0x20
test byte [0x85c164], 4
jne 0x47bb35
mov eax, dword [esp + 0x3c]
mov ecx, dword [esp + 0x18]
push 0
push eax
push ecx
call fcn.00477460
add esp, 0xc
mov eax, dword [ebp + 0x8be474]
mov ecx, 0x40000000
sub ecx, eax
mov eax, ecx
cdq
xor eax, edx
sub eax, edx
cmp eax, 0x40000000
jle 0x47bb6d
test ecx, ecx
jle 0x47bb5b
mov edx, 1
jmp 0x47bb63
xor edx, edx
test ecx, ecx
setge dl
dec edx
mov ecx, 0x80000000
sub ecx, eax
imul ecx, edx
mov edx, dword [ebp + 0x8be468]
imul edx, edx, 0x44
mov ebx, dword [edx + 0x725b08]
mov eax, 0x66666667
imul ecx
sar edx, 3
mov eax, edx
shr eax, 0x1f
add eax, edx
cdq
idiv ebx
mov ecx, dword [0x8cc9fc]
imul ecx, ecx, 0x1c71c71
imul eax, dword [0x85c0f8]
mov dword [esp + 0x2c], eax
mov eax, 0x38e38e3
call fcn.004dcac0
mov edi, eax
mov eax, dword [ebp + 0x8be474]
lea ecx, [eax + 0x40000000]
mov eax, edi
mov dword [0x8bb9b4], edi
call fcn.004dcac0
mov esi, eax
lea eax, [edi*4]
cdq
idiv ebx
mov ecx, dword [ebp + 0x8be474]
call fcn.004dcac0
mov ecx, dword [esp + 0x18]
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x3c]
lea eax, [eax + ecx*2]
mov ecx, dword [eax*4 + 0x8e8694]
lea ebx, [eax*4 + 0x8e8694]
mov dword [esp + 0x38], eax
xor eax, eax
mov dword [esp + 0x4c], ebx
mov dword [esp + 0xa4], 0
call fcn.004bc7a0
test eax, eax
je 0x47bc27
xor edi, edi
call fcn.004bae90
jmp 0x47bc2e
fld dword [esp + 0xa4]
fmul dword [0x715698]
call fcn.005f275c
test eax, eax
mov dword [esp + 0x1c], eax
je 0x47c48c
mov edx, dword [ebp + 0x8be4d4]
mov eax, dword [ebp + 0x8be474]
mov ecx, dword [ebp + 0x8be468]
mov ebx, dword [esp + 0x18]
push edx
push eax
mov eax, dword [0x727800]
push ecx
call fcn.0045b6d0
mov edx, dword [0x72ed74]
mov dword [ebp + 0x8be4d4], eax
fld dword [edx + 0x2c]
add esp, 0xc
call fcn.005f275c
mov edi, eax
cmp dword [ebp + 0x8be490], 0x6e
mov dword [esp + 0x28], edi
jle 0x47bcb0
mov ebx, dword [sym.imp.MSVCR71.dll_rand]
call ebx
cdq
mov ecx, 0x14
idiv ecx
test edx, edx
jne 0x47bcb0
cmp dword [ebp + 0x8be490], 0x190
jge 0x47bcb0
call ebx
mov edx, dword [0x8ca494]
mov ecx, dword [ebp + 0x8be468]
push edx
mov eax, 0x38e38e39
imul ecx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
imul eax, eax, 7
mov ecx, dword [ebp + 0x8be47c]
add eax, 0x4b
mov ebx, dword [esp + 0x30]
cdq
and edx, 3
add eax, edx
sar eax, 2
mov dword [esp + 0x18], eax
shl ecx, 3
push 0xffffffffffffffff
mov edx, esi
sub edx, ecx
mov ecx, dword [esp + 0x28]
sub edx, ebx
push edx
mov edx, dword [ebp + 0x8be474]
sub edx, 0x80000000
push ecx
mov ecx, dword [ebp + 0x8be470]
push edx
mov eax, 0x51eb851f
imul ecx
mov ecx, dword [ebp + 0x8be46c]
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cdq
and edx, 3
add eax, edx
mov edx, dword [0x8bb9d0]
sar eax, 2
add eax, edx
push edi
push eax
mov eax, 0x51eb851f
imul ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cdq
and edx, 3
add eax, edx
mov edx, dword [0x8bb9d4]
sar eax, 2
add eax, edx
push eax
mov eax, dword [esp + 0x6c]
mov ecx, dword [eax]
mov eax, dword [esp + 0x34]
push ecx
mov edx, eax
call fcn.004bc2e0
mov edx, dword [esp + 0x38]
mov ecx, dword [edx*4 + 0x8e86a4]
mov edx, dword [ebp + 0x8be468]
mov eax, 0x38e38e39
imul edx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
imul eax, eax, 7
add eax, 0x4b
cdq
and edx, 3
push 0
add eax, edx
push 0xffffffffffffffff
sar eax, 2
mov edx, dword [ebp + 0x8be47c]
shl edx, 3
sub esi, edx
mov edx, dword [esp + 0x28]
mov dword [esp + 0x1c], eax
sub esi, ebx
push esi
push edx
mov edx, dword [ebp + 0x8be474]
sub edx, 0x80000000
push edx
mov edx, dword [ebp + 0x8be470]
mov eax, 0x51eb851f
imul edx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cdq
and edx, 3
add eax, edx
mov edx, dword [0x8bb9d0]
sar eax, 2
add eax, edx
mov edx, dword [ebp + 0x8be46c]
push edi
push eax
mov edi, dword [0x8bb9d4]
mov eax, 0x51eb851f
imul edx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cdq
and edx, 3
add eax, edx
sar eax, 2
add eax, edi
push eax
mov eax, dword [esp + 0x34]
push ecx
mov edx, eax
call fcn.004bc2e0
mov esi, eax
mov eax, 0xd
mov ecx, esi
mov dword [esp + 0x20], esi
mov dword [esp + 0xb4], 0
call fcn.004bc7a0
test eax, eax
je 0x47be4e
xor edi, edi
call fcn.004bae90
jmp 0x47be55
fld dword [esp + 0xb4]
fmul dword [0x715698]
call fcn.005f275c
mov edi, eax
mov eax, 0xaaaaaaab
mul edi
mov ecx, edx
shr ecx, 3
test edi, edi
je 0x47be8e
mov eax, dword [0x8ca494]
xor edx, edx
div edi
mov eax, edx
xor edx, edx
div ecx
imul eax, ecx
push eax
push 0xd
mov ecx, esi
call fcn.004bc4e0
mov eax, dword [esp + 0x3c]
test eax, eax
jne 0x47bf3f
mov esi, dword [esp + 0x18]
lea ecx, [esi*4]
imul ecx, ecx, 0x4a8
mov edx, dword [ecx + 0x8be46c]
mov ecx, dword [ecx + 0x8be470]
mov eax, 0x51eb851f
imul edx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cdq
and edx, 3
add eax, edx
mov edx, dword [0x8bb9d4]
sar eax, 2
add eax, edx
mov dword [esp + 0x14], eax
mov eax, 0x51eb851f
imul ecx
fild dword [esp + 0x14]
fstp dword [esp + 0x78]
mov ecx, dword [0x8bb9d0]
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cdq
and edx, 3
add eax, edx
mov edx, dword [esp + 0x78]
sar eax, 2
add eax, ecx
mov dword [esp + 0x14], eax
lea eax, [esi + esi*2]
lea ecx, [eax*4 + 0x8eaf10]
fild dword [esp + 0x14]
mov dword [ecx], edx
fstp dword [esp + 0x7c]
mov eax, dword [esp + 0x7c]
fild dword [esp + 0x28]
mov dword [ecx + 4], eax
fstp dword [esp + 0x80]
mov edx, dword [esp + 0x80]
mov dword [ecx + 8], edx
test byte [0x85c164], 4
jne 0x47bf76
mov eax, dword [ebp + 0x8be498]
mov ecx, dword [ebp + 0x8be49c]
shl eax, 4
sub eax, ecx
test eax, eax
jle 0x47bf64
mov eax, 1
jmp 0x47bf6e
xor edx, edx
test eax, eax
setge dl
dec edx
mov eax, edx
add ecx, eax
mov dword [ebp + 0x8be49c], ecx
mov ecx, dword [ebp + 0x8be49c]
test ecx, ecx
jl 0x47bfa2
mov eax, dword [esp + 0x1c]
imul eax, ecx
cdq
and edx, 7
add eax, edx
sar eax, 3
cdq
and edx, 0xf
add eax, edx
sar eax, 4
push eax
mov eax, dword [esp + 0x50]
mov ecx, dword [eax]
jmp 0x47bfcf
mov esi, dword [esp + 0x1c]
mov eax, esi
imul eax, ecx
cdq
and edx, 7
add eax, edx
sar eax, 3
cdq
and edx, 0xf
add eax, edx
mov ecx, eax
mov eax, esi
cdq
sub eax, edx
mov edx, dword [esp + 0x4c]
sar ecx, 4
sar eax, 1
sub eax, ecx
mov ecx, dword [edx]
push eax
push 0xc
call fcn.004bc4e0
mov eax, dword [ebp + 0x8be4d4]
mov esi, dword [esp + 0x4c]
mov ecx, dword [esi]
push eax
push 0
call fcn.004bc4e0
mov ecx, dword [ebp + 0x8be4d4]
push ecx
mov ecx, dword [esp + 0x24]
push 0
call fcn.004bc4e0
mov edx, dword [0x8ca494]
mov ecx, dword [esi]
shr edx, 1
push edx
push 9
call fcn.004bc4e0
mov ecx, dword [esi]
mov eax, 0xaaaaaaab
mul dword [0x8ca494]
shr edx, 1
push edx
push 0xb
call fcn.004bc4e0
mov eax, dword [0x7273bc]
mov edi, dword [ebp + 0x8be474]
mov ecx, dword [esi]
sub eax, edi
sub eax, 0x80000000
push eax
call fcn.004bd400
mov ebx, dword [esi]
call fcn.004bd2e0
mov ecx, dword [esp + 0x38]
mov ecx, dword [ecx*4 + 0x8e86a4]
xor edi, edi
mov eax, 3
call fcn.004bc830
mov ebx, eax
mov eax, dword [ebp + 0x8be480]
test eax, eax
jne 0x47c083
push edi
mov edi, dword [esp + 0x3c]
mov ecx, dword [edi*4 + 0x8e86a4]
push 3
call fcn.004bc4e0
push 0
jmp 0x47c110
mov eax, dword [ebp + 0x8be4a4]
test eax, eax
jne 0x47c090
dec ebx
jmp 0x47c0fc
mov ecx, dword [ebp + 0x8be4a8]
mov edx, ebx
imul edx, edx, 0xb
mov edi, ecx
sub edi, eax
mov eax, 0x66666667
imul edx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
imul eax, edi
imul eax, edi
cdq
idiv ecx
cdq
idiv ecx
mov ecx, eax
mov eax, 0x66666667
imul ebx
sar edx, 2
mov eax, edx
shr eax, 0x1f
dec ecx
add eax, edx
cmp ecx, eax
jl 0x47c0f5
mov ebx, dword [esp + 0x38]
mov edi, ecx
mov ecx, dword [ebx*4 + 0x8e86a4]
sub edi, eax
push edi
push 3
call fcn.004bc4e0
mov ecx, dword [ebx*4 + 0x8e86a4]
push edi
jmp 0x47c117
lea edx, [ecx + ecx*4]
shl edx, 1
sub ebx, edx
mov edi, dword [esp + 0x38]
mov ecx, dword [edi*4 + 0x8e86a4]
push ebx
push 3
call fcn.004bc4e0
push ebx
mov ecx, dword [edi*4 + 0x8e86a4]
push 4
call fcn.004bc4e0
mov ebx, dword [0x85c164]
mov eax, dword [ebp + 0x8be494]
and ebx, 0xfffff7ff
mov edi, 0x64
cmp eax, edi
mov dword [0x85c164], ebx
jge 0x47c14b
cmp dword [ebp + 0x8be490], edi
jl 0x47c462
cmp word [ebp + 0x8be4be], 0
jne 0x47c193
mov eax, dword [ebp + 0x8be468]
call fcn.004a65e0
push 0xbf800000
push 0xffffffffffffffff
push 0x50
mov esi, eax
push 0x4e
xor eax, eax
or ecx, 0xffffffff
call fcn.00488840
mov eax, dword [esp + 0x5c]
mov esi, dword [eax]
add esp, 0x10
mov ecx, 0x64
call fcn.004bd230
mov esi, dword [esp + 0x4c]
mov edi, 0x64
movsx ecx, word [ebp + 0x8be4be]
push ecx
mov ecx, dword [esi]
push 1
call fcn.004bc4e0
movsx edx, word [ebp + 0x8be4be]
mov ecx, dword [esp + 0x20]
push edx
push 1
call fcn.004bc4e0
mov ecx, dword [esi]
mov eax, 1
mov dword [esp + 0xe8], 0
call fcn.004bc7a0
test eax, eax
je 0x47c1e0
xor edi, edi
call fcn.004bae90
mov edi, 0x64
jmp 0x47c1e7
fld dword [esp + 0xe8]
fmul dword [0x715698]
call fcn.005f275c
fld qword [0x8ca498]
fmul dword [0x715698]
mov ebx, eax
call fcn.005f275c
add word [ebp + 0x8be4be], ax
mov ax, word [ebp + 0x8be4be]
movsx edx, ax
lea ecx, [ebx - 1]
cmp edx, ecx
jl 0x47c44e
dec ebx
mov word [ebp + 0x8be4be], bx
cmp dword [ebp + 0x8be490], edi
jl 0x47c45c
cmp word [ebp + 0x8be4c0], 0
jne 0x47c31f
test byte [0x85c164], 4
je 0x47c255
mov word [ebp + 0x8be4c0], 1
mov esi, dword [esp + 0x4c]
mov eax, dword [esi]
push eax
mov eax, dword [ebp + 0x8be468]
xor ecx, ecx
call fcn.004785f0
mov ecx, dword [esp + 0x24]
mov eax, dword [ebp + 0x8be468]
add esp, 4
push ecx
xor ecx, ecx
call fcn.004785f0
mov eax, dword [esi]
add esp, 4
push str.transparent.tga
push str.ship_lantern_light
push 0
call fcn.004bb170
push eax
call fcn.004bfe30
mov eax, dword [ebp + 0x8be468]
cdq
mov ecx, 9
idiv ecx
add esp, 0x10
push 0x64
imul eax, eax, 7
add eax, 0x4b
mov ecx, edx
cdq
and edx, 3
add eax, edx
sar eax, 2
mov dword [esp + 0x18], eax
fild dword [esp + 0x18]
fmul dword [ecx*4 + 0x7276fc]
call fcn.005f275c
fld dword [0x8cea04]
fmul dword [0x715698]
push eax
call fcn.005f275c
push eax
mov eax, dword [esi]
mov ecx, str.dummy_fx_ship_sinking_froth
mov edx, 0x8ce9d8
call fcn.004c12b0
mov eax, dword [ebp + 0x8be468]
call fcn.004a65e0
push 0xbf800000
push 0xffffffffffffffff
push 0x50
mov esi, eax
push 0x4f
xor eax, eax
or ecx, 0xffffffff
call fcn.00488840
mov esi, dword [esp + 0x5c]
add esp, 0x10
mov edx, dword [ebp + 0x8be4cc]
mov ecx, dword [esi]
or edx, 8
mov dword [ebp + 0x8be4cc], edx
mov edx, dword [ebp + 0x8be468]
mov eax, 2
mov dword [0x7277f8], edx
mov dword [esp + 0xfc], 0
call fcn.004bc7a0
test eax, eax
je 0x47c361
mov edi, str.playeffect_fx_ship_sinking_froth_dummy_fx_ship_sinking_froth
call fcn.004bae90
jmp 0x47c368
fld dword [esp + 0xfc]
fmul dword [0x715698]
call fcn.005f275c
movsx ecx, word [ebp + 0x8be4c0]
sub ecx, eax
mov eax, 0
sets al
dec eax
and ecx, eax
mov eax, dword [0x7277f8]
call fcn.00480ef0
mov ecx, dword [esp + 0x38]
mov ecx, dword [ecx*4 + 0x8e86a4]
mov edi, eax
push 0
push edi
call fcn.004c28d0
mov ecx, dword [esi]
push 0
push edi
call fcn.004c28d0
movsx edx, word [ebp + 0x8be4c0]
mov ecx, dword [esi]
push edx
push 2
call fcn.004bc4e0
mov ecx, dword [esi]
push 0
call fcn.004bf740
movsx eax, word [ebp + 0x8be4c0]
mov ecx, dword [esp + 0x20]
push eax
push 2
call fcn.004bc4e0
mov esi, dword [esi]
mov eax, 2
mov ecx, esi
mov dword [esp + 0x84], 0
call fcn.004bc7a0
test eax, eax
je 0x47c403
xor edi, edi
call fcn.004bae90
jmp 0x47c40a
fld dword [esp + 0x84]
fmul dword [0x715698]
call fcn.005f275c
fld qword [0x8ca498]
fmul dword [0x715698]
mov esi, eax
call fcn.005f275c
add word [ebp + 0x8be4c0], ax
movsx ecx, word [ebp + 0x8be4c0]
cmp ecx, esi
jl 0x47c45c
dec esi
mov word [ebp + 0x8be4c0], si
mov dword [ebp + 0x8be490], 0x270f
jmp 0x47c45c
cmp dword [ebp + 0x8be490], edi
jle 0x47c45c
mov dword [ebp + 0x8be490], edi
mov ebx, dword [0x85c164]
cmp dword [ebp + 0x8be490], 0xc8
jge 0x47c7b0
mov edx, dword [0x8cc9fc]
mov eax, dword [esp + 0x3c]
mov ecx, dword [esp + 0x18]
push edx
push eax
mov eax, dword [esp + 0x28]
push ecx
jmp 0x47c7a2
mov edx, dword [0x72ed74]
fld dword [edx + 0x2c]
call fcn.005f275c
mov ecx, dword [ebp + 0x8be490]
cmp ecx, 0x64
mov edi, eax
jle 0x47c4d9
mov edx, dword [ebp + 0x8be468]
and dl, 1
neg dl
mov eax, 0x57619f1
sbb edx, edx
and edx, 0x80000000
add edx, 0x40000000
imul edx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
add ecx, 0xffffff9c
imul eax, ecx
add esi, eax
mov ecx, dword [ebx]
mov dword [esp + 0x1c], ecx
mov ecx, dword [ebp + 0x8be468]
mov eax, 0x38e38e39
imul ecx
imul ecx, ecx, 0x44
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
imul eax, eax, 7
add eax, 0x4b
cdq
and edx, 3
add eax, edx
mov edx, dword [ebp + 0x8be47c]
mov ecx, dword [ecx + 0x725b08]
shl edx, 3
sar eax, 2
push 0
mov ebx, esi
sub ebx, edx
push 0xffffffffffffffff
mov edx, ebx
mov ebx, dword [esp + 0x34]
sub edx, ebx
push edx
mov edx, dword [esp + 0x2c]
push edx
mov edx, dword [ebp + 0x8be474]
sub edx, 0x80000000
mov dword [esp + 0x24], eax
dec ecx
imul ecx, dword [ebp + 0x8be490]
push edx
mov eax, 0x51eb851f
imul ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
mov ecx, edi
sub ecx, eax
push ecx
mov ecx, dword [ebp + 0x8be470]
mov eax, 0x51eb851f
imul ecx
mov ecx, dword [ebp + 0x8be46c]
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cdq
and edx, 3
add eax, edx
mov edx, dword [0x8bb9d0]
sar eax, 2
add eax, edx
push eax
mov eax, 0x51eb851f
imul ecx
mov ecx, dword [0x8bb9d4]
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cdq
and edx, 3
add eax, edx
mov edx, dword [esp + 0x38]
sar eax, 2
add eax, ecx
push eax
mov eax, dword [esp + 0x34]
push edx
mov edx, eax
call fcn.004bc2e0
mov ecx, dword [ebp + 0x8be468]
mov dword [esp + 0x1c], eax
push 0
mov eax, 0x38e38e39
imul ecx
imul ecx, ecx, 0x44
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
imul eax, eax, 7
add eax, 0x4b
cdq
mov ecx, dword [ecx + 0x725b08]
and edx, 3
add eax, edx
mov edx, dword [ebp + 0x8be47c]
shl edx, 3
sar eax, 2
sub esi, edx
mov edx, dword [esp + 0x24]
push 0xffffffffffffffff
mov dword [esp + 0x1c], eax
sub esi, ebx
push esi
push edx
mov edx, dword [ebp + 0x8be474]
sub edx, 0x80000000
dec ecx
imul ecx, dword [ebp + 0x8be490]
push edx
mov eax, 0x51eb851f
imul ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
mov ecx, edi
sub ecx, eax
push ecx
mov ecx, dword [ebp + 0x8be470]
mov eax, 0x51eb851f
imul ecx
mov ecx, dword [0x8bb9d0]
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cdq
and edx, 3
add eax, edx
sar eax, 2
add eax, ecx
mov ecx, dword [ebp + 0x8be46c]
push eax
mov esi, dword [0x8bb9d4]
mov eax, 0x51eb851f
imul ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cdq
and edx, 3
add eax, edx
mov edx, dword [esp + 0x54]
sar eax, 2
add eax, esi
push eax
mov eax, dword [edx*4 + 0x8e86a4]
push eax
mov eax, dword [esp + 0x38]
mov edx, eax
call fcn.004bc2e0
mov ebx, dword [esp + 0x3c]
test ebx, ebx
mov esi, dword [esp + 0x18]
jne 0x47c789
lea ecx, [esi*4]
imul ecx, ecx, 0x4a8
mov edx, dword [ecx + 0x8be46c]
mov eax, 0x51eb851f
imul edx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cdq
and edx, 3
add eax, edx
mov edx, dword [0x8bb9d4]
sar eax, 2
add eax, edx
mov edx, dword [ecx + 0x8be470]
mov dword [esp + 0x14], eax
mov eax, 0x51eb851f
imul edx
fild dword [esp + 0x14]
fstp dword [esp + 0x88]
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cdq
and edx, 3
add eax, edx
mov edx, dword [0x8bb9d0]
sar eax, 2
add eax, edx
mov edx, dword [ecx + 0x8be468]
imul edx, edx, 0x44
mov edx, dword [edx + 0x725b08]
dec edx
imul edx, dword [ecx + 0x8be490]
mov dword [esp + 0x14], eax
mov eax, 0x51eb851f
imul edx
fild dword [esp + 0x14]
fstp dword [esp + 0x8c]
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
sub edi, eax
mov eax, dword [esp + 0x88]
mov dword [esp + 0x14], edi
lea ecx, [esi + esi*2]
lea edx, [ecx*4 + 0x8eaf10]
fild dword [esp + 0x14]
mov ecx, dword [esp + 0x8c]
mov dword [edx], eax
mov dword [edx + 4], ecx
fstp dword [esp + 0x90]
mov eax, dword [esp + 0x90]
mov dword [edx + 8], eax
cmp dword [ebp + 0x8be490], 0xc8
jge 0x47c7aa
mov ecx, dword [0x8cc9fc]
mov eax, dword [esp + 0x1c]
push ecx
push ebx
push esi
call fcn.004766f0
add esp, 0xc
mov ebx, dword [0x85c164]
mov eax, dword [ebp + 0x8be490]
cmp eax, 0x19
jge 0x47c7d5
mov ecx, dword [0x8bb9b0]
test ecx, ecx
je 0x47ca9b
mov ecx, dword [esp + 0x18]
test ecx, ecx
je 0x47ca9b
test byte [ebp + 0x8be4cc], 8
jne 0x47c95c
test bl, 4
jne 0x47c7f3
cmp eax, 0x64
jge 0x47c7f3
inc word [ebp + 0x8be4b8]
mov edx, dword [ebp + 0x8be468]
imul edx, edx, 0x44
mov ebx, dword [edx + 0x725b08]
mov ecx, ebx
imul ecx, ecx, 0x3e8
mov eax, 0x66666667
imul ecx
mov ecx, dword [ebp + 0x8be474]
sar edx, 4
mov edi, edx
shr edi, 0x1f
add edi, edx
mov eax, edi
call fcn.004dcac0
mov ecx, dword [ebp + 0x8be46c]
mov dword [esp + 0x14], eax
mov eax, 0x51eb851f
imul ecx
mov eax, dword [esp + 0x14]
sar edx, 5
mov esi, edx
add eax, edx
shr esi, 0x1f
add esi, eax
mov eax, dword [ebp + 0x8be474]
lea ecx, [eax + 0x40000000]
mov eax, edi
call fcn.004dcac0
mov ecx, dword [ebp + 0x8be470]
mov edi, eax
mov eax, 0x51eb851f
imul ecx
sar edx, 5
mov ecx, edx
add edi, edx
shr ecx, 0x1f
add ecx, edi
mov edi, dword [ebp + 0x8be490]
mov eax, 0x51eb851f
imul edi
sar edx, 3
mov eax, edx
shr eax, 0x1f
lea edx, [edx + eax - 1]
test edx, edx
mov dword [esp + 0x28], edx
jge 0x47c8a2
mov dword [esp + 0x28], 0
jmp 0x47c8af
cmp edx, 2
jle 0x47c8af
mov dword [esp + 0x28], 2
mov edx, dword [0x8ca494]
push edx
mov eax, 0x38e38e39
imul dword [ebp + 0x8be468]
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
imul eax, eax, 7
add eax, 0x4b
cdq
and edx, 3
add eax, edx
sar eax, 2
mov dword [esp + 0x18], eax
mov eax, dword [ebp + 0x8be474]
add eax, 0x80000000
push 0xffffffffffffffff
lea edx, [ebx - 1]
imul edx, edi
push 0
push 0xe38e38e
push eax
mov eax, 0x51eb851f
imul edx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
lea edx, [ebx + ebx]
sub edx, eax
mov ebx, dword [0x8bb9d4]
push edx
mov eax, ecx
mov ecx, dword [0x8bb9d0]
cdq
and edx, 3
add eax, edx
sar eax, 2
add eax, ecx
mov ecx, dword [esp + 0x40]
push eax
mov eax, esi
cdq
and edx, 3
add eax, edx
sar eax, 2
add eax, ebx
push eax
mov eax, dword [esp + 0x58]
lea edx, [ecx + eax*2]
add edx, eax
mov eax, dword [edx*4 + 0x8e8660]
push eax
mov eax, dword [esp + 0x38]
mov edx, eax
call fcn.004bc2e0
jmp 0x47ca95
mov ecx, dword [ebp + 0x8be468]
imul ecx, ecx, 0x44
mov edi, dword [ecx + 0x725b08]
mov ebx, dword [esp + 0x38]
mov ecx, edi
imul ecx, ecx, 0x3e8
fld dword [ebx*4 + 0x8bc658]
fmul dword [0x715698]
mov eax, 0x66666667
imul ecx
sar edx, 4
lea ebx, [ebx*4 + 0x8bc658]
mov esi, edx
shr esi, 0x1f
add esi, edx
call fcn.005f275c
push eax
mov eax, 0x38e38e39
imul dword [ebp + 0x8be468]
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
imul eax, eax, 7
add eax, 0x4b
cdq
and edx, 3
add eax, edx
sar eax, 2
mov dword [esp + 0x18], eax
mov eax, dword [ebp + 0x8be474]
add eax, 0x80000000
lea ecx, [edi - 1]
imul ecx, dword [ebp + 0x8be490]
push 0xffffffffffffffff
push 0
push 0xe38e38e
push eax
mov eax, 0x51eb851f
imul ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
lea ecx, [edi + edi]
sub ecx, eax
mov eax, dword [ebp + 0x8be474]
push ecx
lea ecx, [eax + 0x40000000]
mov eax, esi
call fcn.004dcac0
mov ecx, dword [ebp + 0x8be470]
mov edi, eax
mov eax, 0x51eb851f
imul ecx
mov ecx, dword [ebp + 0x8be474]
sar edx, 5
mov eax, edx
shr eax, 0x1f
add edi, edx
add eax, edi
cdq
and edx, 3
add eax, edx
mov edx, dword [0x8bb9d0]
sar eax, 2
add eax, edx
push eax
mov eax, esi
call fcn.004dcac0
mov ecx, dword [ebp + 0x8be46c]
mov esi, eax
mov eax, 0x51eb851f
imul ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add esi, edx
add eax, esi
cdq
and edx, 3
add eax, edx
mov edx, dword [0x8bb9d4]
sar eax, 2
add eax, edx
mov edx, dword [0x8e8690]
push eax
mov eax, dword [esp + 0x34]
push edx
mov edx, eax
call fcn.004bc2e0
fld qword [0x8ca498]
fadd dword [ebx]
fstp dword [ebx]
mov ebx, dword [0x85c164]
mov eax, dword [ebp + 0x8be490]
cmp eax, 0x64
jl 0x47cc18
test bl, 4
jne 0x47cb3d
test byte [ebp + 0x8be4cc], 8
jne 0x47cac5
add eax, 0xa
mov dword [ebp + 0x8be490], eax
mov eax, dword [ebp + 0x8be484]
test eax, eax
je 0x47cb3d
call dword [sym.imp.MSVCR71.dll_rand]
cdq
mov ecx, 6
idiv ecx
test edx, edx
jne 0x47cb37
cmp dword [ebp + 0x8be490], 0x1f4
jge 0x47cb37
mov edx, dword [ebp + 0x8be470]
mov eax, dword [ebp + 0x8be46c]
mov ecx, dword [esp + 0x18]
push 1
push 1
push 0x3e8
push edx
push eax
push ecx
call fcn.00476e70
mov esi, dword [ebp + 0x8be484]
mov edx, dword [esp + 0x50]
mov eax, dword [edx*4 + 0x8e86a4]
dec esi
mov dword [ebp + 0x8be484], esi
push eax
mov eax, dword [ebp + 0x8be468]
mov ecx, esi
call fcn.004785f0
add esp, 0x1c
mov ebx, dword [0x85c164]
cmp dword [ebp + 0x8be490], 0x7d0
jle 0x47cc18
mov ecx, dword [ebp + 0x8be4cc]
mov eax, dword [esp + 0x3c]
and ecx, 0xfffffffd
test eax, eax
mov dword [ebp + 0x8be4cc], ecx
jne 0x47cc18
mov eax, dword [esp + 0x18]
test eax, eax
mov esi, 0x8ebf58
je 0x47cb8b
push str.The_enemy_ship_sinks_beneath_the_waves._n
call fcn.004f7660
mov dword [0x727804], 2
jmp 0x47cbb0
cmp word [0x86bad0], 1
jne 0x47cb9c
push str.Your_ship_sinks_beneath_the_waves_and_nyou_are_washed_up_on_a_deserted_island._n
jmp 0x47cba1
push str.Your_ship_sinks_beneath_the_waves__nyou_are_pulled_from_the_water_nby_your_comrades._n
call fcn.004f7660
mov dword [0x727804], 0
mov ecx, dword [0x8ccaa4]
add esp, 4
xor eax, eax
test ecx, ecx
jne 0x47cc00
push str.Play_again__n_Arghh__No._n_OK__Sail_Ho__n
mov esi, 0x8ebf58
call fcn.004f7680
add esp, 4
push 0
push 0
push 0xffffffffffffffff
push 0
push 0
push 0xffffffffffffffff
push 0
push str.sinking.pcx
push 0x134
push 0xae
call fcn.00430160
add esp, 0x28
mov dword [0x8bb9b0], 0
mov ebx, dword [0x85c164]
xor ecx, ecx
cmp eax, 1
sete cl
lea ecx, [ecx + ecx - 1]
mov dword [0x8ccaa0], ecx
mov dword [esp + 0x20], 0
mov esi, 0x8bc3ec
mov edi, dword [esi - 0x14]
test edi, edi
je 0x47cdc3
mov eax, dword [esi + 8]
test eax, eax
jne 0x47cce8
mov edx, dword [esi + 4]
mov eax, dword [esp + 0x20]
imul edx, edx, 0x32
push edx
cdq
mov ecx, 3
idiv ecx
push 0xffffffffffffffff
add edx, ecx
lea eax, [edx + edx*4]
shl eax, 1
cdq
and edx, ecx
add eax, edx
mov edx, dword [esi]
mov ecx, dword [esi - 8]
sar eax, 2
lea ebx, [eax + eax*4]
mov eax, dword [esi - 4]
push edx
mov edx, dword [esi - 0xc]
push eax
push ecx
mov ecx, dword [esi - 0x10]
push edx
mov eax, 0x51eb851f
imul ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cdq
and edx, 3
add eax, edx
mov edx, dword [0x8bb9d0]
sar eax, 2
add eax, edx
push eax
mov eax, 0x51eb851f
imul edi
mov edi, dword [0x8bb9d4]
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cdq
and edx, 3
add eax, edx
sar eax, 2
add eax, edi
push eax
shl ebx, 1
push 0x8cea98
mov edx, ebx
call fcn.004bc2e0
mov ebx, dword [0x85c164]
test bl, 4
jne 0x47cdc3
mov ecx, dword [esi + 4]
inc ecx
mov eax, ecx
mov dword [esi + 4], ecx
cmp eax, 0x28
jmp 0x47cdba
mov eax, dword [esi + 4]
imul eax, eax, 0x32
mov ecx, dword [esi - 4]
mov edx, dword [esi - 8]
mov dword [esp + 0x14], eax
mov eax, dword [esi]
mov dword [esp + 0x1c], eax
mov eax, dword [esi - 0xc]
mov dword [esp + 0x48], eax
mov dword [esp + 0x28], edx
mov dword [esp + 0x2c], ecx
mov ecx, dword [esi - 0x10]
mov eax, 0x51eb851f
imul ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cdq
and edx, 3
add eax, edx
mov edx, dword [0x8bb9d0]
mov ecx, eax
sar ecx, 2
add ecx, edx
mov eax, 0x51eb851f
imul edi
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cdq
and edx, 3
add eax, edx
mov edx, dword [0x8bb9d4]
sar eax, 2
add eax, edx
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x20]
cdq
mov edi, 3
idiv edi
lea eax, [edx + edx*2]
shl eax, 6
add eax, 0x8cf098
je 0x47cda9
mov edx, dword [esp + 0x14]
push edx
mov edx, dword [esp + 0x20]
push 0xffffffffffffffff
push edx
mov edx, dword [esp + 0x38]
push edx
mov edx, dword [esp + 0x38]
push edx
mov edx, dword [esp + 0x5c]
push edx
push ecx
mov ecx, dword [esp + 0x4c]
push ecx
push eax
mov edx, 0xc
mov byte [eax + 0x25], 1
call fcn.004bc2e0
mov ebx, dword [0x85c164]
test bl, 4
jne 0x47cdc3
mov ecx, dword [esi + 4]
inc ecx
mov eax, ecx
mov dword [esi + 4], ecx
cmp eax, 0x32
jle 0x47cdc3
mov dword [esi - 0x14], 0
mov edx, dword [esp + 0x20]
inc edx
add esi, 0x20
cmp esi, 0x8bc66c
mov dword [esp + 0x20], edx
jl 0x47cc25
mov eax, dword [ebp + 0x8be4b4]
test eax, eax
jg 0x47cdf2
mov eax, dword [0x8bb9b0]
test eax, eax
je 0x47ce89
mov edx, dword [ebp + 0x8be468]
imul edx, edx, 0x44
mov eax, dword [edx + 0x725b08]
lea eax, [eax + eax*4]
cdq
mov ecx, dword [ebp + 0x8be470]
and edx, 3
add eax, edx
mov esi, eax
mov eax, dword [ebp + 0x8be474]
sub eax, 0x80000000
push 0
push 0xffffffffffffffff
push 0
push 0
push eax
mov eax, 0x51eb851f
imul ecx
mov ecx, dword [ebp + 0x8be46c]
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cdq
and edx, 3
add eax, edx
mov edx, dword [0x8bb9d0]
sar eax, 2
add eax, edx
push 0xa
push eax
mov eax, 0x51eb851f
imul ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cdq
and edx, 3
add eax, edx
mov edx, dword [0x8bb9d4]
sar eax, 2
add eax, edx
sar esi, 2
push eax
push 0x8ce6d8
mov edx, esi
call fcn.004bc2e0
mov ebx, dword [0x85c164]
mov eax, dword [esp + 0x40]
xor edx, edx
lea eax, [eax + eax*2]
shl eax, 3
mov dword [esp + 0x2c], 0
mov dword [esp + 0x48], edx
mov dword [esp + 0x110], eax
jmp 0x47ceb0
mov ecx, dword [esp + 0x110]
lea esi, [ecx + edx]
lea esi, [esi + esi*4]
shl esi, 3
mov eax, dword [esi + 0x8bc668]
test eax, eax
je 0x47e1f7
mov ecx, dword [esp + 0x18]
mov edi, dword [0x8bb9b8]
mov eax, 1
shl eax, cl
mov ecx, 3
or edi, eax
mov eax, edx
cdq
idiv ecx
mov dword [0x8bb9b8], edi
mov edi, dword [esi + 0x8bc67c]
lea eax, [edx + edx*2]
shl eax, 6
fld dword [eax + 0x8cee84]
mov dword [esp + 0x30], eax
fmul dword [0x7157e4]
call fcn.005f275c
mov ecx, eax
mov eax, 0xae147ae1
imul ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
mov ecx, edi
sub ecx, eax
mov eax, dword [esi + 0x8bc678]
cmp eax, ecx
jle 0x47d108
mov ecx, dword [esi + 0x8bc670]
sub edi, eax
mov eax, 0x30d4
mov ebx, edi
call fcn.004dcac0
mov edi, eax
mov eax, dword [esi + 0x8bc680]
shl eax, 3
cdq
and edx, 7
add eax, edx
sar eax, 3
add edi, eax
mov eax, dword [esi + 0x8bc670]
lea ecx, [eax + 0x40000000]
mov eax, 0x30d4
call fcn.004dcac0
mov ecx, eax
mov eax, dword [esi + 0x8bc684]
shl eax, 3
cdq
and edx, 7
add eax, edx
mov edx, dword [0x72ed74]
sar eax, 3
fld dword [edx + 0x2c]
add ecx, eax
mov dword [esp + 0x28], ecx
call fcn.005f275c
test ebx, ebx
mov dword [esp + 0x1c], eax
jle 0x47d05e
cmp dword [esp + 0x2c], 2
jge 0x47d05e
mov edx, dword [esi + 0x8bc68c]
xor ecx, ecx
mov eax, ebx
imul eax, eax, 0x19
push eax
mov eax, dword [esp + 0x44]
cmp edx, 1
sete cl
imul eax, eax, 0x3c0
lea ecx, [ecx*4 + 4]
imul ecx, ecx, 0x38e38e3
push 0xffffffffffffffff
push 0
mov edx, 0x40000000
sub edx, ecx
mov ecx, dword [eax + 0x8bc670]
push edx
mov edx, dword [esp + 0x2c]
add edx, 0xf
push ecx
push edx
mov eax, 0x51eb851f
imul dword [esp + 0x40]
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cdq
and edx, 3
add eax, edx
mov edx, dword [0x8bb9d0]
sar eax, 2
add eax, edx
push eax
mov ecx, dword [0x8bb9d4]
mov eax, 0x51eb851f
imul edi
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cdq
and edx, 3
add eax, edx
sar eax, 2
add eax, ecx
push eax
push 0x8cf458
mov edx, 1
mov byte [0x8cf47d], 1
call fcn.004bc2e0
inc dword [esp + 0x2c]
mov ecx, dword [ebp + 0x8be468]
imul ebx, ebx, 0x3c
mov eax, 0x38e38e39
imul ecx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
imul eax, eax, 7
add eax, 0x4b
cdq
and edx, 3
add eax, edx
mov edx, dword [esp + 0x40]
imul edx, edx, 0x3c0
mov ecx, eax
mov eax, dword [edx + 0x8bc670]
mov edx, dword [esp + 0x1c]
push ebx
push 0xffffffffffffffff
add edx, 0xf
push 0
push 0
push eax
push edx
mov ebx, dword [0x8bb9d0]
mov eax, 0x51eb851f
imul dword [esp + 0x40]
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cdq
and edx, 3
add eax, edx
sar eax, 2
add eax, ebx
push eax
mov eax, 0x51eb851f
imul edi
mov edi, dword [0x8bb9d4]
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cdq
and edx, 3
add eax, edx
sar eax, 2
add eax, edi
push eax
mov eax, dword [esp + 0x50]
lea edx, [eax + 0x8cee58]
sar ecx, 2
push edx
mov edx, ecx
call fcn.004bc2e0
mov ebx, dword [0x85c164]
mov edx, ebx
and edx, 4
mov dword [esp + 0x1c], edx
jne 0x47d119
dec dword [esi + 0x8bc678]
mov eax, dword [esi + 0x8bc678]
cmp eax, 1
jle 0x47d634
test edx, edx
jne 0x47d186
mov eax, dword [esi + 0x8bc68c]
mov eax, dword [eax*4 + 0x727808]
mov ecx, dword [esi + 0x8bc670]
shl eax, 2
cdq
and edx, 7
add eax, edx
sar eax, 3
call fcn.004dcac0
add dword [esi + 0x8bc668], eax
mov ecx, dword [esi + 0x8bc68c]
mov eax, dword [ecx*4 + 0x727808]
mov ecx, dword [esi + 0x8bc670]
shl eax, 2
cdq
and edx, 7
add eax, edx
sar eax, 3
add ecx, 0x40000000
call fcn.004dcac0
add dword [esi + 0x8bc66c], eax
mov edx, dword [0x72ed74]
fld dword [edx + 0x2c]
call fcn.005f275c
mov ecx, dword [esi + 0x8bc67c]
mov dword [esp + 0x28], eax
xor edx, edx
mov eax, 0x80000000
div ecx
mov edi, ecx
imul edi, edi, 0x64
mov ecx, eax
imul ecx, dword [esi + 0x8bc678]
mov eax, edi
call fcn.004dcac0
cdq
sub eax, edx
sar eax, 1
mov dword [esi + 0x8bc674], eax
mov edi, dword [esi + 0x8bc68c]
cmp edi, 1
jne 0x47d250
add eax, eax
mov dword [esi + 0x8bc674], eax
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x47d1e6
xor edi, edi
jmp 0x47d202
call dword [sym.imp.MSVCR71.dll_rand]
cdq
mov ecx, 0x48
idiv ecx
mov ebx, dword [0x85c164]
mov edi, edx
imul edi, edi, 0x38e38e3
test bl, 4
je 0x47d20b
xor ecx, ecx
jmp 0x47d227
call dword [sym.imp.MSVCR71.dll_rand]
cdq
mov ecx, 0x48
idiv ecx
mov ebx, dword [0x85c164]
mov ecx, edx
imul ecx, ecx, 0x38e38e3
mov eax, dword [esi + 0x8bc68c]
and ebx, 0x40
or ebx, 0x80
push 0
shr ebx, 6
neg eax
push 0xffffffffffffffff
sbb eax, eax
and eax, 0xfa0
push 0
add eax, 0x1770
push edi
jmp 0x47d2a5
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x47d25c
xor ecx, ecx
jmp 0x47d281
mov edi, dword [esi + 0x8bc68c]
call dword [sym.imp.MSVCR71.dll_rand]
cdq
mov ecx, 0x48
idiv ecx
mov ebx, dword [0x85c164]
mov ecx, edx
imul ecx, edi
imul ecx, ecx, 0x38e38e3
and ebx, 0x40
or ebx, 0x80
push 0
shr ebx, 6
mov eax, edi
neg eax
push 0xffffffffffffffff
sbb eax, eax
and eax, 0xbb8
push 0
add eax, 0x1388
push 0
cdq
and edx, 3
add eax, edx
sar eax, 2
cdq
idiv ebx
mov edi, dword [esp + 0x38]
push ecx
mov ecx, dword [esi + 0x8bc674]
mov ebx, eax
mov eax, 0x51eb851f
imul ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
add eax, edi
lea eax, [eax + eax*4]
shl eax, 1
mov ecx, dword [esi + 0x8bc66c]
cdq
and edx, 3
add eax, edx
sar eax, 2
push eax
mov eax, 0x51eb851f
imul ecx
mov ecx, dword [esi + 0x8bc668]
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cdq
and edx, 3
add eax, edx
mov edx, dword [0x8bb9d0]
sar eax, 2
add eax, edx
push eax
mov eax, 0x51eb851f
imul ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cdq
and edx, 3
add eax, edx
mov edx, dword [0x8bb9d4]
sar eax, 2
add eax, edx
push eax
mov eax, dword [esp + 0x58]
lea edx, [eax + eax*2]
mov eax, dword [esp + 0x68]
lea ecx, [eax + edx*8]
mov edx, dword [ecx*4 + 0x8e84e0]
push edx
mov edx, ebx
call fcn.004bc2e0
fld qword [0x8ca4b0]
fmul dword [0x715698]
call fcn.005f275c
mov ecx, dword [esi + 0x8bc674]
push eax
mov eax, dword [esi + 0x8bc68c]
neg eax
sbb eax, eax
and eax, 0x1f4
add eax, 0x1f4
cdq
push 0xffffffffffffffff
and edx, 3
add eax, edx
mov ebx, eax
push 0
push 0
mov eax, 0x51eb851f
sar ebx, 2
imul ecx
push 0
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
add eax, edi
lea eax, [eax + eax*4]
mov ecx, dword [esi + 0x8bc66c]
shl eax, 1
cdq
and edx, 3
add eax, edx
sar eax, 2
push eax
mov eax, 0x51eb851f
imul ecx
mov ecx, dword [esi + 0x8bc668]
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cdq
and edx, 3
add eax, edx
mov edx, dword [0x8bb9d0]
sar eax, 2
add eax, edx
push eax
mov eax, 0x51eb851f
imul ecx
mov ecx, dword [0x8bb9d4]
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cdq
and edx, 3
add eax, edx
sar eax, 2
add eax, ecx
push eax
push 0x8ced98
mov edx, ebx
call fcn.004bc2e0
mov eax, dword [esi + 0x8bc68c]
test eax, eax
jne 0x47d41f
mov ebx, 0x10
jmp 0x47d442
test byte [0x85c164], 4
je 0x47d42f
mov ebx, 4
jmp 0x47d442
call dword [sym.imp.MSVCR71.dll_rand]
cdq
mov ecx, 0xf
idiv ecx
mov ebx, edx
add ebx, 4
mov ecx, dword [esi + 0x8bc66c]
mov eax, 0x51eb851f
imul ecx
mov ecx, dword [esi + 0x8bc668]
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cdq
push 0
push 0xffffffffffffffff
and edx, 3
add eax, edx
mov edx, dword [0x8bb9d0]
push 0
sar eax, 2
add eax, edx
push 0
push 0
add edi, 0xa
push edi
push eax
mov eax, 0x51eb851f
imul ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cdq
and edx, 3
add eax, edx
mov edx, dword [0x8bb9d4]
sar eax, 2
add eax, edx
push eax
push 0x8ce3d8
mov edx, ebx
call fcn.004bc2e0
mov ebx, dword [0x85c164]
test bl, 4
jne 0x47e1f7
mov eax, dword [esi + 0x8bc678]
cmp eax, 0x14
jge 0x47e1f7
test eax, eax
jl 0x47e1f7
mov eax, dword [esp + 0x18]
mov ecx, eax
imul ecx, ecx, 0x12a0
mov edi, 0x8bf724
sub edi, ecx
neg eax
shl eax, 3
mov byte [esp + 0x58], 0
mov byte [esp + 0x59], 1
mov byte [esp + 0x5a], 2
mov byte [esp + 0x5b], 2
mov byte [esp + 0x5c], 3
mov byte [esp + 0x5d], 0xff
mov byte [esp + 0x5e], 0
mov byte [esp + 0x5f], 0
mov byte [esp + 0x60], 0
mov byte [esp + 0x61], 1
mov byte [esp + 0x62], 0xff
mov byte [esp + 0x63], 1
mov byte [esp + 0x64], 1
mov byte [esp + 0x65], 1
mov byte [esp + 0x66], 0
mov dword [esp + 0x28], 0
mov dword [esp + 0x20], 0x8bf730
mov dword [esp + 0x1c], edi
mov dword [esp + 0x30], eax
nop
test byte [edi + 0x48], 2
je 0x47e1b5
mov eax, dword [esi + 0x8bc678]
cdq
sub eax, edx
mov ebx, eax
sar ebx, 1
test ebx, ebx
jle 0x47d57c
call dword [sym.imp.MSVCR71.dll_rand]
cdq
idiv ebx
test edx, edx
jne 0x47e1af
mov edx, dword [esp + 0x30]
mov eax, dword [edx + 0x8e869c]
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x48]
mov ebx, dword [sym.imp.MSVCR71.dll_rand]
lea ecx, [ecx + ecx*2]
lea ecx, [edx + ecx*8]
mov dword [esp + 0x14], ecx
mov ecx, dword [ecx*4 + 0x8e84e0]
push eax
push ecx
call fcn.004c2120
add esp, 8
test al, al
je 0x47e1af
mov eax, dword [esp + 0x18]
test eax, eax
mov byte [esp + 0x37], 1
je 0x47d5fc
call ebx
mov ecx, eax
and ecx, 0x80000003
jns 0x47d5d5
dec ecx
or ecx, 0xfffffffc
inc ecx
mov eax, dword [0x85c158]
mov edx, dword [0x8c09a8]
add edx, eax
cmp edx, ecx
jl case.default.0x47d62d
test byte [0x7273b0], 1
jne 0x47d5fc
cmp eax, 2
jle case.default.0x47d62d
mov eax, dword [0x8bb9b0]
test eax, eax
jne case.default.0x47d62d
call ebx
cdq
mov ecx, 5
idiv ecx
mov eax, dword [esi + 0x8bc68c]
lea ecx, [esp + eax + 0x58]
lea eax, [ecx + eax*4]
movsx eax, byte [eax + edx]
cmp eax, 3
ja case.default.0x47d62d
jmp dword [eax*4 + 0x47fcb8]
cmp eax, 0xffffffcb
jle 0x47e1ed
mov edi, dword [esi + 0x8bc688]
mov ecx, 1
sub ecx, eax
cmp edi, 0xffffffff
mov dword [esp + 0x20], ecx
jne 0x47d92d
mov edx, dword [esp + 0x30]
fld dword [edx + 0x8cf904]
mov edi, ecx
fmul dword [0x715698]
shl edi, 5
call fcn.005f275c
cmp edi, eax
jg 0x47d6ed
mov ecx, dword [esi + 0x8bc66c]
mov eax, 0x51eb851f
imul ecx
mov ecx, dword [esi + 0x8bc668]
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cdq
push edi
push 0xffffffffffffffff
and edx, 3
add eax, edx
mov edx, dword [0x8bb9d0]
sar eax, 2
add eax, edx
push 0
push 0
push 0
push 0xa
push eax
mov eax, 0x51eb851f
imul ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cdq
and edx, 3
add eax, edx
mov edx, dword [0x8bb9d4]
sar eax, 2
add eax, edx
push eax
mov eax, dword [esp + 0x50]
lea ecx, [eax + 0x8cf8d8]
push ecx
mov edx, 0x19
call fcn.004bc2e0
mov ebx, dword [0x85c164]
test bl, 4
jne 0x47d75e
mov eax, dword [esp + 0x20]
cdq
sub eax, edx
mov edx, dword [esi + 0x8bc68c]
sar eax, 1
lea edi, [eax + 1]
mov eax, dword [edx*4 + 0x727808]
shl eax, 2
cdq
and edx, 7
add eax, edx
sar eax, 3
cdq
idiv edi
mov ecx, dword [esi + 0x8bc670]
call fcn.004dcac0
add dword [esi + 0x8bc668], eax
mov eax, dword [esi + 0x8bc68c]
mov eax, dword [eax*4 + 0x727808]
shl eax, 2
cdq
and edx, 7
add eax, edx
sar eax, 3
cdq
idiv edi
mov ecx, dword [esi + 0x8bc670]
add ecx, 0x40000000
call fcn.004dcac0
add dword [esi + 0x8bc66c], eax
mov eax, dword [esp + 0x38]
mov edx, dword [esp + 0x48]
lea ecx, [eax + eax*2]
lea edi, [edx + ecx*8]
and ebx, 0x40
or ebx, 0x80
mov eax, 0x4e2
cdq
shr ebx, 6
idiv ebx
push 0
push 0xffffffffffffffff
push 0
push 0
push 0
mov ebx, eax
mov eax, dword [esi + 0x8bc678]
lea ecx, [eax + eax + 4]
push ecx
mov ecx, dword [esi + 0x8bc66c]
mov eax, 0x51eb851f
imul ecx
mov ecx, dword [esi + 0x8bc668]
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cdq
and edx, 3
add eax, edx
mov edx, dword [0x8bb9d0]
sar eax, 2
add eax, edx
push eax
mov eax, 0x51eb851f
imul ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cdq
and edx, 3
add eax, edx
mov edx, dword [0x8bb9d4]
sar eax, 2
add eax, edx
mov edx, dword [edi*4 + 0x8e84e0]
push eax
push edx
mov edx, ebx
call fcn.004bc2e0
mov eax, dword [esi + 0x8bc678]
neg eax
shl eax, 1
test eax, eax
jge 0x47d80a
xor eax, eax
jmp 0x47d814
cmp eax, 0x50
jle 0x47d814
mov eax, 0x50
mov ecx, 0x50
sub ecx, eax
push 0
push ecx
mov ecx, dword [edi*4 + 0x8e84e0]
call fcn.004c28d0
mov eax, dword [esi + 0x8bc678]
test eax, eax
jne 0x47d4ae
test byte [0x85c164], 4
je 0x47d84b
mov dword [esi + 0x8bc678], 0xffffffff
lea edi, [edi + edi*2]
mov edx, dword [edi*4 + 0x8c940c]
lea edi, [edi*4 + 0x8c9408]
push 0xbf800000
push edx
push edi
call fcn.00488fa0
mov dword [edi + 4], 0xffffffff
mov ecx, dword [esi + 0x8bc668]
mov eax, 0x51eb851f
imul ecx
mov ecx, dword [0x8bb9d4]
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cdq
and edx, 3
add eax, edx
sar eax, 2
add eax, ecx
mov ecx, dword [esi + 0x8bc66c]
mov dword [esp + 0x20], eax
mov eax, 0x51eb851f
imul ecx
fild dword [esp + 0x20]
fstp dword [esp + 0xa4]
mov ecx, dword [0x8bb9d0]
sar edx, 5
add esp, 0xc
mov eax, edx
shr eax, 0x1f
add eax, edx
cdq
push 0xffffffffffffffff
push 0xbf800000
push 0
and edx, 3
add eax, edx
push 0xffffffffffffffff
sar eax, 2
add eax, ecx
mov ecx, dword [esp + 0xa8]
push 0xffffffffffffffff
mov dword [esp + 0x28], eax
push 0xffffffffffffffff
push 0xffffffffffffffff
fild dword [esp + 0x30]
sub esp, 0xc
mov eax, esp
mov dword [eax], ecx
fstp dword [esp + 0xc4]
mov edx, dword [esp + 0xc4]
mov dword [esp + 0xc8], 0x41c80000
mov ecx, dword [esp + 0xc8]
mov dword [eax + 4], edx
push 0x29
mov dword [eax + 8], ecx
call fcn.004889e0
add esp, 0x2c
jmp 0x47d4ae
test byte [esp + 0x48], 1
je 0x47da13
mov eax, dword [esp + 0x18]
shl eax, 2
sub edi, eax
mov ebx, dword [esp + 0x20]
imul edi, edi, 0x4a8
mov eax, dword [edi + 0x8bf708]
imul eax, eax, 0x44
mov eax, dword [eax + 0x725b08]
lea eax, [eax + eax*4]
shl eax, 3
mov ecx, dword [esi + 0x8bc674]
mov edx, ebx
imul edx, edx, 0x63
push edx
cdq
and edx, 3
add eax, edx
mov edi, eax
mov eax, 0x51eb851f
imul ecx
sar edx, 5
mov ecx, dword [esi + 0x8bc66c]
mov eax, edx
shr eax, 0x1f
add eax, edx
cdq
and edx, 3
add eax, edx
sar eax, 2
add eax, 0x32
push 0xffffffffffffffff
push 0
push 0
push 0
push eax
mov eax, 0x51eb851f
imul ecx
mov ecx, dword [esi + 0x8bc668]
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cdq
and edx, 3
add eax, edx
mov edx, dword [0x8bb9d0]
sar eax, 2
add eax, edx
push eax
mov eax, 0x51eb851f
imul ecx
mov ecx, dword [0x8bb9d4]
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cdq
and edx, 3
add eax, edx
sar eax, 2
add eax, ecx
push eax
sar edi, 2
push 0x8ce618
mov edx, edi
call fcn.004bc2e0
cmp ebx, 5
jle 0x47d4ae
mov dword [esi + 0x8bc668], 0
jmp 0x47d4ae
test edx, edx
jne 0x47da7b
mov ecx, dword [esi + 0x8bc68c]
mov eax, dword [ecx*4 + 0x727808]
mov ecx, dword [0x727800]
shl eax, 2
cdq
and edx, 7
add eax, edx
sar eax, 3
cdq
sub eax, edx
sar eax, 1
call fcn.004dcac0
sub dword [esi + 0x8bc668], eax
mov edx, dword [esi + 0x8bc68c]
mov eax, dword [edx*4 + 0x727808]
mov ecx, dword [0x727800]
shl eax, 2
cdq
and edx, 7
add eax, edx
sar eax, 3
cdq
sub eax, edx
sar eax, 1
add ecx, 0x40000000
call fcn.004dcac0
sub dword [esi + 0x8bc66c], eax
mov eax, dword [esp + 0x18]
shl eax, 2
sub edi, eax
imul edi, edi, 0x4a8
mov edi, dword [edi + 0x8bf708]
mov eax, edi
imul eax, eax, 0x44
mov ecx, dword [eax + 0x725b08]
mov eax, 0x38e38e39
imul edi
sar edx, 1
mov eax, edx
shr eax, 0x1f
lea edx, [edx + eax + 3]
add ecx, 3
imul ecx, edx
add ecx, 0x32
mov eax, ecx
cdq
and edx, 3
add eax, edx
mov ecx, eax
mov eax, dword [esi + 0x8bc670]
mov edx, dword [esi + 0x8bc674]
add eax, 0x40000000
mov dword [esp + 0x14], eax
mov eax, 0x51eb851f
imul edx
sar edx, 5
mov eax, edx
shr eax, 0x1f
lea eax, [edx + eax + 0x96]
cdq
and edx, 3
add eax, edx
mov edx, dword [esi + 0x8bc66c]
sar eax, 2
mov dword [esp + 0x1c], eax
mov eax, 0x51eb851f
imul edx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cdq
and edx, 3
add eax, edx
mov edx, dword [0x8bb9d0]
mov edi, eax
sar edi, 2
add edi, edx
mov edx, dword [esi + 0x8bc668]
mov eax, 0x51eb851f
imul edx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cdq
and edx, 3
add eax, edx
mov edx, dword [0x8bb9d4]
sar eax, 2
add eax, edx
mov edx, dword [esp + 0x30]
lea edx, [edx + 0x8cf098]
sar ecx, 2
test edx, edx
je 0x47db8a
mov ebx, dword [esp + 0x20]
imul ebx, ebx, 0x32
push ebx
mov ebx, dword [esp + 0x18]
push 0xffffffffffffffff
push 0
push 0x40000000
push ebx
mov ebx, dword [esp + 0x30]
push ebx
push edi
push eax
mov byte [edx + 0x25], 1
push edx
mov edx, ecx
call fcn.004bc2e0
mov ebx, dword [0x85c164]
cmp dword [esp + 0x20], 0x32
jle 0x47d4b4
mov dword [esi + 0x8bc668], 0
jmp 0x47d4b4
mov eax, dword [edi + 0x48]
mov ecx, dword [edi - 0x1c]
and al, 1
imul ecx, ecx, 0x44
neg al
sbb eax, eax
and eax, 0x32
add eax, 0x32
cdq
idiv dword [ecx + 0x725b08]
mov ebx, eax
test ebx, ebx
jle 0x47dbd1
call dword [sym.imp.MSVCR71.dll_rand]
cdq
idiv ebx
jmp 0x47dbd3
xor edx, edx
mov eax, dword [edi + 0x10]
mov ecx, dword [esp + 0x18]
test ecx, ecx
lea eax, [eax + edx + 1]
mov dword [edi + 0x10], eax
jne 0x47dc03
mov ecx, dword [0x85c158]
test ecx, ecx
jne 0x47dc03
mov ecx, dword [0x8c09a8]
test ecx, ecx
jne 0x47dc03
mov ecx, dword [esp + 0x20]
add eax, 5
mov dword [ecx + 4], eax
mov eax, dword [edi + 0x10]
test eax, eax
jge 0x47dc0e
xor eax, eax
jmp 0x47dc18
cmp eax, 0x64
jle 0x47dc18
mov eax, 0x64
test eax, eax
mov dword [edi + 0x10], eax
jge 0x47dc23
xor eax, eax
jmp 0x47dc2d
cmp eax, 0x64
jle 0x47dc2d
mov eax, 0x64
mov edx, dword [esp + 0x30]
mov ecx, dword [edx + 0x8e869c]
call fcn.004bd130
fld qword [0x8ca4b0]
fcomp dword [0x8c93c0]
mov ebx, dword [esp + 0x18]
fnstsw ax
test ah, 0x41
jne 0x47dc9c
push 0xffffffffffffffff
push 0xbf800000
push 0
push 0xffffffffffffffff
push 0xffffffffffffffff
push 0xffffffffffffffff
lea eax, [ebx + ebx*2]
shl eax, 2
push 0xffffffffffffffff
mov ecx, 0x8eaf1c
sub ecx, eax
mov eax, dword [ecx]
sub esp, 0xc
mov edx, esp
mov dword [edx], eax
mov eax, dword [ecx + 4]
mov ecx, dword [ecx + 8]
mov dword [edx + 4], eax
push 0x2b
mov dword [edx + 8], ecx
call fcn.004889e0
fld qword [0x8ca4b0]
fstp dword [0x8c93c0]
add esp, 0x2c
test ebx, ebx
mov byte [esp + 0x37], 0
je case.default.0x47d62d
mov edx, dword [0x8ca494]
mov dword [0x8ccb70], 0x3f000000
mov dword [0x8ccb74], 0x3f000000
mov dword [0x8ccb78], 0x3dcccccd
mov dword [0x8ccb7c], 0x3dcccccd
mov dword [0x8ccb84], 0x3e8
mov dword [0x8ccb80], edx
jmp 0x47e0c9
test byte [edi + 0x4c], 8
je 0x47dd16
mov ecx, dword [edi]
mov eax, 0x2aaaaaab
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
lea ebx, [edx + eax + 2]
test ebx, ebx
jle 0x47dd28
call dword [sym.imp.MSVCR71.dll_rand]
cdq
idiv ebx
jmp 0x47dd2a
mov eax, dword [edi]
cdq
and edx, 0xf
add eax, edx
mov ebx, eax
sar ebx, 4
add ebx, 3
jmp 0x47dd07
xor edx, edx
mov eax, dword [edi]
sub eax, edx
mov dword [edi], eax
dec eax
cmp eax, 1
mov dword [edi], eax
jge 0x47dd40
mov dword [edi], 1
jmp 0x47dd7f
test eax, eax
je 0x47dd7f
call dword [sym.imp.MSVCR71.dll_rand]
cdq
mov ecx, 3
idiv ecx
test edx, edx
jne 0x47dd7f
mov eax, dword [esi + 0x8bc668]
mov ebx, dword [esp + 0x18]
push edx
push edx
mov edx, dword [esi + 0x8bc66c]
push 0x7d0
push edx
mov ecx, 1
push eax
sub ecx, ebx
push ecx
call fcn.00476e70
add esp, 0x18
mov edx, dword [esp + 0x30]
mov eax, dword [edx + 0x8e869c]
mov ecx, dword [edi]
push eax
mov eax, dword [edi - 0x1c]
call fcn.004785f0
add esp, 4
jmp case.default.0x47d62d
mov eax, dword [0x85c158]
test eax, eax
jne 0x47ddad
mov eax, dword [esp + 0x18]
test eax, eax
jne 0x47de05
mov eax, dword [edi - 4]
test eax, eax
je 0x47ddf9
dec eax
mov dword [edi - 4], eax
jns 0x47ddc1
mov dword [edi - 4], 0
mov eax, dword [edi - 4]
test eax, eax
je 0x47ddf9
call ebx
and eax, 0x80000001
jns 0x47ddd6
dec eax
or eax, 0xfffffffe
inc eax
je 0x47ddf9
mov ecx, dword [esi + 0x8bc66c]
mov edx, dword [esi + 0x8bc668]
push 0
push 0
push 0x7d0
push ecx
push edx
push 2
call fcn.00476e70
add esp, 0x18
mov eax, dword [esp + 0x18]
test eax, eax
je case.default.0x47d62d
mov eax, dword [0x8ca494]
mov dword [0x8ccb70], 0x3f800000
mov dword [0x8ccb74], 0x3f800000
mov dword [0x8ccb78], 0x3f800000
mov dword [0x8ccb7c], 0x3f800000
mov dword [0x8ccb84], 0x1f4
mov dword [0x8ccb80], eax
jmp 0x47e0c9
mov ebx, dword [edi + 0x4c]
mov ecx, dword [edi + 0xc]
mov edx, dword [esp + 0x30]
and bl, 8
neg bl
mov dword [edx + 0x8c93d4], ecx
sbb ebx, ebx
and ebx, 0xffffffce
add ebx, 0x96
test ebx, ebx
jle 0x47de75
call dword [sym.imp.MSVCR71.dll_rand]
cdq
idiv ebx
jmp 0x47de77
xor edx, edx
mov ecx, dword [edi - 0x1c]
imul ecx, ecx, 0x44
mov eax, edx
cdq
idiv dword [ecx + 0x725b08]
mov edx, dword [edi + 0xc]
mov ecx, dword [esp + 0x18]
test ecx, ecx
lea eax, [eax + edx + 1]
mov dword [edi + 0xc], eax
jne 0x47deb7
mov ecx, dword [0x85c158]
test ecx, ecx
jne 0x47deb7
mov ecx, dword [0x8c09a8]
test ecx, ecx
jne 0x47deb7
mov ecx, dword [esp + 0x20]
add eax, 3
mov dword [ecx], eax
jmp 0x47debb
mov ecx, dword [esp + 0x20]
cmp dword [edi + 0xc], 0x4b
jle 0x47dfb8
call dword [sym.imp.MSVCR71.dll_rand]
cdq
mov ecx, 3
idiv ecx
push 0xffffffffffffffff
push 0x64
mov eax, dword [edx*4 + 0x8e86b4]
fld dword [eax + 0x2c]
mov edx, dword [esp + 0x24]
mov ecx, dword [edx - 0x1c]
fmul dword [0x715698]
mov dword [esp + 0x74], eax
mov eax, 0x38e38e39
imul ecx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
imul eax, eax, 7
add eax, 0x4b
cdq
mov ecx, dword [esi + 0x8bc66c]
and edx, 3
add eax, edx
sar eax, 2
mov dword [esp + 0x7c], eax
mov eax, dword [esi + 0x8bc670]
add eax, 0x40000000
mov dword [esp + 0xf4], eax
mov eax, 0x51eb851f
imul ecx
mov ecx, dword [esi + 0x8bc668]
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cdq
and edx, 3
add eax, edx
mov edi, eax
mov eax, dword [0x8bb9d0]
sar edi, 2
add edi, eax
mov eax, 0x51eb851f
imul ecx
mov ecx, dword [0x8bb9d4]
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cdq
and edx, 3
add eax, edx
mov ebx, eax
sar ebx, 2
add ebx, ecx
call fcn.005f275c
mov ecx, dword [esp + 0xf4]
mov edx, dword [esp + 0x74]
push eax
mov eax, dword [esp + 0x80]
push eax
push 0
push 0
push ecx
push 0x14
push edi
push ebx
push 0
push edx
mov edi, 0x7288dc
call fcn.004ab1b0
mov edi, dword [esp + 0x1c]
mov ecx, dword [esp + 0x20]
mov dword [eax + 0x28], 0x3f000000
mov eax, dword [esp + 0x18]
test eax, eax
jne 0x47dfef
cmp dword [ecx], 0x64
jl 0x47dfef
mov eax, dword [ecx - 4]
imul eax, eax, 0x45c
mov ax, word [eax + 0x8162fe]
test ax, ax
jle 0x47dfef
movsx eax, ax
shl eax, 5
cmp dword [eax + 0x85c970], 0x28
jne 0x47dfef
mov dword [ecx], 0x63
mov ecx, dword [esp + 0x30]
mov eax, dword [edi - 0x1c]
mov ebx, dword [ecx + 0x8e869c]
cdq
mov ecx, 9
idiv ecx
mov ecx, dword [ebx + 0xbc]
test edx, edx
setne dl
test ecx, ecx
mov byte [esp + 0x10c], dl
je 0x47e027
mov eax, dword [esp + 0x10c]
push eax
call fcn.004bd3d0
mov byte [ebx + 0x4c], dl
mov eax, dword [edi + 0xc]
test eax, eax
jge 0x47e035
xor eax, eax
jmp 0x47e03f
cmp eax, 0x64
jle 0x47e03f
mov eax, 0x64
mov ecx, dword [esp + 0x30]
mov ecx, dword [ecx + 0x8e869c]
call fcn.004bd190
call dword [sym.imp.MSVCR71.dll_rand]
and eax, 0x80000001
jns 0x47e060
dec eax
or eax, 0xfffffffe
inc eax
je 0x47e083
mov edx, dword [esi + 0x8bc66c]
mov eax, dword [esi + 0x8bc668]
push 0
push 0
push 0x7d0
push edx
push eax
push 4
call fcn.00476e70
add esp, 0x18
mov eax, dword [esp + 0x18]
test eax, eax
je case.default.0x47d62d
mov ecx, dword [0x8ca494]
mov dword [0x8ccb70], 0x3f4ccccd
mov dword [0x8ccb74], 0x3f4ccccd
mov dword [0x8ccb78], 0x3e4ccccd
mov dword [0x8ccb7c], 0x3e4ccccd
mov dword [0x8ccb84], 0x7d0
mov dword [0x8ccb80], ecx
mov byte [0x8ccb88], 1
mov eax, dword [esp + 0x18]
mov edx, dword [0x8e8694]
mov ecx, 1
sub ecx, eax
mov eax, dword [esp + 0x30]
push edx
mov edx, dword [eax + 0x8e869c]
mov eax, dword [esp + 0x2c]
push edx
call fcn.004a6040
mov al, byte [esp + 0x3f]
add esp, 8
test al, al
je 0x47e174
fld qword [0x8ca4b0]
fcomp dword [0x8c93bc]
fnstsw ax
test ah, 0x41
jne 0x47e174
mov ebx, dword [edi + 0x4c]
mov eax, dword [esp + 0x14]
mov eax, dword [eax*4 + 0x8e84e0]
and bl, 8
neg bl
sbb ebx, ebx
and ebx, 0x19
add ebx, 0x28
call fcn.004bb170
push 0xffffffffffffffff
push 0xbf800000
push 0
push 0xffffffffffffffff
push 0xffffffffffffffff
push 0xffffffffffffffff
push 0xffffffffffffffff
add eax, 0x90
mov edx, dword [eax]
sub esp, 0xc
mov ecx, esp
mov dword [ecx], edx
mov edx, dword [eax + 4]
mov eax, dword [eax + 8]
mov dword [ecx + 4], edx
push ebx
mov dword [ecx + 8], eax
call fcn.004889e0
fld qword [0x8ca4b0]
fstp dword [0x8c93bc]
add esp, 0x2c
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x28]
lea ebx, [eax + eax*2]
mov dword [esi + 0x8bc678], 0
lea ebx, [ebx*4 + 0x8c9408]
mov dword [esi + 0x8bc688], ecx
mov edx, dword [ebx + 4]
push 0xbf800000
push edx
push ebx
call fcn.00488fa0
add esp, 0xc
mov dword [ebx + 4], 0xffffffff
mov ebx, dword [0x85c164]
mov eax, dword [esp + 0x28]
mov edx, dword [esp + 0x30]
inc eax
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x20]
add eax, 0x4a8
add edx, 4
add edi, 0x4a8
cmp eax, 0x8c09d0
mov dword [esp + 0x30], edx
mov dword [esp + 0x20], eax
mov dword [esp + 0x1c], edi
jl 0x47d550
jmp 0x47e1f7
mov dword [esi + 0x8bc668], 0
mov edx, dword [esp + 0x48]
inc edx
cmp edx, 0x18
mov dword [esp + 0x48], edx
jl 0x47ceb0
mov eax, dword [ebp + 0x8be490]
mov ecx, 0x64
cmp eax, ecx
jge 0x47e362
cmp dword [ebp + 0x8be494], ecx
jge 0x47e2af
mov eax, dword [esp + 0x18]
test eax, eax
jne 0x47e2af
mov esi, dword [esp + 0x3c]
mov edi, esi
imul edi, edi, 0x4a8
xor eax, eax
mov ax, word [edi + 0x8be4ba]
test ax, ax
je 0x47e2af
test bl, 4
jne 0x47e257
dec eax
mov word [edi + 0x8be4ba], ax
mov al, byte [edi + 0x8be4cc]
mov esi, dword [esi*4 + 0x8e8694]
movsx ecx, word [edi + 0x8be4bc]
test al, 1
movsx eax, word [edi + 0x8be4ba]
jne 0x47e285
imul eax, eax, 0x32
cdq
idiv ecx
mov ecx, 0x64
sub ecx, eax
jmp 0x47e290
imul eax, eax, 0x32
cdq
idiv ecx
mov ecx, eax
add ecx, 0x32
call fcn.004bd230
cmp word [edi + 0x8be4ba], 0
jne 0x47e362
xor dword [edi + 0x8be4cc], 1
jmp 0x47e362
mov eax, dword [ebp + 0x8be4a4]
test eax, eax
je 0x47e340
test bl, 4
jne 0x47e2c9
dec eax
mov dword [ebp + 0x8be4a4], eax
mov eax, dword [ebp + 0x8be4a4]
test eax, eax
jne 0x47e340
mov eax, dword [esp + 0x18]
test eax, eax
jne 0x47e340
push 0xbf800000
push 0xffffffffffffffff
push 0xffffffffffffffff
push 0x4d
or esi, 0xffffffff
xor eax, eax
or ecx, 0xffffffff
call fcn.00488840
mov edx, dword [0x8ca494]
add esp, 0x10
mov dword [0x8ccb70], 0x3f800000
mov dword [0x8ccb74], 0x3f800000
mov dword [0x8ccb78], 0x3f800000
mov dword [0x8ccb7c], 0x3f800000
mov dword [0x8ccb84], 0xc8
mov dword [0x8ccb80], edx
mov byte [0x8ccb88], 1
mov ecx, 0x64
cmp dword [ebp + 0x8be494], ecx
jge 0x47e362
mov eax, dword [esp + 0x18]
test eax, eax
je 0x47e362
mov eax, dword [esp + 0x4c]
movsx ecx, word [ebp + 0x8be4ba]
mov esi, dword [eax]
call fcn.004bd230
mov esi, dword [ebp + 0x8be4b4]
test esi, esi
jle 0x47e4e5
call dword [sym.imp.MSVCR71.dll_rand]
cdq
idiv esi
mov ecx, dword [ebp + 0x8be4b4]
mov eax, 0x55555556
mov esi, edx
imul ecx
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp esi, eax
jg 0x47e4e5
mov eax, dword [esp + 0x40]
imul eax, eax, 0x3c0
lea eax, [eax + 0x8bc670]
dec ecx
mov dword [ebp + 0x8be4b4], ecx
mov ecx, dword [eax]
mov dword [esp + 0x6c], eax
mov dword [esp + 0x14], ecx
mov ecx, dword [ebp + 0x8be46c]
mov eax, 0x51eb851f
imul ecx
mov ecx, dword [ebp + 0x8be470]
sar edx, 5
mov esi, edx
shr esi, 0x1f
add esi, edx
mov eax, 0x51eb851f
imul ecx
sar edx, 5
mov edi, edx
shr edi, 0x1f
add edi, edx
call dword [sym.imp.MSVCR71.dll_rand]
cdq
mov ecx, 0xb
idiv ecx
mov eax, dword [ebp + 0x8be468]
mov ecx, dword [ebp + 0x8be474]
imul eax, eax, 0x44
sub edx, 5
imul edx, dword [eax + 0x725b08]
lea ebx, [edx + edx*4]
shl ebx, 1
mov eax, ebx
call fcn.004dcac0
add esi, eax
mov eax, dword [ebp + 0x8be474]
lea ecx, [eax + 0x40000000]
mov eax, ebx
call fcn.004dcac0
add edi, eax
mov eax, dword [esp + 0x3c]
mov ecx, edi
imul ecx, ecx, 0x64
mov edx, esi
imul edx, edx, 0x64
push ecx
mov ecx, dword [esp + 0x1c]
push edx
push eax
push ecx
call fcn.00477c10
mov edx, dword [ebp + 0x8be468]
mov ecx, dword [0x727848]
imul edx, edx, 0x44
mov eax, dword [edx + 0x725b08]
mov edx, dword [esp + 0x7c]
add esp, 0x10
lea eax, [ecx + eax*2]
mov ecx, dword [esp + 0x14]
push 0x64
lea ebx, [eax + eax*4]
mov eax, dword [edx]
push 0xffffffffffffffff
push 0
sub eax, 0x80000000
push 0x40000000
push eax
shl ebx, 1
push 0x14
add ecx, 0x40000000
mov eax, ebx
call fcn.004dcac0
mov ecx, dword [0x8bb9d0]
add eax, edi
cdq
and edx, 3
add eax, edx
sar eax, 2
add eax, ecx
push eax
mov ecx, dword [esp + 0x30]
mov eax, ebx
call fcn.004dcac0
add eax, esi
mov esi, dword [0x8bb9d4]
cdq
and edx, 3
add eax, edx
sar eax, 2
add eax, esi
push eax
push 0x8ce618
mov edx, 0x46
call fcn.004bc2e0
mov esi, dword [ebp + 0x8be4b4]
test esi, esi
jg 0x47e370
mov edi, dword [esp + 0x3c]
inc edi
cmp edi, 4
mov dword [esp + 0x3c], edi
jl 0x47b470
mov eax, dword [esp + 0x18]
inc eax
cmp eax, 2
mov dword [esp + 0x18], eax
jl 0x47b451
mov ecx, dword [0x8e869c]
mov edx, dword [0x8e8694]
push ecx
push edx
call fcn.004c2120
mov ecx, dword [esp + 0x2c]
add esp, 8
cmp ecx, 0x30d40
mov ecx, dword [0x8bb9b0]
movzx eax, al
jge 0x47e54a
test eax, eax
je 0x47e54a
mov eax, dword [0x8bf724]
test eax, eax
je 0x47e54a
mov eax, dword [0x8be484]
test eax, eax
jne 0x47e552
test ecx, ecx
je 0x47e6ef
cmp dword [0x8bf730], 0x64
jge 0x47e6ef
cmp dword [0x8be490], 0x64
jge 0x47e6ef
test byte [0x85c164], 4
jne 0x47e57c
inc ecx
mov dword [0x8bb9b0], ecx
cmp ecx, 0x1e
jle 0x47e6f9
push 0xbf800000
push 0xffffffffffffffff
push 0xffffffffffffffff
push 0x4b
or esi, 0xffffffff
xor eax, eax
or ecx, 0xffffffff
call fcn.00488840
push str.The_ships_collide_with_a_mighty_crash__n
mov esi, 0x8ebf58
call fcn.004f7660
mov eax, dword [0x8ccaa4]
add esp, 0x14
test eax, eax
je 0x47e604
mov esi, dword [0x8be484]
imul esi, dword [0x8be488]
test esi, esi
jle 0x47e5d6
call dword [sym.imp.MSVCR71.dll_rand]
cdq
idiv esi
mov ecx, edx
jmp 0x47e5d8
xor ecx, ecx
mov eax, dword [0x85c158]
cdq
sub eax, edx
sar eax, 1
add eax, 4
imul eax, dword [0x8bf724]
imul eax, dword [0x8bf728]
cmp ecx, eax
jle 0x47e604
cmp dword [0x8bf768], 4
jne 0x47f882
mov eax, dword [0x8bf768]
cmp eax, 4
jg 0x47f882
mov ecx, dword [0x8ccaa4]
test ecx, ecx
jne 0x47fa25
mov ecx, dword [0x8be484]
push eax
mov eax, dword [0x8bf724]
push eax
push ecx
push str._NUM_Pirates_vs.__NUM__NATIONALITY_crewmen._n
mov esi, 0x8ebf58
call fcn.004f7680
mov edx, dword [0x8be484]
mov eax, dword [0x8bf724]
imul edx, dword [0x8be488]
imul eax, dword [0x8bf728]
add esp, 0x10
cmp edx, eax
jle 0x47e691
push str.After_a_desperate_melee_the_enemy_nship_is_taken.
call fcn.004f7680
add esp, 4
push 0xbf800000
push 0xffffffffffffffff
push 0xffffffffffffffff
push 0x4a
or esi, 0xffffffff
xor eax, eax
or ecx, 0xffffffff
mov dword [0x727804], 3
call fcn.00488840
add esp, 0x10
jmp 0x47e6a8
push str.After_a_desperate_melee_you_are_ncaptured_and_thrown_in_prison._n
call fcn.004f7680
add esp, 4
mov dword [0x727804], 1
push str.Play_again__n_Arghh__No._n_OK__Sail_Ho__n
mov esi, 0x8ebf58
call fcn.004f7680
add esp, 4
push 0
push 0
push 0xffffffffffffffff
push 0
push 0
push 0xffffffffffffffff
push 0
push str.snap
push 0x13a
push 0x11c
call fcn.00430160
add esp, 0x28
dec eax
neg eax
sbb eax, eax
and eax, 0xfffffffe
inc eax
mov dword [0x8ccaa0], eax
jmp 0x47e6f9
mov dword [0x8bb9b0], 0
xor ebp, ebp
mov esi, 0x8bb9f0
mov eax, dword [esi - 0x14]
test eax, eax
je 0x47ecfb
test byte [0x85c164], 4
jne 0x47eb8b
mov eax, dword [esi - 0xc]
xor edi, edi
cmp eax, edi
jle 0x47e787
mov ecx, dword [esi]
add ecx, eax
mov dword [esi - 0xc], ecx
add dword [esi], 0xfffffff6
cmp dword [esi - 0xc], edi
jle 0x47e77a
mov eax, dword [esi - 8]
lea edx, [eax + eax*4]
mov eax, dword [esi - 0x14]
shl edx, 1
add eax, edx
mov dword [esi - 0x14], eax
mov eax, dword [esi - 4]
mov edx, dword [esi - 0x10]
lea eax, [eax + eax*4]
shl eax, 1
add edx, eax
mov dword [esi - 0x10], edx
mov eax, dword [esi - 0x18]
cmp eax, edi
je 0x47e768
cmp eax, 1
je 0x47e768
mov ecx, dword [esi + 0x14]
add dword [esi + 8], ecx
mov edx, dword [esi + 0x10]
add dword [esi + 4], edx
mov eax, dword [esi + 0x18]
mov ecx, dword [esi + 0xc]
cdq
sub eax, edx
sar eax, 1
add ecx, eax
mov dword [esi + 0xc], ecx
jmp 0x47e787
mov dword [esi + 8], edi
mov dword [esi + 4], edi
mov dword [esi - 0xc], 0xfffffffe
cmp dword [esi - 0xc], edi
jge 0x47e931
mov eax, dword [esi]
cmp eax, edi
jge 0x47e7a4
lea eax, [eax + eax*2]
cdq
and edx, 3
add eax, edx
sar eax, 2
jmp 0x47e7a5
inc eax
mov dword [esi], eax
mov eax, dword [esi - 0x18]
cmp eax, 2
je 0x47e7b4
cmp eax, 3
jne 0x47e7c6
mov dword [esi], 0xffffff6a
cmp dword [esi - 0xc], 0xfffff060
jge 0x47e7c6
mov dword [esi - 0x14], edi
mov eax, dword [esi]
add dword [esi - 0xc], eax
js 0x47e7d0
mov dword [esi - 0xc], edi
cmp dword [esi + 0x20], edi
jne 0x47e888
mov ecx, dword [esi - 0x14]
mov eax, 0x51eb851f
imul ecx
mov ecx, dword [0x8bb9d4]
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cdq
and edx, 3
add eax, edx
sar eax, 2
add eax, ecx
mov ecx, dword [esi - 0x10]
mov dword [esp + 0x24], eax
mov eax, 0x51eb851f
imul ecx
fild dword [esp + 0x24]
fstp dword [esp + 0xa8]
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
push 0xffffffffffffffff
cdq
push 0xbf800000
and edx, 3
add eax, edx
mov edx, dword [0x8bb9d0]
push edi
push 0xffffffffffffffff
sar eax, 2
add eax, edx
mov edx, dword [esp + 0xb8]
push 0xffffffffffffffff
push 0xffffffffffffffff
mov dword [esp + 0x3c], eax
push 0xffffffffffffffff
sub esp, 0xc
fild dword [esp + 0x4c]
mov ecx, esp
mov dword [ecx], edx
mov dword [esp + 0xd8], 0x41200000
mov edx, dword [esp + 0xd8]
fstp dword [esp + 0xd4]
mov eax, dword [esp + 0xd4]
mov dword [ecx + 4], eax
push 0x2a
mov dword [ecx + 8], edx
call fcn.004889e0
add esp, 0x2c
mov eax, dword [esi + 0x20]
lea ecx, [eax + 1]
cmp ecx, 0x35
mov dword [esi + 0x20], ecx
jge 0x47e92e
mov eax, ebp
cdq
mov edi, 3
idiv edi
shl ecx, 5
mov ebx, ecx
lea edi, [edx + edx*2]
shl edi, 6
fld dword [edi + 0x8cf904]
fmul dword [0x715698]
call fcn.005f275c
cmp ebx, eax
jg 0x47e92c
mov ecx, dword [esi - 0x10]
mov eax, 0x51eb851f
imul ecx
mov ecx, dword [esi - 0x14]
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cdq
push ebx
push 0xffffffffffffffff
and edx, 3
add eax, edx
mov edx, dword [0x8bb9d0]
sar eax, 2
add eax, edx
push 0
push 0
push 0
push 0xa
push eax
mov ebx, dword [0x8bb9d4]
mov eax, 0x51eb851f
imul ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cdq
and edx, 3
add eax, edx
sar eax, 2
add eax, ebx
push eax
lea eax, [edi + 0x8cf8d8]
push eax
mov edx, 0x19
call fcn.004bc2e0
xor edi, edi
cmp dword [esi - 0xc], edi
jne 0x47eb4e
mov ecx, dword [0x8be470]
xor edx, edx
mov dword [esi + 8], edx
mov dword [esi + 4], edx
mov edi, dword [esi - 0x10]
mov ebx, dword [esi - 0x14]
mov eax, edi
sub eax, ecx
mov ecx, ebx
sub ecx, dword [0x8be46c]
jns 0x47e95b
neg ecx
cmp eax, edx
jge 0x47e961
neg eax
cmp ecx, eax
jle 0x47e96a
lea eax, [eax + ecx*2]
jmp 0x47e96d
lea eax, [ecx + eax*2]
cdq
sub eax, edx
mov ecx, eax
sar ecx, 1
mov eax, 0x51eb851f
imul ecx
sar edx, 5
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
cmp ecx, 0xc8
jge 0x47eb4e
mov eax, dword [esi - 0x18]
test eax, eax
je 0x47e9a1
cmp eax, 1
jne 0x47ea80
mov ecx, dword [0x8bb9d4]
mov eax, 0x51eb851f
imul ebx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cdq
and edx, 3
add eax, edx
sar eax, 2
add eax, ecx
mov dword [esp + 0x24], eax
mov ecx, dword [0x8bb9d0]
mov eax, 0x51eb851f
imul edi
fild dword [esp + 0x24]
fstp dword [esp + 0xb8]
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
push 0xffffffffffffffff
cdq
push 0xbf800000
and edx, 3
add eax, edx
push 0
push 0xffffffffffffffff
sar eax, 2
add eax, ecx
push 0xffffffffffffffff
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0xcc]
push 0xffffffffffffffff
fild dword [esp + 0x3c]
push 0xffffffffffffffff
sub esp, 0xc
mov edx, esp
mov dword [edx], eax
fstp dword [esp + 0xe4]
mov ecx, dword [esp + 0xe4]
mov dword [esp + 0xe8], 0x41200000
mov eax, dword [esp + 0xe8]
mov dword [edx + 4], ecx
push 0x2c
mov dword [edx + 8], eax
call fcn.004889e0
mov ecx, dword [0x8be484]
mov ebx, dword [0x8bb9a0]
mov edx, dword [0x8e86a4]
mov eax, dword [0x8be468]
add esp, 0x2c
inc ecx
inc ebx
push edx
mov dword [0x8be484], ecx
mov dword [esi - 0x14], 0
mov dword [0x8bb9a0], ebx
call fcn.004785f0
add esp, 4
cmp dword [esi - 0x18], 4
jne 0x47eb4e
mov ecx, dword [esi - 0x14]
mov eax, 0x51eb851f
imul ecx
mov ecx, dword [0x8bb9d4]
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cdq
and edx, 3
add eax, edx
sar eax, 2
add eax, ecx
mov ecx, dword [esi - 0x10]
mov dword [esp + 0x24], eax
mov eax, 0x51eb851f
imul ecx
fild dword [esp + 0x24]
fstp dword [esp + 0xc8]
mov ecx, dword [0x8bb9d0]
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cdq
push 0xffffffffffffffff
push 0xbf800000
push 0
and edx, 3
add eax, edx
push 0xffffffffffffffff
sar eax, 2
add eax, ecx
mov ecx, dword [esp + 0xd8]
push 0xffffffffffffffff
mov dword [esp + 0x38], eax
push 0xffffffffffffffff
push 0xffffffffffffffff
fild dword [esp + 0x40]
sub esp, 0xc
mov eax, esp
mov dword [eax], ecx
fstp dword [esp + 0xf4]
mov edx, dword [esp + 0xf4]
mov dword [esp + 0xf8], 0x41200000
mov ecx, dword [esp + 0xf8]
mov dword [eax + 4], edx
push 0x43
mov dword [eax + 8], ecx
call fcn.004889e0
mov eax, dword [0x86bab4]
add esp, 0x2c
add eax, 0x32
mov dword [0x86bab4], eax
mov dword [esi - 0x14], 0
mov eax, dword [esi - 0xc]
test eax, eax
je 0x47eb59
xor eax, eax
jmp 0x47eb5f
mov eax, ebp
and eax, 1
inc eax
mov ecx, dword [ebp*4 + 0x8cca00]
xor edi, edi
call fcn.004bc830
mov ecx, eax
mov eax, dword [esi + 0x1c]
add eax, 0x14
test ecx, ecx
mov dword [esi + 0x1c], eax
je 0x47eb84
cdq
idiv ecx
mov dword [esi + 0x1c], edx
jmp 0x47eb8b
mov dword [esi + 0x1c], 0
mov eax, dword [esi - 0xc]
test eax, eax
je 0x47eb96
xor ebx, ebx
jmp 0x47eb9c
mov ebx, ebp
and ebx, 1
inc ebx
mov ecx, dword [esi - 0x18]
cmp ecx, 4
je 0x47ebde
test ecx, ecx
je 0x47ebde
cmp ecx, 1
je 0x47ebde
cmp ecx, 2
jne 0x47ebde
test eax, eax
jge 0x47ebde
lea ecx, [eax + eax*4]
shl ecx, 4
mov eax, 0x2572fb07
imul ecx
sar edx, 9
mov eax, edx
shr eax, 0x1f
lea ecx, [edx + eax + 0x50]
push 0
push ecx
mov ecx, dword [ebp*4 + 0x8cca00]
call fcn.004c28d0
mov eax, dword [esi - 0x18]
test eax, eax
je 0x47ebea
cmp eax, 1
jne 0x47ebf6
mov eax, dword [esi - 0xc]
test eax, eax
mov edi, 5
jg 0x47ebfb
mov edi, 0xa
mov edx, dword [esi + 0x1c]
mov eax, dword [esi + 4]
mov ecx, dword [esi + 8]
push edx
mov edx, dword [esi + 0xc]
push ebx
push eax
push ecx
mov ecx, dword [esi - 0xc]
push edx
mov eax, 0x51eb851f
imul ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
imul eax, edi
sub eax, 0x14
mov ecx, dword [esi - 0x10]
cdq
and edx, 3
add eax, edx
sar eax, 2
push eax
mov eax, 0x51eb851f
imul ecx
mov ecx, dword [0x8bb9d0]
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cdq
and edx, 3
add eax, edx
sar eax, 2
add eax, ecx
mov ecx, dword [esi - 0x14]
push eax
mov edi, dword [0x8bb9d4]
mov eax, 0x51eb851f
imul ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cdq
and edx, 3
add eax, edx
sar eax, 2
add eax, edi
push eax
mov eax, dword [ebp*4 + 0x8cca00]
push eax
mov edx, 0x1e
call fcn.004bc2e0
cmp dword [esi - 0xc], 0xa
jle 0x47ecfb
mov ecx, dword [esi - 0x10]
mov eax, 0x51eb851f
imul ecx
mov ecx, dword [esi - 0x14]
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cdq
push 0
push 0xffffffffffffffff
and edx, 3
add eax, edx
mov edx, dword [0x8bb9d0]
push 0
sar eax, 2
add eax, edx
push 0
push 0
push 0xa
push eax
mov eax, 0x51eb851f
imul ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cdq
and edx, 3
add eax, edx
mov edx, dword [0x8bb9d4]
sar eax, 2
add eax, edx
push eax
push 0x8ce3d8
mov edx, 0xc
call fcn.004bc2e0
inc ebp
add esi, 0x40
cmp ebp, 0x28
jl 0x47e700
test byte [0x85c164], 4
jne 0x47ee08
mov eax, dword [0x8cc930]
imul eax, dword [0x85c158]
mov ecx, dword [0x7273bc]
add eax, 0x15555540
lea eax, [eax + eax*2]
sub eax, ecx
cdq
and edx, 0x1f
add eax, edx
sar eax, 5
add ecx, eax
test byte [0x8cc9fc], 0x1f
mov dword [0x7273bc], ecx
jne 0x47edfc
mov ecx, dword [0x8cc934]
mov eax, dword [0x8cc930]
imul ecx, ecx, 0x2d82d
mov esi, dword [sym.imp.MSVCR71.dll_rand]
add eax, ecx
mov dword [0x8cc930], eax
call esi
cdq
mov ecx, 0xb
idiv ecx
mov ecx, dword [0x8cc930]
mov eax, 0xb40000b5
mov edi, edx
imul ecx
add edx, ecx
mov ecx, dword [0x8cc934]
sar edx, 0x17
mov eax, edx
shr eax, 0x1f
add eax, edx
cdq
and edx, 3
add eax, edx
mov ebx, eax
mov eax, ecx
cdq
and edx, 0xf
add eax, edx
sar eax, 4
neg eax
sar ebx, 2
sub eax, ebx
add eax, ecx
lea edx, [eax + edi - 5]
mov dword [0x8cc934], edx
call esi
and eax, 0x80000003
jns 0x47edcc
dec eax
or eax, 0xfffffffc
inc eax
jne 0x47edfc
call esi
cdq
mov ecx, 3
idiv ecx
mov eax, dword [0x85c0f8]
lea eax, [edx + eax - 1]
cmp eax, 4
jge 0x47eded
mov eax, 4
jmp 0x47edf7
cmp eax, 0x14
jle 0x47edf7
mov eax, 0x14
mov dword [0x85c0f8], eax
mov ecx, dword [0x7273bc]
mov dword [0x727800], ecx
xor ebx, ebx
mov edi, 2
nop
mov edx, dword [0x8ccba8]
mov esi, str.Battle
mov dword [0x8ca4dc], edx
call fcn.0042e410
mov ebp, eax
cmp ebp, 0x2c8
jl 0x47eeda
cmp ebp, 0x2d4
jg 0x47eeda
lea eax, [ebp - 0x2c8]
cmp eax, 8
ja case.default.0x47ee4b
jmp dword [eax*4 + 0x47fcc8]
mov ebp, 0x124
jmp case.default.0x47ee4b
mov ebp, 0x126
jmp case.default.0x47ee4b
mov ebp, 0x121
jmp case.default.0x47ee4b
mov ebp, 0x125
jmp case.default.0x47ee4b
mov ebp, 0x10c
jmp case.default.0x47ee4b
mov ebp, 0x127
jmp case.default.0x47ee4b
mov ebp, 0x123
jmp case.default.0x47ee4b
mov ebp, 0x128
jmp case.default.0x47ee4b
mov ebp, 0x122
mov dword [0x86e35c], ebx
cmp ebp, 0x2f
jne 0x47eeb1
mov edx, dword [0x8be4cc]
and dl, 1
neg dl
sbb edx, edx
and edx, edi
add edx, 0x126
mov ebp, edx
cmp ebp, 0x72
jg 0x47f1f7
je case.0x47f21e.290
lea eax, [ebp - 0xd]
cmp eax, 0x64
ja case.0x47f21e.119
movzx eax, byte [eax + 0x47fd18]
jmp dword [eax*4 + 0x47fcec]
cmp dword [0x86e35c], 1
jne 0x47efa4
mov eax, dword [0x727828]
cmp eax, 0xffffffff
je 0x47ef0c
cmp eax, 0xa
jne 0x47ee95
mov eax, dword [0x8be4cc]
and al, 1
neg al
sbb eax, eax
and eax, edi
add eax, 0x126
mov ebp, eax
jmp 0x47ee95
mov eax, dword [0x86e358]
lea ecx, [esp + 0xd4]
push ecx
mov ecx, dword [0x86e354]
lea edx, [esp + 0xc8]
push edx
push eax
push ecx
xor edi, edi
call fcn.004aed80
add esp, 0x10
test al, al
je 0x47ef9f
mov esi, dword [esp + 0xd4]
mov eax, 0x51eb851f
imul dword [0x8be470]
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cdq
and edx, 3
add eax, edx
sar eax, 2
sub esi, eax
mov ecx, dword [0x8bb9d0]
mov eax, 0x51eb851f
imul dword [0x8be46c]
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cdq
sub esi, ecx
mov ecx, dword [esp + 0xc4]
and edx, 3
add eax, edx
sar eax, 2
sub ecx, eax
sub ecx, dword [0x8bb9d4]
mov eax, esi
call fcn.004dcb20
mov dword [0x8be4a0], eax
mov edi, 2
cmp dword [0x86e35c], edi
jne 0x47ee95
mov ebp, 0x20
jmp 0x47eec0
mov eax, dword [0x85c0fc]
inc eax
cmp eax, 0xa
mov dword [0x85c0fc], eax
jle case.0x47f21e.119
mov dword [0x85c0fc], 0xa
jmp case.0x47f21e.119
mov eax, dword [0x85c0fc]
dec eax
cmp eax, 0xfffffff3
mov dword [0x85c0fc], eax
jge case.0x47f21e.119
mov dword [0x85c0fc], 0xfffffff3
jmp case.0x47f21e.119
mov al, byte [0x7283bb]
test al, al
sete cl
mov byte [0x7283bb], cl
jmp case.0x47f21e.119
test byte [0x85c164], 4
jne case.0x47f21e.119
mov eax, dword [0x8be4b0]
cmp eax, ebx
mov cl, byte [0x8be4d0]
jne 0x47f043
test cl, 0x10
jne 0x47f090
cmp eax, ebx
jne 0x47f043
test cl, 0x20
jne 0x47f428
cmp eax, 1
jne 0x47f055
test cl, 0x20
jne 0x47f428
cmp eax, eax
je 0x47f0c3
cmp eax, edi
jmp 0x47f0c1
test byte [0x85c164], 4
jne case.0x47f21e.119
mov eax, dword [0x8be4b0]
cmp eax, ebx
mov cl, byte [0x8be4d0]
jne 0x47f087
test cl, 0x20
jne 0x47f428
cmp eax, ebx
jne 0x47f087
test cl, 0x10
jne 0x47f090
cmp eax, edi
jne 0x47f0be
test cl, 0x10
je 0x47f0ba
mov dword [0x8be4b0], 1
push 0xbf800000
push 0xffffffffffffffff
push 0xffffffffffffffff
push 0x51
or esi, 0xffffffff
xor eax, eax
or ecx, 0xffffffff
call fcn.00488840
add esp, 0x10
jmp case.0x47f21e.119
cmp eax, edi
je 0x47f0c3
cmp eax, 1
jne case.0x47f21e.119
push 0xbf800000
push 0xffffffffffffffff
push 0xffffffffffffffff
mov dword [0x8be4b0], ebx
push 0x50
jmp 0x47f0a5
mov ecx, dword [0x8ccbe8]
push 1
push 0
push 0
push 9
call fcn.004b2890
xor ebx, ebx
mov edi, 0x8e86a4
xor esi, esi
mov ecx, dword [edi]
test ecx, ecx
je 0x47f116
lea eax, [ebx + esi]
imul eax, eax, 0x4a8
push ecx
mov ecx, dword [eax + 0x8be484]
mov eax, dword [eax + 0x8be468]
call fcn.004785f0
add esp, 4
inc esi
add edi, 4
cmp esi, 2
jl 0x47f0f2
add ebx, 4
cmp edi, 0x8e86b4
jl 0x47f0f0
xor ebx, ebx
mov edi, 2
cmp ebp, ebx
je 0x47f141
cmp dword [0x8ccaa0], ebx
je 0x47ee10
mov edx, dword [0x8e8694]
mov eax, dword [0x8be478]
push edx
push eax
call fcn.004a56a0
mov al, byte [0x85c164]
add esp, 8
test al, 4
je 0x47f16c
push 0xff000000
call fcn.004b0230
add esp, 4
push 1
lea ecx, [esp + 0x130]
push ecx
lea edx, [esp + 0x3f]
push edx
lea eax, [esp + 0x7f]
push eax
call fcn.00463c30
mov eax, dword [0x727804]
add esp, 0x10
cmp eax, 0xffffffff
jne 0x47f19d
push ebx
push ebx
push ebx
call fcn.004d1a40
add esp, 0xc
mov edi, dword [esp + 0xd8]
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
mov esi, dword [sym.imp.WINMM.dll_timeGetTime]
test byte [0x8ef61c], 1
jne 0x47f1c7
or dword [0x8ef61c], 1
call esi
mov dword [0x8ef618], eax
call esi
mov edx, dword [0x8ef618]
mov ecx, eax
mov eax, dword [0x85c164]
sub ecx, edx
mov edx, eax
and dl, 0x20
sub ecx, edi
neg dl
sbb edx, edx
and edx, 0x45
add edx, 0x1f
cmp ecx, edx
jge 0x47f6e2
push 2
call ebx
jmp 0x47f1b0
cmp ebp, 0x123
jg 0x47f43e
je case.0x47eed3.103
lea eax, [ebp - 0x76]
cmp eax, 0xac
ja case.0x47f21e.119
movzx edx, byte [eax + 0x47fd94]
jmp dword [edx*4 + 0x47fd80]
test byte [0x85c164], 4
jne case.0x47f21e.119
cmp dword [0x8be4ac], ebx
je case.0x47f21e.119
cmp dword [0x8be490], 0x64
jge case.0x47f21e.119
cmp dword [0x8be4b0], 3
je case.0x47f21e.119
push 0xffffffffffffffff
push 0xffffffffffffffff
push ebx
push ebx
call fcn.00477c10
mov eax, dword [0x8ca494]
add esp, 0x10
mov dword [0x8ccb70], 0x3f800000
mov dword [0x8ccb74], 0x3f800000
mov dword [0x8ccb78], 0x3ecccccd
mov dword [0x8ccb7c], 0x3ecccccd
mov dword [0x8ccb84], 0x258
mov dword [0x8ccb80], eax
mov byte [0x8ccb88], 1
jmp case.0x47f21e.119
test byte [0x85c164], 4
jne case.0x47f21e.119
cmp dword [0x8be4b0], ebx
je case.0x47f21e.119
jmp 0x47f0c3
mov eax, dword [0x85c164]
test al, 4
jne case.0x47f21e.119
cmp dword [0x8bb9b0], ebx
jne case.0x47f21e.119
mov ecx, dword [0x8be474]
xor eax, 0x40
mov dword [0x85c164], eax
test al, 0x40
mov eax, dword [0x8ebfd8]
mov dword [0x8bb9c0], ecx
mov dword [0x8bb9b0], ebx
mov dword [0x85c0fc], ebx
mov dword [0x8bb9bc], ebx
je 0x47f328
push 0x46c35000
push 0x437a0000
call fcn.00412840
jmp case.0x47f21e.119
push 0x47c35000
push 0x447a0000
call fcn.00412840
jmp case.0x47f21e.119
mov eax, dword [0x85c164]
xor eax, 4
sub esp, 0x64
test al, 4
mov dword [0x85c164], eax
mov esi, 0x8cccd0
mov ebx, esp
je 0x47f3b2
lea eax, [esp + 0x1a4]
mov dword [esp + 0x204], esi
mov dword [esp + 0x1a4], 0x31
mov dword [esp + 0x1ac], 1
call fcn.00498530
mov edi, 0x8e87b4
call fcn.004a1410
mov eax, dword [esp + 0x1a0]
add eax, 0xfffffff8
je 0x47f3a6
cmp eax, 0x8cccc8
je 0x47f3a6
push eax
call sub.MSVCR71.dll_void___cdecl_operator_delete___void__
add esp, 4
mov dword [esp + 0x1a0], esi
jmp 0x47f12a
lea eax, [esp + 0x20c]
mov dword [esp + 0x26c], esi
mov dword [esp + 0x20c], 0x32
call fcn.00498530
mov edi, 0x8e87b4
call fcn.004a1410
mov eax, dword [esp + 0x208]
add eax, 0xfffffff8
je 0x47f3f6
cmp eax, 0x8cccc8
je 0x47f3f6
push eax
call sub.MSVCR71.dll_void___cdecl_operator_delete___void__
add esp, 4
mov dword [esp + 0x208], esi
jmp 0x47f12a
test byte [0x85c164], 4
jne case.0x47f21e.119
test byte [0x8be4d0], 0x20
je case.0x47f21e.119
cmp dword [0x8be4b0], edi
je case.0x47f21e.119
push 0xbf800000
push 0xffffffffffffffff
push 0xffffffffffffffff
mov dword [0x8be4b0], edi
push 0x52
jmp 0x47f0a5
cmp ebp, 0x128
jg 0x47f6ba
je 0x47f5a0
mov eax, ebp
sub eax, 0x124
je case.0x47eed3.99
sub eax, edi
jne case.0x47f21e.119
test byte [0x85c164], 4
jne 0x47f135
test byte [0x8be4cc], 1
jne 0x47f135
cmp word [0x8be4ba], bx
jne 0x47f135
mov ecx, dword [0x8bb9d4]
mov eax, 0x51eb851f
imul dword [0x8be46c]
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cdq
and edx, 3
add eax, edx
sar eax, 2
add eax, ecx
mov dword [esp + 0x24], eax
mov eax, 0x51eb851f
imul dword [0x8be470]
fild dword [esp + 0x24]
fstp dword [esp + 0xf0]
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cdq
and edx, 3
add eax, edx
mov edx, dword [0x8bb9d0]
sar eax, 2
add eax, edx
mov edx, dword [0x72ed74]
mov dword [esp + 0x24], eax
fild dword [esp + 0x24]
fstp dword [esp + 0xf4]
fld dword [edx + 0x2c]
call fcn.005f275c
mov ecx, dword [esp + 0xf0]
mov edx, dword [esp + 0xf4]
push 0xffffffffffffffff
push 0xbf800000
push ebx
push 0xffffffffffffffff
push 0xffffffffffffffff
push 0xffffffffffffffff
mov dword [esp + 0x3c], eax
fild dword [esp + 0x3c]
push 0xffffffffffffffff
sub esp, 0xc
mov eax, esp
mov dword [eax], ecx
fstp dword [esp + 0x120]
mov ecx, dword [esp + 0x120]
mov dword [eax + 4], edx
push 0x35
mov dword [eax + 8], ecx
call fcn.004889e0
mov edx, dword [0x8be468]
imul edx, edx, 0x44
mov eax, dword [edx + 0x725b08]
add esp, 0x2c
imul eax, eax, 0x3e8
jmp 0x47f69f
test byte [0x85c164], 4
jne case.0x47f21e.119
test byte [0x8be4d0], 0x10
je case.0x47f21e.119
mov ecx, dword [0x8be4b0]
mov eax, 1
cmp ecx, eax
je case.0x47f21e.119
mov dword [0x8be4b0], eax
jmp 0x47f09a
test byte [0x85c164], 4
jne 0x47f135
test byte [0x8be4cc], 1
je 0x47f135
cmp word [0x8be4ba], bx
jne 0x47f135
mov ecx, dword [0x8bb9d4]
mov eax, 0x51eb851f
imul dword [0x8be46c]
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cdq
and edx, 3
add eax, edx
sar eax, 2
add eax, ecx
mov dword [esp + 0x24], eax
mov eax, 0x51eb851f
imul dword [0x8be470]
fild dword [esp + 0x24]
fstp dword [esp + 0x100]
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cdq
and edx, 3
add eax, edx
mov edx, dword [0x8bb9d0]
sar eax, 2
add eax, edx
mov edx, dword [0x72ed74]
mov dword [esp + 0x24], eax
fild dword [esp + 0x24]
fstp dword [esp + 0x104]
fld dword [edx + 0x2c]
call fcn.005f275c
mov ecx, dword [esp + 0x100]
mov edx, dword [esp + 0x104]
push 0xffffffffffffffff
push 0xbf800000
push ebx
push 0xffffffffffffffff
push 0xffffffffffffffff
push 0xffffffffffffffff
mov dword [esp + 0x3c], eax
fild dword [esp + 0x3c]
push 0xffffffffffffffff
sub esp, 0xc
mov eax, esp
mov dword [eax], ecx
fstp dword [esp + 0x130]
mov ecx, dword [esp + 0x130]
mov dword [eax + 4], edx
push 0x36
mov dword [eax + 8], ecx
call fcn.004889e0
mov edx, dword [0x8be468]
imul edx, edx, 0x44
mov eax, dword [edx + 0x725b08]
add esp, 0x2c
imul eax, eax, 0xfa
mov ecx, dword [0x8be484]
cdq
inc ecx
idiv ecx
mov word [0x8be4bc], ax
mov word [0x8be4ba], ax
jmp 0x47f135
mov eax, ebp
sub eax, 0x2d2
je 0x47f6d6
dec eax
jne case.0x47f21e.119
mov byte [0x7283bb], 1
jmp 0x47f135
mov byte [0x7283bb], 0
jmp 0x47f135
test al, 4
jne 0x47f6fe
mov ecx, dword [0x8cc9fc]
mov eax, dword [0x8bb9a8]
inc ecx
inc eax
mov dword [0x8cc9fc], ecx
mov dword [0x8bb9a8], eax
mov eax, dword [0x8cc9fc]
cdq
and edx, 3
add eax, edx
sar eax, 2
add eax, 0x4b0
cdq
mov ecx, 0x960
idiv ecx
push edx
mov dword [0x7273b8], edx
call fcn.004ae1f0
mov eax, dword [0x8ccaa0]
mov ecx, dword [0x8ccaa4]
mov edx, dword [0x727804]
add esp, 4
cmp eax, 1
jne 0x47f747
test ecx, ecx
je 0x47f76a
cmp edx, 0xffffffff
je 0x47f76a
cmp ebp, 0x1b
je 0x47f7b4
cmp eax, 0xffffffff
je 0x47f7b4
test ecx, ecx
je 0x47f75a
cmp edx, 0xffffffff
jne 0x47f7b4
mov al, byte [0x8ccc27]
test al, al
jne 0x47f7b4
xor ebx, ebx
jmp 0x47ad27
mov ecx, dword [0x72ed74]
push 0
call fcn.004e5e80
call fcn.00480c30
mov eax, dword [esp + 0x44]
test eax, eax
je 0x47a280
dec dword [eax + 4]
jne 0x47a280
mov ecx, eax
mov edx, dword [ecx]
push 1
call dword [edx]
jmp 0x47a280
mov dword [0x8ccaa0], 0
mov ecx, dword [0x8ccaa4]
mov edx, dword [0x727804]
test ecx, ecx
je 0x47f80e
cmp edx, 2
jne 0x47f80e
mov eax, dword [0x7277fc]
imul eax, eax, 0x45c
cmp word [eax + 0x81631e], 0xa
lea esi, [eax + 0x81631e]
jl 0x47f80e
call fcn.004a51d0
call fcn.00404810
mov ecx, 6
sub ecx, eax
movsx eax, word [esi]
cdq
idiv ecx
mov esi, 0x8ebf58
add eax, 5
push eax
push str.You_manage_to_rescue__NUM_seamen_from_the_water._Would_you_like_to_add_them_to_your_crew__n_Welcome_aboard_lads._n_Weve_got_enough_men._n
call fcn.004f7660
push 0
push 0x20
call fcn.00487950
add esp, 0x10
call fcn.00480c30
mov ecx, dword [0x72ed74]
push 0
mov dword [0x7277f8], 0xffffffff
mov word [0x86e330], 0
call fcn.004e5e80
mov ecx, dword [0x8ebfe8]
push 1
push 0
call fcn.00535550
mov ecx, dword [esp + 0x44]
test ecx, ecx
mov esi, dword [0x8ccaa0]
je 0x47f85b
dec dword [ecx + 4]
jne 0x47f85b
mov edx, dword [ecx]
push 1
call dword [edx]
mov eax, dword [esp + 0x50]
push eax
call dword [sym.imp.USER32.dll_SetCursor]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x200
ret
mov dword [0x8ccaa0], 3
jmp 0x47f7a8
push str.The_demoralized_crew_quickly_surrenders.
mov esi, 0x8ebf58
call fcn.004f7680
mov ebx, dword [0x8bf72c]
mov edi, ebx
imul edi, edi, 0x45c
movsx ecx, word [edi + 0x816328]
mov eax, 0x10624dd3
imul ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
add esp, 4
sub eax, 0
je 0x47f8d0
dec eax
je 0x47f8c9
push str.A_kings_ransom_in_gold_and_plunder_is_yours_for_the_taking__n
jmp 0x47f8d5
push str.A_healthy_haul_of_gold_and_plunder_is_yours_for_the_taking__n
jmp 0x47f8d5
push str.A_modest_pile_of_gold_and_plunder_is_yours_for_the_taking__n
call fcn.004f7680
add esp, 4
push 0
push 0x28
call fcn.00487950
mov esi, 4
add esp, 8
cmp word [edi + 0x8162fc], si
jge 0x47f933
cmp ebx, 0xffffffff
jne 0x47f900
xor al, al
jmp 0x47f91e
movsx ecx, word [edi + 0x816328]
mov eax, 0x10624dd3
imul ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, 2
setge al
mov ecx, dword [0x8bf768]
movzx edx, al
push 0
push ecx
add edx, 0xe
push edx
jmp 0x47f9c2
cmp ebx, 0xffffffff
je 0x47f98e
movsx ecx, word [edi + 0x816328]
mov eax, 0x10624dd3
imul ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, 2
jl 0x47f98e
mov eax, dword [0x8ccbd4]
cmp eax, 0x3e8
jl 0x47f971
cmp eax, 0x5dc
jge 0x47f978
xor eax, eax
mov eax, 3
jmp 0x47f9bd
cmp eax, 0x5dc
jl 0x47f984
cmp eax, 0x7ee
mov eax, 1
jl 0x47f989
mov eax, 2
add eax, 3
jmp 0x47f9bd
mov eax, dword [0x8ccbd4]
cmp eax, 0x3e8
jl 0x47f9a5
cmp eax, 0x5dc
jge 0x47f9ac
xor eax, eax
jmp 0x47f9bd
cmp eax, 0x5dc
jl 0x47f9b8
cmp eax, 0x7ee
mov eax, 1
jl 0x47f9bd
mov eax, 2
push 0
push 0xffffffffffffffff
push eax
call fcn.004852e0
mov eax, dword [0x85c268]
add esp, 0xc
push 0
push 0
push 0xffffffffffffffff
cdq
push 0
push fcn.00486200
push 0xffffffffffffffff
and edx, 0xf
add eax, edx
sar eax, 4
push 0
push 0x6f7896
push eax
mov eax, dword [0x85c26c]
cdq
and edx, 0xf
add eax, edx
sar eax, 4
push eax
mov dword [0x8ccc44], 0xbf000000
call fcn.00430160
add esp, 0x28
call fcn.00486710
mov dword [0x727804], esi
call fcn.00480c30
jmp 0x47fba4
call fcn.00480c30
mov eax, dword [0x8bf768]
cmp eax, 5
ja case.default.0x47fa34
jmp dword [eax*4 + 0x47fe44]
push str.Spaniards
jmp 0x47fa63
push str.Englishmen
jmp 0x47fa63
push str.Frenchmen
jmp 0x47fa63
push str.Dutchmen
jmp 0x47fa63
push str.Buccaneers
jmp 0x47fa63
push str.Indians
mov esi, 0x8ebf58
call fcn.004f7660
add esp, 4
mov eax, dword [0x8bf72c]
imul eax, eax, 0x45c
mov ecx, dword [eax + 0x816350]
or edi, 0xffffffff
test ch, 0x40
je 0x47fb76
movsx edi, word [eax + 0x816330]
mov ecx, edi
imul ecx, ecx, 0x1c
movsx eax, word [ecx + 0x864000]
test eax, eax
jle 0x47faf4
lea eax, [eax + eax*8]
shl eax, 2
movsx edx, word [eax + 0x863b82]
mov eax, dword [eax + 0x863b88]
sub esp, 0xc
cmp eax, 0x28
mov dword [0x72587c], edx
mov esi, 0x8ebf58
jl 0x47fb27
lea eax, [eax + eax*2 - 0x78]
lea ecx, [eax*4 + 0x8cd178]
mov eax, dword [ecx]
mov edx, esp
mov dword [edx], eax
mov eax, dword [ecx + 4]
mov ecx, dword [ecx + 8]
mov dword [edx + 4], eax
mov dword [edx + 8], ecx
push str._EVILNAMEs_crew
call fcn.004f7660
add esp, 0x10
mov esi, 1
cmp word [0x86bad0], si
jle 0x47fbcf
cmp edi, 0xffffffff
jne 0x47fbcf
call dword [sym.imp.MSVCR71.dll_rand]
and eax, 0x80000001
jns 0x47fb21
dec eax
or eax, 0xfffffffe
inc eax
inc eax
jmp 0x47fbd1
cmp eax, 0x1e
jl 0x47fb50
lea edx, [eax + eax*2 - 0x5a]
lea eax, [edx*4 + 0x8cd19c]
mov edx, dword [eax]
mov ecx, esp
mov dword [ecx], edx
mov edx, dword [eax + 4]
mov eax, dword [eax + 8]
mov dword [ecx + 4], edx
mov dword [ecx + 8], eax
push str.Mr.__NPCNAMEs_crew
jmp 0x47faec
lea ecx, [edi + edi*2]
lea edx, [ecx*4 + 0x8cd100]
mov ecx, dword [edx]
mov eax, esp
mov dword [eax], ecx
mov ecx, dword [edx + 4]
mov edx, dword [edx + 8]
mov dword [eax + 4], ecx
mov dword [eax + 8], edx
push str._TOP10s_crew
jmp 0x47faec
mov ax, word [eax + 0x8162fe]
test ax, ax
jle 0x47faf4
movsx eax, ax
shl eax, 5
mov ecx, dword [eax + 0x85c98c]
test ecx, ecx
jle 0x47faf4
mov dword [0x727804], 3
mov ecx, dword [esp + 0x44]
test ecx, ecx
je 0x47fbb7
dec dword [ecx + 4]
jne 0x47fbb7
mov edx, dword [ecx]
push 1
call dword [edx]
mov eax, dword [esp + 0x50]
push eax
call dword [sym.imp.USER32.dll_SetCursor]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x200
ret
xor eax, eax
mov ecx, dword [0x7277fc]
mov edx, dword [0x8bf768]
push 0
push 0
push ecx
mov ecx, dword [0x8bf728]
push edi
push edx
mov edx, dword [0x8bf724]
inc ecx
push ecx
mov ecx, dword [0x8be488]
push edx
mov edx, dword [0x8be484]
push ecx
push edx
lea ecx, [esp + 0x154]
push ecx
mov ecx, eax
call fcn.0041b1d0
mov edx, dword [eax]
mov ecx, dword [eax + 4]
mov eax, dword [eax + 8]
add esp, 0x28
cmp edx, esi
mov dword [0x8be484], ecx
mov dword [0x8bf724], eax
jne 0x47fc36
mov dword [0x727804], 3
jmp 0x47fc53
cmp word [0x86bad0], si
jle 0x47fc4d
cmp ecx, esi
mov dword [0x727804], 0
jg 0x47fc53
mov dword [0x727804], esi
mov ecx, dword [esp + 0x44]
test ecx, ecx
je 0x47fc65
dec dword [ecx + 4]
jne 0x47fc65
mov edx, dword [ecx]
push esi
call dword [edx]
mov eax, dword [esp + 0x50]
push eax
call dword [sym.imp.USER32.dll_SetCursor]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x200
ret