Function at 0x4d7380
Capabilities:
Encrypt data using speck

Disassembly:
sub esp, 0x140
push ebx
push ebp
push esi
push edi
or edi, 0xffffffff
push 0xc0
mov dword [esp + 0x34], edi
mov dword [esp + 0x38], edi
call fcn.005354b8
mov esi, eax
xor ecx, ecx
add esp, 4
cmp esi, ecx
je 0x4d79c5
mov eax, dword [0x8ec008]
mov ebp, dword [0x729444]
push ecx
push ecx
push ecx
push ecx
push edi
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
mov dword [esi + 0xbc], ecx
push eax
inc ebp
xor ebx, ebx
mov eax, str.mapShipIcon01.nif
mov ecx, esi
mov dword [0x729444], ebp
call fcn.004be370
mov eax, dword [esi + 4]
inc eax
mov dword [esp + 0x28], esi
mov dword [esi + 4], eax
jmp case.0x4d8915.515
mov al, byte [0x8ccc27]
test al, al
jne case.0x4d8915.523
mov ebp, dword [esp + 0x154]
push ebp
mov word [0x86e330], 0
call fcn.004d9450
mov esi, dword [0x7283c0]
cmp esi, 0xffffffff
jne 0x4d743d
push 0
mov eax, ebp
call fcn.004d92f0
mov esi, dword [0x7283c0]
mov edi, dword [ebp + 8]
mov eax, edi
mov ecx, esi
call fcn.004d96e0
mov ebx, eax
mov eax, edi
mov ecx, esi
mov dword [esp + 0x40], ebx
call fcn.004d9810
mov dword [esp + 0x38], eax
mov eax, edi
mov ecx, esi
call fcn.004d98b0
imul esi, esi, 0x45c
cmp word [esi + 0x816318], 0
mov dword [esp + 0x24], eax
jg 0x4d7483
cmp word [esi + 0x81631a], 0
jle 0x4d7490
cmp dword [0x86bab4], ebx
mov byte [esp + 0x20], 1
jge 0x4d7495
mov byte [esp + 0x20], 0
cmp word [0x86bad0], 1
mov ecx, dword [ebp + 0x10]
setg bl
cmp ecx, 0xffffffff
mov byte [esp + 0x2c], bl
je 0x4d74cb
movsx edx, word [esi + 0x816324]
mov edi, 1
shl edi, cl
test edi, edx
jne 0x4d74cb
cmp dword [0x86bab4], eax
mov byte [esp + 0x19], 1
jg 0x4d74d0
mov byte [esp + 0x19], 0
push 1
call fcn.00404910
add esp, 4
mov edi, eax
push 1
mov dword [esp + 0x20], edi
call fcn.00404a80
add esp, 4
test bl, bl
mov dword [esp + 0x3c], eax
je 0x4d7509
movsx ecx, word [esi + 0x8162f8]
imul ecx, ecx, 0x44
sub edi, dword [ecx + 0x725b1c]
mov byte [esp + 0x1a], 1
js 0x4d750e
mov byte [esp + 0x1a], 0
test bl, bl
je 0x4d7531
movsx edx, word [esi + 0x8162f8]
mov ecx, dword [0x86bab0]
imul edx, edx, 0x44
sub eax, dword [edx + 0x725b14]
cmp eax, ecx
mov byte [esp + 0x1b], 1
jl 0x4d7536
mov byte [esp + 0x1b], 0
call fcn.004d9dc0
mov edx, dword [0x8ccc00]
mov esi, dword [0x85c268]
add edx, 0x7530
mov dword [0x8ccc00], edx
lea eax, [esi + esi*2]
cdq
and edx, 3
add eax, edx
sar eax, 2
mov dword [esp + 0x14], eax
fild dword [esp + 0x14]
mov byte [0x8ccc04], 1
fmul dword [0x7158f0]
call fcn.005f275c
mov edi, dword [0x85c26c]
mov ebx, 0x36
sub ebx, eax
mov eax, edi
cdq
sub eax, edx
sar eax, 1
mov dword [esp + 0x14], eax
fild dword [esp + 0x14]
fadd dword [0x7158ec]
call fcn.005f275c
mov ecx, eax
mov eax, 0x2aaaaaab
imul esi
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [esp + 0x14], eax
mov eax, 0x66666667
imul esi
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
mov edx, dword [esp + 0x14]
sub edx, eax
sub edx, 8
push edx
mov eax, 0x38e38e39
imul edi
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
mov esi, eax
mov eax, 0x55555556
imul edi
mov eax, edx
shr eax, 0x1f
add eax, edx
sub eax, esi
add eax, 0x20
push eax
mov eax, ebx
call fcn.00488110
mov ecx, dword [0x7283c0]
imul ecx, ecx, 0x45c
movsx eax, word [ecx + 0x8162f8]
cdq
mov ecx, 0x1b
idiv ecx
mov edi, dword [0x8ccc00]
sub edi, 0x7530
mov esi, 0x8ebf58
mov dword [0x8ccc00], edi
mov byte [0x8ccc04], 0
mov eax, edx
imul eax, eax, 0x44
mov ecx, dword [eax + 0x725b1c]
push ecx
push edx
push str._SHIPTYPE___NUM_tons_
call fcn.004f7660
add esp, 0x14
push 0
mov ecx, dword [0x85c268]
mov eax, ecx
cdq
and edx, 0x1f
add eax, edx
mov esi, eax
mov eax, 0x2aaaaaab
imul ecx
push 0xffffffffffffffff
sar edx, 2
push 1
mov eax, edx
shr eax, 0x1f
sar esi, 5
add esi, edx
lea ecx, [eax + esi + 0x16]
push 0xffffffffffffffff
push 0x41
push ecx
mov ecx, dword [0x85c26c]
mov eax, ecx
cdq
and edx, 0x1f
add eax, edx
mov esi, eax
mov eax, 0x55555556
imul ecx
mov eax, edx
sar esi, 5
shr eax, 0x1f
add esi, edx
lea ecx, [eax + esi + 0x20]
push ecx
push 0x86bb48
xor eax, eax
call fcn.004b0b40
mov eax, dword [0x7283c0]
and eax, reloc.OLEAUT32.dll_VariantInit
jns 0x4d76c8
dec eax
or eax, 0xfffffff8
inc eax
lea edx, [eax + eax*2]
lea eax, [edx*4 + 0x8dd618]
mov edx, dword [eax]
add esp, 0x14
mov ecx, esp
mov dword [ecx], edx
mov edx, dword [eax + 4]
mov eax, dword [eax + 8]
mov dword [ecx + 4], edx
push 0x701d2c
mov esi, 0x8ebf58
mov dword [ecx + 8], eax
call fcn.004f7660
mov ecx, dword [0x85c26c]
mov eax, ecx
cdq
and edx, 0xf
add eax, edx
mov esi, eax
mov eax, ecx
cdq
sub eax, edx
sar eax, 1
sar esi, 4
sub eax, esi
add eax, 0x40
push 0
push eax
call fcn.00487f30
mov ecx, dword [0x85c268]
mov eax, ecx
cdq
and edx, 0x1f
add eax, edx
mov esi, eax
mov eax, 0x2aaaaaab
imul ecx
push 0
push 0xffffffffffffffff
sar edx, 2
push 1
mov ecx, edx
sar esi, 5
add esi, edx
push 0xffffcc00
shr ecx, 0x1f
add ecx, esi
push 0x64
push ecx
mov ecx, dword [0x85c26c]
mov eax, ecx
cdq
and edx, 0x1f
add eax, edx
mov esi, eax
mov eax, 0x55555556
imul ecx
mov eax, edx
sar esi, 5
shr eax, 0x1f
add esi, edx
lea ecx, [eax + esi + 0x20]
push ecx
push 0x86bb48
xor eax, eax
call fcn.004b0b40
mov al, byte [esp + 0x52]
add esp, 0x38
test al, al
je 0x4d784c
mov edx, dword [0x7283c0]
mov eax, dword [esp + 0x1c]
imul edx, edx, 0x45c
movsx ecx, word [edx + 0x8162f8]
imul ecx, ecx, 0x44
sub eax, dword [ecx + 0x725b1c]
cdq
xor eax, edx
sub eax, edx
push eax
push str.You_will_need_to_dispose_of__NUM_tons_of_cargo_if_you_sell_this_ship._n
mov esi, 0x8ebf58
call fcn.004f7660
push 0
push 0x26
call fcn.00487950
mov ecx, dword [0x85c268]
mov eax, ecx
cdq
and edx, 0x1f
add eax, edx
mov esi, eax
mov eax, 0x2aaaaaab
imul ecx
push 0
sar edx, 2
push 0xffffffffffffffff
mov eax, edx
shr eax, 0x1f
push 1
sar esi, 5
add esi, edx
lea ecx, [eax + esi + 0x26]
push 0xffc00000
push 0x37
push ecx
mov ecx, dword [0x85c26c]
mov eax, ecx
cdq
sub eax, edx
sar eax, 1
add eax, 0x40
cdq
sub eax, edx
mov esi, eax
mov eax, ecx
cdq
and edx, 0x1f
add eax, edx
sar eax, 5
sar esi, 1
add esi, eax
mov eax, 0x55555556
imul ecx
mov eax, edx
shr eax, 0x1f
add esi, edx
lea ecx, [eax + esi + 0x20]
push ecx
push 0x86bb48
xor eax, eax
call fcn.004b0b40
add esp, 0x30
mov edx, dword [0x7283c0]
imul edx, edx, 0x45c
mov ax, word [edx + 0x816318]
test ax, ax
movsx eax, ax
push eax
push str.Sail_Damage:__NUM_
mov esi, 0x8ebf58
setg bl
call fcn.004f7660
mov ecx, dword [0x85c268]
neg bl
mov eax, ecx
cdq
push 0
push 0xffffffffffffffff
push 1
sbb ebx, ebx
and edx, 0x1f
add eax, edx
mov esi, eax
mov eax, 0x2aaaaaab
imul ecx
sar edx, 2
mov ecx, edx
sar esi, 5
add esi, edx
shr ecx, 0x1f
lea edx, [ecx + esi + 0x26]
mov ecx, dword [0x85c26c]
and ebx, 0xffc00001
dec ebx
push ebx
push 0x37
push edx
mov eax, ecx
cdq
and edx, 0x1f
add eax, edx
mov esi, eax
mov eax, 0x55555556
imul ecx
mov eax, edx
sar esi, 5
shr eax, 0x1f
add esi, edx
lea ecx, [eax + esi + 0x20]
push ecx
push 0x86bb48
xor eax, eax
call fcn.004b0b40
mov edx, dword [0x7283c0]
imul edx, edx, 0x45c
mov ax, word [edx + 0x81631a]
test ax, ax
movsx eax, ax
push eax
push str.Hull_Damage:__NUM_
mov esi, 0x8ebf58
setg bl
call fcn.004f7660
mov ecx, dword [0x85c268]
neg bl
mov eax, ecx
cdq
push 0
push 0xffffffffffffffff
push 1
sbb ebx, ebx
and edx, 0x1f
add eax, edx
mov esi, eax
mov eax, 0x2aaaaaab
imul ecx
and ebx, 0xffc00001
dec ebx
sar esi, 5
push ebx
sar edx, 2
push 0x37
mov ecx, edx
add esi, edx
shr ecx, 0x1f
lea edx, [ecx + esi + 0x32]
mov ecx, dword [0x85c26c]
push edx
mov eax, ecx
cdq
and edx, 0x1f
add eax, edx
mov esi, eax
mov eax, 0x55555556
imul ecx
mov eax, edx
sar esi, 5
shr eax, 0x1f
add esi, edx
lea ecx, [eax + esi + 0x20]
push ecx
push 0x86bb48
xor eax, eax
call fcn.004b0b40
mov ecx, dword [ebp + 0x10]
add esp, 0x50
cmp ecx, 0xffffffff
je 0x4d7a8a
mov edx, dword [0x7283c0]
imul edx, edx, 0x45c
movsx eax, word [edx + 0x816324]
mov edx, 1
shl edx, cl
push ecx
mov esi, 0x8ebf58
push ecx
test edx, eax
je 0x4d79ce
push str.The_shipwright_can_upgrade_your_ships_with__UPGRADE___UPGRADED_.
call fcn.004f7660
add esp, 0xc
jmp 0x4d79fa
mov dword [esp + 0x28], ecx
jmp case.0x4d8915.515
push str.The_shipwright_offers_to_upgrade_your_ship_with__UPGRADE___UPGRADED_.
call fcn.004f7660
mov al, byte [esp + 0x25]
add esp, 0xc
test al, al
jne 0x4d79fa
mov eax, dword [esp + 0x24]
push eax
push str.Unfortunately__you_need__NUM_gold.
mov esi, 0x8ebf58
call fcn.004f7680
add esp, 8
push 0
push 0x32
call fcn.00487950
mov ecx, dword [0x85c268]
lea eax, [ecx + ecx*2]
cdq
and edx, 3
add eax, edx
mov esi, eax
mov eax, 0x2aaaaaab
imul ecx
sar edx, 2
mov edi, edx
sar esi, 2
add esi, edx
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 3
mov ecx, edx
shr edi, 0x1f
add edi, esi
shr ecx, 0x1f
add ecx, edx
sub edi, ecx
mov ecx, dword [0x85c26c]
mov eax, 0x55555556
imul ecx
mov esi, edx
push 0
push 0xffffffffffffffff
shr esi, 0x1f
add esi, edx
mov eax, ecx
cdq
push 1
and edx, 0x1f
push 0xffffffffffffffff
add eax, edx
push 0x33
sar eax, 5
sub edi, 0x52
lea edx, [eax + esi*2 - 0x1c]
push edi
push edx
push 0x86bb48
xor eax, eax
mov dword [0x85c11c], 0x33
call fcn.004b0b40
add esp, 0x28
mov ecx, dword [0x85c268]
lea eax, [ecx + ecx*2]
cdq
and edx, 3
add eax, edx
mov esi, eax
mov eax, 0x2aaaaaab
imul ecx
sar edx, 2
mov edi, edx
sar esi, 2
add esi, edx
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 3
mov eax, edx
shr edi, 0x1f
shr eax, 0x1f
add edi, esi
add eax, edx
sub edi, eax
sub edi, 0x5a
mov dword [esp + 0x14], edi
push 0
fild dword [esp + 0x18]
push 0x420c0000
fild dword [0x8cfcd0]
fmul dword [0x7158e8]
faddp st(1)
call fcn.005f275c
mov ecx, dword [0x85c26c]
push eax
mov eax, ecx
cdq
and edx, 0x1f
add eax, edx
mov esi, eax
mov eax, 0x55555556
imul ecx
mov ecx, edx
sar esi, 5
shr ecx, 0x1f
add esi, edx
lea edx, [ecx + esi + 0x20]
mov dword [esp + 0x20], edx
fild dword [esp + 0x20]
fild dword [0x8cfccc]
fmul dword [0x7158e8]
faddp st(1)
call fcn.005f275c
push eax
push 0x8cfc98
call fcn.004bc130
mov eax, dword [0x86bab4]
push eax
push str.Gold:__NUM
mov esi, 0x8ebf58
call fcn.004f7660
mov ecx, dword [0x85c268]
lea eax, [ecx + ecx*2]
cdq
and edx, 3
add eax, edx
mov esi, eax
mov eax, 0x2aaaaaab
imul ecx
sar edx, 2
sar esi, 2
mov edi, edx
add esi, edx
mov eax, 0x92492493
push 0
imul ecx
push 0xffffffffffffffff
push 1
shr edi, 0x1f
push 0xffffffffffffffff
add edi, esi
push 0x41
add edx, ecx
sar edx, 3
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
sub edi, ecx
mov ecx, dword [0x85c26c]
mov eax, ecx
cdq
and edx, 0x1f
add eax, edx
mov esi, eax
mov eax, 0x55555556
imul ecx
mov eax, edx
sar esi, 5
shr eax, 0x1f
add esi, edx
sub edi, 0x54
lea ecx, [eax + esi + 0x38]
push edi
push ecx
push 0x86bb48
xor eax, eax
call fcn.004b0b40
mov esi, dword [esp + 0x50]
add esp, 0x28
test esi, esi
je 0x4d7c7a
mov ecx, dword [0x85c268]
lea eax, [ecx + ecx*2]
cdq
and edx, 3
add eax, edx
mov edi, eax
mov eax, 0x2aaaaaab
imul ecx
sar edx, 2
mov ebx, edx
sar edi, 2
add edi, edx
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 3
mov eax, edx
shr ebx, 0x1f
shr eax, 0x1f
add ebx, edi
add eax, edx
sub ebx, eax
sub ebx, 0x3a
mov dword [esp + 0x14], ebx
push 0
fild dword [esp + 0x18]
push 0x420c0000
fild dword [esi + 0x38]
fmul dword [0x7158e8]
faddp st(1)
call fcn.005f275c
mov ecx, dword [0x85c26c]
push eax
mov eax, ecx
cdq
and edx, 0x1f
add eax, edx
mov edi, eax
mov eax, 0x55555556
imul ecx
mov ecx, edx
sar edi, 5
shr ecx, 0x1f
add edi, edx
lea edx, [ecx + edi + 0x28]
mov dword [esp + 0x20], edx
fild dword [esp + 0x20]
fild dword [esi + 0x34]
fmul dword [0x7158e8]
faddp st(1)
call fcn.005f275c
push eax
push esi
call fcn.004bc130
mov eax, dword [esp + 0x1c]
push eax
push str.Space_in_hold:__NUM_tons
mov esi, 0x8ebf58
call fcn.004f7660
push 0
push 0x1e
call fcn.00487950
mov ecx, dword [0x85c268]
lea eax, [ecx + ecx*2]
cdq
and edx, 3
add eax, edx
mov esi, eax
mov eax, 0x2aaaaaab
imul ecx
sar edx, 2
mov edi, edx
sar esi, 2
add esi, edx
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 3
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
shr edi, 0x1f
add edi, esi
sub edi, ecx
mov ecx, dword [0x85c26c]
mov eax, ecx
cdq
and edx, 0x1f
add eax, edx
mov esi, eax
mov eax, 0x55555556
imul ecx
push 0
push 0xffffffffffffffff
push 1
push 0xffffffffffffffff
mov eax, edx
push 0x41
sar esi, 5
shr eax, 0x1f
add esi, edx
sub edi, 0x42
lea ecx, [eax + esi + 0x38]
push edi
push ecx
push 0x86bb48
xor eax, eax
call fcn.004b0b40
add esp, 0x30
xor ebx, ebx
mov edi, 0x79
mov ebp, 0x8d94d8
mov edx, dword [0x7283c0]
imul edx, edx, 0x45c
movsx eax, word [edx + 0x816324]
mov edx, 1
mov ecx, ebx
shl edx, cl
test edx, eax
je 0x4d7e0d
push ebx
push str._UPGRADE
mov esi, 0x8ebf58
call fcn.004f7660
mov ecx, dword [0x85c26c]
add esp, 8
push 0
push 0x425c0000
lea eax, [edi + 8]
push eax
mov eax, ecx
cdq
and edx, 0x1f
add eax, edx
mov esi, eax
mov eax, 0x66666667
imul ecx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
sar esi, 5
sub esi, eax
mov eax, 0x55555556
imul ecx
mov eax, edx
shr eax, 0x1f
add esi, edx
add eax, esi
mov esi, eax
mov eax, ecx
cdq
sub eax, edx
sar eax, 1
lea ecx, [esi + eax + 0x50]
push ecx
push ebp
call fcn.004bc130
mov ecx, dword [0x85c26c]
mov eax, ecx
cdq
and edx, 0x1f
add eax, edx
mov esi, eax
mov eax, 0x66666667
imul ecx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
sar esi, 5
sub esi, eax
mov eax, 0x55555556
imul ecx
mov eax, edx
shr eax, 0x1f
add esi, edx
add eax, esi
push 0
mov esi, eax
push 0xffffffffffffffff
mov eax, ecx
push 1
cdq
push 0xffffffffffffffff
sub eax, edx
push 0x37
sar eax, 1
lea ecx, [esi + eax + 0x58]
push edi
push ecx
push 0x86bb48
xor eax, eax
call fcn.004b0b40
add esp, 0x20
add edi, 0x10
add ebp, 0xc0
inc ebx
cmp ebp, 0x8d9ad8
jl 0x4d7d22
mov ebx, dword [0x7283c0]
mov edx, ebx
imul edx, edx, 0x45c
movsx eax, word [edx + 0x8162f8]
push eax
lea edi, [esp + 0x18]
lea esi, [esp + 0x50]
lea eax, [esp + 0x4c]
lea ecx, [esp + 0x48]
call fcn.004e1c70
mov ebp, dword [esp + 0x158]
mov eax, dword [ebp + 0x60]
add esp, 4
test eax, eax
jne 0x4d7eae
mov ecx, dword [ebx*4 + 0x8ec014]
test ecx, ecx
je 0x4d7eae
push 0
call fcn.004bbbd0
mov ecx, dword [ebp + 0x60]
mov esi, eax
cmp ecx, esi
je 0x4d7e90
test ecx, ecx
je 0x4d7e86
dec dword [ecx + 4]
jne 0x4d7e86
mov edx, dword [ecx]
push 1
call dword [edx]
test esi, esi
mov dword [ebp + 0x60], esi
je 0x4d7e90
inc dword [esi + 4]
mov eax, dword [ebp + 0x60]
mov ecx, dword [0x8ec008]
mov dword [eax + 0x18], ecx
mov edx, dword [ebp + 0x60]
mov eax, dword [edx + 0xbc]
mov ecx, dword [0x8ec008]
mov dword [eax + 0x18], ecx
mov ecx, dword [esp + 0x44]
mov edx, dword [0x8ca494]
imul ecx, ecx, 0x64
push edx
mov eax, 0x51eb851f
imul ecx
mov ecx, dword [0x85c268]
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
push 0
push eax
mov eax, 0x2aaaaaab
imul ecx
sar edx, 2
mov esi, edx
shr esi, 0x1f
add esi, edx
mov eax, 0x55555556
imul ecx
mov ecx, edx
add esi, edx
shr ecx, 0x1f
add ecx, esi
mov esi, dword [0x85c26c]
mov eax, esi
cdq
and edx, 3
add eax, edx
mov edi, eax
mov eax, 0x55555556
imul esi
push 0
mov eax, edx
shr eax, 0x1f
sar edi, 2
push 0
add edi, edx
lea edx, [eax + edi + 0x40]
mov eax, dword [ebp + 0x60]
push 0x40000000
push eax
mov eax, 0xffffff9c
call fcn.004bc250
mov bl, byte [esp + 0x20]
test bl, bl
jne 0x4d7f73
mov eax, dword [0x7283c0]
imul eax, eax, 0x45c
cmp word [eax + 0x816318], 0
jg 0x4d7f73
cmp word [eax + 0x81631a], 0
jg 0x4d7f73
mov eax, dword [ebp + 0x30]
test eax, eax
je 0x4d81a4
mov edi, 1
or word [eax + 0x20], di
jmp 0x4d81a9
mov ecx, dword [esp + 0x40]
mov eax, dword [ebp + 0x30]
and byte [eax + 0x20], 0xfe
push ecx
push str.Repair_n_NUM_gold
mov esi, 0x8ebf58
call fcn.004f7660
mov eax, dword [0x8ccc18]
imul eax, eax, 0x3c
cdq
and edx, 0x3ff
add esp, 8
add eax, edx
sar eax, 0xa
push 0
mov dword [esp + 0x18], eax
mov eax, dword [0x8cbdd8]
push 0x86bb48
push eax
mov dword [0x85c11c], 0x3c
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 edi, eax
mov eax, dword [ebp + 0xc]
test eax, eax
jne 0x4d8097
mov eax, dword [0x8ccc00]
mov ecx, dword [0x85c268]
add eax, 0x61a8
mov dword [0x8ccc00], eax
mov eax, ecx
cdq
and edx, 0x1f
add eax, edx
mov esi, eax
mov eax, 0x2aaaaaab
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
sar esi, 5
add esi, edx
lea ecx, [eax + esi + 0x1c]
mov esi, dword [0x85c26c]
mov eax, esi
cdq
and edx, 0x1f
add eax, edx
sar eax, 5
mov dword [esp + 0x14], eax
mov eax, 0x55555556
imul esi
mov esi, dword [esp + 0x14]
push 0xa0
push 0xc0204080
push 0x40
mov eax, edx
add esi, edx
lea edx, [edi + 0x60]
push edx
push ecx
shr eax, 0x1f
add eax, esi
push eax
push 0
push 0
push 0
push 0
push 0
mov byte [0x8ccc04], 1
call fcn.004af500
mov eax, dword [0x8ccc00]
add esp, 0x2c
sub eax, 0x61a8
mov dword [0x8ccc00], eax
mov byte [0x8ccc04], 0
mov ecx, dword [0x85c268]
mov al, bl
neg al
push 0
push 0xffffffffffffffff
push 1
sbb eax, eax
and eax, 0x7f000000
add eax, 0x80ffffff
push eax
mov eax, ecx
cdq
and edx, 0x1f
add eax, edx
mov esi, eax
mov eax, 0x2aaaaaab
imul ecx
sar edx, 2
mov ecx, edx
sar esi, 5
add esi, edx
shr ecx, 0x1f
lea edx, [ecx + esi + 0x56]
mov ecx, dword [0x85c26c]
push 0x3c
push edx
mov eax, ecx
cdq
and edx, 0x1f
add eax, edx
mov esi, eax
mov eax, 0x55555556
imul ecx
mov eax, edx
sar esi, 5
shr eax, 0x1f
add esi, edx
lea ecx, [eax + esi + 0x4a]
push ecx
push 0x86bb48
xor eax, eax
call fcn.004b0b40
add esp, 0x20
test bl, bl
je 0x4d81a4
mov ecx, dword [0x85c268]
mov eax, ecx
cdq
and edx, 0x1f
add eax, edx
mov esi, eax
mov eax, 0x2aaaaaab
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
sar esi, 5
add esi, edx
lea ecx, [eax + esi + 0x4e]
mov esi, dword [0x85c26c]
mov eax, esi
cdq
and edx, 0x1f
add eax, edx
mov ebx, eax
mov eax, 0x55555556
imul esi
mov si, word [0x86e330]
mov eax, edx
sar ebx, 5
shr eax, 0x1f
add ebx, edx
lea edx, [eax + ebx + 0x18]
movsx eax, si
shl eax, 1
mov word [eax + 0x86de80], cx
add ecx, 0x2a
mov word [eax + 0x86e010], dx
lea edx, [edi + edx + 0x30]
inc si
mov word [eax + 0x86e1a0], 0
mov word [eax + 0x86dcf0], dx
mov word [eax + 0x86db60], cx
mov word [0x86e330], si
mov edi, 1
mov al, byte [esp + 0x2c]
test al, al
mov eax, dword [ebp + 0x34]
je 0x4d83d9
and byte [eax + 0x20], 0xfe
mov eax, dword [esp + 0x38]
push eax
push str.Sell_n_NUM_gold
mov esi, 0x8ebf58
call fcn.004f7660
mov eax, dword [0x8ccc18]
imul eax, eax, 0x3c
cdq
and edx, 0x3ff
add esp, 8
add eax, edx
sar eax, 0xa
push 0
mov dword [esp + 0x18], eax
mov eax, dword [0x8cbdd8]
push 0x86bb48
push eax
mov dword [0x85c11c], 0x3c
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
cmp dword [ebp + 0xc], edi
jne 0x4d82d6
mov eax, dword [0x8ccc00]
mov ecx, dword [0x85c268]
mov ebx, 0x61a8
add eax, ebx
mov dword [0x8ccc00], eax
mov eax, ecx
cdq
and edx, 0x1f
add eax, edx
mov edi, eax
mov eax, 0x2aaaaaab
imul ecx
sar edx, 2
mov ecx, edx
sar edi, 5
add edi, edx
shr ecx, 0x1f
lea ecx, [ecx + edi + 0x62]
mov edi, dword [0x85c26c]
mov eax, edi
cdq
and edx, 0x1f
add eax, edx
sar eax, 5
mov dword [esp + 0x14], eax
mov eax, 0x55555556
imul edi
mov edi, dword [esp + 0x14]
push 0xa0
push 0xc0204080
push 0x38
mov eax, edx
add edi, edx
lea edx, [esi + 0x60]
push edx
push ecx
shr eax, 0x1f
add eax, edi
push eax
push 0
push 0
push 0
push 0
push 0
mov byte [0x8ccc04], 1
call fcn.004af500
mov eax, dword [0x8ccc00]
add esp, 0x2c
sub eax, ebx
mov dword [0x8ccc00], eax
mov byte [0x8ccc04], 0
mov ecx, dword [0x85c268]
mov eax, ecx
cdq
and edx, 0x1f
add eax, edx
mov edi, eax
mov eax, 0x2aaaaaab
imul ecx
push 0
push 0xffffffffffffffff
sar edx, 2
push 1
mov eax, edx
shr eax, 0x1f
sar edi, 5
add edi, edx
lea ecx, [eax + edi + 0x88]
push 0xffffffffffffffff
push 0x3c
push ecx
mov ecx, dword [0x85c26c]
mov eax, ecx
cdq
and edx, 0x1f
add eax, edx
mov edi, eax
mov eax, 0x55555556
imul ecx
mov eax, edx
sar edi, 5
shr eax, 0x1f
add edi, edx
lea ecx, [eax + edi + 0x4a]
push ecx
push 0x86bb48
xor eax, eax
call fcn.004b0b40
mov ecx, dword [0x85c268]
mov eax, ecx
cdq
and edx, 0x1f
add eax, edx
mov edi, eax
mov eax, 0x2aaaaaab
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
sar edi, 5
add edi, edx
lea ecx, [eax + edi + 0x80]
mov edi, dword [0x85c26c]
mov eax, edi
cdq
and edx, 0x1f
add eax, edx
mov ebx, eax
mov eax, 0x55555556
imul edi
mov di, word [0x86e330]
mov eax, edx
sar ebx, 5
shr eax, 0x1f
add ebx, edx
lea edx, [eax + ebx + 0x18]
movsx eax, di
shl eax, 1
mov word [eax + 0x86de80], cx
add ecx, 0x2a
add esp, 0x20
inc di
mov word [eax + 0x86e010], dx
lea edx, [edx + esi + 0x30]
mov word [0x86e330], di
mov word [eax + 0x86e1a0], 1
mov word [eax + 0x86dcf0], dx
mov word [eax + 0x86db60], cx
mov edi, 1
jmp 0x4d83e1
test eax, eax
je 0x4d83e1
or word [eax + 0x20], di
mov al, byte [esp + 0x19]
test al, al
mov eax, dword [ebp + 0x38]
je 0x4d8630
and byte [eax + 0x20], 0xfe
mov eax, dword [esp + 0x24]
mov ecx, dword [ebp + 0x10]
push eax
push ecx
push str.Upgrade:__UPGRADE_n_NUM_gold
mov esi, 0x8ebf58
call fcn.004f7660
add esp, 0xc
push 0
push 0x23
call fcn.00487950
mov eax, dword [0x8ccc18]
imul eax, eax, 0x3c
cdq
and edx, 0x3ff
add esp, 8
add eax, edx
sar eax, 0xa
push 0
mov dword [esp + 0x18], eax
mov eax, dword [0x8cbdd8]
push 0x86bb48
push eax
mov dword [0x85c11c], 0x3c
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 [ebp + 0xc]
mov ebx, 2
cmp eax, ebx
jne 0x4d8529
mov eax, dword [0x8ccc00]
mov ecx, dword [0x85c268]
add eax, 0x61a8
mov dword [0x8ccc00], eax
mov eax, ecx
cdq
and edx, 0x1f
add eax, edx
mov edi, eax
mov eax, 0x2aaaaaab
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
sar edi, 5
add edi, edx
lea ecx, [eax + edi + 0xa8]
mov edi, dword [0x85c26c]
mov eax, edi
cdq
and edx, 0x1f
add eax, edx
sar eax, 5
mov dword [esp + 0x14], eax
mov eax, 0x55555556
imul edi
mov edi, dword [esp + 0x14]
push 0xa0
push 0xc0204080
push 0x38
mov eax, edx
add edi, edx
lea edx, [esi + 0x60]
push edx
push ecx
shr eax, 0x1f
add eax, edi
push eax
push 0
push 0
push 0
push 0
push 0
mov byte [0x8ccc04], 1
call fcn.004af500
mov eax, dword [0x8ccc00]
add esp, 0x2c
sub eax, 0x61a8
mov dword [0x8ccc00], eax
mov byte [0x8ccc04], 0
mov ecx, dword [0x85c268]
mov eax, ecx
cdq
and edx, 0x1f
add eax, edx
mov edi, eax
mov eax, 0x2aaaaaab
imul ecx
push 0
push 0xffffffffffffffff
sar edx, 2
push 1
mov eax, edx
shr eax, 0x1f
sar edi, 5
add edi, edx
lea ecx, [eax + edi + 0xba]
push 0xffffffffffffffff
push 0x3c
push ecx
mov ecx, dword [0x85c26c]
mov eax, ecx
cdq
and edx, 0x1f
add eax, edx
mov edi, eax
mov eax, 0x55555556
imul ecx
mov eax, edx
sar edi, 5
shr eax, 0x1f
add edi, edx
lea ecx, [eax + edi + 0x4a]
push ecx
push 0x86bb48
xor eax, eax
call fcn.004b0b40
mov ecx, dword [0x85c268]
mov eax, ecx
cdq
and edx, 0x1f
add eax, edx
mov edi, eax
mov eax, 0x2aaaaaab
imul ecx
sar edx, 2
sar edi, 5
add edi, edx
mov eax, edx
shr eax, 0x1f
lea ecx, [eax + edi + 0xb2]
mov edi, dword [0x85c26c]
mov eax, edi
cdq
and edx, 0x1f
add eax, edx
sar eax, 5
mov dword [esp + 0x34], eax
mov eax, 0x55555556
imul edi
mov edi, dword [esp + 0x34]
mov eax, edx
add edi, edx
shr eax, 0x1f
lea edx, [eax + edi + 0x18]
mov di, word [0x86e330]
movsx eax, di
shl eax, 1
mov word [eax + 0x86de80], cx
add ecx, 0x2a
add esp, 0x20
inc di
mov word [eax + 0x86e010], dx
lea edx, [edx + esi + 0x30]
mov word [0x86e330], di
mov word [eax + 0x86e1a0], bx
mov word [eax + 0x86dcf0], dx
mov word [eax + 0x86db60], cx
mov edi, 1
jmp 0x4d8638
test eax, eax
je 0x4d8638
or word [eax + 0x20], di
lea edx, [ebp + 0x3c]
mov ecx, 0x8162f8
mov dword [esp + 0x14], edx
mov esi, 0xfffe
lea esp, [esp]
mov eax, dword [edx]
test eax, eax
je 0x4d8666
cmp word [ecx], 0xffff
jne 0x4d8662
or word [eax + 0x20], di
jmp 0x4d8666
and word [eax + 0x20], si
add ecx, 0x45c
add edx, 4
cmp ecx, 0x8185d8
jl 0x4d8650
mov esi, dword [0x8de30c]
cmp dword [esp + 0x30], esi
mov edx, dword [0x8de310]
jne 0x4d868f
cmp dword [esp + 0x34], edx
je 0x4d86a8
mov dword [esp + 0x30], esi
mov dword [esp + 0x34], edx
call fcn.0042c6c0
mov ebx, dword [ebp + 0xc]
mov edi, eax
mov esi, ebp
call fcn.004d9240
mov eax, dword [ebp + 0x2c]
mov edi, dword [eax + 8]
cmp edi, 3
jl 0x4d875f
cmp edi, 0xa
setle al
test al, al
je 0x4d875f
add edi, 0xfffffffd
lea ecx, [edi + 1]
push ecx
push str.Ship__NUM
mov esi, 0x8ebf58
call fcn.004f7660
imul edi, edi, 0x2a
mov ecx, dword [0x85c268]
lea eax, [ecx + ecx*2]
cdq
and edx, 3
add eax, edx
mov esi, eax
mov eax, 0x2aaaaaab
imul ecx
sar edx, 2
mov ebx, edx
sar esi, 2
add esi, edx
mov eax, 0x92492493
imul ecx
add edx, ecx
mov ecx, dword [0x85c26c]
sar edx, 3
mov eax, edx
shr eax, 0x1f
add eax, edx
shr ebx, 0x1f
add ebx, esi
sub ebx, eax
mov eax, ecx
cdq
and edx, 0x1f
add eax, edx
mov esi, eax
mov eax, 0x55555556
imul ecx
push 0
push 0xffffffffffffffff
push 4
mov ecx, edx
push 0xffffffffffffffff
sar esi, 5
add esi, edx
shr ecx, 0x1f
push 0x33
add ecx, esi
add ebx, 0x16
push ebx
lea edx, [ecx + edi + 0x38]
push edx
push 0x86bb48
xor eax, eax
call fcn.004b0b40
add esp, 0x28
mov ecx, dword [0x85c26c]
mov eax, dword [0x85c268]
add ecx, 0xffffffc6
push 0xb
push ecx
add eax, 0xffffffa6
xor cl, cl
call fcn.0042feb0
push 0
push 0
push 0
call fcn.004d1a40
add esp, 0x14
push str.Menu
call fcn.0042e1a0
mov ebx, eax
mov eax, dword [0x86db5c]
add esp, 4
test eax, eax
je 0x4d87f4
push ebx
push str.Menu
lea edx, [esp + 0x58]
push str._s__03X
push edx
call dword [sym.imp.MSVCR71.dll_sprintf]
mov ecx, dword [0x86db5c]
mov eax, dword [ecx]
add esp, 0x10
lea edx, [esp + 0x50]
push edx
mov edi, ecx
call dword [eax + 4]
mov ecx, dword [edi + 8]
mov esi, dword [ecx + eax*4]
test esi, esi
je 0x4d87f4
mov eax, dword [esi + 4]
mov edx, dword [edi]
push eax
lea ecx, [esp + 0x54]
push ecx
mov ecx, edi
call dword [edx + 8]
test al, al
jne 0x4d87f1
mov esi, dword [esi]
test esi, esi
jne 0x4d87d5
jmp 0x4d87f4
mov ebx, dword [esi + 8]
cmp ebx, 0xd
mov eax, ebx
jne 0x4d8803
mov eax, dword [ebp + 0xc]
add eax, 0x200
cmp eax, 0x138
jg 0x4d8900
cmp eax, 0x131
jge 0x4d88bb
cmp eax, 0x126
jg 0x4d8872
je 0x4d8859
cmp eax, 0x1b
je case.0x4d8915.523
cmp eax, 0x125
jne case.0x4d8915.515
mov eax, dword [0x7283c0]
test eax, eax
jne 0x4d8846
movsx eax, word [0x86bad0]
dec eax
push eax
mov eax, dword [esp + 0x158]
call fcn.004d92f0
jmp case.0x4d8915.515
mov edx, dword [esp + 0x20]
mov cl, byte [esp + 0x19]
push edx
mov dl, byte [esp + 0x30]
mov eax, ebp
call fcn.004d8ff0
jmp case.0x4d8915.515
sub eax, 0x127
je 0x4d889e
dec eax
jne case.0x4d8915.515
mov eax, dword [esp + 0x2c]
mov dl, byte [esp + 0x19]
mov cl, byte [esp + 0x20]
push eax
mov eax, dword [esp + 0x158]
call fcn.004d8e10
jmp case.0x4d8915.515
mov eax, dword [0x7283c0]
movsx ecx, word [0x86bad0]
inc eax
cdq
idiv ecx
mov eax, ebp
push edx
call fcn.004d92f0
jmp case.0x4d8915.515
add eax, 0xfffffecf
js 0x4d88e0
movsx edx, word [0x86bad0]
dec edx
cmp eax, edx
setle cl
test cl, cl
je 0x4d88e0
push eax
mov eax, ebp
call fcn.004d92f0
jmp case.0x4d8915.515
push 0xbf800000
push 0xffffffffffffffff
push 0xffffffffffffffff
push 0x2e
or esi, 0xffffffff
xor eax, eax
or ecx, 0xffffffff
call fcn.00488840
add esp, 0x10
jmp case.0x4d8915.515
add eax, 0xfffffe00
cmp eax, 0xb
ja case.0x4d8915.515
movzx eax, byte [eax + 0x4d8df8]
jmp dword [eax*4 + 0x4d8de4]
mov eax, dword [0x7283c0]
mov esi, dword [0x86bab4]
imul eax, eax, 0x45c
mov ecx, dword [esp + 0x40]
push 0xffffffffffffffff
push 0xbf800000
push 0xffffffffffffffff
push 0xffffffffffffffff
push 0xffffffffffffffff
xor edi, edi
sub esi, ecx
push 0x35
mov word [eax + 0x81631a], di
push 0x8ca270
mov word [eax + 0x816318], di
mov dword [0x86bab4], esi
call fcn.00488920
mov edx, dword [0x7283c0]
movsx eax, word [0x8185fa]
mov ecx, dword [edx*4 + 0x8ec014]
add esp, 0x1c
call fcn.004bd190
mov ecx, dword [0x7283c0]
movsx eax, word [0x8185f8]
mov ecx, dword [ecx*4 + 0x8ec014]
call fcn.004bd130
mov esi, dword [esp + 0x154]
mov ecx, dword [esi + 0x60]
cmp ecx, edi
je 0x4d89b3
dec dword [ecx + 4]
jne 0x4d89b0
mov edx, dword [ecx]
push 1
call dword [edx]
mov dword [esi + 0x60], edi
cmp dword [0x8ccc48], 2
mov dword [esi + 0xc], 0xffffffff
je case.0x4d8915.515
mov eax, dword [0x8ca494]
mov dword [0x8ccc48], 2
mov dword [0x8ccc4c], eax
jmp case.0x4d8915.515
mov eax, dword [0x7283c0]
mov ebp, dword [0x86bab4]
imul eax, eax, 0x45c
mov ecx, dword [esp + 0x24]
mov edi, dword [esp + 0x154]
sub ebp, ecx
mov dword [0x86bab4], ebp
mov ecx, dword [edi + 0x10]
mov edx, 1
shl edx, cl
lea eax, [eax + 0x816324]
or word [eax], dx
mov eax, 4
call fcn.0042e700
mov ecx, dword [edi + 0x10]
mov eax, 1
shl eax, cl
mov dword [edi + 0xc], 0xffffffff
cmp eax, 1
jne 0x4d8a82
mov ecx, dword [0x7283c0]
mov esi, dword [ecx*4 + 0x8ec014]
mov ecx, dword [esi + 0xbc]
test ecx, ecx
je 0x4d8a54
push eax
call fcn.004bce10
mov eax, dword [esi + 0x3c]
test al, 1
jne 0x4d8a69
or eax, 1
push eax
mov ecx, esi
mov dword [esi + 0x3c], eax
call fcn.004bcc90
mov ecx, dword [edi + 0x60]
test ecx, ecx
je 0x4d8a82
dec dword [ecx + 4]
jne 0x4d8a7b
mov edx, dword [ecx]
push 1
call dword [edx]
mov dword [edi + 0x60], 0
cmp dword [0x8ccc48], 4
je case.0x4d8915.515
mov eax, dword [0x8ca494]
mov dword [0x8ccc48], 4
mov dword [0x8ccc4c], eax
jmp case.0x4d8915.515
mov bl, byte [esp + 0x1a]
test bl, bl
mov al, byte [esp + 0x1b]
je 0x4d8ba9
mov ecx, dword [0x7283c0]
imul ecx, ecx, 0x45c
test al, al
je 0x4d8b88
movsx ecx, word [ecx + 0x8162f8]
mov esi, dword [esp + 0x3c]
imul ecx, ecx, 0x44
mov eax, dword [ecx + 0x725b14]
mov edx, dword [0x86bab0]
sub eax, esi
add eax, edx
cdq
xor eax, edx
sub eax, edx
mov edx, dword [ecx + 0x725b1c]
push eax
mov eax, dword [esp + 0x20]
sub eax, edx
cdq
xor eax, edx
sub eax, edx
push eax
push str.Are_you_sure_you_want_to_sell_this_ship_and_dump__NUM_tons_of_cargo_and_lose__NUM_crew__n_Yes__Im_sure._n_On_second_thought__no._n
mov esi, 0x8ebf58
call fcn.004f7660
mov edi, dword [esp + 0x160]
mov edx, dword [edi + 0x28]
mov ecx, dword [edx + 4]
add esp, 0xc
test ecx, ecx
je 0x4d8b28
inc dword [ecx + 4]
or byte [ecx + 0x20], 1
dec dword [ecx + 4]
jne 0x4d8b37
mov eax, dword [ecx]
push 1
call dword [eax]
push 0
push 0x30
mov word [0x86e330], 0
mov dword [0x85c11c], 0x41
call fcn.00487950
mov ecx, dword [0x85c268]
push 0
mov eax, 0x2aaaaaab
imul ecx
push 0
push 0xffffffffffffffff
push 0
push fcn.004d9dc0
sar edx, 2
push 0xffffffffffffffff
mov ecx, edx
push 0
shr ecx, 0x1f
push 0x6f7896
lea edx, [edx + ecx + 0x23]
push edx
jmp 0x4d8c60
movsx edx, word [ecx + 0x8162f8]
mov eax, dword [esp + 0x1c]
imul edx, edx, 0x44
sub eax, dword [edx + 0x725b1c]
cdq
xor eax, edx
sub eax, edx
push eax
push str.Are_you_sure_you_want_to_sell_this_ship_and_dump__NUM_tons_of_cargo__n_Yes__Im_sure._n_On_second_thought__no._n
jmp 0x4d8be4
test al, al
je 0x4d8ca5
mov ecx, dword [0x7283c0]
imul ecx, ecx, 0x45c
movsx edx, word [ecx + 0x8162f8]
mov ecx, dword [0x86bab0]
imul edx, edx, 0x44
mov eax, dword [edx + 0x725b14]
sub eax, dword [esp + 0x3c]
add eax, ecx
cdq
xor eax, edx
sub eax, edx
push eax
push str.Are_you_sure_you_want_to_sell_this_ship_and_lose__NUM_crew__n_Yes__Im_sure._n_On_second_thought__no._n
mov esi, 0x8ebf58
call fcn.004f7660
mov edi, dword [esp + 0x15c]
mov eax, dword [edi + 0x28]
mov ecx, dword [eax + 4]
add esp, 8
test ecx, ecx
je 0x4d8c05
inc dword [ecx + 4]
or byte [ecx + 0x20], 1
dec dword [ecx + 4]
jne 0x4d8c14
mov edx, dword [ecx]
push 1
call dword [edx]
push 0
push 0x30
mov dword [0x85c11c], 0x41
mov word [0x86e330], 0
call fcn.00487950
mov ecx, dword [0x85c268]
push 0
mov eax, 0x2aaaaaab
imul ecx
push 0
push 0xffffffffffffffff
push 0
push fcn.004d9dc0
sar edx, 2
push 0xffffffffffffffff
mov eax, edx
push 0
shr eax, 0x1f
lea ecx, [edx + eax + 0x23]
push 0x6f7896
push ecx
mov ecx, dword [0x85c26c]
mov eax, 0x55555556
imul ecx
mov eax, edx
shr eax, 0x1f
lea ecx, [edx + eax + 0x38]
push ecx
call fcn.00430160
mov edx, dword [edi + 0x28]
mov ecx, dword [edx + 4]
add esp, 0x30
test ecx, ecx
mov esi, eax
je 0x4d8c8e
inc dword [ecx + 4]
and byte [ecx + 0x20], 0xfe
dec dword [ecx + 4]
jne 0x4d8c9d
mov eax, dword [ecx]
push 1
call dword [eax]
test esi, esi
jne case.0x4d8915.515
mov eax, dword [0x7283c0]
call fcn.00404ca0
mov edx, dword [0x86bab4]
mov ecx, dword [esp + 0x38]
add edx, ecx
test bl, bl
mov dword [0x86bab4], edx
je 0x4d8cca
call fcn.00405420
mov esi, dword [esp + 0x14]
mov edi, 8
mov eax, dword [esi]
test eax, eax
je 0x4d8cf5
call fcn.00508cf0
mov ecx, dword [esi]
test ecx, ecx
je 0x4d8cf5
dec dword [ecx + 4]
jne 0x4d8cef
mov edx, dword [ecx]
push 1
call dword [edx]
mov dword [esi], 0
add esi, 4
dec edi
jne 0x4d8cd3
mov eax, dword [0x7283c0]
cmp eax, 7
jge 0x4d8d3d
lea esi, [eax*4 + 0x8ec014]
lea esp, [esp]
mov ecx, dword [esi]
cmp ecx, dword [esi + 4]
je 0x4d8d32
test ecx, ecx
je 0x4d8d26
dec dword [ecx + 4]
jne 0x4d8d26
mov eax, dword [ecx]
push 1
call dword [eax]
mov eax, dword [esi + 4]
test eax, eax
mov dword [esi], eax
je 0x4d8d32
inc dword [eax + 4]
add esi, 4
cmp esi, 0x8ec030
jl 0x4d8d10
movsx esi, word [0x86bad0]
mov ecx, dword [esi*4 + 0x8ec014]
test ecx, ecx
lea esi, [esi*4 + 0x8ec014]
je 0x4d8d67
dec dword [ecx + 4]
jne 0x4d8d61
mov edx, dword [ecx]
push 1
call dword [edx]
mov dword [esi], 0
mov esi, dword [esp + 0x154]
push esi
call fcn.004d9450
movsx ecx, word [0x86bad0]
mov eax, dword [0x7283c0]
or edi, 0xffffffff
dec ecx
cmp eax, ecx
mov dword [0x7283c0], edi
jle 0x4d8d90
mov eax, ecx
push eax
mov eax, esi
call fcn.004d92f0
cmp dword [0x8ccc48], 6
mov dword [esi + 0xc], edi
je case.0x4d8915.515
mov eax, dword [0x8ca494]
mov dword [0x8ccc48], 6
mov dword [0x8ccc4c], eax
jmp case.0x4d8915.515
mov ecx, dword [esp + 0x28]
test ecx, ecx
je 0x4d8dd4
dec dword [ecx + 4]
jne 0x4d8dd4
mov edx, dword [ecx]
push 1
call dword [edx]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x140
ret 4