Function at 0x461210
Capabilities:
Encode data using xor
Encrypt data using speck
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x11c
push ebx
push ebp
push esi
mov esi, eax
test byte [0x85c164], 0x40
push edi
mov edi, ecx
jne 0x461252
mov ebx, dword [0x81630c]
mov eax, 0x1f4
mov ecx, ebx
call fcn.004dcac0
add edi, eax
lea ecx, [ebx + 0x40000000]
mov eax, 0x1f4
call fcn.004dcac0
lea esi, [esi + eax - 0x1f4]
xor eax, eax
mov dword [esp + 0xe4], eax
mov dword [esp + 0xe8], eax
mov dword [esp + 0xec], eax
mov dword [esp + 0xf0], eax
mov dword [esp + 0xf4], eax
mov dword [esp + 0xf8], eax
mov dword [esp + 0xfc], eax
push eax
mov dword [esp + 0x104], eax
push 1
xor cl, cl
mov eax, esi
mov edx, edi
call fcn.00460eb0
mov eax, dword [0x727678]
add esp, 8
inc eax
cdq
sub eax, edx
sar eax, 1
mov dword [esp + 0x14], eax
mov eax, dword [0x72ed78]
fild dword [esp + 0x14]
push esi
push edi
fmul dword [eax + 0x14]
push eax
fstp dword [eax + 0x10]
call fcn.004e91f0
mov al, byte [0x8cc9f0]
test al, al
jne 0x4612f8
mov eax, dword [0x7273b8]
cmp eax, 0x4b0
je 0x4612f8
mov ecx, eax
and ecx, 3
lea eax, [ecx + eax + 4]
cdq
mov ecx, 0x960
idiv ecx
push edx
mov dword [0x7273b8], edx
call fcn.004ae1f0
add esp, 4
mov ecx, dword [0x8bb8fc]
mov ebx, dword [0x85c164]
mov eax, 0x10
mov dword [0x7275fc], eax
mov dword [0x8bb98c], eax
mov eax, dword [0x81630c]
sub eax, ecx
cdq
and edx, 7
add eax, edx
mov edx, dword [0x727608]
sar eax, 3
add ecx, eax
mov dword [0x85c128], edi
mov dword [0x85c138], edi
mov dword [0x85c124], esi
mov dword [0x85c134], esi
mov edi, ebx
and edi, 0x40
mov esi, edi
neg esi
sbb esi, esi
mov dword [0x8bb8fc], ecx
and esi, 0x32
add esi, 0xfa
mov ecx, edi
neg ecx
sbb ecx, ecx
add edx, edx
mov eax, 0x55555556
imul edx
mov eax, edx
and ecx, 0x32
shr eax, 0x1f
add ecx, 0x14
add eax, edx
cmp eax, ecx
jge 0x46137f
mov eax, ecx
cmp eax, esi
jle 0x461385
mov eax, esi
mov edx, dword [0x727688]
mov esi, dword [0x8bb8e0]
push 0
lea ecx, [eax*8]
mov eax, dword [0x8bb8dc]
push 0x46
push edx
push eax
mov eax, esi
call fcn.004893a0
add esp, 0x10
test bl, 4
mov dword [0x8bb8dc], eax
jne 0x4613bf
add esi, eax
mov dword [0x8bb8e0], esi
cmp esi, 0x64
jge 0x4613cf
mov esi, 0x64
mov dword [0x8bb8e0], esi
test byte [0x8f0200], 1
mov ebp, dword [0x85c0fc]
jne 0x4613f5
mov eax, dword [0x8f0200]
or eax, 1
mov ecx, ebp
mov dword [0x8f0200], eax
imul ecx, ecx, 0x1f4
jmp 0x4613fb
mov ecx, dword [0x8f01fc]
mov eax, ebp
imul eax, eax, 0x1f4
sub eax, ecx
mov edx, eax
mov ebx, dword [0x727678]
mov eax, 0x66666667
imul edx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
add ecx, eax
lea eax, [esi + esi*2]
cdq
sub eax, edx
sar eax, 1
imul eax, ebx
cdq
sub eax, edx
mov esi, eax
mov eax, dword [esp + 0x130]
sar esi, 1
add esi, ecx
test eax, eax
mov dword [0x8f01fc], ecx
mov dword [esp + 0x1c], esi
je 0x461450
call eax
jmp 0x46177b
test edi, edi
je 0x46169f
mov ebx, dword [0x85c164]
and ebx, 0x80
mov ecx, dword [0x81630c]
je 0x4614ab
mov ecx, dword [0x85c7b0]
mov eax, 0x10624dd3
imul ecx
sar edx, 6
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
mov dword [0x85c138], ecx
mov ecx, dword [0x85c7d0]
mov eax, 0x10624dd3
imul ecx
mov ecx, dword [0x85c810]
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [0x85c134], eax
mov edx, dword [0x879518]
mov edi, dword [0x87951c]
push 0
push 0x38e38e3
push 0x2d82d8
push edx
mov eax, edi
call fcn.004893a0
add edi, eax
add esp, 0x10
test ebx, ebx
mov dword [0x879518], eax
mov dword [0x87951c], edi
mov dword [0x8bb8d8], edi
je 0x461614
mov eax, dword [0x85c7f0]
lea eax, [eax + eax*4 + 0x30d4]
shl eax, 1
mov dword [esp + 0x14], eax
fild dword [esp + 0x14]
mov eax, dword [0x8ebfd8]
push ecx
fstp dword [esp]
push 0x43fa0000
call fcn.00412840
mov esi, dword [0x87951c]
lea ecx, [esi + 0x40000000]
mov eax, 0x190
call fcn.004dcac0
mov edx, dword [0x85c7d0]
mov ecx, eax
mov eax, 0x10624dd3
imul edx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
sub eax, ecx
mov dword [esp + 0x14], eax
mov eax, 0x190
mov ecx, esi
call fcn.004dcac0
mov ecx, dword [0x85c7b0]
fild dword [esp + 0x14]
mov esi, eax
mov edi, dword [0x72ed78]
mov eax, 0x10624dd3
imul ecx
sar edx, 6
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
push 1
sub ecx, esi
sub esp, 8
mov dword [esp + 0x24], ecx
mov al, 1
fstp dword [esp + 4]
fild dword [esp + 0x24]
fstp dword [esp]
call fcn.004e8db0
mov ecx, dword [0x85c164]
fstp st(0)
and ecx, 0x1000
mov edi, dword [0x85c158]
je 0x4615b0
mov esi, 0x3e8
jmp 0x4615bd
mov eax, 0x1770
lea esi, [edi + 2]
cdq
idiv esi
mov esi, eax
test ecx, ecx
mov ecx, dword [0x85c7f0]
je 0x4615cf
lea edx, [ecx + 0xfa]
jmp 0x4615de
mov eax, 0x2ee
add edi, 2
cdq
idiv edi
mov edx, eax
add edx, ecx
mov edi, dword [0x87951c]
imul ecx, ecx, 0x249f0
push 0x1c71c71c
push 0
push esi
push edx
mov edx, dword [0x85c138]
mov eax, 0x18e38e38
sub eax, ecx
mov ecx, dword [0x85c134]
push edx
call fcn.004892c0
add esp, 0x14
jmp 0x46177b
mov eax, 0x55555556
imul esi
mov eax, edx
shr eax, 0x1f
add eax, edx
mov esi, eax
mov eax, dword [0x8ebfd8]
push 0x46ea6000
push 0x43fa0000
mov dword [esp + 0x24], esi
call fcn.00412840
mov ecx, esi
imul ecx, ecx, 0x4dac
mov edi, 0xe38e38e
sub edi, ecx
lea ecx, [esi + 0x1f40]
shl ecx, 5
mov eax, 0x51eb851f
imul ecx
mov ecx, dword [0x85c138]
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
push 0x1c71c71c
push 0
push eax
lea eax, [esi + 0x1388]
cdq
and edx, 7
add eax, edx
sar eax, 3
push eax
push ecx
mov ecx, dword [0x85c134]
mov eax, edi
mov edi, dword [0x87951c]
call fcn.004892c0
add esp, 0x14
jmp 0x46177b
add esi, 0xfffff63c
mov eax, 0x55555556
imul esi
mov eax, edx
shr eax, 0x1f
lea eax, [edx + eax + 0x9c4]
imul eax, ebx
cdq
and edx, 3
add eax, edx
sar eax, 2
mov esi, eax
cmp esi, 0x1388
mov dword [esp + 0x1c], esi
jle 0x4616d9
mov esi, 0x1388
jmp 0x4616e6
cmp esi, 0x1f4
jge 0x4616ea
mov esi, 0x1f4
mov dword [esp + 0x1c], esi
lea eax, [ebp + ebp*4]
shl eax, 4
lea ecx, [eax + 0x124f8]
mov dword [esp + 0x14], ecx
fild dword [esp + 0x14]
sub esp, 8
add eax, 0x3e8
fstp dword [esp + 4]
mov dword [esp + 0x1c], eax
fild dword [esp + 0x1c]
mov eax, dword [0x8ebfd8]
fstp dword [esp]
call fcn.00412840
lea ecx, [esi + esi*4]
shl ecx, 4
mov eax, 0x66666667
imul ecx
sar edx, 4
push 0x238e38e3
mov eax, edx
push 0
shr eax, 0x1f
add eax, edx
push 0x15555555
push 0
push eax
shl esi, 7
mov eax, 0x66666667
imul esi
mov eax, dword [0x85c138]
sar edx, 4
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
mov edx, dword [0x85c134]
sub edx, ecx
push edx
push eax
call fcn.004ad540
add esp, 0x1c
mov dword [0x8bb8d8], 0
mov ecx, dword [0x727600]
mov esi, dword [0x81630c]
mov eax, 0x10
mov dword [0x7275fc], eax
mov dword [0x8bb98c], eax
sub ecx, esi
mov eax, ecx
cdq
xor eax, edx
sub eax, edx
cmp eax, 0x40000000
mov dword [0x72760c], 0x3e8
jle 0x4617cd
test ecx, ecx
jle 0x4617bb
mov edx, 1
jmp 0x4617c3
xor edx, edx
test ecx, ecx
setge dl
dec edx
mov ecx, 0x80000000
sub ecx, eax
imul ecx, edx
mov eax, 0x66666667
imul ecx
sar edx, 5
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
mov ebp, ecx
mov ecx, dword [0x85c154]
imul ebp, dword [0x85c0f8]
imul ecx, ecx, 0x4444444
mov eax, 0x4fa4fa4
call fcn.004dcac0
lea ecx, [esi + 0x40000000]
mov dword [esp + 0x18], eax
call fcn.004dcac0
movsx ebx, word [0x8162f8]
mov edi, eax
imul ebx, ebx, 0x44
mov eax, dword [esp + 0x18]
shl eax, 2
cdq
idiv dword [ebx + 0x725b08]
mov ecx, esi
call fcn.004dcac0
mov ecx, dword [0x85c164]
and ecx, 0x80
mov dword [esp + 0x18], eax
je 0x461856
mov eax, 0x66666667
imul dword [esp + 0x18]
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [esp + 0x18], eax
test ecx, ecx
je 0x46186d
mov eax, 0x66666667
imul edi
sar edx, 2
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
mov edi, ecx
mov edx, dword [0x72ed74]
fld dword [edx + 0x2c]
call fcn.005f275c
mov dword [esp + 0x14], eax
movsx eax, word [0x8162f8]
cdq
mov ecx, 9
idiv ecx
mov ecx, edx
mov dl, byte [ebx + 0x725b20]
test dl, dl
jns 0x461b6a
movsx edx, word [0x816346]
mov eax, dword [0x7273bc]
push edx
push esi
push ecx
xor ebx, ebx
call fcn.0045b6d0
add esp, 0xc
mov word [0x816346], ax
movsx eax, word [0x8162f8]
push 1
push ebx
call fcn.0045a970
movsx ecx, word [0x8162f8]
mov esi, eax
mov eax, dword [0x8ca494]
add esp, 8
push eax
mov eax, 0x38e38e39
imul ecx
sar edx, 1
mov ecx, edx
shr ecx, 0x1f
lea eax, [edx + ecx + 6]
imul eax, dword [0x727678]
mov ecx, dword [0x85c164]
and ecx, 0x10000080
sub ecx, 0x10000000
neg ecx
sbb ecx, ecx
lea eax, [eax + eax*4]
cdq
and ecx, 0xfffffffe
add ecx, 4
idiv ecx
mov edx, dword [0x816314]
mov ecx, dword [esp + 0x1c]
push 0xffffffffffffffff
mov ebx, eax
lea eax, [edx*8]
mov edx, dword [0x81630c]
sub edi, eax
mov eax, dword [esp + 0x1c]
add edx, 0x80000000
sub edi, ebp
push edi
push ecx
mov ecx, dword [0x816308]
push edx
push eax
mov eax, 0x10624dd3
imul ecx
sar edx, 6
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
push ecx
mov ecx, dword [0x816304]
mov eax, 0x10624dd3
imul ecx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
push eax
push esi
mov edx, ebx
call fcn.004bc2e0
movsx ecx, word [0x816346]
push ecx
push 0
mov ecx, esi
call fcn.004bc4e0
push 0
push 0x64
mov ecx, esi
call fcn.004c28d0
test byte [0x86baac], 1
mov ecx, 0x32
je 0x4619ad
mov ecx, 0x64
call fcn.004bd230
mov al, byte [esp + 0x134]
test al, al
je 0x4619d7
mov edx, dword [0x816310]
push edx
push esi
call fcn.004a2cb0
add esp, 8
mov ebx, 0x8162f8
call fcn.004a4000
push 0x64
mov ecx, esi
call fcn.004bc920
mov edi, dword [0x7276a4]
push 1
push 0
call fcn.004bceb0
mov edi, esi
call fcn.004afbe0
mov eax, dword [0x7273bc]
sub eax, dword [0x81630c]
sub eax, 0x80000000
push eax
mov ecx, esi
call fcn.004bd400
movsx eax, word [0x8162f8]
mov ecx, eax
imul ecx, ecx, 0x44
mov dl, byte [ecx + 0x725b20]
test dl, dl
jns 0x461abc
cdq
mov ecx, 9
idiv ecx
mov ecx, dword [esi + 0xbc]
test edx, edx
setne dl
test ecx, ecx
mov byte [esp + 0x14], dl
je 0x461a4d
mov eax, dword [esp + 0x14]
push eax
call fcn.004bd3d0
mov byte [esi + 0x4c], dl
movsx eax, word [0x816318]
test eax, eax
jge 0x461a5f
xor eax, eax
jmp 0x461a69
cmp eax, 0x64
jle 0x461a69
mov eax, 0x64
mov ecx, esi
call fcn.004bd130
movsx eax, word [0x81631a]
test eax, eax
jge 0x461a7f
xor eax, eax
jmp 0x461a89
cmp eax, 0x64
jle 0x461a89
mov eax, 0x64
mov ecx, esi
call fcn.004bd190
mov ecx, dword [0x816324]
shr ecx, 1
and ecx, 0xffffff01
push ecx
mov ecx, esi
call fcn.004bce60
xor edx, edx
mov dl, byte [0x816324]
mov ecx, esi
and edx, 0xffffff01
push edx
call fcn.004bce10
cmp word [0x81631a], 0x32
jl 0x461b5e
movsx eax, word [0x8162f8]
fld qword [0x8ca4b0]
fmul dword [0x715698]
imul eax, eax, 0x44
mov edi, dword [eax + 0x725b08]
call fcn.005f275c
mov ecx, dword [0x81630c]
push eax
push 0xffffffffffffffff
push 0
add ecx, 0x80000000
push 0xe38e38e
push ecx
lea ecx, [edi + edi*4]
lea ecx, [ecx + ecx - 0xa]
mov eax, 0x51eb851f
imul ecx
mov ecx, dword [0x816308]
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
push eax
mov eax, 0x10624dd3
imul ecx
sar edx, 6
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
push ecx
mov ecx, dword [0x816304]
mov eax, 0x10624dd3
imul ecx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
push eax
lea ebx, [edi*8 + 0x14]
push 0x8cf5d8
mov edx, ebx
call fcn.004bc2e0
mov ecx, dword [0x85c150]
push ecx
jmp 0x461bfd
add eax, 6
imul eax, dword [0x727678]
lea eax, [eax + eax*4]
cdq
sub eax, edx
mov edx, dword [0x816314]
mov ebx, eax
lea eax, [edx*8]
mov edx, dword [esp + 0x18]
sub edi, eax
mov eax, dword [esp + 0x14]
push 0
push 0xffffffffffffffff
sub edi, ebp
push edi
push edx
mov edx, dword [0x816308]
add esi, 0x80000000
push esi
push eax
mov eax, 0x10624dd3
imul edx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
mov edx, dword [0x816304]
push eax
mov eax, 0x10624dd3
imul edx
sar edx, 6
mov eax, edx
lea ecx, [ecx + ecx*2]
shr eax, 0x1f
add eax, edx
shl ecx, 6
push eax
add ecx, 0x8cda18
sar ebx, 1
push ecx
mov edx, ebx
call fcn.004bc2e0
mov esi, eax
push 0
push 0x64
mov ecx, esi
call fcn.004c28d0
mov edx, dword [0x85c150]
push edx
xor edi, edi
mov ecx, 1
mov eax, esi
call fcn.0045a8a0
movsx eax, word [0x81631a]
movsx ecx, word [0x816318]
lea edx, [ecx + eax]
add esp, 4
test edx, edx
mov esi, 0x8ebf58
je 0x461c46
push ecx
mov ecx, dword [0x86bab0]
push eax
mov eax, dword [0x86bacc]
push eax
push ecx
push str.Crew:_NUM_Cannon:_NUM_Damage:_NUM__NUM_
call fcn.004f7660
add esp, 0x14
jmp 0x461c60
mov edx, dword [0x86bacc]
mov eax, dword [0x86bab0]
push edx
push eax
push str.Crew:_NUM_Cannon:_NUM
call fcn.004f7660
add esp, 0xc
mov cl, byte [0x85c164]
test cl, 4
jne 0x461ca1
mov esi, dword [0x8bb8d0]
mov eax, esi
cdq
and edx, 7
add eax, edx
sar eax, 3
neg eax
add esi, eax
mov dword [0x8bb8d0], esi
mov esi, dword [0x8bb8cc]
mov eax, esi
cdq
and edx, 7
add eax, edx
sar eax, 3
neg eax
add esi, eax
mov dword [0x8bb8cc], esi
test cl, 0x20
je 0x461d3a
xor ecx, ecx
mov eax, 0x8185d8
cmp word [eax], 0xffff
je 0x461cb8
inc ecx
add eax, 0x45c
cmp eax, 0x85bef8
jl 0x461cb1
mov edx, dword [0x8bb8cc]
mov eax, dword [0x8bb8d0]
push edx
mov edx, dword [0x8bb6ac]
push eax
push edx
push ecx
push str.nF:_NUM_nVisible:_NUM_SMcalls:_NUM_SMcalled:_NUM
mov esi, 0x8ebf58
call fcn.004f7660
mov esi, dword [0x8bb984]
mov eax, dword [0x85c26c]
add esp, 0x14
xor ecx, ecx
cmp esi, 0x96
setge cl
push 0
push 0xffffffffffffffff
push 4
cdq
sub eax, edx
dec ecx
and ecx, 0xffc0c0
add ecx, 0xff000000
push ecx
push 0x4b
sar eax, 1
push 0x18
push eax
push 0x86bb48
xor eax, eax
mov dword [0x85c11c], 0x4b
call fcn.004b0b40
add esp, 0x20
jmp 0x461d83
mov ecx, dword [0x7273bc]
mov eax, 0xb40000b5
imul ecx
add edx, ecx
sar edx, 0x17
mov eax, edx
shr eax, 0x1f
add eax, edx
push eax
push str.Wind:__NUM
mov esi, 0x8ebf58
call fcn.004f7660
mov al, byte [0x86baac]
add esp, 8
test al, 1
je 0x461d76
push str.Full_Sails
jmp 0x461d7b
push str.Battle_Sails
call fcn.004f7660
add esp, 4
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 [0x85c154], 0xf
mov dword [0x7273bc], ecx
jne 0x461e31
test byte [0x85c164], 4
jne 0x461e31
mov ecx, dword [0x8cc934]
mov ebx, dword [0x8cc930]
imul ecx, ecx, 0x2d82d
add ebx, ecx
mov dword [0x8cc930], ebx
call dword [sym.imp.MSVCR71.dll_rand]
cdq
mov ecx, 0xb
idiv ecx
mov ecx, dword [0x8cc930]
mov eax, 0xb40000b5
mov esi, 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 edi, eax
mov eax, ecx
cdq
and edx, 0xf
add eax, edx
sar eax, 4
sar edi, 2
neg eax
sub eax, edi
add eax, ecx
lea edx, [eax + esi - 5]
mov dword [0x8cc934], edx
mov dword [esp + 0x18], 8
mov ebx, dword [esp + 0x18]
lea ecx, [ecx]
mov edi, ebx
imul edi, edi, 0x45c
mov cx, word [edi + 0x81635c]
xor ebp, ebp
or esi, 0xffffffff
cmp cx, si
mov dword [esp + 0x14], ebp
je 0x461eb5
movsx eax, word [edi + 0x81635e]
sub eax, dword [0x8de310]
mov edx, dword [0x8de30c]
movsx ecx, cx
sub ecx, edx
jns 0x461e79
neg ecx
test eax, eax
jge 0x461e7f
neg eax
cmp ecx, eax
jle 0x461e88
lea ecx, [eax + ecx*2]
jmp 0x461e8b
lea ecx, [ecx + eax*2]
mov eax, dword [0x85c26c]
cdq
and edx, 0xf
add eax, edx
sar eax, 4
mov dword [esp + 0x28], eax
mov eax, ecx
mov ecx, dword [esp + 0x28]
cdq
sub eax, edx
sar eax, 1
cmp eax, ecx
jge 0x461eb5
mov ebp, 1
mov dword [esp + 0x14], ebp
cmp word [edi + 0x8162f8], si
mov word [edi + 0x81635c], si
je 0x462dfe
mov esi, dword [edi + 0x816350]
test esi, 0x200
jne 0x462dfe
cmp dword [0x8bb984], 0x12c
jge 0x461eef
cmp ebx, dword [0x8bb988]
je 0x461f1e
mov ecx, ebx
xor eax, eax
call fcn.00405e20
and esi, 0x400
neg esi
sbb esi, esi
and esi, 2
add esi, 3
cmp eax, esi
jl 0x461f1e
test ebp, ebp
jne 0x461f1e
mov word [edi + 0x816344], 0xffff
jmp 0x462dfe
cmp word [edi + 0x81631a], 0x64
jge 0x462dfe
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x28]
push ecx
mov ecx, dword [edi + 0x816308]
mov eax, 0x10624dd3
imul ecx
mov ecx, dword [edi + 0x816304]
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
push 0x1e
push eax
mov eax, 0x10624dd3
imul ecx
sar edx, 6
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
push ecx
mov byte [0x86bb48], 0
call fcn.004aec50
add esp, 0x14
test al, al
je 0x462dfe
mov eax, dword [0x85c154]
cmp dword [0x8bb8d4], eax
jge 0x461f91
mov dword [0x8bb8d4], eax
mov ax, word [esp + 0x20]
mov dx, word [esp + 0x24]
mov word [edi + 0x81635e], ax
mov eax, dword [edi + 0x816350]
test ah, 0x40
mov word [edi + 0x81635c], dx
mov dword [0x85c11c], 0x32
je 0x461ff8
movsx eax, word [edi + 0x816330]
lea ecx, [eax + eax*2]
lea edx, [ecx*4 + 0x8cd100]
mov ecx, dword [edx]
sub esp, 0xc
mov eax, esp
mov dword [eax], ecx
mov ecx, dword [edx + 4]
mov edx, dword [edx + 8]
mov dword [eax + 4], ecx
push str.___TOP10__
mov esi, 0x8ebf58
mov dword [eax + 8], edx
call fcn.004f7680
add esp, 0x10
jmp case.default.0x462005
movsx eax, word [edi + 0x8162fa]
dec eax
cmp eax, 3
ja case.default.0x462005
jmp dword [eax*4 + 0x463c14]
movsx eax, word [edi + 0x8162fc]
push eax
push str._NATIONALITY_pirate_hunter
jmp 0x462046
movsx ecx, word [edi + 0x8162fc]
push ecx
push str._NATIONALITY_privateer
jmp 0x462046
movsx edx, word [edi + 0x8162fc]
push edx
push str._NATIONALITY_raider
jmp 0x462046
movsx eax, word [edi + 0x8162fc]
push eax
push str._NATIONALITY_smuggler
mov esi, 0x8ebf58
call fcn.004f7660
add esp, 8
mov eax, dword [edi + 0x816350]
test ah, 0x20
mov ax, word [edi + 0x8162fe]
je 0x462160
test ax, ax
jle 0x462143
movsx ecx, ax
shl ecx, 5
mov eax, dword [ecx + 0x85c98c]
test eax, eax
jle 0x462155
lea edx, [eax + eax*8]
mov eax, dword [edx*4 + 0x863b88]
sub esp, 0xc
cmp eax, 0x28
mov esi, 0x8ebf58
jl 0x4620d5
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
push str._EVILNAME
mov dword [edx + 8], ecx
call fcn.004f7660
add esp, 0x10
mov word [edi + 0x816344], 0xffff
jmp 0x46217e
cmp eax, 0x1e
jl 0x46210f
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
push str.Mr.__NPCNAME
mov dword [ecx + 8], eax
call fcn.004f7660
add esp, 0x10
mov word [edi + 0x816344], 0xffff
jmp 0x46217e
lea ecx, [eax + eax*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
push str._TOP10
mov dword [eax + 8], edx
call fcn.004f7660
add esp, 0x10
mov word [edi + 0x816344], 0xffff
jmp 0x46217e
push str.Evil_Spaniard_
mov esi, 0x8ebf58
call fcn.004f7660
add esp, 4
mov word [edi + 0x816344], 0xffff
jmp 0x46217e
test ax, ax
jle 0x46217e
movsx eax, ax
mov byte [0x86bb48], 0
call fcn.0044cdc0
and dword [edi + 0x816350], 0xff7fffff
mov ecx, dword [0x85c164]
test cl, 0x20
je 0x4621aa
movsx eax, word [edi + 0x816348]
push eax
push ebx
push 0x6fd89c
mov esi, 0x8ebf58
call fcn.004f7680
mov ecx, dword [0x85c164]
add esp, 0xc
movsx eax, word [edi + 0x816348]
cdq
xor eax, edx
sub eax, edx
cmp eax, 0x32
jl 0x4621c4
test cl, 0x20
je 0x46228a
and ecx, 0x40
mov eax, ecx
neg eax
sbb eax, eax
mov edx, dword [esp + 0x1c]
and eax, 0xfffffda8
add eax, 0x4b0
imul eax, dword [0x85c11c]
imul eax, dword [0x727678]
lea esi, [edx + 0x1f4]
cdq
idiv esi
neg ecx
sbb ecx, ecx
and ecx, 0xffffffec
add ecx, 0xffffffba
mov dword [esp + 0x28], ecx
fild dword [esp + 0x28]
fmul qword [0x715680]
mov dword [0x85c11c], eax
call fcn.005f275c
mov ebp, dword [0x8bb8d8]
mov ecx, dword [edi + 0x816308]
mov esi, eax
xor ebx, ebx
test ebp, ebp
setne bl
mov eax, 0x10624dd3
imul ecx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
mov edx, dword [edi + 0x816304]
mov ecx, eax
push 0
mov eax, 0x10624dd3
imul edx
push 0xc
push 0x1f4
push ebp
push esi
sar edx, 6
dec ebx
push 0
mov eax, edx
and ebx, 0x1f4
sub ecx, ebx
shr eax, 0x1f
push 0x271
add eax, edx
push ecx
push eax
mov eax, 0xff000000
mov ecx, 0x86bb48
call fcn.004af0b0
mov ebp, dword [esp + 0x38]
mov ebx, dword [esp + 0x3c]
add esp, 0x24
mov eax, dword [edi + 0x816350]
test eax, 0x400000
mov byte [0x86bb48], 0
jne 0x462dfe
test al, al
jns 0x4622af
mov ax, word [edi + 0x816336]
jmp 0x4622b6
mov ax, word [edi + 0x816338]
movsx ecx, word [edi + 0x8162fc]
movsx ecx, word [ecx*2 + 0x86ba78]
movsx ebx, ax
mov eax, 0x99999999
imul dword [0x8bb984]
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp ecx, eax
mov byte [0x86bb48], 0
jge 0x4623ec
cmp word [edi + 0x816322], 3
jge 0x4623ec
push str.Stay_clear_you_scurvy_Pirate_
mov esi, 0x8ebf58
call fcn.004f7660
mov eax, dword [edi + 0x816350]
add esp, 4
test eax, 0x100000
je 0x462326
push str.No_valuables_on_board.
call fcn.004f7660
add esp, 4
movsx ecx, word [edi + 0x816320]
mov eax, 0x7d0
add ecx, 5
cdq
idiv ecx
mov esi, eax
test esi, esi
jle 0x46234f
call dword [sym.imp.MSVCR71.dll_rand]
cdq
idiv esi
test edx, edx
jne 0x4623ec
test dword [edi + 0x816350], 0x100000
jne 0x4623ec
cmp dword [0x8bb984], 0xfa
jge 0x4623ec
mov edx, dword [edi + 0x81630c]
mov ecx, dword [0x816308]
push 1
or edx, 1
push 0xffffffffffffffff
push 0
push edx
mov eax, 0x10624dd3
imul ecx
mov ecx, dword [0x816304]
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
push eax
mov eax, 0x10624dd3
imul ecx
sar edx, 6
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
push ecx
mov ecx, dword [edi + 0x816308]
mov eax, 0x10624dd3
imul ecx
mov ecx, dword [edi + 0x816304]
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
push eax
mov eax, 0x10624dd3
imul ecx
sar edx, 6
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
push ecx
mov ecx, 0x14
call fcn.0045abf0
add esp, 0x20
mov esi, dword [esp + 0x18]
mov ecx, esi
xor eax, eax
call fcn.00405e20
cmp eax, 3
jg 0x462406
cmp dword [0x8bb988], esi
je 0x46240e
test ebp, ebp
je 0x462822
mov edx, dword [edi + 0x816340]
mov ecx, dword [0x85c150]
sub ecx, edx
imul ecx, ecx, 0x1e
mov eax, 0x57619f1
imul ecx
sar edx, 7
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
test ebp, ebp
je 0x462447
cmp word [edi + 0x816344], 0x78
jl 0x462447
mov word [edi + 0x816344], 1
movsx edx, word [edi + 0x816344]
mov eax, 0x66666667
imul edx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
sub eax, 0
je 0x46260a
dec eax
je 0x462560
dec eax
jne 0x4627c4
mov eax, dword [edi + 0x816350]
and eax, 0x80
jne 0x4624f4
movsx edx, word [edi + 0x816336]
shl edx, 5
movsx cx, byte [edx + 0x862b74]
cmp cx, word [edi + 0x8162fc]
jne 0x4624f4
movsx edx, word [edi + 0x816338]
shl edx, 5
mov al, byte [edx + 0x862b74]
mov ecx, ebx
shl ecx, 5
mov edx, dword [ecx + 0x862b80]
push edx
movsx eax, al
push eax
lea ecx, [ebx + ebx*2]
lea edx, [ecx*4 + 0x8ddd08]
mov ecx, dword [edx]
sub esp, 0xc
mov eax, esp
mov dword [eax], ecx
mov ecx, dword [edx + 4]
mov edx, dword [edx + 8]
mov dword [eax + 4], ecx
push str.Were_bound_for__CITYNAME.___NATIONALITY__LOCTYPE_
mov esi, 0x8ebf58
mov dword [eax + 8], edx
call fcn.004f7660
add esp, 0x18
jmp 0x4627c4
test eax, eax
je 0x46250a
movsx eax, word [edi + 0x816336]
shl eax, 5
mov al, byte [eax + 0x862b74]
jmp 0x46251a
movsx ecx, word [edi + 0x816338]
shl ecx, 5
mov al, byte [ecx + 0x862b74]
mov edx, ebx
shl edx, 5
mov ecx, dword [edx + 0x862b80]
push ecx
movsx edx, al
push edx
lea eax, [ebx + ebx*2]
lea ecx, [eax*4 + 0x8ddd08]
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 str.Were_returning_to__CITYNAME.___NATIONALITY__LOCTYPE_
mov esi, 0x8ebf58
mov dword [edx + 8], ecx
call fcn.004f7660
add esp, 0x18
jmp 0x4627c4
cmp ecx, 0xe
jge 0x4625b9
cmp ecx, 2
jge 0x462571
mov ecx, 2
jmp 0x46257b
cmp ecx, 0x63
jle 0x46257b
mov ecx, 0x63
movsx eax, word [edi + 0x816336]
lea edx, [eax + eax*2]
lea eax, [edx*4 + 0x8ddd08]
mov esi, dword [eax]
sub esp, 0xc
mov edx, esp
mov dword [edx], esi
mov esi, dword [eax + 4]
mov eax, dword [eax + 8]
mov dword [edx + 4], esi
push ecx
push str.Were__NUM_days_out_of__CITYNAME.
mov esi, 0x8ebf58
mov dword [edx + 8], eax
call fcn.004f7660
add esp, 0x14
jmp 0x4627c4
movsx eax, word [edi + 0x816336]
lea edx, [eax + eax*2]
lea eax, [edx*4 + 0x8ddd08]
mov esi, dword [eax]
sub esp, 0xc
mov edx, esp
mov dword [edx], esi
mov esi, dword [eax + 4]
mov eax, dword [eax + 8]
mov dword [edx + 4], esi
mov dword [edx + 8], eax
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 2
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
push ecx
push str.Were__NUM_weeks_out_of__CITYNAME.
mov esi, 0x8ebf58
call fcn.004f7660
add esp, 0x14
jmp 0x4627c4
mov eax, dword [esp + 0x18]
call fcn.00413080
mov eax, dword [0x7287c8]
mov ecx, dword [0x7287cc]
sub esp, 0xc
mov edx, esp
mov dword [edx], eax
mov eax, dword [0x7287d0]
mov dword [edx + 4], ecx
movsx ecx, word [edi + 0x8162f8]
mov dword [edx + 8], eax
movsx edx, word [edi + 0x8162fc]
push ecx
push edx
push str._NATIONALITY__SHIPTYPE__SHIPNAME
mov esi, 0x8ebf58
call fcn.004f7660
add esp, 0x18
cmp word [edi + 0x816344], 0
jne 0x4626f3
mov eax, dword [0x8cc9c8]
lea ecx, [eax + 0x64]
mov eax, dword [0x85c154]
cmp eax, ecx
jle 0x4626f8
test dword [edi + 0x816350], 0x400000
jne 0x4626f8
fild dword [0x816308]
push 0xffffffffffffffff
push 0xbf800000
push 0
fmul dword [0x715610]
push 0xffffffffffffffff
fild dword [0x816304]
push 0xffffffffffffffff
push 0xffffffffffffffff
push 0xffffffffffffffff
fmul dword [0x715610]
sub esp, 0xc
mov edx, esp
mov dword [esp + 0x78], 0
fstp dword [esp + 0x70]
mov eax, dword [esp + 0x70]
mov dword [edx], eax
mov eax, dword [esp + 0x78]
fstp dword [esp + 0x74]
mov ecx, dword [esp + 0x74]
mov dword [edx + 4], ecx
push 9
mov dword [edx + 8], eax
call fcn.004889e0
mov eax, dword [0x85c154]
mov ecx, dword [0x8bb8d4]
add esp, 0x2c
cmp ecx, eax
jge 0x4626f8
mov dword [0x8bb8d4], eax
jmp 0x4626f8
mov eax, dword [0x85c154]
cmp word [edi + 0x816344], 0x19
jne 0x4627c4
mov ecx, dword [0x8cc9c8]
add ecx, 0x7d
cmp eax, ecx
jle 0x4627c4
test dword [edi + 0x816350], 0x400000
jne 0x4627c4
fild dword [edi + 0x816308]
movsx edx, word [edi + 0x8162fc]
push 0xffffffffffffffff
push 0xbf800000
fmul dword [0x715610]
push 0
fild dword [edi + 0x816304]
push 0xffffffffffffffff
push 0xffffffffffffffff
push 0xffffffffffffffff
fmul dword [0x715610]
push 0xffffffffffffffff
sub esp, 0xc
cmp word [edx*2 + 0x86ba78], 0
mov dword [0x8cc9c8], eax
jge 0x462794
fstp dword [esp + 0x64]
mov ecx, dword [esp + 0x64]
mov eax, esp
mov dword [eax], ecx
fstp dword [esp + 0x68]
mov edx, dword [esp + 0x68]
mov dword [esp + 0x6c], 0
mov ecx, dword [esp + 0x6c]
mov dword [eax + 4], edx
mov dword [eax + 8], ecx
push 0xb
jmp 0x4627bc
fstp dword [esp + 0x58]
mov eax, dword [esp + 0x58]
mov edx, esp
mov dword [edx], eax
fstp dword [esp + 0x5c]
mov ecx, dword [esp + 0x5c]
mov dword [esp + 0x60], 0
mov eax, dword [esp + 0x60]
mov dword [edx + 4], ecx
mov dword [edx + 8], eax
push 0xa
call fcn.004889e0
add esp, 0x2c
movsx eax, word [edi + 0x816344]
cdq
mov ecx, 0x28
idiv ecx
cmp edx, 0x1a
jle 0x46281b
movsx edx, word [edi + 0x8162fc]
movsx ecx, word [edx*2 + 0x86ba78]
mov eax, 0x99999999
imul dword [0x8bb984]
sar edx, 2
mov eax, edx
shr eax, 0x1f
shl ecx, 1
add eax, edx
cmp ecx, eax
mov byte [0x86bb48], 0
jge 0x46281b
push str.Stay_clear_you_scurvy_Pirate_
mov esi, 0x8ebf58
call fcn.004f7660
add esp, 4
inc word [edi + 0x816344]
cmp word [edi + 0x8162fa], 1
jne 0x4629d1
push str.Stand_and_fight_you_yellow_bellied_Pirate_
mov esi, 0x8ebf58
call fcn.004f7660
mov ebx, dword [0x8bb984]
mov ebp, dword [sym.imp.MSVCR71.dll_rand]
lea ecx, [ebx + ebx*4]
shl ecx, 3
mov eax, 0x10624dd3
imul ecx
sar edx, 4
mov ecx, edx
shr ecx, 0x1f
lea esi, [edx + ecx + 0xa]
add esp, 4
test esi, esi
jle 0x46287e
call ebp
cdq
idiv esi
test edx, edx
jne 0x4629d7
mov ebx, dword [0x8bb984]
cmp ebx, 0x96
jge 0x4629d7
or ebx, 0xffffffff
lea ecx, [ecx]
call ebp
mov esi, eax
and esi, reloc.OLEAUT32.dll_VariantInit
jns 0x4628a1
dec esi
or esi, 0xfffffff8
inc esi
mov edx, esi
imul edx, edx, 0x45c
cmp word [edx + 0x8162f8], bx
je 0x462890
mov eax, dword [0x85c158]
lea ecx, [eax + 1]
mov eax, 0x7d0
cdq
idiv ecx
mov ebx, eax
test ebx, ebx
jle 0x4628cf
call ebp
cdq
idiv ebx
jmp 0x4628d1
xor edx, edx
imul esi, esi, 0x45c
mov ebp, dword [esi + 0x81630c]
add ebp, 0x40000000
mov eax, edx
mov ecx, ebp
call fcn.004dcac0
mov ebx, eax
mov eax, dword [esi + 0x816310]
shl eax, 1
mov ecx, ebp
call fcn.004dcac0
mov edx, dword [0x85c158]
mov ebp, eax
lea ecx, [edx + 1]
mov eax, 0x7d0
cdq
idiv ecx
test eax, eax
mov dword [esp + 0x28], eax
jle 0x462929
call dword [sym.imp.MSVCR71.dll_rand]
cdq
idiv dword [esp + 0x28]
mov dword [esp + 0x14], edx
jmp 0x462931
mov dword [esp + 0x14], 0
mov ecx, dword [esi + 0x816308]
mov eax, 0x10624dd3
imul ecx
mov ecx, dword [0x81630c]
sar edx, 6
push 1
mov eax, edx
shr eax, 0x1f
add eax, edx
push 0xffffffffffffffff
add eax, ebp
push 0
add eax, ebx
push 0xffffffffffffffff
push eax
mov eax, dword [0x816310]
add eax, eax
call fcn.004dcac0
mov ecx, dword [esi + 0x81630c]
mov ebx, eax
mov eax, dword [esp + 0x28]
call fcn.004dcac0
mov esi, dword [esi + 0x816304]
add ebx, eax
mov eax, 0x10624dd3
imul esi
sar edx, 6
mov ecx, edx
shr ecx, 0x1f
add ebx, edx
add ecx, ebx
push ecx
mov ecx, dword [edi + 0x816308]
mov eax, 0x10624dd3
imul ecx
mov ecx, dword [edi + 0x816304]
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
push eax
mov eax, 0x10624dd3
imul ecx
sar edx, 6
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
push ecx
mov ecx, 0x14
call fcn.0045abf0
add esp, 0x20
mov ebp, dword [sym.imp.MSVCR71.dll_rand]
mov eax, dword [edi + 0x816350]
test ah, 0x40
je 0x462bd2
movsx ecx, word [edi + 0x816344]
mov eax, 0x66666667
imul ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
test al, 1
mov esi, 0x8ebf58
je 0x462a16
push str.Argggh_matey__avast_ye_lubbers_
call fcn.004f7660
add esp, 4
jmp 0x462a49
movsx eax, word [edi + 0x816330]
lea ecx, [eax + eax*2]
lea edx, [ecx*4 + 0x8cd100]
mov ecx, dword [edx]
sub esp, 0xc
mov eax, esp
mov dword [eax], ecx
mov ecx, dword [edx + 4]
mov edx, dword [edx + 8]
mov dword [eax + 4], ecx
push str.Fear_the_dread_pirate__TOP10_
mov dword [eax + 8], edx
call fcn.004f7660
add esp, 0x10
movsx eax, word [edi + 0x816330]
imul eax, eax, 0x1c
test byte [eax + 0x863ffc], 1
je 0x462a6e
push str.Youre_a_no_good_treasure_stealer_
mov esi, 0x8ebf58
call fcn.004f7660
add esp, 4
mov ecx, dword [0x8bb984]
imul ecx, ecx, 0x78
mov eax, 0x10624dd3
imul ecx
sar edx, 4
mov ecx, edx
shr ecx, 0x1f
lea esi, [edx + ecx + 0x14]
test esi, esi
jle 0x462a9b
call ebp
cdq
idiv esi
test edx, edx
jne 0x462bd2
cmp dword [0x8bb984], 0x96
jge 0x462bd2
mov edx, dword [0x85c158]
lea ecx, [edx + 1]
mov eax, 0x3e8
cdq
idiv ecx
mov esi, eax
test esi, esi
jle 0x462acd
call ebp
cdq
idiv esi
mov dword [esp + 0x14], edx
jmp 0x462ad5
mov dword [esp + 0x14], 0
mov eax, dword [0x816310]
mov esi, dword [0x81630c]
add eax, eax
lea ecx, [esi + 0x40000000]
call fcn.004dcac0
mov edx, dword [0x85c158]
mov ebp, eax
lea ecx, [edx + 1]
mov eax, 0x3e8
cdq
idiv ecx
mov ebx, eax
test ebx, ebx
jle 0x462b19
call dword [sym.imp.MSVCR71.dll_rand]
cdq
idiv ebx
mov esi, dword [0x81630c]
mov ebx, edx
jmp 0x462b1b
xor ebx, ebx
mov edx, dword [edi + 0x81630c]
mov eax, dword [esp + 0x14]
push 1
push 0xffffffffffffffff
or edx, 1
push 0
push edx
mov ecx, esi
call fcn.004dcac0
mov ecx, dword [0x816308]
mov dword [esp + 0x38], eax
mov eax, 0x10624dd3
imul ecx
mov ecx, dword [esp + 0x38]
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
add ecx, ebp
add eax, ecx
push eax
mov eax, dword [0x816310]
add eax, eax
mov ecx, esi
call fcn.004dcac0
mov ebp, eax
mov eax, ebx
mov ecx, esi
call fcn.004dcac0
mov ecx, dword [0x816304]
add ebp, eax
mov eax, 0x10624dd3
imul ecx
sar edx, 6
mov ecx, edx
shr ecx, 0x1f
add ebp, edx
add ecx, ebp
push ecx
mov ecx, dword [edi + 0x816308]
mov eax, 0x10624dd3
imul ecx
mov ecx, dword [edi + 0x816304]
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
push eax
mov eax, 0x10624dd3
imul ecx
sar edx, 6
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
push ecx
mov ecx, 0x14
call fcn.0045abf0
mov ebp, dword [sym.imp.MSVCR71.dll_rand]
add esp, 0x20
mov eax, dword [edi + 0x816350]
test ah, 0x20
je 0x462ce9
push str.EVIL_
mov esi, 0x8ebf58
call fcn.004f7660
mov ecx, dword [0x8bb984]
imul ecx, ecx, 0x78
mov eax, 0x10624dd3
imul ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
lea esi, [edx + eax + 0x14]
add esp, 4
test esi, esi
jle 0x462c20
call ebp
cdq
idiv esi
test edx, edx
jne 0x462ce9
cmp dword [0x8bb984], 0x96
jge 0x462ce9
call ebp
cdq
mov ecx, 0x7d0
idiv ecx
mov ecx, dword [0x81630c]
add ecx, 0x40000000
mov eax, edx
call fcn.004dcac0
mov edx, dword [edi + 0x81630c]
push 1
mov ecx, eax
push 0xffffffffffffffff
or edx, 1
push 0
push edx
mov edx, dword [0x816308]
mov eax, 0x10624dd3
imul edx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
add eax, ecx
push eax
call ebp
cdq
mov ecx, 0x7d0
idiv ecx
mov ecx, dword [0x81630c]
mov eax, edx
call fcn.004dcac0
mov ecx, dword [0x816304]
mov esi, eax
mov eax, 0x10624dd3
imul ecx
mov ecx, dword [edi + 0x816308]
sar edx, 6
mov eax, edx
shr eax, 0x1f
add esi, edx
add eax, esi
push eax
mov eax, 0x10624dd3
imul ecx
sar edx, 6
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
push ecx
mov ecx, dword [edi + 0x816304]
mov eax, 0x10624dd3
imul ecx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
push eax
mov ecx, 0x14
call fcn.0045abf0
add esp, 0x20
mov al, byte [0x86bb48]
test al, al
je 0x462df0
mov esi, dword [0x85c164]
mov ecx, esi
and ecx, 0x40
mov eax, 0x32
mov dword [0x85c11c], eax
jne 0x462d31
mov eax, dword [0x727678]
mov edx, dword [esp + 0x1c]
imul eax, eax, 0x124f8
or edx, 1
mov dword [esp + 0x1c], edx
lea ebx, [edx + 0x3e8]
cdq
idiv ebx
mov dword [0x85c11c], eax
test esi, 0x10000000
je 0x462d43
cdq
sub eax, edx
sar eax, 1
mov dword [0x85c11c], eax
movsx ebx, word [edi + 0x816344]
imul ebx, ebx, 0x1e
add ebx, 0xc8
jns 0x462d59
xor ebx, ebx
jmp 0x462d66
cmp ebx, 0x1f4
jle 0x462d66
mov ebx, 0x1f4
mov eax, dword [edi + 0x816350]
test ah, 0x20
je 0x462d76
mov ebx, 0x1f4
neg ecx
sbb ecx, ecx
and ecx, 0xffffffec
add ecx, 0xffffffba
mov dword [esp + 0x28], ecx
fild dword [esp + 0x28]
fmul qword [0x715680]
call fcn.005f275c
mov edx, dword [edi + 0x816308]
mov ecx, eax
mov edi, dword [edi + 0x816304]
mov eax, 0x10624dd3
imul edx
sar edx, 6
mov eax, edx
shr eax, 0x1f
lea esi, [edx + eax - 0x1f4]
mov eax, 0x10624dd3
imul edi
push 0
sar edx, 6
push 0xc
mov eax, edx
shr eax, 0x1f
push ebx
add eax, edx
mov edx, dword [0x8bb8d8]
push edx
push ecx
push 0
push 0x1f4
push esi
push eax
mov eax, 0xff000000
mov ecx, 0x86bb48
call fcn.004af0b0
add esp, 0x24
mov ebx, dword [esp + 0x18]
mov dword [0x85c11c], 0x64
inc ebx
cmp ebx, 0x100
mov dword [esp + 0x18], ebx
jl 0x461e40
mov edx, dword [0x8de310]
lea eax, [esp + 0x20]
push eax
mov eax, dword [0x8de30c]
lea ecx, [esp + 0x28]
push ecx
push edx
push eax
xor edi, edi
call fcn.004aed80
add esp, 0x10
test al, al
je 0x462eab
mov edi, dword [esp + 0x20]
mov ebx, dword [esp + 0x24]
mov ebp, 0x70cb0
mov esi, 0x816308
cmp word [esi - 0x10], 0xffff
je 0x462e9d
mov ecx, dword [esi]
mov eax, 0x10624dd3
imul ecx
sar edx, 6
mov ecx, edx
shr ecx, 0x1f
add edx, ecx
mov ecx, edi
sub ecx, edx
mov edx, dword [esi - 4]
mov eax, 0x10624dd3
imul edx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, ebx
sub eax, edx
jns 0x462e80
neg eax
test ecx, ecx
jge 0x462e86
neg ecx
cmp eax, ecx
jle 0x462e8f
lea eax, [ecx + eax*2]
jmp 0x462e92
lea eax, [eax + ecx*2]
cdq
sub eax, edx
sar eax, 1
cmp eax, ebp
jge 0x462e9d
mov ebp, eax
add esi, 0x45c
cmp esi, 0x85bf08
jl 0x462e46
mov eax, dword [0x85c164]
test ah, ah
jns 0x4632f7
mov edx, dword [0x8de310]
xor edi, edi
test al, al
js 0x46309a
lea eax, [esp + 0x20]
push eax
mov eax, dword [0x8de30c]
lea ecx, [esp + 0x28]
push ecx
push edx
push eax
call fcn.004aed80
add esp, 0x10
test al, al
je 0x4632f7
mov ecx, dword [0x816304]
mov eax, 0x10624dd3
imul ecx
mov ecx, dword [0x816308]
mov esi, dword [esp + 0x20]
mov edi, dword [esp + 0x24]
sar edx, 6
mov ebx, edx
shr ebx, 0x1f
add ebx, edx
mov eax, 0x10624dd3
imul ecx
sar edx, 6
mov ebp, edx
shr ebp, 0x1f
add ebp, edx
sub esi, ebp
sub edi, ebx
mov eax, esi
mov ecx, edi
call fcn.004dcb20
test edi, edi
mov dword [esp + 0x24], eax
jge 0x462f36
neg edi
test esi, esi
jge 0x462f3c
neg esi
cmp edi, esi
lea eax, [esi + edi*2]
jg 0x462f46
lea eax, [edi + esi*2]
cdq
sub eax, edx
sar eax, 1
cmp eax, 0x2710
mov dword [esp + 0x18], eax
jle 0x462f7d
mov dword [esp + 0x18], 0x2710
mov dword [esp + 0x14], 0x14d
movsx eax, byte [0x86bb24]
dec eax
je 0x462fba
dec eax
je 0x462fb0
mov dword [esp + 0x1c], 0x88b8
jmp 0x462fc2
cmp eax, 0x7d0
jge 0x462f8e
mov dword [esp + 0x18], 0x7d0
jmp 0x462f5e
cmp eax, 0x3e8
jge 0x462f5e
fild dword [esp + 0x18]
fmul dword [0x715944]
fsubr dword [0x7158b0]
call fcn.005f275c
mov dword [esp + 0x14], eax
jmp 0x462f66
mov dword [esp + 0x1c], 0xd6d8
jmp 0x462fc2
mov dword [esp + 0x1c], 0xafc8
mov ecx, dword [0x8cbde8]
fild dword [esp + 0x1c]
mov eax, dword [ecx + 4]
lea edx, [eax + 0x128]
mov ecx, 7
fld st(0)
mov esi, edx
lea edi, [esp + 0x54]
rep movsd dword es:[edi], dword [esi]
fld dword [esp + 0x68]
fucompp
mov dword [esp + 0x20], eax
fnstsw ax
test ah, 0x44
jp 0x463008
fld dword [0x715698]
fld dword [esp + 0x64]
fucompp
fnstsw ax
test ah, 0x44
jnp 0x46304a
fld dword [0x715554]
mov ecx, 7
fld st(1)
mov esi, edx
fucompp
lea edi, [esp + 0x54]
rep movsd dword es:[edi], dword [esi]
fnstsw ax
test ah, 0x44
mov dword [esp + 0x64], 0x447a0000
jnp 0x463034
fstp dword [esp + 0x68]
jmp 0x463036
fstp st(0)
mov ecx, dword [esp + 0x20]
lea edx, [esp + 0x54]
call fcn.004cdb50
call fcn.004adca0
jmp 0x46304c
fstp st(0)
mov eax, dword [0x85c164]
mov ecx, dword [esp + 0x18]
and al, 0x80
neg al
lea esi, [ecx + 0x5dc]
sbb eax, eax
and eax, 0xffff3cb0
add eax, 0x186a0
cdq
idiv esi
xor edx, edx
add ecx, 0x3e8
imul eax, eax, 0xb60b60
push eax
mov eax, 0xb60b60
div ecx
mov edx, dword [esp + 0x28]
push 0
imul eax, eax, 0x2710
push eax
mov eax, dword [esp + 0x20]
jmp 0x4632a1
lea eax, [esp + 0x24]
push eax
mov eax, dword [0x8de30c]
lea ecx, [esp + 0x2c]
push ecx
push edx
push eax
call fcn.004aed80
add esp, 0x10
test al, al
je 0x4632f7
mov ecx, dword [0x85c7b0]
mov eax, 0x10624dd3
imul ecx
mov ecx, dword [0x85c7d0]
sar edx, 6
mov ebx, edx
shr ebx, 0x1f
add ebx, edx
mov eax, 0x10624dd3
imul ecx
mov eax, dword [0x85c268]
sar edx, 6
mov edi, dword [0x8de310]
mov ebp, edx
lea ecx, [eax + eax*4]
shr ebp, 0x1f
add ebp, edx
mov eax, 0x2aaaaaab
imul ecx
mov eax, dword [0x85c26c]
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
cdq
sub eax, edx
mov edx, dword [0x8de30c]
sub ecx, edi
sar eax, 1
mov dword [esp + 0x20], ecx
sub edx, eax
fild dword [esp + 0x20]
mov dword [esp + 0x20], edx
fild dword [esp + 0x20]
fxch st(1)
fpatan
fmul qword [0x715650]
fmul qword [0x715850]
call fcn.005f275c
mov ecx, dword [0x85c810]
sub ecx, eax
mov eax, dword [esp + 0x24]
mov dword [esp + 0x14], ecx
mov ecx, dword [esp + 0x28]
sub eax, ebp
sub ecx, ebx
jns 0x46315a
neg ecx
test eax, eax
jge 0x463160
neg eax
cmp ecx, eax
jle 0x463169
lea eax, [eax + ecx*2]
jmp 0x46316c
lea eax, [ecx + eax*2]
movsx ecx, byte [0x86bb24]
cdq
sub eax, edx
sar eax, 1
dec ecx
je 0x463192
dec ecx
je 0x463188
mov dword [esp + 0x18], 0xfa0
jmp 0x46319a
mov dword [esp + 0x18], 0x1f40
jmp 0x46319a
mov dword [esp + 0x18], 0x1770
cmp eax, 0x7d
jge 0x4631a6
mov eax, 0x7d
jmp 0x4631b2
cmp eax, 0xfa0
jle 0x4631b2
mov eax, 0xfa0
mov ecx, dword [0x85c7f0]
lea edx, [ecx + 0x28]
add eax, 0xffffff83
mov dword [esp + 0x20], eax
fild dword [esp + 0x20]
sub ecx, edx
add ecx, 0x1f4
fmul dword [0x715940]
mov dword [esp + 0x20], ecx
fild dword [esp + 0x20]
mov dword [esp + 0x24], edx
fmul st(1)
fiadd dword [esp + 0x24]
call fcn.005f275c
fmul dword [0x71593c]
mov dword [esp + 0x28], eax
fadd dword [0x715938]
call fcn.005f275c
fild dword [esp + 0x18]
mov dword [esp + 0x24], eax
mov eax, dword [0x8cbde8]
mov eax, dword [eax + 4]
fld st(0)
lea edx, [eax + 0x128]
mov ecx, 7
mov esi, edx
lea edi, [esp + 0x54]
rep movsd dword es:[edi], dword [esi]
fld dword [esp + 0x68]
fucompp
mov dword [esp + 0x20], eax
fnstsw ax
test ah, 0x44
jp 0x463249
fld dword [0x715934]
fld dword [esp + 0x64]
fucompp
fnstsw ax
test ah, 0x44
jnp 0x46328b
fld dword [0x715554]
mov ecx, 7
fld st(1)
mov esi, edx
fucompp
lea edi, [esp + 0x54]
rep movsd dword es:[edi], dword [esi]
fnstsw ax
test ah, 0x44
mov dword [esp + 0x64], 0x42fa0000
jnp 0x463275
fstp dword [esp + 0x68]
jmp 0x463277
fstp st(0)
mov ecx, dword [esp + 0x20]
lea edx, [esp + 0x54]
call fcn.004cdb50
call fcn.004adca0
jmp 0x46328d
fstp st(0)
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x28]
push 0x11c71c71
push 0
push ecx
mov ecx, dword [0x8cbde8]
push edx
push eax
push ebp
push ebx
push ecx
call fcn.004db160
mov eax, dword [0x85c26c]
mov esi, dword [0x8cbde8]
mov ecx, dword [0x85c268]
cdq
sub eax, edx
mov edx, dword [0x8de30c]
sar eax, 1
sub edx, eax
mov dword [esi + 0x14], edx
mov eax, ecx
cdq
sub eax, edx
sar eax, 1
sub ecx, eax
mov eax, dword [0x8de310]
mov byte [esi + 0x10], 1
sub ecx, eax
mov dword [esi + 0x18], 0xa
mov dword [esi + 0x1c], ecx
mov dword [esi + 0x20], 0x32
mov ecx, dword [0x85c150]
mov eax, 0x7482296b
imul ecx
sar edx, 0xf
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [0x85c140], eax
mov al, byte [0x8cc9e8]
test al, al
je 0x463328
dec al
mov byte [0x8cc9e8], al
jmp 0x4633f3
mov eax, dword [0x8bb988]
cmp eax, 0xffffffff
je 0x46339f
imul eax, eax, 0x45c
mov cx, word [eax + 0x8162f8]
cmp cx, 0xffff
je 0x46339f
mov edx, dword [eax + 0x816350]
test dl, 8
je 0x46339f
test edx, 0x100000
jne 0x46339f
cmp dword [0x8bb984], 0x96
jge 0x46339f
mov dl, byte [0x85c164]
test dl, dl
js 0x46339f
test byte [0x7273b0], 1
jne 0x46339f
movsx edx, word [eax + 0x8162fc]
movsx ecx, cx
push ecx
push edx
push str.Press_keypad_5_to_attack__NATIONALITY__SHIPTYPE
mov esi, 0x8ebf58
call fcn.004f7660
add esp, 0xc
mov dword [0x85c11c], 0x4b
mov al, byte [0x85c164]
test al, al
jns 0x4633f3
mov eax, dword [0x8bb978]
test eax, eax
jne 0x4633f3
push str.Press_r_to_return_to_ship.
mov esi, 0x8ebf58
call fcn.004f7660
mov eax, dword [0x85c26c]
add esp, 4
push 0
push 0xffffffffffffffff
push 4
cdq
push 0xffffffffffffffff
sub eax, edx
push 0x4b
sar eax, 1
push 8
push eax
push 0x86bb48
xor eax, eax
mov dword [0x85c11c], 0x4b
call fcn.004b0b40
add esp, 0x20
mov eax, dword [0x8bb988]
mov ecx, dword [0x727604]
push eax
push ecx
push str._NUM__NUM
mov esi, 0x8ebf58
call fcn.004f7660
mov al, byte [0x85c164]
add esp, 0xc
test al, 0x20
je 0x46344e
mov eax, dword [0x85c26c]
push 0
push 0xffffffffffffffff
push 4
cdq
push 0xff000000
sub eax, edx
push 0x4b
sar eax, 1
push 0x28
push eax
push 0x86bb48
xor eax, eax
mov dword [0x85c11c], 0x4b
call fcn.004b0b40
add esp, 0x20
mov ebx, dword [0x727678]
mov ecx, dword [0x72ed74]
mov eax, ebx
imul eax, eax, 0x32
cdq
sub eax, edx
mov edx, dword [ecx + 0x28]
sar eax, 1
cmp edx, eax
je 0x4634a0
mov dword [ecx + 0x28], eax
mov dword [esp + 0x30], 0xbf800000
mov edx, dword [esp + 0x30]
add ecx, 0xe4
mov dword [ecx], edx
mov dword [esp + 0x34], 0xbf800000
mov eax, dword [esp + 0x34]
mov dword [esp + 0x38], 0xbf800000
mov edx, dword [esp + 0x38]
mov dword [ecx + 4], eax
mov dword [ecx + 8], edx
mov dword [esp + 0x1c], 0
jmp 0x4634b0
mov ebx, dword [0x727678]
mov al, byte [0x8bb96c]
test al, al
mov ebp, dword [0x8bb6b0]
mov esi, dword [esp + 0x1c]
je 0x4634ee
test esi, esi
jne 0x4634ee
mov eax, dword [0x8bb6b4]
add eax, 8
imul eax, eax, 0x3e8
mov dword [0x8bb8f0], eax
mov eax, ebp
imul eax, eax, 0x3e8
mov dword [0x8bb8e4], eax
mov byte [0x8bb96c], 0
test byte [0x85c164], 4
jne 0x46353b
mov eax, dword [0x727684]
mov esi, dword [0x7273bc]
cdq
and edx, 0xf
add eax, edx
mov edi, eax
sar edi, 4
mov eax, edi
mov ecx, esi
call fcn.004dcac0
mov ecx, dword [esp + 0x1c]
sub dword [ecx*4 + 0x8bb8f0], eax
lea ecx, [esi + 0x40000000]
mov eax, edi
call fcn.004dcac0
mov ecx, dword [esp + 0x1c]
sub dword [ecx*4 + 0x8bb8e4], eax
mov esi, ecx
mov edx, dword [0x8bb6b4]
mov ecx, dword [esi*4 + 0x8bb8f0]
imul edx, edx, 0x3e8
cmp ecx, edx
jge 0x46368b
mov eax, dword [esi*4 + 0x8bb8e4]
imul ebp, ebp, 0x3e8
sub eax, ebp
sub ecx, edx
jns 0x46356b
neg ecx
test eax, eax
jge 0x463571
neg eax
cmp ecx, eax
jle 0x46357a
lea eax, [eax + ecx*2]
jmp 0x46357d
lea eax, [ecx + eax*2]
cdq
sub eax, edx
sar eax, 1
cmp eax, 0x3e80
jle 0x46368b
mov esi, dword [sym.imp.MSVCR71.dll_rand]
call esi
cdq
mov ecx, 3
idiv ecx
mov ecx, dword [0x727678]
lea ecx, [ecx + ecx*2]
shl ecx, 2
mov eax, 0x55555556
mov ebx, dword [esp + 0x1c]
mov edi, edx
imul ecx
mov ecx, dword [0x8bb6b4]
mov eax, edx
shr eax, 0x1f
add eax, edx
sub eax, edi
add eax, ecx
imul eax, eax, 0x3e8
mov dword [ebx*4 + 0x8bb8f0], eax
call esi
cdq
mov ecx, 0x15
idiv ecx
mov ecx, dword [0x81630c]
add ecx, 0x40000000
test ecx, ecx
mov edi, 0xc
mov esi, edx
jns 0x463600
mov edi, 0xfffffff4
and ecx, 0x7fffffff
test ecx, 0x40000000
je 0x463611
mov edx, 0x7fffffff
sub edx, ecx
mov ecx, edx
mov eax, edi
cdq
xor eax, edx
sub eax, edx
cmp eax, 0x7d00
mov ebp, 1
jle 0x46363b
mov eax, edi
cdq
sub eax, edx
sar eax, 1
mov edi, eax
cdq
xor eax, edx
sub eax, edx
add ebp, ebp
cmp eax, 0x7d00
jg 0x463624
mov edx, edi
call fcn.00495330
imul eax, ebp
add esi, eax
mov eax, dword [0x8bb6b0]
lea ecx, [esi + eax - 0xa]
imul ecx, ecx, 0x3e8
test ebx, ebx
mov dword [ebx*4 + 0x8bb8e4], ecx
jne 0x463882
push 0xbf800000
push 0xffffffffffffffff
push 0xffffffffffffffff
push 0x69
or esi, 0xffffffff
mov eax, 0x8ca230
or ecx, 0xffffffff
call fcn.00488840
mov ebx, dword [0x727678]
add esp, 0x10
jmp 0x463693
test esi, esi
jne 0x463888
fld qword [0x8ca4b0]
fmul dword [0x715698]
call fcn.005f275c
xor esi, esi
push esi
push esi
mov edi, eax
lea edx, [ebx + ebx*4]
push esi
lea eax, [esp + 0x60]
shl edx, 4
call fcn.004dc670
mov ecx, dword [0x8bb8f0]
add esp, 0xc
push edi
push esi
push edx
mov edx, eax
mov eax, dword [0x8bb8e4]
push edx
push 0x12c
push eax
push ecx
mov ecx, 0x8ceb58
call fcn.004bc350
cmp dword [0x8ceba8], esi
je 0x46377d
jmp 0x4636f0
mov ecx, dword [0x8cc4e0]
call fcn.00552c40
cmp dword [0x8cc4cc], esi
jne 0x463769
mov edx, dword [0x8cc4c8]
cmp dword [edx + 0xc], esi
jbe 0x463769
mov ecx, dword [0x8cc4e0]
push esi
call fcn.00552ba0
test eax, eax
jne 0x463769
mov ecx, dword [0x8cc4c8]
mov eax, dword [ecx + 4]
mov edx, dword [eax]
cmp edx, esi
mov edi, ecx
mov dword [ecx + 4], edx
je 0x463737
mov dword [edx + 4], esi
jmp 0x46373a
mov dword [ecx + 8], esi
mov edx, dword [ecx]
mov ebp, dword [eax + 8]
push eax
call dword [edx + 8]
mov esi, dword [edi + 0xc]
mov ecx, dword [0x8cc4e0]
mov dword [0x8cc4cc], ebp
mov eax, dword [0x8cc4cc]
dec esi
add eax, 8
mov dword [edi + 0xc], esi
mov eax, dword [eax]
mov eax, dword [eax + 8]
push eax
call fcn.00546910
mov eax, dword [0x8cc4cc]
mov eax, dword [0x8ceba8]
xor esi, esi
cmp eax, esi
jne 0x4636f0
mov ecx, dword [0x8cec14]
cmp ecx, esi
je 0x46379f
cmp dword [0x7283a0], 1
jg 0x46379f
mov eax, ecx
call fcn.004bb170
mov ecx, dword [0x8cec14]
jmp 0x4637a4
mov eax, dword [0x8ceb74]
mov edx, dword [eax + 0x68]
cmp dword [0x8ceba8], esi
mov dword [esp + 0x20], edx
je 0x463852
jmp 0x4637c0
mov ecx, dword [0x8cc4e0]
call fcn.00552c40
cmp dword [0x8cc4cc], esi
jne 0x463838
mov eax, dword [0x8cc4c8]
cmp dword [eax + 0xc], esi
jbe 0x463838
mov ecx, dword [0x8cc4e0]
push esi
call fcn.00552ba0
test eax, eax
jne 0x463838
mov ecx, dword [0x8cc4c8]
mov eax, dword [ecx + 4]
mov edx, dword [eax]
cmp edx, esi
mov edi, ecx
mov dword [ecx + 4], edx
je 0x463806
mov dword [edx + 4], esi
jmp 0x463809
mov dword [ecx + 8], esi
mov edx, dword [ecx]
mov ebp, dword [eax + 8]
push eax
call dword [edx + 8]
mov esi, dword [edi + 0xc]
mov ecx, dword [0x8cc4e0]
mov dword [0x8cc4cc], ebp
mov eax, dword [0x8cc4cc]
dec esi
add eax, 8
mov dword [edi + 0xc], esi
mov eax, dword [eax]
mov eax, dword [eax + 8]
push eax
call fcn.00546910
mov eax, dword [0x8cc4cc]
mov eax, dword [0x8ceba8]
xor esi, esi
cmp eax, esi
jne 0x4637c0
mov ecx, dword [0x8cec14]
cmp ecx, esi
je 0x463868
cmp dword [0x7283a0], 1
jg 0x463868
mov eax, ecx
call fcn.004bb170
jmp 0x46386d
mov eax, dword [0x8ceb74]
fld dword [esp + 0x20]
fmul dword [eax + 0x34]
fmul dword [0x70de8c]
fstp dword [0x8ca1f8]
jmp 0x4638ce
mov ebx, dword [0x727678]
push 0
push 0
push 0
lea eax, [esp + 0x110]
call fcn.004dc670
imul ebx, ebx, 0xfa
add esp, 0xc
push 0
push 0xffffffffffffffff
push ebx
mov ecx, eax
mov eax, dword [esp + 0x28]
mov edx, dword [eax*4 + 0x8bb8e4]
mov eax, dword [eax*4 + 0x8bb8f0]
push ecx
push 0x1f4
push edx
push eax
mov ecx, 0x8ce498
call fcn.004bc350
mov eax, dword [esp + 0x1c]
inc eax
cmp eax, 3
mov dword [esp + 0x1c], eax
jl 0x4634aa
push 0
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x36]
push edx
lea eax, [esp + 0x3b]
push eax
mov byte [esp + 0x3e], 0
mov byte [esp + 0x3f], 0
mov dword [esp + 0x24], 0x3e8
call fcn.00463c30
mov al, byte [0x8bb991]
add esp, 0x10
test al, al
mov ebp, 0x8cccd0
je 0x4639dd
mov edx, dword [0x8eed78]
mov ecx, 0x8eed78
call dword [edx + 0x18]
test al, al
jne 0x463952
push 0
push str.The_audio_manager_has_not_been_properly_initialized_yet
mov eax, 1
call fcn.004887a0
add esp, 8
or esi, 0xffffffff
mov byte [0x8bb991], 0
jmp 0x4639e0
mov al, byte [0x8eaeff]
test al, al
jne 0x463943
xor eax, eax
or esi, 0xffffffff
sub esp, 0x64
mov dword [esp + 0xe8], eax
mov dword [esp + 0xf8], eax
mov dword [esp + 0x114], eax
lea eax, [esp + 0xdc]
mov ebx, esp
mov dword [esp + 0x13c], ebp
mov dword [esp + 0xdc], 0x10
mov dword [esp + 0xe4], 0x58
mov dword [esp + 0xec], esi
mov dword [esp + 0xf0], esi
mov dword [esp + 0xf4], esi
mov dword [esp + 0xfc], esi
mov dword [esp + 0x104], 0x3f800000
call fcn.00498530
mov edi, 0x8e87b4
call fcn.004a1410
mov byte [0x8bb991], 0
jmp 0x4639e0
or esi, 0xffffffff
mov al, byte [esp + 0x2f]
test al, al
je 0x463b45
mov eax, dword [0x8ca200]
cmp eax, dword [0x8ca1fc]
je 0x463a64
mov edx, dword [0x8eed78]
mov ecx, 0x8eed78
call dword [edx + 0x18]
test al, al
jne 0x463a21
push 0
push str.The_audio_manager_has_not_been_properly_initialized_yet
mov eax, 1
call fcn.004887a0
add esp, 8
jmp 0x463a64
sub esp, 0x64
lea eax, [esp + 0xdc]
mov ebx, esp
mov dword [esp + 0x13c], ebp
mov dword [esp + 0xdc], 0x14
mov dword [esp + 0xe4], 0x5f
mov dword [esp + 0x104], 0x3f800000
call fcn.00498530
mov edi, 0x8e87b4
call fcn.004a1410
mov edi, dword [0x8ca200]
test edi, edi
jl 0x463bb0
cmp edi, 0xe
jg 0x463bb0
mov eax, dword [0x8eed78]
mov ecx, 0x8eed78
call dword [eax + 0x18]
test al, al
jne 0x463aa5
push 0
push str.The_audio_manager_has_not_been_properly_initialized_yet
mov eax, 1
call fcn.004887a0
add esp, 8
jmp 0x463b32
mov al, byte [0x8eaeff]
test al, al
jne 0x463b32
sub esp, 0x64
lea eax, [esp + 0xdc]
mov ebx, esp
mov dword [esp + 0x13c], ebp
mov dword [esp + 0xdc], 0x13
mov dword [esp + 0xe4], 0x5f
mov dword [esp + 0xe8], 0
mov dword [esp + 0xec], esi
mov dword [esp + 0xf0], esi
mov dword [esp + 0xf4], esi
mov dword [esp + 0xf8], 1
mov dword [esp + 0xfc], edi
mov dword [esp + 0x104], 0
mov dword [esp + 0x114], 0x8ca244
call fcn.00498530
mov edi, 0x8e87b4
call fcn.004a1410
push 1
push 0x5f
push 0x8ca244
call fcn.00488ea0
add esp, 0xc
jmp 0x463bb0
mov edx, dword [0x8eed78]
mov ecx, 0x8eed78
call dword [edx + 0x18]
test al, al
jne 0x463b6d
push 0
push str.The_audio_manager_has_not_been_properly_initialized_yet
mov eax, 1
call fcn.004887a0
add esp, 8
jmp 0x463bb0
sub esp, 0x64
lea eax, [esp + 0xdc]
mov ebx, esp
mov dword [esp + 0x13c], ebp
mov dword [esp + 0xdc], 0x14
mov dword [esp + 0xe4], 0x5f
mov dword [esp + 0x104], 0x3f800000
call fcn.00498530
mov edi, 0x8e87b4
call fcn.004a1410
mov eax, dword [0x8ca200]
mov dword [0x8ca1fc], eax
mov al, byte [esp + 0x2e]
test al, al
je 0x463bdd
mov edi, dword [esp + 0x14]
mov ecx, 0x64
sub ecx, edi
push ecx
push 0x5f
push 0x8ca244
call fcn.00488ea0
add esp, 0xc
lea esi, [esp + 0x104]
mov edi, 8
lea esp, [esp]
mov ecx, dword [esi - 4]
sub esi, 4
test ecx, ecx
je 0x463c05
dec dword [ecx + 4]
jne 0x463c05
mov edx, dword [ecx]
push 1
call dword [edx]
dec edi
jne 0x463bf0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x11c
ret