Function at 0x478690
Capabilities:
Inspect section memory permissions

Disassembly:
mov ecx, dword [0x85c158]
mov edx, dword [esp + 8]
mov eax, dword [esp + 4]
sub esp, 0x74
push ebx
push ebp
push esi
xor esi, esi
cmp ecx, esi
push edi
je 0x4786c4
lea ecx, [edx + eax*4]
imul ecx, ecx, 0x4a8
cmp dword [ecx + 0x8be4c8], 4
mov byte [0x727839], 1
je 0x4786cb
mov byte [0x727839], 0
lea ecx, [eax*4]
mov ebp, ecx
imul ebp, ebp, 0xfffffb58
mov edi, dword [ebp + 0x8bf734]
mov eax, 0x64
sub eax, edi
lea edi, [ecx + edx]
mov dword [esp + 0x38], edi
imul edi, edi, 0x4a8
mov edx, dword [edi + 0x8be494]
mov dword [esp + 0x2c], ecx
mov ecx, 0x64
sub ecx, edx
lea edx, [ecx + ecx*2]
lea ebx, [eax + eax]
cmp edx, ebx
mov dword [esp + 0x28], esi
mov dword [esp + 0x1c], ebp
jge 0x47871f
mov dword [esp + 0x28], 0xffffffff
add ecx, ecx
lea edx, [eax + eax*2]
cmp edx, ecx
jge 0x478730
mov dword [esp + 0x28], 1
mov ecx, dword [ebp + 0x8bf728]
mov eax, dword [edi + 0x8be484]
mov edx, dword [edi + 0x8be488]
mov dword [esp + 0x20], esi
imul edx, eax
mov esi, dword [ebp + 0x8bf724]
imul ecx, esi
lea ebx, [ecx + ecx]
cmp edx, ebx
jle 0x478761
mov dword [esp + 0x20], 1
add edx, edx
cmp ecx, edx
jle 0x47876f
mov dword [esp + 0x20], 0xffffffff
mov ecx, dword [edi + 0x8be4c8]
cmp ecx, 4
jne 0x478782
mov dword [esp + 0x20], 1
cmp ecx, 5
jl 0x47878f
mov dword [esp + 0x20], 0xffffffff
mov ebx, dword [edi + 0x8be480]
cdq
sub eax, edx
sar eax, 1
test ebx, ebx
mov dword [esp + 0x24], 0
jge 0x4787a8
xor ebx, ebx
cmp ebx, eax
jle 0x4787ae
mov ebx, eax
mov ecx, dword [ebp + 0x8bf720]
mov eax, esi
cdq
sub eax, edx
sar eax, 1
test ecx, ecx
jge 0x4787c1
xor ecx, ecx
cmp ecx, eax
jle 0x4787c7
mov ecx, eax
lea eax, [ecx + ecx*2]
lea edx, [ebx + ebx]
cmp edx, eax
jle 0x4787d9
mov dword [esp + 0x24], 1
lea eax, [ecx + ecx]
lea ecx, [ebx + ebx*2]
cmp eax, ecx
jle 0x4787eb
mov dword [esp + 0x24], 0xffffffff
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x20]
lea eax, [edx + ecx*2]
add eax, ecx
mov ecx, dword [esp + 0x24]
lea edx, [ecx + eax*2]
movsx esi, byte [eax + edx + 0x727839]
cmp esi, 3
mov dword [esp + 0x14], esi
jne 0x478821
cmp dword [edi + 0x8be4c8], 4
jne 0x478838
xor esi, esi
mov dword [esp + 0x14], esi
jmp 0x478825
test esi, esi
jne 0x478838
mov eax, dword [edi + 0x8be480]
test eax, eax
jne 0x478838
mov esi, 2
mov dword [esp + 0x14], esi
mov eax, dword [ebp + 0x8bf710]
mov ecx, dword [edi + 0x8be470]
mov ebx, dword [ebp + 0x8bf70c]
mov edx, dword [edi + 0x8be46c]
mov dword [esp + 0x34], eax
sub eax, ecx
mov ecx, ebx
sub ecx, edx
jns 0x47885e
neg ecx
test eax, eax
jge 0x478864
neg eax
cmp ecx, eax
jle 0x47886d
lea eax, [eax + ecx*2]
jmp 0x478870
lea eax, [ecx + eax*2]
mov ecx, dword [esp + 0x24]
cdq
sub eax, edx
sar eax, 1
mov dword [esp + 0x18], eax
or eax, 0xffffffff
cmp ecx, eax
jne 0x4788b0
cmp dword [esp + 0x20], eax
jne 0x4788b0
mov eax, dword [esp + 0x28]
test eax, eax
jne 0x4788b0
mov eax, dword [edi + 0x8be478]
cmp eax, dword [ebp + 0x8bf718]
jge 0x4788b0
mov eax, dword [edi + 0x8be480]
test eax, eax
je 0x4788b0
xor esi, esi
mov dword [esp + 0x14], esi
cmp dword [edi + 0x8be494], 0x64
jl 0x4788c2
mov esi, 3
mov dword [esp + 0x14], esi
test byte [0x85c164], 0x20
mov dword [edi + 0x8be4b0], 0
je 0x478988
cmp esi, 4
ja case.default.0x4788e2
jmp dword [esi*4 + 0x479f60]
push str._Fire
mov esi, 0x8ebf58
call fcn.004f7680
mov ecx, dword [ebp + 0x8bf730]
mov eax, dword [ebp + 0x8bf734]
xor edx, edx
add esp, 4
cmp ecx, eax
setle dl
mov dword [edi + 0x8be4b0], edx
jmp case.default.0x4788e2
push str._Flee
jmp 0x478958
push str._Board
mov esi, 0x8ebf58
call fcn.004f7680
mov dword [edi + 0x8be4b0], 2
jmp 0x47896c
push str._Strike
mov esi, 0x8ebf58
call fcn.004f7680
mov dword [edi + 0x8be4b0], 2
jmp 0x47896c
push str._Escort
mov esi, 0x8ebf58
call fcn.004f7680
mov dword [edi + 0x8be4b0], 1
add esp, 4
mov eax, dword [edi + 0x8be498]
push eax
push str._NUM
mov esi, 0x8ebf58
call fcn.004f7680
add esp, 8
mov ecx, dword [edi + 0x8be4b0]
mov eax, dword [ecx*4 + 0x727808]
mov ecx, dword [esp + 0x1c]
shl eax, 2
cdq
and edx, 7
add eax, edx
mov esi, eax
mov eax, dword [ecx + 0x8bf718]
imul eax, dword [esp + 0x18]
cdq
sar esi, 3
idiv esi
mov ebp, dword [ecx + 0x8bf714]
lea ecx, [ebp + 0x40000000]
cdq
and edx, 7
add eax, edx
sar eax, 3
lea esi, [eax + eax*4]
shl esi, 1
mov eax, esi
call fcn.004dcac0
mov ecx, dword [edi + 0x8be470]
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x34]
sub eax, ecx
mov ecx, dword [esp + 0x30]
add ecx, eax
mov dword [esp + 0x34], ecx
mov eax, esi
mov ecx, ebp
call fcn.004dcac0
mov esi, dword [edi + 0x8be46c]
mov ecx, eax
mov eax, dword [esp + 0x34]
sub ebx, esi
add ecx, ebx
call fcn.004dcb20
mov ebp, eax
mov eax, dword [edi + 0x8be474]
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], ebp
sub ebp, eax
mov eax, ebp
cdq
mov esi, eax
xor esi, edx
sub esi, edx
mov eax, 0x40000000
sub eax, esi
cdq
mov ecx, eax
mov eax, dword [edi + 0x8be4a4]
xor ecx, edx
sub ecx, edx
xor edx, edx
cmp ecx, 0xe38e38e
setle dl
test eax, eax
mov byte [esp + 0x13], 0
mov dword [esp + 0x30], edx
jne 0x478a9e
mov eax, dword [esp + 0x38]
imul eax, eax, 0x3c0
mov edx, dword [eax + 0x8bc668]
test edx, edx
jne 0x478a9e
mov eax, dword [edi + 0x8be480]
test eax, eax
je 0x478a9e
mov eax, dword [edi + 0x8be484]
test eax, eax
je 0x478a9e
mov ebx, dword [edi + 0x8be488]
mov eax, 0x15555555
inc ebx
cdq
idiv ebx
cmp ecx, eax
jge 0x478a9e
cmp dword [edi + 0x8be490], 0x64
jge 0x478a9e
mov byte [esp + 0x13], 1
or dword [edi + 0x8be4cc], 1
mov ecx, dword [esp + 0x14]
cmp ecx, 2
jne 0x478acc
cmp dword [esp + 0x18], 0xfa0
jge 0x478ad1
mov eax, dword [esp + 0x1c]
mov edx, dword [eax + 0x8bf718]
cmp edx, dword [edi + 0x8be478]
jle 0x478ad1
jmp 0x478adc
cmp ecx, 3
jne 0x478ae2
mov eax, dword [esp + 0x8c]
test eax, eax
je 0x478ae2
xor ecx, ecx
mov dword [esp + 0x14], ecx
mov eax, dword [edi + 0x8be484]
test eax, eax
jne 0x478af3
mov ecx, 3
jmp 0x478b4d
test ecx, ecx
jne 0x478b51
mov eax, dword [esp + 0x1c]
mov edx, dword [edi + 0x8be490]
cmp edx, dword [eax + 0x8bf730]
jge 0x478b51
mov edx, dword [edi + 0x8be4d0]
mov eax, dword [eax + 0x8bf720]
shr edx, 6
mov ebx, dword [edi + 0x8be480]
and edx, 1
shl edx, 4
add eax, 4
imul eax, dword [edx + 0x7277d4]
imul eax, eax, 0x186a0
add ebx, 4
cdq
idiv ebx
cmp dword [esp + 0x18], eax
jle 0x478b51
mov eax, dword [esp + 0x30]
test eax, eax
jne 0x478b51
mov ecx, 1
mov dword [esp + 0x14], ecx
mov edx, dword [esp + 0x8c]
xor eax, eax
cmp edx, eax
je 0x478b7c
cmp ecx, 1
je 0x478b7c
mov edx, dword [edi + 0x8be468]
imul edx, edx, 0x44
cmp dword [edx + 0x725b10], eax
je 0x478b7c
xor ecx, ecx
mov dword [esp + 0x14], ecx
jmp switch.0x00478b85
cmp ecx, 4
ja case.default.0x478b85
jmp dword [ecx*4 + 0x479f74]
mov ecx, dword [esp + 0x1c]
mov ebx, dword [ecx + 0x8bf730]
add ebx, 0xa
cmp ebx, eax
jle 0x478bac
call dword [sym.imp.MSVCR71.dll_rand]
cdq
idiv ebx
mov dword [esp + 0x34], edx
jmp 0x478bb0
mov dword [esp + 0x34], eax
mov edx, dword [esp + 0x1c]
mov ebx, dword [edx + 0x8bf734]
add ebx, 0xa
test ebx, ebx
jle 0x478bcc
call dword [sym.imp.MSVCR71.dll_rand]
cdq
idiv ebx
jmp 0x478bce
xor edx, edx
mov ecx, dword [esp + 0x34]
xor eax, eax
cmp ecx, edx
setle al
mov dword [edi + 0x8be4b0], eax
jmp 0x478c28
mov dword [edi + 0x8be4b0], 2
jmp case.default.0x478b85
mov dword [edi + 0x8be4b0], 1
jmp case.default.0x478b85
mov ecx, dword [esp + 0x88]
mov edx, dword [esp + 0x8c]
mov dword [edi + 0x8be4b0], eax
push 0xffffffffffffffff
lea eax, [edx + ecx*2]
mov ecx, dword [eax*4 + 0x8e8694]
push str.surrender
call fcn.004bd020
mov byte [esp + 0x13], 0
mov ecx, dword [esp + 0x14]
cmp dword [edi + 0x8be4b0], 1
jne 0x478c4c
mov edx, dword [esp + 0x1c]
cmp dword [edx + 0x8bf734], 0x64
jl 0x478c4c
mov dword [edi + 0x8be4b0], 2
mov eax, dword [edi + 0x8be4d0]
mov ebx, dword [edi + 0x8be4b0]
mov edx, eax
shr edx, 6
and edx, 1
lea edx, [ebx + edx*4]
mov ebx, dword [edx*4 + 0x7277d4]
mov edx, dword [esp + 0x18]
imul ebx, ebx, 0x186a0
cmp edx, ebx
jle 0x478c82
mov dword [edi + 0x8be4b0], 0
cmp dword [edi + 0x8be4b0], 2
jne 0x478c99
test al, 0x20
jne 0x478c99
mov dword [edi + 0x8be4b0], 1
cmp dword [edi + 0x8be4b0], 1
jne 0x478cb0
test al, 0x10
jne 0x478cb0
mov dword [edi + 0x8be4b0], 0
cmp edx, dword [0x8bb9c4]
jge 0x478cbe
mov dword [0x8bb9c4], edx
test ecx, ecx
je 0x478ccb
cmp ecx, 3
jne 0x478d83
test ebp, ebp
mov ebp, dword [esp + 0x24]
jle 0x478cdb
add ebp, 0xc0000000
jmp 0x478ce1
add ebp, 0x40000000
mov ebx, dword [edi + 0x8be478]
cmp ebx, 0x64
mov dword [esp + 0x20], ebp
jge 0x478d4c
mov eax, dword [edi + 0x8be468]
mov ecx, dword [0x727800]
push eax
mov eax, ebp
call fcn.004773b0
add esp, 4
test eax, eax
jle 0x478d42
cmp ebx, 0x64
jge 0x478d4c
cmp esi, 0x40000000
jle 0x478d4c
mov ecx, dword [edi + 0x8be474]
mov eax, ebp
sub eax, ecx
cdq
sub eax, edx
sar eax, 1
add eax, ecx
mov ecx, dword [edi + 0x8be468]
push ecx
mov ecx, dword [0x727800]
call fcn.004773b0
add esp, 4
test eax, eax
jg 0x478d4c
sub ebp, 0x80000000
mov dword [esp + 0x20], ebp
mov eax, 0x51eb851f
imul dword [esp + 0x18]
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, 0x1770
jle 0x478d78
mov edx, dword [esp + 0x28]
xor ecx, ecx
test edx, edx
setl cl
inc ecx
mov dword [esp + 0x14], ecx
jmp 0x478d7f
and dword [edi + 0x8be4cc], 0xfffffffe
mov ecx, dword [esp + 0x14]
test ecx, ecx
jne 0x478e1d
test byte [0x8bb9b8], 1
je 0x478dd5
mov eax, dword [esp + 0x1c]
mov edx, dword [edi + 0x8be480]
cmp edx, dword [eax + 0x8bf720]
jle 0x478dd5
cmp dword [edi + 0x8be4a4], 0x1e
jle 0x478dd5
cmp dword [edi + 0x8be494], 0x32
jge 0x478dd5
mov eax, dword [0x727800]
mov ebp, dword [esp + 0x24]
sub eax, ebp
cdq
xor eax, edx
sub eax, edx
cmp eax, 0x20000000
jge 0x478dd5
mov ecx, ebp
mov dword [esp + 0x20], ecx
mov eax, dword [0x727804]
mov ebx, 5
cmp eax, ebx
je 0x4792c5
cmp dword [edi + 0x8be490], 0x64
jge 0x4792c5
mov ebp, dword [0x7273b8]
mov eax, 0x4b0
sub eax, ebp
cdq
xor eax, edx
sub eax, edx
lea esi, [eax - 0x1f4]
mov ecx, esi
test ecx, ecx
jge 0x4791c5
xor ecx, ecx
jmp 0x4791d2
cmp ecx, 1
jne 0x478e2c
mov edx, dword [esp + 0x24]
mov dword [esp + 0x20], edx
jmp 0x478dd5
cmp ecx, 2
je 0x478e36
cmp ecx, 3
jne 0x478dd5
mov eax, dword [0x8bb9b8]
test eax, eax
jne 0x478dd5
mov esi, dword [0x727800]
mov edx, dword [esp + 0x24]
add edx, 0x80000000
mov eax, esi
sub eax, edx
mov ecx, edx
mov dword [esp + 0x20], edx
cdq
xor eax, edx
sub eax, edx
sub ecx, esi
cmp eax, 0x40000000
jge 0x478ea9
mov eax, dword [esp + 0x1c]
mov edx, dword [eax + 0x8bf708]
mov eax, dword [edi + 0x8be468]
imul edx, edx, 0x44
mov ebx, dword [edx + 0x725b08]
imul eax, eax, 0x44
mov eax, dword [eax + 0x725b08]
cmp eax, ebx
jle 0x478ea9
test ecx, ecx
jle 0x478e98
mov eax, 1
jmp 0x478ea0
xor eax, eax
test ecx, ecx
setge al
dec eax
shl eax, 0x1e
add eax, esi
mov dword [esp + 0x20], eax
mov eax, 0x51eb851f
imul dword [esp + 0x18]
mov eax, dword [esp + 0x8c]
sar edx, 5
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
cmp ecx, 0x5dc
mov dword [esp + 0x38], ecx
jge 0x4790c3
test eax, eax
jne 0x478dd5
mov ebp, dword [esp + 0x2c]
imul ebp, ebp, 0x4a8
cmp dword [ebp + 0x8be490], 0x64
jge 0x4790cb
push 0xbf800000
push 0xffffffffffffffff
push 0xffffffffffffffff
push 0x4a
or esi, 0xffffffff
xor eax, eax
or ecx, 0xffffffff
call fcn.00488840
push str.As_your_ship_approaches__the_enemy_strikes_her_colors.
mov esi, 0x8ebf58
call fcn.004f7660
mov ebx, dword [ebp + 0x8be48c]
mov dword [esp + 0x48], ebx
imul ebx, ebx, 0x45c
movsx ecx, word [ebx + 0x816328]
mov eax, 0x10624dd3
imul ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
add esp, 0x14
sub eax, 0
je 0x478f5a
dec eax
je 0x478f53
push str.A_wealth_in_gold_and_plunder_is_yours_for_the_taking__n
jmp 0x478f5f
push str.A_pretty_pile_of_gold_and_plunder_is_yours_for_the_taking__n
jmp 0x478f5f
push str.A_shiny_stack_of_gold_and_plunder_is_yours_for_the_taking__n
call fcn.004f7680
add esp, 4
push 0
push 0x20
call fcn.00487950
mov eax, dword [0x8ccaa4]
add esp, 8
test eax, eax
jne 0x478fb7
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.plunder.pcx
push 0x36
push 0xb2
call fcn.00430160
add esp, 0x28
mov esi, eax
jmp 0x4790a2
cmp word [ebx + 0x8162fc], 4
mov eax, dword [esp + 0x34]
jge 0x478fdc
mov ecx, dword [ebp + 0x8be4c8]
push 0
push ecx
call fcn.004b0280
movzx edx, al
add edx, 0xe
push edx
jmp 0x47904d
call fcn.004b0280
test al, al
mov eax, dword [0x8ccbd4]
je 0x47901e
cmp eax, 0x3e8
jl 0x479001
cmp eax, 0x5dc
jge 0x479008
xor eax, eax
mov eax, 3
jmp 0x479048
cmp eax, 0x5dc
jl 0x479014
cmp eax, 0x7ee
mov eax, 1
jl 0x479019
mov eax, 2
add eax, 3
jmp 0x479048
cmp eax, 0x3e8
jl 0x479030
cmp eax, 0x5dc
jge 0x479037
xor eax, eax
jmp 0x479048
cmp eax, 0x5dc
jl 0x479043
cmp eax, 0x7ee
mov eax, 1
jl 0x479048
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
mov esi, eax
call fcn.00486710
mov ecx, dword [esp + 0x38]
xor eax, eax
cmp esi, 1
sete al
mov dword [0x727804], 4
lea eax, [eax + eax - 1]
mov dword [0x8ccaa0], eax
jmp 0x4790cb
test eax, eax
jne 0x478dd5
mov esi, dword [esp + 0x2c]
imul esi, esi, 0x4a8
cmp dword [esi + 0x8be490], 0x64
jge 0x478dd5
mov edx, dword [0x7273b8]
mov eax, 0x4b0
sub eax, edx
cdq
xor eax, edx
sub eax, edx
sub eax, 0x1f4
jns 0x4790ff
xor eax, eax
jmp 0x47910b
cmp eax, 0x3e8
jle 0x47910b
mov eax, 0x3e8
mov ebx, dword [esi + 0x8be910]
mov esi, dword [0x8bb9a8]
xor edx, edx
cmp ebx, 0xffffffff
setne dl
add esi, eax
shl esi, 1
dec edx
and edx, 0xffffd8f8
add edx, 0x2710
sub edx, esi
cmp ecx, edx
jle 0x478dd5
push str.As_the_range_increases_the_enemy_ship_slips_away_into_the_gathering_dusk._n
mov esi, 0x8ebf58
call fcn.004f7660
add esp, 4
push 0
push 0x20
call fcn.00487950
mov eax, dword [0x8ccaa4]
add esp, 8
test eax, eax
jne 0x47916e
push str.Play_again__n_Arghh__No._n_OK__Sail_Ho__n
call fcn.004f7680
add esp, 4
mov eax, dword [0x85c268]
push 0
push 0
cdq
push 0xffffffffffffffff
push 0
push 0
and edx, 7
add eax, edx
push 0xffffffffffffffff
sar eax, 3
inc eax
push 0
push str.snap
push eax
mov eax, dword [0x85c26c]
cdq
and edx, 3
add eax, edx
sar eax, 2
push eax
call fcn.00430160
add esp, 0x28
dec eax
neg eax
sbb eax, eax
and eax, 0xfffffffe
inc eax
mov dword [0x8ccaa0], eax
mov dword [0x727804], 5
jmp 0x4792d4
cmp ecx, 0x3e8
jle 0x4791d2
mov ecx, 0x3e8
mov eax, 0x51eb851f
imul dword [esp + 0x18]
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
mov edx, dword [0x8bb9a8]
mov ebp, 0x1388
sub ebp, edx
sub ebp, ecx
shl ebp, 1
cmp eax, ebp
jle 0x4792c5
mov ecx, dword [esp + 0x8c]
test ecx, ecx
jne 0x479456
mov ecx, dword [0x8bb9b8]
test ecx, ecx
je 0x479241
mov ecx, esi
test ecx, ecx
jge 0x479221
xor ecx, ecx
jmp 0x47922e
cmp ecx, 0x3e8
jle 0x47922e
mov ecx, 0x3e8
mov esi, 0x157c
sub esi, edx
sub esi, ecx
shl esi, 1
cmp eax, esi
jle 0x4792d4
push str.As_the_range_increases_your_ship_slips_away_into_the_gathering_dusk._n
mov esi, 0x8ebf58
call fcn.004f7660
add esp, 4
push 0
push 0x20
call fcn.00487950
mov eax, dword [0x8ccaa4]
add esp, 8
test eax, eax
jne 0x479275
push str.Play_again__n_Arghh__No._n_OK__Sail_Ho__n
call fcn.004f7680
add esp, 4
mov eax, dword [0x85c268]
push 0
push 0
cdq
push 0xffffffffffffffff
push 0
push 0
and edx, 7
add eax, edx
push 0xffffffffffffffff
sar eax, 3
inc eax
push 0
push str.snap
push eax
mov eax, dword [0x85c26c]
cdq
and edx, 3
add eax, edx
sar eax, 2
push eax
call fcn.00430160
add esp, 0x28
dec eax
neg eax
sbb eax, eax
and eax, 0xfffffffe
inc eax
mov dword [0x8ccaa0], eax
mov dword [0x727804], ebx
jmp 0x4792d4
mov eax, dword [esp + 0x8c]
test eax, eax
jne 0x479456
mov esi, dword [esp + 0x2c]
imul esi, esi, 0x4a8
test byte [esi + 0x8be974], 2
je 0x479a91
cmp dword [esp + 0x18], 0x30d40
jle 0x479a91
mov eax, dword [esi + 0x8be4c8]
cmp eax, dword [esi + 0x8be970]
jne 0x479a91
cmp dword [esp + 0x18], 0xc3500
jl 0x479323
mov eax, dword [esi + 0x8be4a4]
test eax, eax
je 0x479a91
mov ecx, dword [esi + 0x8be468]
imul ecx, ecx, 0x44
mov eax, dword [ecx + 0x725b10]
test eax, eax
jne 0x479a91
mov edx, dword [esp + 0x88]
imul edx, edx, 0x4a8
mov eax, dword [edx + 0x8be910]
imul eax, eax, 0x44
mov ecx, dword [eax + 0x725b10]
test ecx, ecx
je 0x479a91
mov ecx, dword [esp + 0x1c]
mov eax, dword [ecx + 0x8bf710]
mov ecx, dword [ecx + 0x8bf70c]
mov edx, dword [esi + 0x8be914]
sub eax, dword [esi + 0x8be918]
sub ecx, edx
call fcn.004dcb20
mov ebx, dword [esp + 0x18]
add ebx, 0x186a0
mov dword [esp + 0x34], eax
mov eax, ebx
jns 0x479397
xor eax, eax
jmp 0x4793a3
cmp eax, 0xf4240
jle 0x4793a3
mov eax, 0xf4240
mov ecx, dword [esp + 0x34]
mov ebp, dword [esi + 0x8be46c]
call fcn.004dcac0
sub ebp, eax
mov eax, ebx
test eax, eax
jge 0x4793be
xor eax, eax
jmp 0x4793ca
cmp eax, 0xf4240
jle 0x4793ca
mov eax, 0xf4240
mov ecx, dword [esp + 0x34]
mov ebx, dword [esi + 0x8be474]
add ecx, 0x40000000
call fcn.004dcac0
mov dword [esp + 0x38], eax
lea ecx, [ebx + 0x40000000]
mov eax, 0x186a0
call fcn.004dcac0
mov ecx, dword [esi + 0x8be474]
mov ebx, eax
mov eax, dword [esp + 0x38]
sub ebx, eax
mov eax, 0x186a0
call fcn.004dcac0
mov ecx, eax
sub ebp, dword [esi + 0x8be46c]
add ecx, ebp
mov eax, ebx
call fcn.004dcb20
mov ecx, dword [esi + 0x8be474]
mov dword [esp + 0x20], eax
sub eax, ecx
cdq
xor eax, edx
sub eax, edx
cmp eax, 0x15555555
mov eax, dword [esi + 0x8be4cc]
jge 0x479448
or eax, 1
mov dword [esi + 0x8be4cc], eax
jmp 0x479a91
and eax, 0xfffffffe
mov dword [esi + 0x8be4cc], eax
jmp 0x479a91
mov ecx, dword [edi + 0x8be468]
imul ecx, ecx, 0x44
mov eax, dword [ecx + 0x725b10]
test eax, eax
jne 0x479484
cmp dword [esp + 0x18], 0xc350
jge 0x479a91
cmp dword [edi + 0x8be490], 0x64
jge 0x479a91
mov esi, dword [esp + 0x88]
mov edx, dword [esp + 0x1c]
imul esi, esi, 0x12a0
mov ebp, dword [edx + 0x8bf710]
mov ecx, dword [esi + 0x8be470]
mov ebx, dword [edx + 0x8bf70c]
mov eax, ebp
sub eax, ecx
mov ecx, dword [esi + 0x8be46c]
mov edx, ebx
sub edx, ecx
jns 0x4794b9
neg edx
test eax, eax
jge 0x4794bf
neg eax
cmp edx, eax
jle 0x4794c8
lea eax, [eax + edx*2]
jmp 0x4794cb
lea eax, [edx + eax*2]
cdq
sub eax, edx
sar eax, 1
cmp eax, 0x61a80
jl 0x4794e1
cmp eax, dword [esp + 0x18]
jge 0x479575
mov edx, dword [edi + 0x8be4c8]
cmp edx, dword [esi + 0x8be4c8]
jne 0x479575
test byte [esi + 0x8be4cc], 2
je 0x479575
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
mov ecx, dword [ecx + 0x8bf714]
cdq
sub eax, edx
sar eax, 1
add ecx, 0x40000000
mov dword [esp + 0x38], eax
call fcn.004dcac0
sub ebp, dword [edi + 0x8be470]
mov edx, dword [esp + 0x1c]
mov ecx, dword [edx + 0x8bf714]
add eax, ebp
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x38]
call fcn.004dcac0
mov ebp, dword [edi + 0x8be46c]
mov ecx, eax
mov eax, dword [esp + 0x34]
sub ebx, ebp
add ecx, ebx
call fcn.004dcb20
mov ecx, dword [edi + 0x8be474]
mov dword [esp + 0x20], eax
sub eax, ecx
cdq
xor eax, edx
sub eax, edx
cmp eax, 0x15555555
mov eax, dword [edi + 0x8be4cc]
jge 0x4795c8
or eax, 1
jmp 0x4795cb
cmp dword [esp + 0x14], 1
je 0x4795d1
mov eax, dword [edi + 0x8be4a4]
test eax, eax
je 0x4795d1
mov eax, dword [esi + 0x8be470]
add eax, ebp
cdq
sub eax, edx
mov edx, dword [edi + 0x8be470]
mov ebp, eax
lea eax, [ebx + ecx]
sar ebp, 1
sub ebp, edx
cdq
sub eax, edx
mov edx, dword [edi + 0x8be46c]
mov ecx, eax
sar ecx, 1
sub ecx, edx
mov eax, ebp
call fcn.004dcb20
mov dword [esp + 0x20], eax
mov eax, dword [edi + 0x8be4cc]
mov dword [esp + 0x14], 4
and eax, 0xfffffffe
mov dword [edi + 0x8be4cc], eax
test byte [esi + 0x8be4cc], 2
je 0x479657
mov ecx, dword [esi + 0x8be46c]
mov eax, dword [edi + 0x8be46c]
mov esi, dword [esi + 0x8be470]
mov ebp, dword [edi + 0x8be470]
sub ecx, eax
sub esi, ebp
test ecx, ecx
mov eax, esi
mov edx, ecx
jge 0x479600
neg edx
test esi, esi
jge 0x479608
mov eax, esi
neg eax
cmp edx, eax
jle 0x479611
lea eax, [eax + edx*2]
jmp 0x479614
lea eax, [edx + eax*2]
cdq
sub eax, edx
sar eax, 1
cmp eax, 0x30d40
jge 0x479657
mov ebx, dword [edi + 0x8be474]
mov eax, esi
call fcn.004dcb20
mov ecx, eax
sub ecx, ebx
mov eax, ecx
cdq
xor eax, edx
sub eax, edx
cmp eax, 0x20000000
jge 0x479657
xor eax, eax
test ecx, ecx
setge al
dec eax
and eax, 0x40000000
add eax, 0xe0000000
add eax, ebx
mov dword [esp + 0x20], eax
cmp dword [esp + 0x18], 0xc350
jge 0x479a91
mov ecx, dword [edi + 0x8be490]
mov eax, 0x64
cmp ecx, eax
jge 0x479a91
mov ecx, dword [esp + 0x1c]
cmp dword [ecx + 0x8bf730], eax
jge 0x479a91
push 0xbf800000
push 0xffffffffffffffff
push 0xffffffffffffffff
push 0x4b
or esi, 0xffffffff
xor eax, eax
or ecx, 0xffffffff
call fcn.00488840
mov edx, dword [esp + 0x9c]
mov eax, dword [esp + 0x3c]
sub eax, edx
mov edx, dword [edi + 0x8be4c8]
imul eax, eax, 0x4a8
mov ecx, dword [eax + 0x8be970]
add esp, 0x10
cmp edx, ecx
mov esi, 0x8ebf58
jne 0x4796d2
push str.The_enemy_escort_ship_crashes_alongside._nYou_grab_your_sword_to_repel_boarders__n
jmp 0x4796d7
push str.The_enemy_warship_crashes_alongside._nYou_grab_your_sword_to_repel_boarders__n
call fcn.004f7660
mov eax, dword [edi + 0x8be4c8]
mov ebx, 4
add esp, 4
cmp eax, ebx
jle 0x479700
push str.The_enemy_vessel_is_crushed_in_a_violent_collision__n
mov esi, 0x8ebf58
call fcn.004f7660
add esp, 4
mov eax, dword [0x85c268]
xor ebp, ebp
push ebp
push ebp
cdq
push 0xffffffffffffffff
push ebp
push ebp
and edx, 0xf
add eax, edx
push 0xffffffffffffffff
sar eax, 4
inc eax
push ebp
push str.snap
push eax
mov eax, dword [0x85c26c]
cdq
and edx, 3
add eax, edx
sar eax, 2
push eax
call fcn.00430160
mov eax, dword [edi + 0x8be4c8]
add esp, 0x28
cmp eax, ebx
jle 0x479750
mov dword [edi + 0x8be490], 0x65
jmp 0x479a91
mov dword [0x8bb9ac], 1
call fcn.00480c30
mov eax, dword [edi + 0x8be4c8]
cmp eax, 5
mov dword [0x8bb9ac], ebp
ja case.default.0x479770
jmp dword [eax*4 + 0x479f88]
push str.Spaniards
jmp 0x47979f
push str.Englishmen
jmp 0x47979f
push str.Frenchmen
jmp 0x47979f
push str.Dutchmen
jmp 0x47979f
push str.Buccaneers
jmp 0x47979f
push str.Indians
mov esi, 0x8ebf58
call fcn.004f7660
add esp, 4
mov eax, dword [edi + 0x8be48c]
imul eax, eax, 0x45c
mov ecx, dword [eax + 0x816350]
or ebx, 0xffffffff
test ch, 0x40
je 0x4798a4
movsx ebx, word [eax + 0x816330]
mov eax, ebx
imul eax, eax, 0x1c
movsx eax, word [eax + 0x864000]
cmp eax, ebp
jle 0x479831
lea eax, [eax + eax*8]
shl eax, 2
movsx ecx, word [eax + 0x863b82]
mov eax, dword [eax + 0x863b88]
sub esp, 0xc
cmp eax, 0x28
mov dword [0x72587c], ecx
mov esi, 0x8ebf58
jl 0x479858
lea edx, [eax + eax*2 - 0x78]
lea eax, [edx*4 + 0x8cd178]
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._EVILNAMEs_crew
call fcn.004f7660
add esp, 0x10
mov esi, 1
cmp word [0x86bad0], si
jle 0x4798cf
call dword [sym.imp.MSVCR71.dll_rand]
and eax, 0x80000001
jns 0x479855
dec eax
or eax, 0xfffffffe
inc eax
inc eax
jmp 0x4798d1
cmp eax, 0x1e
jl 0x479881
lea ecx, [eax + eax*2 - 0x5a]
lea edx, [ecx*4 + 0x8cd19c]
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.Mr.__NPCNAMEs_crew
jmp 0x479829
lea eax, [ebx + ebx*2]
lea ecx, [eax*4 + 0x8cd100]
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._TOP10s_crew
jmp 0x479829
mov ax, word [eax + 0x8162fe]
cmp ax, bp
jle 0x479831
movsx edx, ax
shl edx, 5
cmp dword [edx + 0x85c98c], ebp
jle 0x479831
mov eax, 0xfffffffe
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x74
ret
xor eax, eax
mov ecx, dword [0x7277fc]
mov edx, dword [edi + 0x8be4c8]
push ebp
push ebp
push ecx
mov ecx, dword [edi + 0x8be488]
push ebx
push edx
mov edx, dword [edi + 0x8be484]
inc ecx
push ecx
mov ecx, dword [0x8be488]
push edx
mov edx, dword [0x8be484]
push ecx
push edx
lea ecx, [esp + 0x60]
push ecx
mov ecx, eax
call fcn.0041b1d0
mov bl, byte [0x8ccc27]
mov edx, dword [eax]
mov ecx, dword [eax + 4]
mov eax, dword [eax + 8]
add esp, 0x28
test bl, bl
jne 0x47994f
cmp edx, 0xffffffff
mov dword [0x8be484], ecx
mov dword [edi + 0x8be484], eax
jne 0x47995a
cmp word [0x86bad0], si
jle 0x479944
cmp ecx, esi
mov dword [0x727804], ebp
jg 0x47994a
mov dword [0x727804], esi
call fcn.00480c30
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x74
ret
cmp word [0x86bad0], 6
mov byte [esp + 0x34], 0
jge 0x479978
mov eax, dword [edi + 0x8be48c]
call fcn.00404b70
mov byte [esp + 0x34], al
mov eax, dword [edi + 0x8be48c]
movsx ebp, word [0x86bad0]
xor edx, edx
mov dword [esp + 0x4c], edx
mov dword [esp + 0x50], edx
mov dword [esp + 0x54], edx
xor ecx, ecx
imul eax, eax, 0x45c
mov dword [esp + 0x58], edx
mov dword [esp + 0x5c], edx
mov dword [esp + 0x60], edx
mov dword [esp + 0x64], edx
lea edx, [eax + 0x816328]
movsx esi, word [edx]
mov dword [esp + ecx*4 + 0x68], esi
inc ecx
add edx, 2
cmp ecx, 7
jl 0x4799b1
movsx eax, word [eax + 0x816320]
mov ecx, dword [esp + 0x34]
push ecx
mov dword [esp + 0x84], eax
mov eax, dword [0x85c268]
lea edx, [ebp - 1]
push edx
cdq
and edx, 7
add eax, edx
push 0xffffffffffffffff
sar eax, 3
push eax
lea eax, [esp + 0x5c]
push eax
lea ecx, [esp + 0x7c]
push ecx
push 1
call fcn.004053c0
mov eax, dword [edi + 0x8be48c]
imul eax, eax, 0x45c
mov ecx, dword [eax + 0x816350]
add esp, 0x1c
test ch, 0x40
je 0x479a5d
movsx ebx, word [eax + 0x816330]
mov esi, ebx
imul esi, esi, 0x1c
push 0
push 0
push ebx
push 0x30
mov dword [esi + 0x863ff8], 0
call fcn.0043a8d0
push ebx
call fcn.0044b800
mov al, byte [esi + 0x863ffc]
add esp, 0x14
test al, 2
je 0x479a5d
movsx eax, word [esi + 0x864000]
lea edx, [eax + eax*8]
mov word [edx*4 + 0x863b78], 0
movsx eax, word [0x86bad0]
cmp eax, ebp
jne 0x479a71
and dword [edi + 0x8be4cc], 0xfffffffd
jmp 0x479a7b
mov dword [edi + 0x8be490], 0x65
mov ecx, dword [edi + 0x8be48c]
push 0
push ecx
call fcn.00414c00
add esp, 8
call fcn.004809e0
mov edx, dword [edi + 0x8be468]
mov esi, dword [0x727800]
mov ebx, dword [esp + 0x20]
push edx
mov ecx, esi
mov eax, ebx
call fcn.004773b0
add esp, 4
cmp eax, 0x64
jg 0x479b11
mov ebp, dword [esp + 0x14]
test ebp, ebp
je 0x479ac0
cmp ebp, 1
jne 0x479ad4
cmp dword [edi + 0x8be478], 0xc8
jl 0x479ad4
mov eax, dword [esp + 0x30]
test eax, eax
jne 0x479b11
cmp ebx, esi
je 0x479b11
mov eax, ebx
sub eax, esi
test eax, eax
jle 0x479ae7
mov eax, 1
jmp 0x479af1
xor ecx, ecx
test eax, eax
setge cl
dec ecx
mov eax, ecx
mov edx, dword [edi + 0x8be468]
imul eax, eax, 0x15555555
add ebx, eax
push edx
mov ecx, esi
mov eax, ebx
call fcn.004773b0
add esp, 4
cmp eax, 0x64
jle 0x479ab7
lea ebp, [ebx + 0x71c71c7]
mov eax, 0x493e0
mov ecx, ebp
mov dword [esp + 0x34], 0
call fcn.004dcac0
mov esi, eax
add esi, dword [edi + 0x8be46c]
lea ecx, [ebp + 0x40000000]
mov eax, 0x493e0
call fcn.004dcac0
mov edx, dword [edi + 0x8be470]
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
push eax
mov ecx, dword [0x8bb9d4]
mov eax, 0x51eb851f
imul esi
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
call fcn.00476090
movzx eax, al
add esp, 8
test eax, eax
jne 0x479c31
lea ecx, [ebx - 0x71c71c7]
mov eax, 0x493e0
call fcn.004dcac0
mov esi, eax
add esi, dword [edi + 0x8be46c]
lea ecx, [ebx + 0x38e38e39]
mov eax, 0x493e0
call fcn.004dcac0
mov edx, dword [edi + 0x8be470]
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
push eax
mov ecx, dword [0x8bb9d4]
mov eax, 0x51eb851f
imul esi
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
call fcn.00476090
movzx eax, al
add esp, 8
test eax, eax
je 0x479df7
mov eax, 0xf8e38e39
sub eax, ebx
mov dword [esp + 0x34], eax
mov eax, 0x71c71c7
sub eax, ebx
mov dword [esp + 0x28], ebp
mov dword [esp + 0x2c], 0
mov dword [esp + 0x24], 0x71c71c7
lea ebp, [ebx - 0x71c71c7]
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x24]
sub eax, dword [0x727800]
add eax, ebx
cdq
xor eax, edx
sub eax, edx
cmp eax, 0x20000000
jle 0x479d11
mov ecx, dword [esp + 0x28]
mov eax, 0x493e0
call fcn.004dcac0
mov ecx, dword [esp + 0x28]
mov esi, eax
add esi, dword [edi + 0x8be46c]
add ecx, 0x40000000
mov eax, 0x493e0
call fcn.004dcac0
mov edx, dword [edi + 0x8be470]
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
push eax
mov ecx, dword [0x8bb9d4]
mov eax, 0x51eb851f
imul esi
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
call fcn.00476090
add esp, 8
test al, al
jne 0x479d11
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x28]
add eax, ecx
mov dword [esp + 0x2c], eax
mov edx, dword [0x727800]
mov eax, ebp
sub eax, edx
cdq
xor eax, edx
sub eax, edx
cmp eax, 0x20000000
jle 0x479db5
mov eax, 0x493e0
mov ecx, ebp
call fcn.004dcac0
mov esi, eax
add esi, dword [edi + 0x8be46c]
lea ecx, [ebp + 0x40000000]
mov eax, 0x493e0
call fcn.004dcac0
mov edx, dword [edi + 0x8be470]
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
push eax
mov ecx, dword [0x8bb9d4]
mov eax, 0x51eb851f
imul esi
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
call fcn.00476090
add esp, 8
test al, al
jne 0x479db5
mov edx, dword [esp + 0x34]
add edx, ebp
mov dword [esp + 0x2c], edx
mov eax, dword [esp + 0x2c]
test eax, eax
jne 0x479de9
mov eax, dword [esp + 0x24]
mov esi, dword [esp + 0x28]
add eax, 0x71c71c7
add esi, 0x71c71c7
sub ebp, 0x71c71c7
cmp eax, 0x55555555
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], esi
jle 0x479c61
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x34], 1
add ebx, eax
mov ebp, dword [edi + 0x8be474]
mov ecx, dword [0x727800]
mov eax, ebp
mov esi, ebx
sub eax, ecx
sub esi, ecx
test eax, eax
jle 0x479e16
mov edx, 1
jmp 0x479e1e
xor edx, edx
test eax, eax
setge dl
dec edx
test esi, esi
jle 0x479e29
mov ecx, 1
jmp 0x479e31
xor ecx, ecx
test esi, esi
setge cl
dec ecx
cmp edx, ecx
je 0x479ea0
test byte [edi + 0x8be4cc], 1
je 0x479ea0
mov ecx, dword [edi + 0x8be468]
imul ecx, ecx, 0x44
cmp dword [ecx + 0x725b08], 8
jge 0x479e59
cmp dword [edi + 0x8be494], 0x32
jl 0x479ea0
mov ecx, dword [esp + 0x14]
test ecx, ecx
jne 0x479e75
cmp dword [edi + 0x8be478], 0xc8
jl 0x479e75
mov ecx, dword [esp + 0x30]
test ecx, ecx
jne 0x479ea0
test eax, eax
jle 0x479e80
mov eax, 1
jmp 0x479e8a
xor edx, edx
test eax, eax
setge dl
dec edx
mov eax, edx
xor ecx, ecx
test eax, eax
setg cl
lea ecx, [ecx*4 - 2]
mov dword [edi + 0x8be498], ecx
jmp 0x479ed1
sub ebx, ebp
mov eax, 0x90000017
imul ebx
add edx, ebx
sar edx, 0x19
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, 0xfffffffe
jge 0x479ec1
mov eax, 0xfffffffe
jmp 0x479ecb
cmp eax, 2
jle 0x479ecb
mov eax, 2
mov dword [edi + 0x8be498], eax
mov eax, dword [esp + 0x34]
test eax, eax
je 0x479ee7
mov edx, dword [edi + 0x8be498]
shl edx, 1
mov dword [edi + 0x8be498], edx
mov eax, dword [edi + 0x8be484]
test eax, eax
jne 0x479efb
mov dword [edi + 0x8be498], 0
test byte [edi + 0x8be4cc], 1
je 0x479f16
xor eax, eax
mov ax, word [edi + 0x8be4ba]
cmp ax, 0x64
jge 0x479f2d
inc eax
jmp 0x479f26
xor eax, eax
mov ax, word [edi + 0x8be4ba]
cmp ax, 0x32
jle 0x479f2d
dec eax
mov word [edi + 0x8be4ba], ax
mov al, byte [esp + 0x13]
test al, al
je 0x479f51
mov eax, dword [esp + 0x8c]
mov ecx, dword [esp + 0x88]
push 0xffffffffffffffff
push 0xffffffffffffffff
push eax
push ecx
call fcn.00477c10
add esp, 0x10
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x74
ret