Function at 0x4ae8a0
Capabilities:
Check http status code

Disassembly:
sub esp, 0xec
mov eax, dword [0xd802ec]
push ebx
push ebp
push esi
mov dword [esp + 0x3c], eax
mov eax, dword [0x16845d0]
xor esi, esi
mov ebx, ecx
cmp eax, esi
mov eax, dword [0xd16a78]
push edi
mov dword [esp + 0x18], ebx
mov dword [esp + 0x28], esi
mov dword [esp + 0x3c], 0xffffffff
je 0x4ae8ed
cmp eax, esi
jne 0x4b1b9f
call fcn.004bb6f0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xec
ret
mov edi, 1
cmp eax, edi
je 0x4b1b9f
cmp eax, 6
je 0x4b1b9f
cmp eax, 4
jne 0x4ae90d
call fcn.004bd570
cmp dword [0xd16b60], edi
je 0x4b1b9f
mov ebp, dword [0x176582c]
mov eax, ebp
shl eax, 4
add eax, ebp
lea ecx, [eax + eax*2]
lea eax, [ebp + ecx*2]
lea edx, [eax + eax*8]
lea eax, [ebp + edx*4]
cmp dword [eax*4 + 0xd5f54c], esi
je 0x4aeb99
cmp dword [0x1a4647c], esi
jne 0x4ae957
cmp dword [0xf0aee4], esi
jne 0x4ae957
dec dword [0xd7ea14]
cmp dword [0xd7ea14], esi
jne 0x4b1b9f
push esi
push 0xffffffffffffffff
mov ecx, 0xfb78d8
mov dword [0xf0aee4], esi
call fcn.0049e8c0
push esi
push 0xffffffffffffffff
mov ecx, 0xf016f8
call fcn.0049e8c0
mov ecx, 0xdbef90
mov dword [0xdbf014], 9
call fcn.00489a50
mov eax, dword [0xd16a78]
cmp eax, esi
jne 0x4aea36
mov eax, dword [0x176582c]
mov esi, 2
mov ecx, eax
shl ecx, 4
add ecx, eax
lea ecx, [ecx + ecx*2]
lea ecx, [eax + ecx*2]
lea edx, [ecx + ecx*8]
lea ecx, [eax + edx*4]
cmp dword [ecx*4 + 0xd5f54c], edi
jne 0x4ae9df
mov ecx, 0xd16a10
call fcn.0046daf0
mov eax, dword [0x176582c]
mov dword [0xd16a70], esi
mov ecx, eax
shl ecx, 4
add ecx, eax
lea edx, [ecx + ecx*2]
lea ecx, [eax + edx*2]
lea ecx, [ecx + ecx*8]
lea edx, [eax + ecx*4]
cmp dword [edx*4 + 0xd5f54c], esi
jne 0x4aea13
push 0
push 0x1e
mov ecx, 0xd16a10
call fcn.0046d170
mov dword [0xd16a70], 0
push 0
push 0x11
call fcn.004a7490
add esp, 8
push 0
push 0x11
call fcn.004a7490
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xec
ret
cmp eax, 5
jne 0x4aeab7
mov eax, dword [0x176582c]
mov ecx, eax
shl ecx, 4
add ecx, eax
lea ecx, [ecx + ecx*2]
lea ecx, [eax + ecx*2]
lea edx, [ecx + ecx*8]
lea ecx, [eax + edx*4]
cmp dword [ecx*4 + 0xd5f54c], edi
jne 0x4aea6b
mov ecx, 0xd16a10
call fcn.0046dcd0
mov eax, dword [0x176582c]
mov ecx, eax
shl ecx, 4
add ecx, eax
lea edx, [ecx + ecx*2]
lea ecx, [eax + edx*2]
lea ecx, [ecx + ecx*8]
lea edx, [eax + ecx*4]
cmp dword [edx*4 + 0xd5f54c], 2
jne 0x4aea95
push esi
push 0x1e
mov ecx, 0xd16a10
call fcn.0046d170
push esi
push 0x11
call fcn.004a7490
add esp, 8
push 0
push 0x11
call fcn.004a7490
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xec
ret
mov esi, 2
cmp eax, esi
jne 0x4aeb82
mov eax, dword [0xd16a7c]
test eax, eax
je 0x4aeaf8
push 0x16
mov dword [0xdbefe4], 7
call fcn.0048c910
add esp, 4
push 0
push 0x11
call fcn.004a7490
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xec
ret
mov eax, dword [0x176582c]
mov ecx, eax
shl ecx, 4
add ecx, eax
lea ecx, [ecx + ecx*2]
lea ecx, [eax + ecx*2]
lea edx, [ecx + ecx*8]
lea ecx, [eax + edx*4]
cmp dword [ecx*4 + 0xd5f54c], edi
jne 0x4aeb52
cmp dword [0xd2b460], esi
jge 0x4aeb31
push 0
push 0x1d
mov ecx, 0xd16a10
call fcn.0046d170
jmp 0x4aeb4d
push 0x1d
mov ecx, 0xdbef90
mov dword [0xd16b60], edi
mov dword [0xdbefe4], 0x2f
call fcn.00489950
mov eax, dword [0x176582c]
mov ecx, eax
shl ecx, 4
add ecx, eax
lea edx, [ecx + ecx*2]
lea ecx, [eax + edx*2]
lea ecx, [ecx + ecx*8]
lea edx, [eax + ecx*4]
cmp dword [edx*4 + 0xd5f54c], esi
jne 0x4aeb7c
push 0
push 0x1e
mov ecx, 0xd16a10
call fcn.0046d170
mov dword [0xd16a70], esi
push 0
push 0x11
call fcn.004a7490
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xec
ret
cmp dword [ebx + 0x13548], esi
je 0x4aebb8
mov eax, dword [ebx + 0x13544]
cmp eax, esi
jle 0x4aebb8
dec eax
mov dword [ebx + 0x13544], eax
mov ebp, dword [0x176582c]
cmp dword [0xd7e000], esi
je 0x4b1b9f
cmp dword [0xd16b1c], esi
je 0x4aec03
mov eax, ebp
mov dword [0xd16b1c], esi
shl eax, 4
add eax, ebp
lea eax, [eax + eax*2]
lea eax, [ebp + eax*2]
lea ecx, [eax + eax*8]
lea edx, [ebp + ecx*4]
mov dword [edx*4 + 0xd5f54c], edi
pop edi
pop esi
pop ebp
mov dword [0xd7ea14], 0xa
pop ebx
add esp, 0xec
ret
mov eax, 0xd802f0
mov ecx, dword [eax]
cmp ecx, esi
je 0x4aec1b
inc ecx
cmp ecx, 0x4b0
mov dword [eax], ecx
jle 0x4aec1b
mov dword [eax], esi
add eax, 4
cmp eax, 0xd80370
jl 0x4aec08
mov eax, dword [0x1545858]
mov ecx, 9
mov dword [esp + 0x30], eax
xor eax, eax
lea edi, [esp + 0xd8]
mov esi, 3
rep stosd dword es:[edi], eax
mov ecx, 9
or eax, 0xffffffff
lea edi, [esp + 0xb4]
rep stosd dword es:[edi], eax
mov ecx, 9
xor eax, eax
lea edi, [esp + 0x90]
rep stosd dword es:[edi], eax
mov ecx, dword [0xd7dfc4]
mov eax, dword [ebx + 0x84]
cmp ecx, eax
jne 0x4aed36
mov edx, dword [ebx + 0x80]
mov eax, dword [0xd7dfc8]
inc edx
cmp eax, edx
jne 0x4aed36
cmp dword [0xdbde64], 1
jne 0x4aed36
mov eax, dword [0xd7dfc0]
test eax, eax
jne 0x4aed36
mov ecx, dword [ebx + 0x5ac]
xor edx, edx
test ecx, ecx
jle 0x4aed36
lea eax, [ebx + 0x5c4]
cmp dword [eax - 0xc], esi
jne 0x4aeccb
cmp dword [eax], 0x1e
jne 0x4aeccb
mov edx, 1
add eax, 0xe4
dec ecx
jne 0x4aecbc
test edx, edx
je 0x4aed36
mov esi, dword [0x1a464b8]
xor edx, edx
test esi, esi
jle 0x4aed10
mov eax, 0x1a46596
cmp word [eax - 2], 0
je 0x4aed06
movsx ecx, word [eax + 4]
cmp ecx, ebp
jne 0x4aed06
mov cx, word [eax]
cmp cx, 0x1b
je 0x4aed36
cmp cx, 0x46
je 0x4aed36
inc edx
add eax, 0x32c
cmp edx, esi
jl 0x4aece8
push str.general_message3.wav
push str.ap_civil12.bik
push 0x12
push 0xc9
mov ecx, 0xcbf3b0
call fcn.0046bcd0
push eax
mov ecx, 0xf0a5c0
call fcn.004b2e80
mov eax, dword [ebx + 0x5ac]
mov dword [esp + 0x14], 0
test eax, eax
jle 0x4b19e4
mov edi, 1
xor esi, esi
jmp 0x4aed5c
xor esi, esi
mov edi, 1
mov ecx, dword [esp + 0x14]
mov edx, ecx
imul edx, edx, 0xe4
mov eax, dword [edx + ebx + 0x5b4]
lea ebp, [edx + ebx]
mov edx, dword [0xd7dfc8]
cmp edx, eax
mov dword [esp + 0x1c], ebp
jl 0x4b19e4
jne 0x4aed99
mov eax, dword [0xd7dfc4]
mov edx, dword [ebp + 0x5b0]
cmp eax, edx
jl 0x4b19e4
cmp word [ebp + 0x5bc], si
jne 0x4b19cd
mov eax, dword [ebp + 0x5b8]
dec eax
je 0x4b147d
dec eax
je 0x4b1471
dec eax
jne 0x4b19cd
mov eax, dword [ebp + 0x5c4]
cmp eax, esi
je 0x4aedd0
cmp eax, 0x1a
jne 0x4aedeb
mov eax, dword [esp + 0x3c]
cmp eax, 0xffffffff
je 0x4aede7
imul eax, eax, 0xe4
mov word [eax + ebx + 0x5bc], di
mov dword [esp + 0x3c], ecx
mov edx, ecx
xor eax, eax
imul edx, edx, 0x39
mov dword [esp + 0x10], esi
mov dword [esp + 0x20], esi
mov dword [esp + 0x2c], eax
mov dword [esp + 0x24], edx
jmp 0x4aee0c
mov edx, dword [esp + 0x24]
mov ecx, dword [esp + 0x14]
lea esi, [edx + eax]
cmp byte [ebx + esi*4 + 0x5cf], 0
lea edi, [ebx + esi*4]
je case.0x4aee4d.24
mov esi, dword [esp + 0x20]
lea ecx, [ecx + ecx*4]
inc esi
cmp eax, 0x27
lea ecx, [eax + ecx*8]
mov dword [esp + 0x20], esi
lea esi, [ebx + ecx*4 + 0xb7d0]
mov dword [esi], 0
ja case.0x4aee4d.24
xor ecx, ecx
mov cl, byte [eax + 0x4b1c10]
jmp dword [ecx*4 + 0x4b1bac]
mov edx, dword [esp + 0x20]
mov dword [esp + 0x10], edx
jmp case.0x4aee4d.24
mov eax, dword [esp + 0x24]
movsx ecx, word [ebx + eax*4 + 0x5d0]
push ecx
mov ecx, ebx
call fcn.004b2d60
mov edx, dword [0x176582c]
mov ecx, edx
shl ecx, 4
add ecx, edx
lea ecx, [ecx + ecx*2]
lea ecx, [edx + ecx*2]
lea ecx, [ecx + ecx*8]
lea edx, [edx + ecx*4]
cmp dword [edx*4 + 0xd5f488], eax
jl 0x4af7b4
mov eax, dword [esp + 0x10]
mov dword [esi], 1
inc eax
mov dword [esp + 0x10], eax
jmp case.0x4aee4d.24
mov ecx, dword [0x176582c]
mov eax, ecx
shl eax, 4
add eax, ecx
lea eax, [eax + eax*2]
lea eax, [ecx + eax*2]
lea edx, [eax + eax*8]
lea eax, [ecx + edx*4]
mov eax, dword [eax*4 + 0xd5f518]
test eax, eax
je case.0x4aee4d.24
mov cl, byte [edi + 0x5ce]
test cl, cl
je 0x4af537
cmp eax, 0xa
je 0x4af537
movsx ecx, cl
inc ecx
cmp ecx, eax
jne 0x4af7b4
mov eax, dword [esp + 0x10]
mov dword [esi], 1
inc eax
mov dword [esp + 0x10], eax
jmp case.0x4aee4d.24
mov ecx, dword [0x176582c]
mov eax, ecx
shl eax, 4
add eax, ecx
lea edx, [eax + eax*2]
lea eax, [ecx + edx*2]
lea eax, [eax + eax*8]
lea ecx, [ecx + eax*4]
mov eax, dword [ecx*4 + 0xd5f51c]
test eax, eax
je 0x4af7b4
mov eax, dword [esp + 0x10]
mov dword [esi], 1
inc eax
mov dword [esp + 0x10], eax
jmp case.0x4aee4d.24
mov edx, dword [esp + 0x24]
mov ecx, ebx
movsx eax, word [ebx + edx*4 + 0x5dc]
push eax
call fcn.004b2d60
mov edx, dword [0x176582c]
mov ecx, edx
shl ecx, 4
add ecx, edx
lea ecx, [ecx + ecx*2]
lea ecx, [edx + ecx*2]
lea ecx, [ecx + ecx*8]
lea edx, [edx + ecx*4]
cmp dword [edx*4 + 0xd5d814], eax
jl 0x4af7b4
mov eax, dword [esp + 0x10]
mov dword [esi], 1
inc eax
mov dword [esp + 0x10], eax
jmp case.0x4aee4d.24
mov eax, dword [esp + 0x24]
mov ecx, ebx
mov dword [esp + 0x44], 0xa
mov dword [esp + 0x48], 0xb
movsx eax, word [ebx + eax*4 + 0x5e0]
push eax
mov dword [esp + 0x50], 0xc
mov dword [esp + 0x54], 0xd
call fcn.004b2d60
mov cl, byte [edi + 0x5ce]
test cl, cl
jne 0x4af010
mov edx, dword [0x176582c]
xor edi, edi
mov ecx, edx
mov ebx, 4
shl ecx, 4
add ecx, edx
lea ecx, [ecx + ecx*2]
lea ecx, [edx + ecx*2]
lea ecx, [ecx + ecx*8]
lea edx, [edx + ecx*4]
lea ecx, [esp + 0x44]
mov ebp, edx
add ebp, dword [ecx]
add ecx, 4
add edi, dword [ebp*4 + 0xd5d7d8]
dec ebx
jne 0x4aeffa
jmp 0x4af195
movsx edi, cl
cmp edi, 8
jne 0x4af01d
mov edi, 7
mov edx, dword [0x176582c]
mov ecx, edx
add edi, edx
shl ecx, 4
add ecx, edx
lea ecx, [ecx + ecx*2]
lea ecx, [edx + ecx*2]
lea ecx, [ecx + ecx*8]
lea edx, [edi + ecx*4]
cmp dword [edx*4 + 0xd5d7d8], eax
jl 0x4af7b4
mov eax, dword [esp + 0x10]
mov dword [esi], 1
inc eax
mov dword [esp + 0x10], eax
jmp case.0x4aee4d.24
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x2c]
add eax, ecx
mov ecx, ebx
mov dword [esp + 0x70], 0x11
mov dword [esp + 0x74], 0x12
movsx eax, word [ebx + eax*4 + 0x5cc]
push eax
mov dword [esp + 0x7c], 0x13
mov dword [esp + 0x80], 0x14
mov dword [esp + 0x84], 0x15
mov dword [esp + 0x88], 0x16
mov dword [esp + 0x8c], 0x17
mov dword [esp + 0x90], 0x18
call fcn.004b2d60
mov cl, byte [edi + 0x5ce]
test cl, cl
jne 0x4af1c8
mov edx, dword [0x176582c]
xor edi, edi
mov ecx, edx
mov ebx, 8
shl ecx, 4
add ecx, edx
lea ecx, [ecx + ecx*2]
lea ecx, [edx + ecx*2]
lea ecx, [ecx + ecx*8]
lea edx, [edx + ecx*4]
lea ecx, [esp + 0x70]
mov ebp, edx
add ebp, dword [ecx]
add ecx, 4
add edi, dword [ebp*4 + 0xd5d7d8]
dec ebx
jne 0x4af0f4
jmp 0x4af195
mov eax, dword [esp + 0x24]
mov ecx, ebx
mov dword [esp + 0x54], 0xe
mov dword [esp + 0x58], 2
movsx eax, word [ebx + eax*4 + 0x5e8]
push eax
mov dword [esp + 0x60], 3
mov dword [esp + 0x64], 4
mov dword [esp + 0x68], 6
mov dword [esp + 0x6c], 7
mov dword [esp + 0x70], 9
call fcn.004b2d60
mov cl, byte [edi + 0x5ce]
test cl, cl
jne 0x4af1c8
mov edx, dword [0x176582c]
xor edi, edi
mov ecx, edx
mov ebx, 7
shl ecx, 4
add ecx, edx
lea ecx, [ecx + ecx*2]
lea ecx, [edx + ecx*2]
lea ecx, [ecx + ecx*8]
lea edx, [edx + ecx*4]
lea ecx, [esp + 0x54]
mov ebp, edx
add ebp, dword [ecx]
add ecx, 4
add edi, dword [ebp*4 + 0xd5d7d8]
dec ebx
jne 0x4af184
cmp edi, eax
jl 0x4af1b5
mov eax, dword [esp + 0x10]
mov ebp, dword [esp + 0x1c]
mov ebx, dword [esp + 0x18]
inc eax
mov dword [esp + 0x10], eax
mov dword [esi], 1
jmp case.0x4aee4d.24
mov ebp, dword [esp + 0x1c]
mov ebx, dword [esp + 0x18]
mov dword [esi], 0
jmp case.0x4aee4d.24
movsx edi, cl
cmp edi, 8
jne 0x4af01d
jmp 0x4af018
mov ecx, dword [0x176582c]
mov eax, ecx
shl eax, 4
add eax, ecx
lea eax, [eax + eax*2]
lea eax, [ecx + eax*2]
lea edx, [eax + eax*8]
lea eax, [ecx + edx*4]
mov edx, dword [eax*4 + 0xd5f450]
test edx, edx
jne 0x4af211
mov eax, dword [esp + 0x10]
mov dword [esi], 1
inc eax
mov dword [esp + 0x10], eax
jmp case.0x4aee4d.24
cmp dword [0xd16a78], 2
jne 0x4af7b4
mov eax, dword [0xd2b460]
test eax, eax
jne 0x4af7b4
cmp ecx, 1
jne 0x4af7b4
mov ecx, 0x1515150
call fcn.0050efe0
test eax, eax
je 0x4af7b4
mov eax, dword [esp + 0x10]
mov dword [esi], 1
inc eax
mov dword [esp + 0x10], eax
jmp case.0x4aee4d.24
mov ecx, dword [0x176582c]
mov eax, ecx
shl eax, 4
add eax, ecx
lea edx, [eax + eax*2]
lea eax, [ecx + edx*2]
lea eax, [eax + eax*8]
lea ecx, [ecx + eax*4]
mov eax, dword [ecx*4 + 0xd5f450]
test eax, eax
jne case.0x4aee4d.24
mov eax, dword [ebp + 0x5c4]
cmp eax, 0x1a
je 0x4af2aa
test eax, eax
je 0x4af2aa
cmp eax, 0x17
je 0x4af2aa
mov eax, dword [esp + 0x10]
mov dword [esi], 1
inc eax
mov dword [esp + 0x10], eax
jmp case.0x4aee4d.24
mov edx, dword [esp + 0x14]
lea ecx, [edx + 1]
mov edx, dword [ebx + 0x5ac]
cmp ecx, edx
jge 0x4af57e
mov eax, ecx
imul eax, eax, 0xe4
lea eax, [eax + ebx + 0x630]
cmp dword [eax - 0x78], 1
jne 0x4af2e4
cmp dword [eax], 0
jne 0x4af2e4
cmp word [eax - 0x74], 0
je case.0x4aee4d.24
inc ecx
add eax, 0xe4
cmp ecx, edx
jl 0x4af2ce
mov eax, dword [esp + 0x10]
mov dword [esi], 1
inc eax
mov dword [esp + 0x10], eax
jmp case.0x4aee4d.24
mov ecx, dword [0x176582c]
push ecx
mov ecx, 0xd2c5c8
call fcn.00456820
test eax, eax
je 0x4af7b4
mov eax, dword [esp + 0x10]
mov dword [esi], 1
inc eax
mov dword [esp + 0x10], eax
jmp case.0x4aee4d.24
mov ecx, dword [0x177bf80]
xor edx, edx
cmp ecx, 1
jle 0x4af57e
mov eax, 0x177c75e
dec ecx
mov edi, 2
cmp word [eax - 2], di
jne 0x4af358
cmp word [eax], 0x2d
jne 0x4af358
inc edx
add eax, 0x490
dec ecx
jne 0x4af34b
test edx, edx
jne 0x4af7b4
mov eax, dword [esp + 0x10]
mov dword [esi], 1
inc eax
mov dword [esp + 0x10], eax
jmp case.0x4aee4d.24
mov ecx, dword [0x176582c]
mov eax, ecx
shl eax, 4
add eax, ecx
lea edx, [eax + eax*2]
lea eax, [ecx + edx*2]
lea eax, [eax + eax*8]
lea ecx, [ecx + eax*4]
mov eax, dword [ecx*4 + 0xd5f450]
test eax, eax
je 0x4af7b4
mov eax, dword [esp + 0x10]
mov dword [esi], 1
inc eax
mov dword [esp + 0x10], eax
jmp case.0x4aee4d.24
mov eax, dword [0x177bf80]
xor edi, edi
cmp eax, 1
jle 0x4af450
mov ebx, dword [0x176582c]
mov ecx, 0x177c75e
lea edx, [eax - 1]
cmp word [ecx - 2], 2
jne 0x4af443
movsx eax, word [ecx + 8]
cmp eax, ebx
jne 0x4af443
mov al, byte [ecx + 0x29e]
test al, al
jne 0x4af443
cmp word [ecx + 0x2ca], 0
jne 0x4af443
mov ax, word [ecx]
cmp ax, 0x1d
je 0x4af443
cmp ax, 0x1e
jne 0x4af412
cmp word [ecx + 0x2fa], 0
je 0x4af443
cmp ax, 0x3a
je 0x4af443
cmp ax, 0x3b
je 0x4af443
cmp ax, 0x3c
je 0x4af443
cmp ax, 0x29
je 0x4af443
cmp ax, 0x3d
je 0x4af443
cmp ax, 0x27
je 0x4af443
cmp ax, 0x4d
je 0x4af443
cmp ax, 0x28
je 0x4af443
inc edi
add ecx, 0x490
dec edx
jne 0x4af3d6
test edi, edi
jne 0x4af468
mov eax, dword [esp + 0x10]
mov ebx, dword [esp + 0x18]
inc eax
mov dword [esi], 1
mov dword [esp + 0x10], eax
jmp case.0x4aee4d.24
mov ebx, dword [esp + 0x18]
mov dword [esi], 0
jmp case.0x4aee4d.24
mov al, byte [edi + 0x5ce]
test al, al
je 0x4af4c6
jle case.0x4aee4d.24
cmp al, 4
jg case.0x4aee4d.24
movsx ecx, word [ebx + edx*4 + 0x600]
movsx eax, al
cmp dword [eax*4 + 0xd7dd48], ecx
jl case.0x4aee4d.24
mov dword [eax*4 + 0xd7dd48], 0
mov eax, dword [esp + 0x10]
inc eax
mov dword [esi], 1
mov dword [esp + 0x10], eax
jmp case.0x4aee4d.24
xor ecx, ecx
mov eax, 0xd7dd44
mov edi, dword [eax]
add eax, 4
add ecx, edi
cmp eax, 0xd7dd68
jl 0x4af4cd
movsx edx, word [ebx + edx*4 + 0x600]
cmp ecx, edx
jl case.0x4aee4d.24
mov ecx, 9
xor eax, eax
mov edi, 0xd7dd44
jmp 0x4af57c
mov al, byte [edi + 0x5ce]
test al, al
je 0x4af54b
jle case.0x4aee4d.24
cmp al, 4
jg case.0x4aee4d.24
movsx ecx, word [ebx + edx*4 + 0x604]
movsx eax, al
cmp dword [eax*4 + 0xd7dd6c], ecx
jl case.0x4aee4d.24
mov dword [eax*4 + 0xd7dd6c], 0
mov eax, dword [esp + 0x10]
mov dword [esi], 1
inc eax
mov dword [esp + 0x10], eax
jmp case.0x4aee4d.24
xor ecx, ecx
mov eax, 0xd7dd68
mov edi, dword [eax]
add eax, 4
add ecx, edi
cmp eax, 0xd7dd8c
jl 0x4af552
movsx edx, word [ebx + edx*4 + 0x604]
cmp ecx, edx
jl case.0x4aee4d.24
mov ecx, 9
xor eax, eax
mov edi, 0xd7dd68
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x10]
mov dword [esi], 1
inc eax
mov dword [esp + 0x10], eax
jmp case.0x4aee4d.24
mov ecx, dword [0x176582c]
mov eax, ecx
shl eax, 4
add eax, ecx
lea eax, [eax + eax*2]
lea eax, [ecx + eax*2]
lea eax, [eax + eax*8]
lea ecx, [ecx + eax*4]
mov ax, word [ecx*4 + 0xd5f586]
cmp ax, word [ebx + edx*4 + 0x61c]
jl case.0x4aee4d.24
mov eax, dword [esp + 0x10]
mov dword [esi], 1
inc eax
mov dword [esp + 0x10], eax
jmp case.0x4aee4d.24
mov ecx, dword [0x176582c]
mov eax, ecx
shl eax, 4
add eax, ecx
movsx edx, word [ebx + edx*4 + 0x624]
lea eax, [eax + eax*2]
neg edx
lea eax, [ecx + eax*2]
lea eax, [eax + eax*8]
lea ecx, [ecx + eax*4]
cmp dword [ecx*4 + 0xd5f43c], edx
jmp 0x4af6bd
mov ecx, dword [0x176582c]
mov eax, ecx
shl eax, 4
add eax, ecx
movsx edx, word [ebx + edx*4 + 0x628]
lea eax, [eax + eax*2]
lea eax, [ecx + eax*2]
lea eax, [eax + eax*8]
lea ecx, [ecx + eax*4]
mov eax, dword [ecx*4 + 0xd5f43c]
jmp 0x4af64b
mov edx, dword [0x176582c]
mov ecx, 0xd2c5c8
push edx
call fcn.00458710
mov ecx, dword [esp + 0x24]
movsx edx, word [ebx + ecx*4 + 0x620]
cmp eax, edx
jl case.0x4aee4d.24
mov eax, dword [esp + 0x10]
mov dword [esi], 1
inc eax
mov dword [esp + 0x10], eax
jmp case.0x4aee4d.24
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x10]
dec eax
cmp ecx, eax
jne 0x4af6d7
push 1
push 0x1a
call fcn.004a7490
mov eax, dword [ebx + 0x13548]
add esp, 8
test eax, eax
jne 0x4af6ab
mov ecx, dword [esp + 0x24]
movsx eax, word [ebx + ecx*4 + 0x668]
lea edx, [eax + eax*2]
lea eax, [eax + edx*8]
shl eax, 5
mov dword [ebx + 0x13544], eax
mov dword [ebx + 0x13540], eax
mov eax, dword [ebx + 0x13544]
mov dword [ebx + 0x13548], 1
test eax, eax
jg case.0x4aee4d.24
mov eax, dword [esp + 0x10]
mov dword [esi], 1
inc eax
mov dword [esp + 0x10], eax
jmp case.0x4aee4d.24
mov eax, dword [ebx + 0x13548]
test eax, eax
je 0x4af6ed
push 0
push 0x1a
call fcn.004a7490
add esp, 8
mov dword [ebx + 0x13548], 0
jmp case.0x4aee4d.24
cmp dword [0xd7dfb4], 1
jne case.0x4aee4d.24
mov eax, dword [esp + 0x10]
mov dword [esi], 1
inc eax
mov dword [esp + 0x10], eax
jmp case.0x4aee4d.24
cmp dword [0xd16a78], 2
je case.0x4aee4d.24
mov ecx, dword [0x1a464b8]
xor edx, edx
cmp ecx, 1
jle 0x4af7b4
mov eax, 0x1a468c2
dec ecx
cmp word [eax - 2], 0
je 0x4af755
cmp word [eax], 0x21
jne 0x4af755
cmp word [eax + 0xca], 0
jne 0x4af755
inc edx
add eax, 0x32c
dec ecx
jne 0x4af73d
cmp edx, 4
jmp 0x4af03f
cmp dword [0xd16a78], 2
je case.0x4aee4d.24
mov ecx, dword [0x1a464b8]
xor edx, edx
cmp ecx, 1
jle 0x4af7b4
mov eax, 0x1a468c2
dec ecx
cmp word [eax - 2], 0
je 0x4af7a3
cmp word [eax], 0x16
jne 0x4af7a3
cmp word [eax + 0xca], 0
jne 0x4af7a3
cmp word [eax + 0x1de], 0
jle 0x4af7a3
inc edx
add eax, 0x32c
dec ecx
jne 0x4af781
cmp edx, 2
jge 0x4af57e
mov dword [esi], 0
mov eax, dword [esp + 0x2c]
inc eax
cmp eax, 0x28
mov dword [esp + 0x2c], eax
jl 0x4aee04
cmp word [ebp + 0x5c8], 0
jne 0x4af7de
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x4af7ee
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x20]
cmp eax, ecx
jl 0x4b19cd
mov eax, 1
mov word [ebp + 0x5bc], ax
mov ecx, dword [ebp + 0x5c4]
mov dword [ecx*4 + 0xd802f0], eax
mov eax, dword [ebp + 0x5c4]
cmp eax, 0x1e
ja case.0x4af816.2
jmp dword [eax*4 + 0x4b1c38]
mov ecx, dword [0x176582c]
mov eax, ecx
shl eax, 4
add eax, ecx
lea edx, [eax + eax*2]
lea eax, [ecx + edx*2]
lea eax, [eax + eax*8]
lea ecx, [ecx + eax*4]
mov eax, dword [ecx*4 + 0xd5f54c]
test eax, eax
jne case.0x4af816.2
mov edx, dword [esp + 0x14]
mov esi, dword [ebx + 0x5ac]
inc edx
cmp edx, esi
jge 0x4af8a0
mov eax, edx
mov edi, dword [0xd7dfc8]
imul eax, eax, 0xe4
lea eax, [eax + ebx + 0x5c4]
mov ebx, dword [0xd7dfc4]
cmp dword [eax - 0xc], 3
jne 0x4af896
mov ecx, dword [eax]
test ecx, ecx
je 0x4af880
cmp ecx, 0x1a
jne 0x4af896
mov ecx, dword [eax - 0x10]
cmp edi, ecx
jl 0x4af896
jne case.0x4af816.2
cmp ebx, dword [eax - 0x14]
jg case.0x4af816.2
inc edx
add eax, 0xe4
cmp edx, esi
jl 0x4af86f
xor eax, eax
mov word [ebp + 0x5bc], ax
mov dword [ebp + 0x5c4], eax
mov ecx, dword [0xd7dfc8]
mov dword [ebp + 0x5b4], ecx
mov edx, dword [0xd7dfc4]
lea eax, [edx + 1]
jmp 0x4aface
mov ecx, dword [0x176582c]
mov eax, ecx
shl eax, 4
add eax, ecx
lea eax, [eax + eax*2]
lea eax, [ecx + eax*2]
lea edx, [eax + eax*8]
lea ecx, [ecx + edx*4]
mov eax, dword [ecx*4 + 0xd5f54c]
test eax, eax
jne case.0x4af816.2
mov eax, dword [esp + 0x14]
mov edi, dword [ebx + 0x5ac]
lea esi, [eax + 1]
cmp esi, edi
jge 0x4af94e
mov edx, esi
mov ebp, dword [0xd7dfc4]
imul edx, edx, 0xe4
lea eax, [edx + ebx + 0x5c4]
mov ebx, dword [0xd7dfc8]
cmp dword [eax - 0xc], 3
jne 0x4af944
mov edx, dword [eax]
test edx, edx
je 0x4af92e
cmp edx, 0x1a
jne 0x4af944
mov edx, dword [eax - 0x10]
cmp ebx, edx
jl 0x4af944
jne case.0x4af816.2
cmp ebp, dword [eax - 0x14]
jg case.0x4af816.2
inc esi
add eax, 0xe4
cmp esi, edi
jl 0x4af91d
mov eax, dword [0xd16a78]
xor edi, edi
cmp eax, edi
je 0x4af967
cmp eax, 5
je 0x4af967
cmp eax, 2
jne case.0x4af816.2
mov esi, 1
push esi
mov dword [ecx*4 + 0xd5f54c], esi
push 0x11
mov dword [0xd7ea14], 0xf0
call fcn.004a7490
mov eax, dword [0xd16a34]
add esp, 8
cmp eax, 0x3d
je 0x4af997
cmp eax, 0x3e
jne 0x4af9ae
mov eax, dword [0xd16a48]
push edi
push 0xe
mov ecx, 0xd16a10
mov dword [0xd16a34], eax
call fcn.0046d170
mov eax, dword [0x177bfa0]
mov dword [0x150c8a4], edi
cmp eax, edi
jle 0x4af9db
mov ecx, 0x177bf80
call fcn.00570570
mov ecx, 0x177bf80
call fcn.00572060
mov ecx, 0x1bd5928
call fcn.00467f80
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
mov dword [ecx + 0x145d8], edi
mov dl, byte [eax + 0x5d3]
test dl, dl
je 0x4afa05
mov dword [ecx + 0x145d8], esi
mov ebx, ecx
call fcn.004b8aa0
jmp 0x4b19cd
mov dl, byte [eax + 0x5df]
test dl, dl
je 0x4afa29
mov ebx, dword [esp + 0x18]
mov dword [ecx + 0x145d8], 2
mov ecx, ebx
call fcn.004b8aa0
jmp 0x4b19cd
mov dl, byte [eax + 0x5e3]
test dl, dl
jne 0x4afa67
mov dl, byte [eax + 0x5e7]
test dl, dl
jne 0x4afa67
mov dl, byte [eax + 0x5eb]
test dl, dl
jne 0x4afa67
mov dl, byte [eax + 0x613]
test dl, dl
jne 0x4afa67
mov ebx, dword [esp + 0x18]
mov dword [ecx + 0x145d8], esi
mov ecx, ebx
call fcn.004b8aa0
jmp 0x4b19cd
mov ebx, dword [esp + 0x18]
mov dword [ecx + 0x145d8], 3
mov ecx, ebx
call fcn.004b8aa0
jmp 0x4b19cd
mov ecx, dword [0x176582c]
mov eax, ecx
shl eax, 4
add eax, ecx
lea edx, [eax + eax*2]
lea eax, [ecx + edx*2]
lea eax, [eax + eax*8]
lea ecx, [ecx + eax*4]
mov eax, dword [ecx*4 + 0xd5f54c]
test eax, eax
jne case.0x4af816.2
mov word [ebp + 0x5bc], 0
mov dword [ebp + 0x5c4], 1
mov edx, dword [0xd7dfc8]
mov dword [ebp + 0x5b4], edx
mov eax, dword [0xd7dfc4]
inc eax
cmp eax, 0xc
mov dword [ebp + 0x5b0], eax
jl case.0x4af816.2
mov ebx, dword [esp + 0x18]
add eax, 0xfffffff4
mov dword [ebp + 0x5b0], eax
mov eax, dword [ebp + 0x5b4]
inc eax
mov ecx, ebx
mov dword [ebp + 0x5b4], eax
call fcn.004b8aa0
jmp 0x4b19cd
mov ecx, dword [0x176582c]
mov eax, ecx
shl eax, 4
add eax, ecx
lea edx, [eax + eax*2]
lea eax, [ecx + edx*2]
lea eax, [eax + eax*8]
lea ecx, [ecx + eax*4]
mov eax, dword [ecx*4 + 0xd5f54c]
test eax, eax
jne case.0x4af816.2
mov eax, dword [0xd16a78]
test eax, eax
je 0x4afb42
cmp eax, 5
je 0x4afb42
cmp eax, 2
jne case.0x4af816.2
mov esi, 2
mov dword [ecx*4 + 0xd5f54c], esi
mov ecx, 0x177bf80
call fcn.005734c0
mov eax, dword [0xd16a78]
mov dword [0xd7ea14], 0xf0
cmp eax, esi
jne 0x4afb7e
mov eax, dword [0xd2b460]
test eax, eax
jne 0x4afb7e
mov dword [0xd7ea14], 0x280
push esi
push 0x11
call fcn.004a7490
mov eax, dword [0xd16a34]
add esp, 8
cmp eax, 0x3d
je 0x4afb98
cmp eax, 0x3e
jne 0x4afbb2
mov ecx, dword [0xd16a48]
push 0
mov dword [0xd16a34], ecx
push 0xe
mov ecx, 0xd16a10
call fcn.0046d170
mov eax, dword [0x177bfa0]
mov dword [0x150c8a4], 0
test eax, eax
jle case.0x4af816.2
mov ecx, 0x177bf80
call fcn.00570570
mov ecx, 0x177bf80
call fcn.00572060
mov ecx, 0x1bd5928
call fcn.00467f80
mov ebx, dword [esp + 0x18]
mov ecx, ebx
call fcn.004b8aa0
jmp 0x4b19cd
push 0xe
mov ecx, 0x1bd5ba0
call fcn.005223f0
mov ebx, dword [esp + 0x18]
mov ecx, ebx
call fcn.004b8aa0
jmp 0x4b19cd
mov eax, dword [ebp + 0x5c0]
test eax, eax
jne 0x4afc22
mov eax, 1
push eax
push 0xe
mov ecx, 0x1bd5ba0
call fcn.00522430
mov ebx, dword [esp + 0x18]
mov ecx, ebx
call fcn.004b8aa0
jmp 0x4b19cd
mov ecx, dword [0x176582c]
xor ebx, ebx
mov eax, ecx
push 0x41
shl eax, 4
add eax, ecx
mov esi, 9
lea edx, [eax + eax*2]
lea eax, [ecx + edx*2]
lea eax, [eax + eax*8]
lea eax, [ecx + eax*4]
shl eax, 2
mov edx, dword [eax + 0xd5d4e8]
mov bl, byte [edx + 0x12579f0]
mov edx, dword [eax + 0xd5d4e4]
mov eax, dword [eax + 0xd5d4e0]
push ebx
shl edx, 3
shl eax, 3
push edx
push eax
movsx eax, word [0xef7aaa]
cdq
idiv esi
push edx
push ecx
mov ecx, 0x177bf80
call fcn.00524f30
mov ecx, dword [0x176582c]
xor ebx, ebx
mov eax, ecx
push 0x41
shl eax, 4
add eax, ecx
lea edx, [eax + eax*2]
lea eax, [ecx + edx*2]
lea eax, [eax + eax*8]
lea eax, [ecx + eax*4]
shl eax, 2
mov edx, dword [eax + 0xd5d4e8]
mov bl, byte [edx + 0x12579f0]
mov edx, dword [eax + 0xd5d4e4]
mov eax, dword [eax + 0xd5d4e0]
push ebx
shl edx, 3
shl eax, 3
push edx
push eax
movsx eax, word [0xef7aaa]
sar eax, 3
cdq
idiv esi
push edx
push ecx
mov ecx, 0x177bf80
call fcn.00524f30
mov ecx, dword [0x176582c]
xor ebx, ebx
mov eax, ecx
push 0x41
shl eax, 4
add eax, ecx
lea edx, [eax + eax*2]
lea eax, [ecx + edx*2]
lea eax, [eax + eax*8]
lea eax, [ecx + eax*4]
shl eax, 2
mov edx, dword [eax + 0xd5d4e8]
mov bl, byte [edx + 0x12579f0]
mov edx, dword [eax + 0xd5d4e4]
mov eax, dword [eax + 0xd5d4e0]
push ebx
shl edx, 3
shl eax, 3
push edx
push eax
movsx eax, word [0xef7aaa]
sar eax, 6
cdq
idiv esi
push edx
push ecx
mov ecx, 0x177bf80
call fcn.00524f30
mov ecx, dword [0x176582c]
xor ebx, ebx
mov eax, ecx
push 0x42
shl eax, 4
add eax, ecx
lea edx, [eax + eax*2]
lea eax, [ecx + edx*2]
lea eax, [eax + eax*8]
lea eax, [ecx + eax*4]
shl eax, 2
mov edx, dword [eax + 0xd5d4e8]
mov bl, byte [edx + 0x12579f0]
mov edx, dword [eax + 0xd5d4e4]
mov eax, dword [eax + 0xd5d4e0]
push ebx
shl edx, 3
shl eax, 3
push edx
push eax
movsx eax, word [0xef7aaa]
sar eax, 9
cdq
idiv esi
push edx
push ecx
mov ecx, 0x177bf80
call fcn.00524f30
mov ecx, dword [0x176582c]
xor ebx, ebx
mov eax, ecx
push 0x42
shl eax, 4
add eax, ecx
lea edx, [eax + eax*2]
lea eax, [ecx + edx*2]
lea eax, [eax + eax*8]
lea eax, [ecx + eax*4]
shl eax, 2
mov edx, dword [eax + 0xd5d4e8]
mov bl, byte [edx + 0x12579f0]
mov edx, dword [eax + 0xd5d4e4]
mov eax, dword [eax + 0xd5d4e0]
push ebx
shl edx, 3
shl eax, 3
push edx
push eax
movsx eax, word [0xef7aaa]
sar eax, 0xc
cdq
idiv esi
push edx
push ecx
mov ecx, 0x177bf80
call fcn.00524f30
mov ecx, dword [str.action_fair.bik]
push str.Random_Events1.wav
push ecx
push 1
push 0xc9
mov ecx, 0xcbf3b0
call fcn.0046bcd0
push eax
mov ecx, 0xf0a5c0
call fcn.004b2e80
mov al, byte [ebp + 0x5ca]
test al, al
je case.0x4af816.2
mov al, byte [ebp + 0x5cb]
cmp al, 1
je case.0x4af816.2
cmp al, 0xa
je 0x4afe53
dec al
mov byte [ebp + 0x5cb], al
xor ecx, ecx
mov word [ebp + 0x5bc], 0
mov cl, byte [ebp + 0x5ca]
cmp ecx, 4
jl 0x4afe82
mov eax, ecx
cdq
and edx, 3
add eax, edx
mov esi, eax
movsx eax, word [0xef7aaa]
cdq
sar esi, 2
idiv esi
add ecx, edx
mov eax, 0x2aaaaaab
imul ecx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, dword [0xd7dfc8]
add eax, edx
lea edx, [edx + edx*2]
mov dword [ebp + 0x5b4], eax
mov eax, dword [0xd7dfc4]
shl edx, 2
sub eax, edx
add eax, ecx
cmp eax, 0xc
mov dword [ebp + 0x5b0], eax
jl 0x4b1320
add eax, 0xfffffff4
mov ebx, dword [esp + 0x18]
mov dword [ebp + 0x5b0], eax
mov eax, dword [ebp + 0x5b4]
inc eax
mov ecx, ebx
mov dword [ebp + 0x5b4], eax
mov eax, dword [esp + 0x14]
dec eax
mov dword [esp + 0x14], eax
call fcn.004b8aa0
jmp 0x4b19cd
mov ebx, dword [esp + 0x18]
mov dword [0xd16ae0], 1
mov ecx, ebx
call fcn.004b8aa0
jmp 0x4b19cd
mov ebx, dword [esp + 0x18]
mov dword [0xd16ae0], 0
mov ecx, ebx
call fcn.004b8aa0
jmp 0x4b19cd
mov ecx, dword [0x176582c]
push ecx
mov ecx, 0xd2c5c8
call fcn.00456eb0
mov edx, dword [0x176582c]
mov ecx, 0x1a464b0
push edx
call fcn.00410f70
mov eax, dword [0x176582c]
mov ecx, 0x1a464b0
push eax
call fcn.00411280
mov ecx, dword [0x176582c]
push ecx
mov ecx, 0x177bf80
call fcn.00528fa0
mov edx, dword [0x176582c]
mov ecx, 0x1a464b0
push edx
call fcn.00410180
mov eax, 0xa
mov esi, 0xe
mov dword [0xd16a34], eax
mov dword [0xd16a44], eax
mov dword [0xd16a48], eax
mov eax, dword [0xd16a1c]
cmp eax, esi
jne 0x4affdb
mov eax, dword [0xd16a20]
cmp eax, 0x30
jne 0x4affba
push 0
push esi
mov ecx, 0xd16a10
call fcn.0046d170
cmp dword [0xd16a1c], esi
jne 0x4affdb
mov eax, dword [0xd16a20]
cmp eax, 0x3d
je 0x4affc4
cmp eax, 0x3e
jne 0x4affdb
push 0
push esi
mov ecx, 0xd16a10
mov dword [0xd16a34], 0x3d
call fcn.0046d170
mov ecx, dword [0x176582c]
mov eax, ecx
shl eax, 4
add eax, ecx
lea eax, [eax + eax*2]
lea eax, [ecx + eax*2]
lea edx, [eax + eax*8]
lea eax, [ecx + edx*4]
shl eax, 2
mov ecx, dword [eax + 0xd5f500]
test ecx, ecx
je case.0x4af816.2
lea edx, [ecx + ecx*8]
lea ecx, [ecx + edx*8]
mov edx, dword [eax + 0xd5f504]
shl ecx, 4
cmp edx, dword [ecx + 0x177c2d8]
je case.0x4af816.2
mov ebx, dword [esp + 0x18]
xor ecx, ecx
mov dword [eax + 0xd5f500], ecx
mov dword [eax + 0xd5f504], ecx
mov ecx, ebx
call fcn.004b8aa0
jmp 0x4b19cd
mov ebx, dword [esp + 0x18]
mov dword [0xd16b70], 1
mov ecx, ebx
call fcn.004b8aa0
jmp 0x4b19cd
mov esi, dword [0x176582c]
mov eax, esi
shl eax, 4
add eax, esi
lea eax, [eax + eax*2]
lea eax, [esi + eax*2]
lea ecx, [eax + eax*8]
lea ecx, [esi + ecx*4]
shl ecx, 2
mov word [ecx + 0xd5f5b4], 0x18
mov eax, dword [ecx + 0xd5d368]
cmp eax, 0x1770
jle 0x4b009f
add eax, 0xffffe890
cdq
sub eax, edx
sar eax, 1
add eax, 0x1770
mov dword [ecx + 0xd5d368], eax
mov edx, dword [ebp + 0x5c0]
mov ecx, 0xd2c5c8
push edx
push esi
call fcn.00459b10
mov eax, dword [str.action_plague.bik]
push str.Random_Events2.wav
push eax
push 2
push 0xc9
mov ecx, 0xcbf3b0
call fcn.0046bcd0
push eax
mov ecx, 0xf0a5c0
call fcn.004b2e80
mov al, byte [ebp + 0x5ca]
test al, al
je case.0x4af816.2
mov al, byte [ebp + 0x5cb]
cmp al, 1
je case.0x4af816.2
cmp al, 0xa
je 0x4b0100
dec al
mov byte [ebp + 0x5cb], al
xor ecx, ecx
mov word [ebp + 0x5bc], 0
mov cl, byte [ebp + 0x5ca]
cmp ecx, 4
jl 0x4b012f
mov eax, ecx
cdq
and edx, 3
add eax, edx
mov esi, eax
movsx eax, word [0xef7aaa]
cdq
sar esi, 2
idiv esi
add ecx, edx
mov eax, 0x2aaaaaab
imul ecx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, dword [0xd7dfc8]
add eax, edx
lea edx, [edx + edx*2]
mov dword [ebp + 0x5b4], eax
mov eax, dword [0xd7dfc4]
shl edx, 2
sub eax, edx
add eax, ecx
cmp eax, 0xc
mov dword [ebp + 0x5b0], eax
jl 0x4b1320
add eax, 0xfffffff4
mov ebx, dword [esp + 0x18]
mov dword [ebp + 0x5b0], eax
mov eax, dword [ebp + 0x5b4]
inc eax
mov ecx, ebx
mov dword [ebp + 0x5b4], eax
mov eax, dword [esp + 0x14]
dec eax
mov dword [esp + 0x14], eax
call fcn.004b8aa0
jmp 0x4b19cd
mov ecx, dword [0x176582c]
push 0x1e
push ecx
mov ecx, 0x1a464b0
call fcn.0040cde0
test eax, eax
je 0x4b01e8
mov edx, dword [0x176582c]
mov ecx, 0x1a464b0
push edx
call fcn.00410ee0
mov eax, dword [str.action_wheat_die.bik]
push str.Random_Events3.wav
push eax
push 3
push 0xc9
mov ecx, 0xcbf3b0
call fcn.0046bcd0
push eax
mov ecx, 0xf0a5c0
call fcn.004b2e80
mov al, byte [ebp + 0x5ca]
test al, al
je case.0x4af816.2
mov al, byte [ebp + 0x5cb]
cmp al, 1
je case.0x4af816.2
cmp al, 0xa
je 0x4b0210
dec al
mov byte [ebp + 0x5cb], al
xor ecx, ecx
mov word [ebp + 0x5bc], 0
mov cl, byte [ebp + 0x5ca]
cmp ecx, 4
jl 0x4b023f
mov eax, ecx
cdq
and edx, 3
add eax, edx
mov esi, eax
movsx eax, word [0xef7aaa]
cdq
sar esi, 2
idiv esi
add ecx, edx
mov eax, 0x2aaaaaab
imul ecx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, dword [0xd7dfc8]
add eax, edx
lea edx, [edx + edx*2]
mov dword [ebp + 0x5b4], eax
mov eax, dword [0xd7dfc4]
shl edx, 2
sub eax, edx
add eax, ecx
cmp eax, 0xc
mov dword [ebp + 0x5b0], eax
jl 0x4b1320
add eax, 0xfffffff4
mov ebx, dword [esp + 0x18]
mov dword [ebp + 0x5b0], eax
mov eax, dword [ebp + 0x5b4]
inc eax
mov ecx, ebx
mov dword [ebp + 0x5b4], eax
mov eax, dword [esp + 0x14]
dec eax
mov dword [esp + 0x14], eax
call fcn.004b8aa0
jmp 0x4b19cd
mov ecx, dword [0x176582c]
push 0x1f
push ecx
mov ecx, 0x1a464b0
call fcn.0040cde0
test eax, eax
je 0x4b02f8
mov edx, dword [0x176582c]
mov ecx, 0x1a464b0
push edx
call fcn.00412dd0
mov eax, dword [str.action_hops_die.bik]
push str.Random_Events4.wav
push eax
push 4
push 0xc9
mov ecx, 0xcbf3b0
call fcn.0046bcd0
push eax
mov ecx, 0xf0a5c0
call fcn.004b2e80
mov al, byte [ebp + 0x5ca]
test al, al
je case.0x4af816.2
mov al, byte [ebp + 0x5cb]
cmp al, 1
je case.0x4af816.2
cmp al, 0xa
je 0x4b0320
dec al
mov byte [ebp + 0x5cb], al
xor ecx, ecx
mov word [ebp + 0x5bc], 0
mov cl, byte [ebp + 0x5ca]
cmp ecx, 4
jl 0x4b034f
mov eax, ecx
cdq
and edx, 3
add eax, edx
mov esi, eax
movsx eax, word [0xef7aaa]
cdq
sar esi, 2
idiv esi
add ecx, edx
mov eax, 0x2aaaaaab
imul ecx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, dword [0xd7dfc8]
add eax, edx
lea edx, [edx + edx*2]
mov dword [ebp + 0x5b4], eax
mov eax, dword [0xd7dfc4]
shl edx, 2
sub eax, edx
add eax, ecx
cmp eax, 0xc
mov dword [ebp + 0x5b0], eax
jl 0x4b1320
add eax, 0xfffffff4
mov ebx, dword [esp + 0x18]
mov dword [ebp + 0x5b0], eax
mov eax, dword [ebp + 0x5b4]
inc eax
mov ecx, ebx
mov dword [ebp + 0x5b4], eax
mov eax, dword [esp + 0x14]
dec eax
mov dword [esp + 0x14], eax
call fcn.004b8aa0
jmp 0x4b19cd
mov ecx, dword [0x176582c]
push 0x20
push ecx
mov ecx, 0x1a464b0
call fcn.0040cde0
test eax, eax
je 0x4b0421
mov edx, dword [0x176582c]
mov ecx, 0x1a464b0
push edx
call fcn.00412f20
push str.Random_Events5.wav
push 0x69663c
push 5
push 0xc9
mov ecx, 0xcbf3b0
call fcn.0046bcd0
push eax
mov ecx, 0xf0a5c0
call fcn.004b2e80
mov eax, dword [str.action_apples_die.bik]
push 0x69663c
push eax
push 0x69663c
mov ecx, 0xf0a5c0
call fcn.004b2e80
mov al, byte [ebp + 0x5ca]
test al, al
je case.0x4af816.2
mov al, byte [ebp + 0x5cb]
cmp al, 1
je case.0x4af816.2
cmp al, 0xa
je 0x4b0449
dec al
mov byte [ebp + 0x5cb], al
xor ecx, ecx
mov word [ebp + 0x5bc], 0
mov cl, byte [ebp + 0x5ca]
cmp ecx, 4
jl 0x4b0478
mov eax, ecx
cdq
and edx, 3
add eax, edx
mov esi, eax
movsx eax, word [0xef7aaa]
cdq
sar esi, 2
idiv esi
add ecx, edx
mov eax, 0x2aaaaaab
imul ecx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, dword [0xd7dfc8]
add eax, edx
lea edx, [edx + edx*2]
mov dword [ebp + 0x5b4], eax
mov eax, dword [0xd7dfc4]
shl edx, 2
sub eax, edx
add eax, ecx
cmp eax, 0xc
mov dword [ebp + 0x5b0], eax
jl 0x4b1320
add eax, 0xfffffff4
mov ebx, dword [esp + 0x18]
mov dword [ebp + 0x5b0], eax
mov eax, dword [ebp + 0x5b4]
inc eax
mov ecx, ebx
mov dword [ebp + 0x5b4], eax
mov eax, dword [esp + 0x14]
dec eax
mov dword [esp + 0x14], eax
call fcn.004b8aa0
jmp 0x4b19cd
mov ecx, 0x16188b8
call fcn.004e8db0
mov ecx, dword [str.action_trees_die.bik]
push str.Random_Events6.wav
push ecx
push 6
push 0xc9
mov ecx, 0xcbf3b0
call fcn.0046bcd0
push eax
mov ecx, 0xf0a5c0
call fcn.004b2e80
mov al, byte [ebp + 0x5ca]
test al, al
je case.0x4af816.2
mov al, byte [ebp + 0x5cb]
cmp al, 1
je case.0x4af816.2
cmp al, 0xa
je 0x4b053c
dec al
mov byte [ebp + 0x5cb], al
xor ecx, ecx
mov word [ebp + 0x5bc], 0
mov cl, byte [ebp + 0x5ca]
cmp ecx, 4
jl 0x4b056b
mov eax, ecx
cdq
and edx, 3
add eax, edx
mov esi, eax
movsx eax, word [0xef7aaa]
cdq
sar esi, 2
idiv esi
add ecx, edx
mov eax, 0x2aaaaaab
imul ecx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, dword [0xd7dfc8]
add eax, edx
lea edx, [edx + edx*2]
mov dword [ebp + 0x5b4], eax
mov eax, dword [0xd7dfc4]
shl edx, 2
sub eax, edx
add eax, ecx
cmp eax, 0xc
mov dword [ebp + 0x5b0], eax
jl 0x4b1320
add eax, 0xfffffff4
mov ebx, dword [esp + 0x18]
mov dword [ebp + 0x5b0], eax
mov eax, dword [ebp + 0x5b4]
inc eax
mov ecx, ebx
mov dword [ebp + 0x5b4], eax
mov eax, dword [esp + 0x14]
dec eax
mov dword [esp + 0x14], eax
call fcn.004b8aa0
jmp 0x4b19cd
mov ecx, 0x1bd5ba0
call fcn.00521630
test eax, eax
je 0x4b0667
mov ecx, dword [0x176582c]
push 0x1f
push ecx
mov ecx, 0x1a464b0
call fcn.0040cde0
test eax, eax
jne 0x4b0615
mov edx, dword [0x176582c]
push 0x1e
push edx
mov ecx, 0x1a464b0
call fcn.0040cde0
test eax, eax
je 0x4b0667
mov ecx, 0x1bd5ba0
mov word [0xd7ea88], 0x4b0
call fcn.005216b0
mov eax, dword [0x1cd0f64]
mov ecx, dword [0x1cd0f60]
push eax
push ecx
mov ecx, 0xc5d7b0
call fcn.004ae030
mov edx, dword [str.action_rabbits.bik]
push str.Random_Events7.wav
push edx
push 7
push 0xc9
mov ecx, 0xcbf3b0
call fcn.0046bcd0
push eax
mov ecx, 0xf0a5c0
call fcn.004b2e80
mov al, byte [ebp + 0x5ca]
test al, al
je case.0x4af816.2
mov al, byte [ebp + 0x5cb]
cmp al, 1
je case.0x4af816.2
cmp al, 0xa
je 0x4b068f
dec al
mov byte [ebp + 0x5cb], al
xor ecx, ecx
mov word [ebp + 0x5bc], 0
mov cl, byte [ebp + 0x5ca]
cmp ecx, 4
jl 0x4b06be
mov eax, ecx
cdq
and edx, 3
add eax, edx
mov esi, eax
movsx eax, word [0xef7aaa]
cdq
sar esi, 2
idiv esi
add ecx, edx
mov eax, 0x2aaaaaab
imul ecx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, dword [0xd7dfc8]
add eax, edx
lea edx, [edx + edx*2]
mov dword [ebp + 0x5b4], eax
mov eax, dword [0xd7dfc4]
shl edx, 2
sub eax, edx
add eax, ecx
cmp eax, 0xc
mov dword [ebp + 0x5b0], eax
jl 0x4b1320
add eax, 0xfffffff4
mov ebx, dword [esp + 0x18]
mov dword [ebp + 0x5b0], eax
mov eax, dword [ebp + 0x5b4]
inc eax
mov ecx, ebx
mov dword [ebp + 0x5b4], eax
mov eax, dword [esp + 0x14]
dec eax
mov dword [esp + 0x14], eax
call fcn.004b8aa0
jmp 0x4b19cd
lea ecx, [esp + 0x34]
lea edx, [esp + 0x38]
push ecx
push edx
mov ecx, 0x1bd5ba0
call fcn.00521410
test eax, eax
je 0x4b0889
mov ecx, dword [esp + 0x38]
test ecx, ecx
jl 0x4b0889
cmp ecx, 0x190
jge 0x4b0889
mov eax, dword [esp + 0x34]
test eax, eax
jl 0x4b0889
cmp eax, 0x190
jge 0x4b0889
lea edx, [eax + eax*2]
lea eax, [eax + edx*8]
shl eax, 4
mov dl, byte [eax + ecx + 0x9a68a8]
test dl, dl
je 0x4b0889
mov ecx, dword [0x176582c]
mov eax, ecx
shl eax, 4
add eax, ecx
lea edx, [eax + eax*2]
lea eax, [ecx + edx*2]
lea eax, [eax + eax*8]
lea ecx, [ecx + eax*4]
shl ecx, 2
mov word [ecx + 0xd5f5b6], 0xc
mov eax, dword [ecx + 0xd5d368]
cmp eax, 0x1770
jle 0x4b07d2
add eax, 0xffffe890
cdq
sub eax, edx
sar eax, 1
add eax, 0x1770
mov dword [ecx + 0xd5d368], eax
mov eax, dword [ebp + 0x5c0]
xor edi, edi
test eax, eax
jle 0x4b0863
mov ebx, 1
lea ecx, [esp + 0x34]
lea edx, [esp + 0x38]
push ecx
push edx
mov ecx, 0x1bd5ba0
call fcn.00521410
mov eax, dword [esp + 0x34]
xor edx, edx
lea ecx, [eax + eax*2]
mov esi, dword [ecx*4 + 0xb2ef10]
mov ecx, dword [esp + 0x38]
mov dl, byte [esi + ecx + 0x12579f0]
push edx
push eax
push ecx
push 0xdd
mov ecx, 0x1bd5ba0
call fcn.00520c50
mov ecx, dword [esp + 0x38]
mov esi, eax
mov eax, dword [esp + 0x34]
push eax
push ecx
mov ecx, 0xc5d7b0
call fcn.004ae030
lea edx, [esi + esi*4]
lea eax, [esi + edx*8]
lea eax, [eax + eax*4]
shl eax, 2
inc edi
mov word [eax + 0x1bd5e52], 0
mov word [eax + 0x1bd5e54], bx
cmp edi, dword [ebp + 0x5c0]
jl 0x4b07e7
push 0x69663c
push 0x69663c
push 8
push 0xc9
mov ecx, 0xcbf3b0
call fcn.0046bcd0
push eax
mov ecx, 0xf0a5c0
call fcn.004b2e80
mov al, byte [ebp + 0x5ca]
test al, al
je case.0x4af816.2
mov al, byte [ebp + 0x5cb]
cmp al, 1
je case.0x4af816.2
cmp al, 0xa
je 0x4b08b1
dec al
mov byte [ebp + 0x5cb], al
xor ecx, ecx
mov word [ebp + 0x5bc], 0
mov cl, byte [ebp + 0x5ca]
cmp ecx, 4
jl 0x4b08e0
mov eax, ecx
cdq
and edx, 3
add eax, edx
mov esi, eax
movsx eax, word [0xef7aaa]
cdq
sar esi, 2
idiv esi
add ecx, edx
mov eax, 0x2aaaaaab
imul ecx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, dword [0xd7dfc8]
add eax, edx
lea edx, [edx + edx*2]
mov dword [ebp + 0x5b4], eax
mov eax, dword [0xd7dfc4]
shl edx, 2
sub eax, edx
add eax, ecx
cmp eax, 0xc
mov dword [ebp + 0x5b0], eax
jl 0x4b1320
add eax, 0xfffffff4
mov ebx, dword [esp + 0x18]
mov dword [ebp + 0x5b0], eax
mov eax, dword [ebp + 0x5b4]
inc eax
mov ecx, ebx
mov dword [ebp + 0x5b4], eax
mov eax, dword [esp + 0x14]
dec eax
mov dword [esp + 0x14], eax
call fcn.004b8aa0
jmp 0x4b19cd
mov ecx, 0xd2c5c8
call fcn.00455e50
test eax, eax
je 0x4b0a77
mov ecx, dword [0x176582c]
mov eax, ecx
shl eax, 4
add eax, ecx
lea edx, [eax + eax*2]
lea eax, [ecx + edx*2]
lea eax, [eax + eax*8]
lea ecx, [ecx + eax*4]
mov eax, dword [0x1545858]
inc eax
cmp eax, 0x32
mov word [ecx*4 + 0xd5f5b8], 0x10
mov dword [0x1545858], eax
jl 0x4b0999
mov eax, 1
mov dword [0x1545858], eax
push 0
push eax
mov ecx, 0x1515150
call fcn.0050ec20
mov edx, dword [0x1545858]
mov ecx, 0xd2c5c8
mov byte [edx + 0x1545a50], 8
call fcn.00455e90
shl eax, 4
mov edi, eax
mov eax, dword [ebp + 0x5c0]
inc eax
mov ecx, dword [edi + 0xd805f0]
mov edx, dword [edi + 0xd805ec]
push eax
push 0x1a
push 8
push ecx
push edx
push 9
push 0
mov ecx, 0x1bd5ba0
call fcn.0051fb30
mov ecx, dword [edi + 0xd805ec]
mov esi, eax
mov eax, dword [edi + 0xd805f0]
push eax
push ecx
mov ecx, 0xc5d7b0
call fcn.004ae030
lea edx, [esi + esi*4]
xor edi, edi
lea eax, [esi + edx*8]
lea ebx, [eax + eax*4]
cmp word [ebx*4 + 0x1bd5bfc], di
jle 0x4b0a50
mov eax, edi
mov ecx, 0x1bd5ba0
push eax
push esi
inc edi
call fcn.0051ebb0
movsx edx, word [ebx*4 + 0x1bd5bfc]
lea ecx, [eax + eax*8]
lea eax, [eax + ecx*8]
shl eax, 4
cmp edi, edx
mov dword [eax + 0x177c250], 5
mov word [eax + 0x177c2cc], 2
jl 0x4b0a19
mov eax, dword [str.action_bandits.bik]
push str.Random_Events9.wav
push eax
push 9
push 0xc9
mov ecx, 0xcbf3b0
call fcn.0046bcd0
push eax
mov ecx, 0xf0a5c0
call fcn.004b2e80
mov al, byte [ebp + 0x5ca]
test al, al
je case.0x4af816.2
mov al, byte [ebp + 0x5cb]
cmp al, 1
je case.0x4af816.2
cmp al, 0xa
je 0x4b0a9f
dec al
mov byte [ebp + 0x5cb], al
xor ecx, ecx
mov word [ebp + 0x5bc], 0
mov cl, byte [ebp + 0x5ca]
cmp ecx, 4
jl 0x4b0ace
mov eax, ecx
cdq
and edx, 3
add eax, edx
mov esi, eax
movsx eax, word [0xef7aaa]
cdq
sar esi, 2
idiv esi
add ecx, edx
mov eax, 0x2aaaaaab
imul ecx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, dword [0xd7dfc8]
add eax, edx
lea edx, [edx + edx*2]
mov dword [ebp + 0x5b4], eax
mov eax, dword [0xd7dfc4]
shl edx, 2
sub eax, edx
add eax, ecx
cmp eax, 0xc
mov dword [ebp + 0x5b0], eax
jl 0x4b1320
add eax, 0xfffffff4
mov ebx, dword [esp + 0x18]
mov dword [ebp + 0x5b0], eax
mov eax, dword [ebp + 0x5b4]
inc eax
mov ecx, ebx
mov dword [ebp + 0x5b4], eax
mov eax, dword [esp + 0x14]
dec eax
mov dword [esp + 0x14], eax
call fcn.004b8aa0
jmp 0x4b19cd
mov ecx, dword [0x176582c]
push 0x21
push ecx
mov ecx, 0x1a464b0
call fcn.0040cde0
test eax, eax
je 0x4b0bb1
mov edx, dword [0x176582c]
mov ecx, 0x177bf80
push edx
call fcn.00550d80
mov eax, dword [0x176582c]
mov ecx, 0x1a464b0
push eax
call fcn.00412ed0
push str.Random_Events10.wav
push 0x69663c
push 0xa
push 0xc9
mov ecx, 0xcbf3b0
call fcn.0046bcd0
push eax
mov ecx, 0xf0a5c0
call fcn.004b2e80
mov ecx, dword [str.action_mad_cows.bik]
push 0x69663c
push ecx
push 0x69663c
mov ecx, 0xf0a5c0
call fcn.004b2e80
mov al, byte [ebp + 0x5ca]
test al, al
je case.0x4af816.2
mov al, byte [ebp + 0x5cb]
cmp al, 1
je case.0x4af816.2
cmp al, 0xa
je 0x4b0bd9
dec al
mov byte [ebp + 0x5cb], al
xor ecx, ecx
mov word [ebp + 0x5bc], 0
mov cl, byte [ebp + 0x5ca]
cmp ecx, 4
jl 0x4b0c08
mov eax, ecx
cdq
and edx, 3
add eax, edx
mov esi, eax
movsx eax, word [0xef7aaa]
cdq
sar esi, 2
idiv esi
add ecx, edx
mov eax, 0x2aaaaaab
imul ecx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, dword [0xd7dfc8]
add eax, edx
lea edx, [edx + edx*2]
mov dword [ebp + 0x5b4], eax
mov eax, dword [0xd7dfc4]
shl edx, 2
sub eax, edx
add eax, ecx
cmp eax, 0xc
mov dword [ebp + 0x5b0], eax
jl 0x4b1320
add eax, 0xfffffff4
mov ebx, dword [esp + 0x18]
mov dword [ebp + 0x5b0], eax
mov eax, dword [ebp + 0x5b4]
inc eax
mov ecx, ebx
mov dword [ebp + 0x5b4], eax
mov eax, dword [esp + 0x14]
dec eax
mov dword [esp + 0x14], eax
call fcn.004b8aa0
jmp 0x4b19cd
mov ecx, 0xd2c5c8
call fcn.00455e50
test eax, eax
je 0x4b0edc
mov ecx, 0xd2c5c8
call fcn.00455e90
mov ecx, dword [esp + 0x1c]
xor ebx, ebx
shl eax, 4
mov edx, dword [ecx + 0x5c0]
mov esi, eax
mov eax, dword [0x176582c]
push edx
mov ecx, dword [esi + 0xd805f0]
mov edx, dword [esi + 0xd805ec]
push 0x16
push eax
push ecx
push edx
push 3
push ebx
mov ecx, 0x1bd5ba0
call fcn.0051fb30
mov ecx, dword [esi + 0xd805f0]
mov edx, dword [esi + 0xd805ec]
mov ebp, eax
mov eax, dword [0x176582c]
push 1
push 0x25
push eax
push ecx
push edx
push 0xc
push ebx
mov ecx, 0x1bd5ba0
call fcn.0051fb30
mov ecx, dword [esi + 0xd805ec]
mov edi, eax
mov eax, dword [esi + 0xd805f0]
mov dword [esp + 0x20], edi
push eax
push ecx
mov ecx, 0xc5d7b0
call fcn.004ae030
lea edx, [ebp + ebp*4]
lea eax, [edi + edi*4]
lea esi, [ebp + edx*8]
lea edi, [edi + eax*8]
lea esi, [esi + esi*4]
lea edi, [edi + edi*4]
shl esi, 2
shl edi, 2
mov word [esi + 0x1bd5e42], bx
mov word [edi + 0x1bd5e42], bx
cmp word [esi + 0x1bd5bfc], bx
jle 0x4b0d6f
mov eax, ebx
mov ecx, 0x1bd5ba0
push eax
push ebp
inc ebx
call fcn.0051ebb0
movsx edx, word [esi + 0x1bd5bfc]
lea ecx, [eax + eax*8]
lea eax, [eax + ecx*8]
shl eax, 4
cmp ebx, edx
mov dword [eax + 0x177c250], 8
mov word [eax + 0x177c2cc], 2
jl 0x4b0d39
xor esi, esi
cmp word [edi + 0x1bd5bfc], si
jle 0x4b0db7
mov ebx, 2
mov eax, esi
mov ecx, 0x1bd5ba0
push eax
mov eax, dword [esp + 0x24]
push eax
inc esi
call fcn.0051ebb0
movsx edx, word [edi + 0x1bd5bfc]
lea ecx, [eax + eax*8]
lea eax, [eax + ecx*8]
shl eax, 4
cmp esi, edx
mov dword [eax + 0x177c250], 8
mov word [eax + 0x177c2cc], bx
jl 0x4b0d7f
mov ecx, dword [0x176582c]
mov eax, ecx
shl eax, 4
add eax, ecx
lea eax, [eax + eax*2]
lea eax, [ecx + eax*2]
lea edx, [eax + eax*8]
lea eax, [ecx + edx*4]
mov ecx, dword [eax*4 + 0xd5d39c]
test ecx, ecx
jle 0x4b0eb0
mov eax, ecx
xor esi, esi
shl eax, 4
add eax, ecx
xor edi, edi
lea eax, [eax + eax*2]
shl eax, 2
sub eax, ecx
shl eax, 2
mov cx, word [eax + 0x1a46596]
cmp cx, 0x28
jne 0x4b0e18
movsx esi, word [eax + 0x1a465b2]
movsx edi, word [eax + 0x1a465b4]
add esi, 3
add edi, 8
jmp 0x4b0e86
cmp cx, 0x29
jne 0x4b0e34
movsx esi, word [eax + 0x1a465b2]
movsx edi, word [eax + 0x1a465b4]
add esi, 3
add edi, 3
jmp 0x4b0e86
cmp cx, 0x2a
jne 0x4b0e50
movsx esi, word [eax + 0x1a465b2]
movsx edi, word [eax + 0x1a465b4]
add esi, 3
add edi, 3
jmp 0x4b0e86
cmp cx, 0x2b
jne 0x4b0e6c
movsx esi, word [eax + 0x1a465b2]
movsx edi, word [eax + 0x1a465b4]
add esi, 4
add edi, 4
jmp 0x4b0e86
cmp cx, 0x2c
jne 0x4b0e86
movsx esi, word [eax + 0x1a465b2]
movsx edi, word [eax + 0x1a465b4]
add esi, 5
add edi, 5
push 0
push 0
push 0
push edi
push esi
push ebp
mov ecx, 0x1bd5ba0
call fcn.00517f80
mov ecx, dword [esp + 0x20]
push 0
push 0
push 0
push edi
push esi
push ecx
mov ecx, 0x1bd5ba0
call fcn.00517f80
mov edx, dword [str.action_archers.bik]
push str.Random_Events11.wav
push edx
push 0xb
push 0xc9
mov ecx, 0xcbf3b0
call fcn.0046bcd0
push eax
mov ecx, 0xf0a5c0
call fcn.004b2e80
mov ebp, dword [esp + 0x1c]
mov al, byte [ebp + 0x5ca]
test al, al
je case.0x4af816.2
mov al, byte [ebp + 0x5cb]
cmp al, 1
je case.0x4af816.2
cmp al, 0xa
je 0x4b0f04
dec al
mov byte [ebp + 0x5cb], al
xor ecx, ecx
mov word [ebp + 0x5bc], 0
mov cl, byte [ebp + 0x5ca]
cmp ecx, 4
jl 0x4b0f33
mov eax, ecx
cdq
and edx, 3
add eax, edx
mov esi, eax
movsx eax, word [0xef7aaa]
cdq
sar esi, 2
idiv esi
add ecx, edx
mov eax, 0x2aaaaaab
imul ecx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, dword [0xd7dfc8]
add eax, edx
lea edx, [edx + edx*2]
mov dword [ebp + 0x5b4], eax
mov eax, dword [0xd7dfc4]
shl edx, 2
sub eax, edx
add eax, ecx
cmp eax, 0xc
mov dword [ebp + 0x5b0], eax
jl 0x4b1320
add eax, 0xfffffff4
mov ebx, dword [esp + 0x18]
mov dword [ebp + 0x5b0], eax
mov eax, dword [ebp + 0x5b4]
inc eax
mov ecx, ebx
mov dword [ebp + 0x5b4], eax
mov eax, dword [esp + 0x14]
dec eax
mov dword [esp + 0x14], eax
call fcn.004b8aa0
jmp 0x4b19cd
mov ecx, dword [0x176582c]
mov word [0xd7ea9c], 1
mov eax, ecx
shl eax, 4
add eax, ecx
lea edx, [eax + eax*2]
lea eax, [ecx + edx*2]
lea eax, [eax + eax*8]
lea eax, [ecx + eax*4]
mov ecx, 0x2710
shl eax, 2
mov word [eax + 0xd5f5bc], 0xc
mov edx, dword [eax + 0xd5d368]
cmp edx, ecx
jle 0x4b0fe0
mov dword [eax + 0xd5d368], ecx
mov ecx, dword [str.action_marriage.bik]
push str.Random_Events12.wav
push ecx
push 0xc
push 0xc9
mov ecx, 0xcbf3b0
call fcn.0046bcd0
push eax
mov ecx, 0xf0a5c0
call fcn.004b2e80
push 0xcf
mov ecx, 0xf017d0
call fcn.00448b60
mov ebx, dword [esp + 0x18]
mov ecx, ebx
call fcn.004b8aa0
jmp 0x4b19cd
mov ecx, dword [0x176582c]
mov word [0xd7ea9e], 1
mov eax, ecx
shl eax, 4
add eax, ecx
lea edx, [eax + eax*2]
lea eax, [ecx + edx*2]
lea eax, [eax + eax*8]
lea eax, [ecx + eax*4]
mov ecx, 0x2710
shl eax, 2
mov word [eax + 0xd5f5be], 0x30
mov edx, dword [eax + 0xd5d368]
cmp edx, ecx
jle 0x4b106a
mov dword [eax + 0xd5d368], ecx
mov ecx, dword [str.action_jester.bik]
push str.Random_Events13.wav
push ecx
push 0xd
push 0xc9
mov ecx, 0xcbf3b0
call fcn.0046bcd0
push eax
mov ecx, 0xf0a5c0
call fcn.004b2e80
mov ebx, dword [esp + 0x18]
mov ecx, ebx
call fcn.004b8aa0
jmp 0x4b19cd
mov ecx, dword [0x176582c]
mov eax, ecx
shl eax, 4
add eax, ecx
lea edx, [eax + eax*2]
lea eax, [ecx + edx*2]
lea eax, [eax + eax*8]
lea edx, [ecx + eax*4]
mov eax, dword [edx*4 + 0xd5f3a4]
test eax, eax
je 0x4b1116
mov eax, dword [ebp + 0x5c0]
push eax
push ecx
mov ecx, 0x1a464b0
call fcn.0040fd20
mov eax, dword [ebp + 0x5c0]
push str.general_message3.wav
cmp eax, 0x64
jne 0x4b10f3
mov ecx, dword [str.action_steal_bread.bik]
push ecx
push 0x10
jmp 0x4b10fc
mov edx, dword [str.action_steal_bread.bik]
push edx
push 0xe
push 0xc9
mov ecx, 0xcbf3b0
call fcn.0046bcd0
push eax
mov ecx, 0xf0a5c0
call fcn.004b2e80
mov al, byte [ebp + 0x5ca]
test al, al
je case.0x4af816.2
mov al, byte [ebp + 0x5cb]
cmp al, 1
je case.0x4af816.2
cmp al, 0xa
je 0x4b113e
dec al
mov byte [ebp + 0x5cb], al
xor ecx, ecx
mov word [ebp + 0x5bc], 0
mov cl, byte [ebp + 0x5ca]
cmp ecx, 4
jl 0x4b116d
mov eax, ecx
cdq
and edx, 3
add eax, edx
mov esi, eax
movsx eax, word [0xef7aaa]
cdq
sar esi, 2
idiv esi
add ecx, edx
mov eax, 0x2aaaaaab
imul ecx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, dword [0xd7dfc8]
add eax, edx
lea edx, [edx + edx*2]
mov dword [ebp + 0x5b4], eax
mov eax, dword [0xd7dfc4]
shl edx, 2
sub eax, edx
add eax, ecx
cmp eax, 0xc
mov dword [ebp + 0x5b0], eax
jl 0x4b1320
add eax, 0xfffffff4
mov ebx, dword [esp + 0x18]
mov dword [ebp + 0x5b0], eax
mov eax, dword [ebp + 0x5b4]
inc eax
mov ecx, ebx
mov dword [ebp + 0x5b4], eax
mov eax, dword [esp + 0x14]
dec eax
mov dword [esp + 0x14], eax
call fcn.004b8aa0
jmp 0x4b19cd
mov ecx, dword [0x176582c]
mov eax, ecx
shl eax, 4
add eax, ecx
lea edx, [eax + eax*2]
lea eax, [ecx + edx*2]
lea eax, [eax + eax*8]
lea edx, [ecx + eax*4]
mov word [edx*4 + 0xd5f5ba], 8
mov eax, dword [ebp + 0x5c0]
push eax
push ecx
mov ecx, 0x1a464b0
call fcn.00415000
mov ecx, dword [0x176582c]
push 0x1b
push ecx
mov ecx, 0x1a464b0
call fcn.0040c420
test eax, eax
je 0x4b1233
mov edx, dword [str.action_fire.bik]
push str.general_warning16.wav
push edx
push 0xf
jmp 0x4b1262
mov eax, dword [0x176582c]
push 0x46
push eax
mov ecx, 0x1a464b0
call fcn.0040c420
test eax, eax
push str.general_warning16.wav
je 0x4b1259
mov ecx, dword [str.action_fire.bik]
push ecx
push 0xf
jmp 0x4b1262
mov edx, dword [str.action_fire.bik]
push edx
push 0x11
push 0xc9
mov ecx, 0xcbf3b0
call fcn.0046bcd0
push eax
mov ecx, 0xf0a5c0
call fcn.004b2e80
mov al, byte [ebp + 0x5ca]
test al, al
je case.0x4af816.2
mov al, byte [ebp + 0x5cb]
cmp al, 1
je case.0x4af816.2
cmp al, 0xa
je 0x4b12a4
dec al
mov byte [ebp + 0x5cb], al
xor ecx, ecx
mov word [ebp + 0x5bc], 0
mov cl, byte [ebp + 0x5ca]
cmp ecx, 4
jl 0x4b12d3
mov eax, ecx
cdq
and edx, 3
add eax, edx
mov esi, eax
movsx eax, word [0xef7aaa]
cdq
sar esi, 2
idiv esi
add ecx, edx
mov eax, 0x2aaaaaab
imul ecx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, dword [0xd7dfc8]
add eax, edx
lea edx, [edx + edx*2]
mov dword [ebp + 0x5b4], eax
mov eax, dword [0xd7dfc4]
shl edx, 2
sub eax, edx
add eax, ecx
cmp eax, 0xc
mov dword [ebp + 0x5b0], eax
jl 0x4b1320
add eax, 0xfffffff4
mov dword [ebp + 0x5b0], eax
mov eax, dword [ebp + 0x5b4]
inc eax
mov dword [ebp + 0x5b4], eax
mov eax, dword [esp + 0x14]
mov ebx, dword [esp + 0x18]
dec eax
mov ecx, ebx
mov dword [esp + 0x14], eax
call fcn.004b8aa0
jmp 0x4b19cd
mov eax, dword [0xd16a78]
test eax, eax
je case.0x4af816.2
cmp dword [ebp + 0x5b4], 0x43d
jne case.0x4af816.2
cmp dword [ebp + 0x5b0], 0xb
jne case.0x4af816.2
mov ecx, dword [0x176582c]
push 0x14
push 0x16
push ecx
push 0x116
xor ebx, ebx
push 0x85
push 3
push ebx
mov ecx, 0x1bd5ba0
call fcn.0051fb30
mov edi, eax
lea edx, [edi + edi*4]
lea esi, [edi + edx*8]
lea esi, [esi + esi*4]
shl esi, 2
mov word [esi + 0x1bd5e42], 3
cmp word [esi + 0x1bd5bfc], bx
jle case.0x4af816.2
mov ebp, 6
mov eax, ebx
mov ecx, 0x1bd5ba0
push eax
push edi
inc ebx
call fcn.0051ebb0
lea ecx, [eax + eax*8]
lea edx, [eax + ecx*8]
movsx eax, word [esi + 0x1bd5bfc]
shl edx, 4
cmp ebx, eax
mov dword [edx + 0x177c250], ebp
jl 0x4b13b0
mov ebx, dword [esp + 0x18]
mov ecx, ebx
call fcn.004b8aa0
jmp 0x4b19cd
mov ebx, dword [esp + 0x18]
mov dword [0xd16ae4], 1
mov ecx, ebx
call fcn.004b8aa0
jmp 0x4b19cd
mov ebx, dword [esp + 0x18]
mov dword [0xd16ae4], 0
mov ecx, ebx
call fcn.004b8aa0
jmp 0x4b19cd
mov eax, dword [ebx + 0x5ac]
xor ecx, ecx
test eax, eax
jle case.0x4af816.2
lea eax, [ebx + 0x630]
mov esi, dword [eax - 0x78]
mov edx, 1
cmp esi, edx
jne 0x4b1451
cmp dword [eax], 0
je 0x4b1451
mov dword [eax], 0
mov word [eax - 0x74], dx
mov dword [eax - 0x7c], 0x49d
mov edx, dword [ebx + 0x5ac]
inc ecx
add eax, 0xe4
cmp ecx, edx
jl 0x4b142f
mov ebx, dword [esp + 0x18]
mov ecx, ebx
call fcn.004b8aa0
jmp 0x4b19cd
mov word [ebp + 0x5bc], di
jmp 0x4b19cd
mov ecx, dword [0x176582c]
mov dword [0xd80444], esi
mov eax, ecx
shl eax, 4
add eax, ecx
lea edx, [eax + eax*2]
lea eax, [ecx + edx*2]
lea eax, [eax + eax*8]
lea ecx, [ecx + eax*4]
mov dword [ecx*4 + 0xd5f57c], 0xffffff38
mov edx, dword [ebp + 0x634]
mov eax, dword [esp + edx*4 + 0xb4]
cmp eax, 0xffffffff
jne 0x4b14ff
mov eax, dword [0x1545858]
inc eax
cmp eax, 0x32
mov dword [0x1545858], eax
jl 0x4b14cf
mov dword [0x1545858], edi
mov eax, dword [ebp + 0x628]
mov ecx, dword [0x1545858]
push eax
push ecx
mov ecx, 0x1515150
call fcn.0050ec20
mov edx, dword [ebp + 0x634]
mov eax, dword [0x1545858]
mov dword [esp + 0x30], eax
mov dword [esp + edx*4 + 0xb4], eax
jmp 0x4b1504
mov dword [0x1545858], eax
mov edx, dword [esp + 0x14]
mov cl, byte [ebp + 0x634]
imul edx, edx, 0x39
add cl, 2
add edx, 0x171
mov byte [eax + 0x1545a50], cl
mov dword [esp + 0x2c], 0
mov dword [esp + 0x24], edx
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x18]
add eax, ecx
mov ebx, dword [edx + eax*4]
test ebx, ebx
je 0x4b1847
mov eax, dword [esp + 0x2c]
xor esi, esi
xor edi, edi
xor ecx, ecx
cmp eax, 0x17
ja case.default.0x4b1558
jmp dword [eax*4 + 0x4b1cb4]
mov esi, 3
mov edi, 0x16
jmp 0x4b16c3
mov esi, 7
mov edi, 0x17
jmp 0x4b16c3
mov esi, 5
mov edi, 0x18
jmp 0x4b16c3
mov esi, 6
mov edi, 0x19
jmp 0x4b16c3
mov esi, 9
mov edi, 0x1a
jmp 0x4b16c3
mov esi, 8
mov edi, 0x1b
jmp 0x4b16c3
mov esi, 0xa
mov edi, 0x1c
jmp 0x4b16c3
mov esi, 4
mov edi, 0x1d
jmp 0x4b16c3
mov esi, 0xb
mov edi, 0x1e
jmp 0x4b16c3
mov esi, 0x16
mov edi, 0x27
jmp 0x4b16c3
mov esi, 0x17
mov edi, 0x28
jmp 0x4b16c3
mov esi, 0x13
mov edi, 0x3b
jmp 0x4b16c3
mov esi, 0x14
mov edi, 0x3a
jmp 0x4b16c3
mov esi, 0x15
mov edi, 0x3c
jmp 0x4b16c3
mov esi, 0xc
mov edi, 0x25
jmp 0x4b16c3
mov esi, 2
mov edi, 5
jmp 0x4b16c3
mov esi, 0x19
mov edi, 0x46
jmp 0x4b16c3
mov esi, 0x1a
mov edi, 0x47
mov ecx, 0x14
jmp case.default.0x4b1558
mov esi, 0x1b
mov edi, 0x48
mov ecx, 0x14
jmp case.default.0x4b1558
mov esi, 0x1c
mov edi, 0x49
mov ecx, 2
jmp case.default.0x4b1558
mov esi, 0x1d
mov edi, 0x4a
jmp 0x4b16c3
mov esi, 0x1e
mov edi, 0x4b
mov ecx, 8
jmp case.default.0x4b1558
mov esi, 0x1f
mov edi, 0x4c
mov ecx, 4
jmp case.default.0x4b1558
mov esi, 0x18
mov edi, 0x4d
mov ecx, 0xa
mov edx, dword [0xd7ea7c]
mov eax, 0x64
sub edx, 0
je 0x4b16ee
sub edx, 2
je 0x4b16e7
dec edx
jne 0x4b16f3
mov eax, 0xc8
jmp 0x4b16f3
mov eax, 0x8c
jmp 0x4b16f3
mov eax, 0x32
imul eax, ebx
mov edx, eax
mov eax, 0x51eb851f
imul edx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add edx, eax
cmp esi, 0x16
mov ebx, edx
jne 0x4b1724
mov eax, dword [0x1545858]
lea eax, [eax + eax*4]
add byte [eax*2 + 0x1545a82], bl
jmp 0x4b1847
cmp esi, 0x17
jne 0x4b173d
mov eax, dword [0x1545858]
lea eax, [eax + eax*4]
add byte [eax*2 + 0x1545a83], bl
jmp 0x4b1847
cmp esi, 0x13
jne 0x4b1756
mov eax, dword [0x1545858]
lea eax, [eax + eax*4]
add byte [eax*2 + 0x1545a84], bl
jmp 0x4b1847
cmp esi, 0x14
jne 0x4b176f
mov eax, dword [0x1545858]
lea eax, [eax + eax*4]
add byte [eax*2 + 0x1545a85], bl
jmp 0x4b1847
cmp esi, 0x15
jne 0x4b1788
mov eax, dword [0x1545858]
lea eax, [eax + eax*4]
add byte [eax*2 + 0x1545a86], bl
jmp 0x4b1847
cmp esi, 0x18
jne 0x4b17a1
mov eax, dword [0x1545858]
lea eax, [eax + eax*4]
add byte [eax*2 + 0x1545a8a], bl
jmp 0x4b1847
mov eax, ebx
cdq
idiv ecx
mov ecx, eax
mov eax, ebx
cdq
inc ecx
idiv ecx
test ebx, ebx
mov ebp, eax
mov dword [esp + 0x20], ebp
jle 0x4b1847
cmp ebp, ebx
jle 0x4b17c4
mov dword [esp + 0x20], ebx
mov edx, dword [esp + 0x1c]
push 0
mov ecx, dword [edx + 0x634]
mov edx, dword [esp + ecx*4 + 0xdc]
add ecx, 2
lea eax, [edx + 1]
mov dword [esp + ecx*4 + 0xd4], eax
mov eax, dword [0x1545858]
mov eax, dword [eax*4 + 0x155ba68]
lea ebp, [eax + eax*2]
lea eax, [eax + ebp*8]
mov ebp, dword [esp + 0x2c]
lea eax, [ebp + eax*2]
mov ebp, dword [esp + 0x24]
push ebp
push 0
shl eax, 4
push edi
push ecx
mov ecx, dword [eax + 0xd806f0]
mov eax, dword [eax + 0xd806ec]
push ecx
push eax
push esi
push edx
mov ecx, 0x1bd5ba0
call fcn.0051f9c0
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x40]
sub ebx, ebp
inc eax
cmp eax, ecx
mov dword [esp + 0x28], eax
jl 0x4b183f
mov dword [esp + 0x28], 0
test ebx, ebx
jg 0x4b17bc
mov eax, dword [esp + 0x2c]
inc eax
cmp eax, 0x19
mov dword [esp + 0x2c], eax
jl 0x4b152c
mov ecx, dword [0x1545858]
mov eax, dword [ecx*4 + 0x155ba68]
mov ecx, 0xc5d7b0
shl eax, 4
mov edx, dword [eax + 0xd805f0]
mov eax, dword [eax + 0xd805ec]
push edx
push eax
call fcn.004ae030
mov eax, dword [0xd16ae4]
mov ecx, dword [esp + 0x30]
mov esi, dword [esp + 0x1c]
mov dword [0x1545858], ecx
test eax, eax
jne 0x4b1947
mov eax, dword [esi + 0x634]
mov ecx, dword [esp + eax*4 + 0x90]
test ecx, ecx
jne 0x4b1947
mov dword [esp + eax*4 + 0x90], 1
sub eax, 0
je 0x4b18d0
dec eax
jne 0x4b18e9
push str.arabian_attack.wav
push str.good_soldier_nervous.bik
jmp 0x4b18da
push str.infidel_attack.wav
push str.sultan_nervous.bik
push 0x69663c
mov ecx, 0xf0a5c0
call fcn.004b2e80
cmp dword [0xd16a1c], 0xe
jne 0x4b1947
mov eax, dword [0xd16a20]
cmp eax, 0x3c
je 0x4b1901
cmp eax, 0x3e
jne 0x4b1947
mov ecx, 0xd16a10
call fcn.0046d150
mov eax, dword [0xd16a34]
cmp eax, 0x3c
mov eax, dword [0xd16a1c]
jne 0x4b193a
cmp eax, 0xe
jne 0x4b192b
mov dword [0xd16a34], 0xa
jmp 0x4b193a
cmp eax, 0xc
jne 0x4b193a
mov dword [0xd16a3c], 0xe7
push 0
push eax
mov ecx, 0xd16a10
call fcn.0046d170
mov eax, dword [esi + 0x630]
test eax, eax
jne 0x4b195c
mov word [esi + 0x5bc], 1
jmp 0x4b19c9
mov word [esi + 0x5be], 0
mov ecx, dword [esi + 0x630]
mov eax, 0x2aaaaaab
mov ebp, dword [esi + 0x5b4]
imul ecx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add edx, eax
add ebp, edx
lea edx, [edx + edx*2]
mov dword [esi + 0x5b4], ebp
shl edx, 2
sub ecx, edx
mov edx, dword [esi + 0x5b0]
add edx, ecx
mov eax, edx
mov dword [esi + 0x5b0], edx
cmp eax, 0xc
jl 0x4b19bc
add eax, 0xfffffff4
mov dword [esi + 0x5b0], eax
mov eax, dword [esi + 0x5b4]
inc eax
mov dword [esi + 0x5b4], eax
mov ecx, dword [esp + 0x18]
call fcn.004b8aa0
dec dword [esp + 0x14]
mov ebx, dword [esp + 0x18]
mov eax, dword [esp + 0x14]
mov ecx, dword [ebx + 0x5ac]
inc eax
cmp eax, ecx
mov dword [esp + 0x14], eax
jl 0x4aed55
mov eax, dword [0xd7dfc8]
mov ecx, dword [0xd7dfc4]
mov dword [esp + 0x28], eax
lea eax, [ecx + 3]
cmp eax, 0xc
mov dword [esp + 0x30], eax
jl 0x4b1a0f
sub eax, 0xc
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x28]
inc eax
mov dword [esp + 0x28], eax
mov ebx, dword [esp + 0x18]
mov ecx, 9
xor eax, eax
lea edi, [esp + 0x90]
rep stosd dword es:[edi], eax
mov eax, dword [ebx + 0x5ac]
xor ebp, ebp
test eax, eax
jle 0x4b1b32
add ebx, 0x5be
mov edx, dword [esp + 0x28]
mov eax, dword [ebx - 0xa]
cmp edx, eax
jne 0x4b1b1b
mov eax, dword [esp + 0x30]
mov ecx, dword [ebx - 0xe]
cmp eax, ecx
jne 0x4b1b1b
cmp word [ebx], 0
jne 0x4b1b1b
mov word [ebx], 1
mov eax, dword [ebx - 6]
dec eax
jne 0x4b1b1b
mov eax, dword [0xd16ae4]
mov dword [0xd80444], 1
test eax, eax
jne 0x4b1b1b
mov edi, dword [ebx + 0x76]
mov eax, dword [esp + edi*4 + 0x90]
test eax, eax
jne 0x4b1b1b
lea eax, [edi*4 + 1]
xor ecx, ecx
lea edx, [ebx + 6]
mov esi, 0x19
add ecx, dword [edx]
add edx, 4
dec esi
jne 0x4b1aaa
cmp ecx, 0x19
jl 0x4b1acf
cmp ecx, 0x4b
jge 0x4b1abf
inc eax
jmp 0x4b1acf
cmp ecx, 0x96
jge 0x4b1acc
add eax, 2
jmp 0x4b1acf
add eax, 3
mov ecx, edi
mov dword [esp + edi*4 + 0x90], 1
sub ecx, 0
je 0x4b1af3
dec ecx
jne 0x4b1b1b
mov ecx, dword [eax*4 + 0x662464]
push ecx
push str.good_soldier_nervous.bik
jmp 0x4b1b00
mov edx, dword [eax*4 + 0x662464]
push edx
push str.good_arab_nervous.bik
push eax
push 0xea
mov ecx, 0xcbf3b0
call fcn.0046bcd0
push eax
mov ecx, 0xf0a5c0
call fcn.004b2e80
mov eax, dword [esp + 0x18]
inc ebp
add ebx, 0xe4
cmp ebp, dword [eax + 0x5ac]
jl 0x4b1a39
cmp dword [0xdbde64], 0x97
jne 0x4b1b9f
cmp dword [0xd7dfc0], 3
jne 0x4b1b9f
mov ecx, dword [0xd7dfc4]
mov edi, dword [0xd7dfc8]
lea esi, [ecx + 1]
cmp esi, 0xc
jl 0x4b1b5f
sub esi, 0xc
inc edi
mov ebx, dword [esp + 0x18]
xor edx, edx
mov eax, dword [ebx + 0x5ac]
test eax, eax
jle 0x4b1b9f
lea eax, [ebx + 0x5b0]
mov ebp, 0x28
cmp edi, dword [eax + 4]
jne 0x4b1b8f
cmp esi, dword [eax]
jne 0x4b1b8f
mov ecx, dword [eax + 8]
dec ecx
jne 0x4b1b8f
mov dword [0xd80410], ebp
mov ecx, dword [ebx + 0x5ac]
inc edx
add eax, 0xe4
cmp edx, ecx
jl 0x4b1b7a
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xec
ret