Function at 0x4433a0
Capabilities:
Encrypt data using speck

Disassembly:
sub esp, 0xcc
mov al, byte [0x798544]
push ebx
push ebp
push esi
push edi
push eax
call fcn.004a4660
mov ecx, dword [0x517de8]
mov dword [esp + 0x28], eax
mov eax, ecx
add esp, 4
cdq
xor eax, edx
sub eax, edx
and eax, 1
xor eax, edx
sub eax, edx
je 0x4433e5
push ecx
push str._gGameMap.width___d__not_even
push str.HandleGameLoopEvents
call fcn.0042b590
add esp, 0xc
mov edi, dword [0x517dec]
mov eax, edi
cdq
xor eax, edx
sub eax, edx
and eax, 1
xor eax, edx
sub eax, edx
je 0x443414
push edi
push str._gGameMap.height___d__not_even
push str.HandleGameLoopEvents
call fcn.0042b590
mov edi, dword [0x517dec]
add esp, 0xc
mov esi, dword [0x6d8d98]
mov ebp, dword [0x517de8]
mov ecx, dword [esi]
mov esi, dword [esi + 4]
mov eax, ecx
sub eax, ebp
cdq
sub eax, edx
mov ebx, eax
mov eax, esi
sub eax, edi
cdq
sub eax, edx
mov ebp, eax
mov al, byte [0x516458]
sar ebx, 1
sar ebp, 1
test al, al
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x30], ebp
jne 0x443d3e
mov edx, dword [str.2222]
mov eax, dword [0x786d48]
mov edi, dword [0x4eb04c]
cmp edx, eax
jge 0x443c7f
mov eax, dword [0x4e41dc]
cmp edi, eax
jle 0x443c7f
mov ecx, dword [0x798538]
mov ebp, dword [0x79853c]
sub ebp, eax
mov eax, dword [0x517de8]
lea ebx, [ecx + edx]
add ebp, edi
mov esi, ebx
mov edi, ebp
shr esi, 5
shr edi, 5
cmp esi, eax
jge 0x4434a4
cmp edi, dword [0x517dec]
jl 0x4434b6
jmp 0x443c7f
mov eax, dword [edi*4 + 0x547df0]
add eax, esi
lea ecx, [eax + eax*2]
xor al, al
shl ecx, 2
mov edx, dword [ecx + 0x517df4]
mov dword [esp + 0x20], edx
mov dl, byte [0x4dfb04]
test dl, dl
je 0x4434f5
xor eax, eax
mov al, byte [ecx + 0x517df8]
cdq
xor eax, edx
sub eax, edx
and eax, 0xf
xor eax, edx
sub eax, edx
dec eax
neg eax
sbb eax, eax
inc eax
mov ecx, dword [0x516438]
test ecx, ecx
jne 0x443b20
test al, al
je 0x44351b
call fcn.004a57c0
test al, al
je 0x443d34
push 1
jmp 0x443d36
call fcn.004a57c0
test al, al
je 0x4438b7
mov ecx, dword [esp + 0x20]
mov dl, byte [0x798544]
mov al, cl
and al, 7
cmp al, dl
mov byte [esp + 0x10], al
je 0x443554
test ecx, 0x3e8
je 0x443554
lea eax, [esp + 0x14]
push 1
lea ecx, [esp + 0x14]
push eax
push ecx
jmp 0x443560
lea edx, [esp + 0x14]
push 0
lea eax, [esp + 0x14]
push edx
push eax
push ebp
push ebx
call fcn.004a5270
add esp, 0x14
test eax, eax
je 0x4436b7
mov cl, byte [eax + 8]
mov ebp, dword [esp + 0x10]
test cl, 4
mov cl, byte [0x798544]
je 0x44359e
xor edx, edx
mov ebx, ebp
mov dl, cl
and ebx, 0xff
cmp byte [ebx + edx*8 + 0x798830], 0
jne 0x4436b7
mov dl, byte [eax + 0x19]
test dl, dl
mov dl, byte [0x797e89]
je 0x443631
cmp byte [esp + 0x10], cl
jne 0x443631
test dl, dl
jne 0x443631
mov cl, byte [0x797e88]
test cl, cl
je 0x4435ca
push 5
jmp 0x443d36
xor ecx, ecx
mov cl, byte [eax + 0x18]
shl ecx, 8
mov cl, byte [ecx + 0x77e27d]
cmp cl, 6
jne 0x4435f2
push edi
push esi
call fcn.00443250
add esp, 8
test al, al
je 0x44362a
push 0xc
jmp 0x443d36
cmp cl, 7
jne 0x4435fe
push 0xc
jmp 0x443d36
cmp cl, 0xe
jne 0x443614
test dword [esp + 0x20], 0x10000
je 0x44362a
push 0xc
jmp 0x443d36
cmp cl, 4
jne 0x443d34
cmp byte [eax + 0x29], 0xa0
jb 0x44362a
push 0xc
jmp 0x443d36
push 0xd
jmp 0x443d36
xor ebx, ebx
and ebp, 0xff
mov bl, cl
cmp byte [ebp + ebx*8 + 0x798830], 0
jne 0x443650
test dl, dl
jne 0x443650
push 5
jmp 0x443d36
mov dl, byte [0x797e8a]
test dl, dl
je 0x44369f
xor edx, edx
mov dl, byte [eax + 0x18]
shl edx, 8
mov bl, byte [edx + 0x77e261]
test bl, bl
je 0x44369f
cmp byte [esp + 0x10], cl
je 0x44369f
call fcn.004a5a10
test al, al
je 0x44368b
mov eax, dword [esp + 0x20]
test ah, 0x20
je 0x44368b
push 1
jmp 0x443d36
call fcn.004a58b0
test al, al
je 0x4438b0
push 2
jmp 0x443d36
push eax
call fcn.004a58f0
add esp, 4
test al, al
je 0x4438b0
push 2
jmp 0x443d36
lea eax, [esp + 0x14]
lea ecx, [esp + 0x10]
push eax
lea edx, [esp + 0x1c]
push ecx
push edx
push edi
push esi
call fcn.004a5640
add esp, 0x14
test al, al
je 0x443851
mov al, byte [0x798544]
mov cl, byte [esp + 0x10]
cmp cl, al
mov cl, byte [0x797e89]
jne 0x443787
test cl, cl
jne 0x443787
mov ecx, dword [esp + 0x18]
xor eax, eax
mov al, byte [ecx + 0x34]
mov edx, eax
shl edx, 5
add edx, eax
lea eax, [eax + edx*2]
cmp byte [eax*4 + 0x6dc59c], 6
jne 0x443724
call fcn.004a5940
test al, al
je 0x443724
push 4
jmp 0x443d36
push 1
call fcn.004a59c0
mov ecx, dword [esp + 0x1c]
add esp, 4
test al, al
je 0x443756
xor eax, eax
mov al, byte [ecx + 0x34]
mov edx, eax
shl edx, 5
add edx, eax
lea eax, [eax + edx*2]
cmp byte [eax*4 + 0x6dc59c], 4
jne 0x443756
push 4
jmp 0x443d36
mov eax, dword [esp + 0x20]
test ah, 4
je 0x443b19
xor eax, eax
mov al, byte [ecx + 0x34]
mov ecx, eax
shl ecx, 5
add ecx, eax
lea edx, [eax + ecx*2]
cmp byte [edx*4 + 0x6dc59c], 0x10
jne 0x4438b0
push 5
jmp 0x443d36
xor edx, edx
mov dl, al
mov eax, dword [esp + 0x10]
and eax, 0xff
mov bl, byte [eax + edx*8 + 0x798830]
test bl, bl
jne 0x4437d8
test cl, cl
jne 0x4437d8
mov eax, dword [esp + 0x20]
test ah, 4
je 0x443b19
mov ecx, dword [esp + 0x18]
xor eax, eax
mov al, byte [ecx + 0x34]
mov edx, eax
shl edx, 5
add edx, eax
lea eax, [eax + edx*2]
cmp byte [eax*4 + 0x6dc59c], 0x10
jne 0x4438b0
push 5
jmp 0x443d36
call fcn.004a58b0
test al, al
je 0x4437e8
push 2
jmp 0x443d36
push 4
call fcn.004a57f0
add esp, 4
test al, al
je 0x44381e
mov cl, byte [esp + 0x10]
mov al, byte [0x798544]
cmp cl, al
je 0x4438b0
mov edx, dword [esp + 0x18]
mov eax, dword [edx + 0x28]
test ah, 2
je 0x4438b0
push 0x1f
jmp 0x443d36
push 3
call fcn.004a57f0
add esp, 4
test al, al
je 0x4438b0
mov al, byte [esp + 0x10]
mov cl, byte [0x798544]
cmp al, cl
je 0x4438b0
mov ecx, dword [esp + 0x18]
mov eax, dword [ecx + 0x28]
test ah, 4
je 0x4438b0
push 4
jmp 0x443d36
mov al, byte [0x797e89]
test al, al
je 0x44386a
call fcn.004a58b0
test al, al
je 0x44386a
push 2
jmp 0x443d36
mov eax, dword [esp + 0x20]
test ah, 0x20
je 0x44389b
test ah, 0x40
je 0x4438b0
test eax, 0x700000
je 0x443894
push 1
call fcn.004a59c0
add esp, 4
test al, al
je 0x443894
push 2
jmp 0x443d36
push 1
jmp 0x443d36
test ah, 0x40
je 0x4438b0
call fcn.004a5980
test al, al
je 0x4438b0
push 0x20
jmp 0x443d36
push 3
jmp 0x443d36
call fcn.004a5860
mov ebx, eax
test ebx, ebx
je 0x4439c5
mov eax, dword [esp + 0x20]
test eax, 0x3f8
je 0x443d34
mov dl, al
xor ecx, ecx
mov cl, byte [0x798544]
and dl, 7
mov byte [esp + 0x10], dl
mov edx, dword [esp + 0x10]
and edx, 0xff
cmp byte [edx + ecx*8 + 0x798830], 0
jne 0x443956
mov cl, byte [0x797e89]
test cl, cl
jne 0x443956
test ah, 4
je 0x443b19
lea eax, [esp + 0x14]
lea ecx, [esp + 0x10]
push eax
lea edx, [esp + 0x1c]
push ecx
push edx
push edi
push esi
call fcn.004a5640
add esp, 0x14
test al, al
je 0x443d34
mov ecx, dword [esp + 0x18]
xor eax, eax
mov al, byte [ecx + 0x34]
mov edx, eax
shl edx, 5
add edx, eax
lea eax, [eax + edx*2]
cmp byte [eax*4 + 0x6dc59c], 0x10
jne 0x443d34
push 5
jmp 0x443d36
lea ecx, [esp + 0x14]
lea edx, [esp + 0x10]
push ecx
lea eax, [esp + 0x1c]
push edx
push eax
push edi
push esi
call fcn.004a5640
add esp, 0x14
test al, al
je 0x4439a9
mov eax, dword [esp + 0x18]
mov cl, byte [eax + 0x35]
test cl, cl
je 0x443990
mov cl, byte [esp + 0x10]
mov dl, byte [0x798544]
cmp cl, dl
je 0x443d34
push eax
push ebx
call fcn.00497530
add esp, 8
test al, al
je 0x443d34
push 2
jmp 0x443d36
push 0
push edi
push esi
push ebx
call fcn.00497140
add esp, 0x10
test al, al
je 0x443d34
push 2
jmp 0x443d36
call fcn.004a5830
test al, al
je 0x443a76
mov ebx, dword [esp + 0x20]
test ebx, 0x3f8
je 0x443d34
lea edx, [esp + 0x14]
lea eax, [esp + 0x10]
push edx
lea ecx, [esp + 0x1c]
push eax
push ecx
push edi
push esi
call fcn.004a5640
add esp, 0x14
test al, al
je 0x443b19
mov eax, dword [esp + 0x18]
mov cl, byte [eax + 0x35]
test cl, cl
je 0x443a47
mov dl, byte [esp + 0x10]
mov cl, byte [0x798544]
cmp dl, cl
jne 0x443a47
xor ecx, ecx
mov cl, byte [eax + 0x34]
push ecx
call fcn.004432f0
add esp, 4
test al, al
je 0x443d34
mov edx, dword [esp + 0x18]
test byte [edx + 0x28], 0x80
jne 0x443d34
push 0xc
jmp 0x443d36
test bh, 4
je 0x443b19
xor ecx, ecx
mov cl, byte [eax + 0x34]
mov eax, ecx
mov edx, eax
shl edx, 5
add edx, eax
lea eax, [eax + edx*2]
cmp byte [eax*4 + 0x6dc59c], 0x10
jne 0x443d34
push 5
jmp 0x443d36
mov ecx, dword [esp + 0x20]
test ecx, 0x3f8
je 0x443d34
test ch, 4
je 0x443ad4
lea ecx, [esp + 0x14]
lea edx, [esp + 0x10]
push ecx
lea eax, [esp + 0x1c]
push edx
push eax
push edi
push esi
call fcn.004a5640
add esp, 0x14
test al, al
je 0x443d34
mov ecx, dword [esp + 0x18]
xor eax, eax
mov al, byte [ecx + 0x34]
mov edx, eax
shl edx, 5
add edx, eax
lea eax, [eax + edx*2]
cmp byte [eax*4 + 0x6dc59c], 0x10
jne 0x443d34
push 5
jmp 0x443d36
mov dl, byte [0x798544]
mov al, cl
and al, 7
cmp al, dl
mov byte [esp + 0x10], al
je 0x443b19
test ecx, 0x3e8
je 0x443b19
lea ecx, [esp + 0x14]
push 1
lea edx, [esp + 0x14]
push ecx
shl edi, 5
push edx
push edi
shl esi, 5
push esi
call fcn.004a5270
add esp, 0x14
test eax, eax
je 0x443d34
push 5
jmp 0x443d36
push 5
jmp 0x443d36
cmp ecx, 2
jne 0x443c1a
push 8
call fcn.0044c420
add esp, 4
lea eax, [esp + 0x14]
lea ecx, [esp + 0x10]
lea edx, [esp + 0x18]
push eax
push ecx
push edx
push edi
push esi
call fcn.004a5640
add esp, 0x14
test al, al
je 0x443b9d
mov al, byte [esp + 0x10]
mov cl, byte [0x798544]
cmp al, cl
jne 0x443d3e
mov ecx, dword [esp + 0x18]
xor eax, eax
mov al, byte [ecx + 0x34]
mov ecx, dword [ecx + 0x24]
mov edx, eax
shl edx, 5
add edx, eax
lea eax, [eax + edx*2]
shl eax, 2
cmp ecx, dword [eax + 0x6dc540]
jge 0x443d3e
mov ecx, dword [eax + 0x6dc598]
test ch, 2
je 0x443d3e
push 0xb
jmp 0x443d36
lea edx, [esp + 0x14]
push 0
lea eax, [esp + 0x14]
push edx
shl edi, 5
push eax
push edi
shl esi, 5
push esi
call fcn.004a5270
mov esi, eax
add esp, 0x14
test esi, esi
je 0x443d3e
mov cl, byte [0x798544]
push 6
push ecx
call fcn.00442910
add esp, 8
test al, al
je 0x443d3e
mov dl, byte [0x798544]
mov al, byte [esp + 0x10]
cmp al, dl
jne 0x443d3e
mov ecx, dword [esi + 4]
xor eax, eax
mov al, byte [esi + 0x18]
shl eax, 8
cmp ecx, dword [eax + 0x77e254]
jge 0x443d3e
mov cl, byte [eax + 0x77e261]
test cl, cl
jne 0x443d3e
push 0xb
jmp 0x443d36
cmp ecx, 3
jne 0x443c63
push 7
call fcn.0044c420
add esp, 4
lea edx, [esp + 0x14]
lea eax, [esp + 0x10]
lea ecx, [esp + 0x18]
push edx
push eax
push ecx
push edi
push esi
call fcn.004a5640
add esp, 0x14
test al, al
je 0x443d3e
mov dl, byte [0x798544]
mov al, byte [esp + 0x10]
cmp al, dl
jne 0x443d3e
push 0xa
jmp 0x443d36
cmp ecx, 4
jne 0x443c6f
push 9
jmp 0x443d36
cmp ecx, 5
jne 0x443d34
push 0x1e
jmp 0x443d36
mov eax, dword [0x4e41e4]
lea edi, [ebx + eax]
cmp edx, edi
jle 0x443d34
sub eax, ebx
add eax, ecx
cmp edx, eax
jge 0x443d34
mov eax, dword [0x4e41e8]
mov ecx, dword [0x4eb04c]
lea edx, [ebp + eax]
cmp ecx, edx
jle 0x443d34
sub eax, ebp
add eax, esi
cmp ecx, eax
jge 0x443d34
mov al, byte [0x51643c]
test al, al
jne 0x443d34
mov al, byte [0x798544]
push 1
push eax
call fcn.00442910
add esp, 8
test al, al
je 0x443d34
mov ecx, dword [esp + 0x24]
cmp dword [ecx + 0x245b0], 0x64
jb 0x443d34
mov eax, dword [0x4eb04c]
mov edx, dword [str.2222]
mov esi, dword [0x4e41e4]
mov ecx, dword [0x517de8]
sub eax, ebp
mov ebp, dword [0x4e41e8]
sub edx, ebx
sub eax, ebp
sub edx, esi
cmp edx, ecx
jge 0x443d15
cmp eax, dword [0x517dec]
jl 0x443d27
push str.Invalid_index_to_gGameMap.map__2____d___d___mx__my
push str.HandleGameLoopEvents
call fcn.0042b590
add esp, 8
call fcn.004a57c0
test al, al
je 0x443d34
push 6
jmp 0x443d36
push 0
call fcn.0044c420
add esp, 4
nop
nop
nop
nop
nop
nop
mov eax, dword [0x4eb04c]
nop
nop
nop
nop
mov dl, byte [0x797eda]
test dl, dl
jne 0x443d62
mov edx, dword [0x4eb02c]
dec edx
cmp eax, edx
jl 0x443dc3
mov eax, dword [0x517dec]
mov esi, dword [0x6dc538]
mov ecx, dword [0x79853c]
mov edx, dword [0x4eb030]
shl eax, 5
sub eax, esi
add ecx, edx
cmp ecx, eax
jg 0x443da8
mov eax, dword [0x516438]
mov dword [0x79853c], ecx
test eax, eax
jne 0x443e26
mov al, byte [0x516458]
test al, al
jne 0x443e26
push 0x12
jmp 0x443e1e
mov dword [0x79853c], eax
mov eax, dword [0x516438]
test eax, eax
jne 0x443e26
mov al, byte [0x516458]
test al, al
jne 0x443e26
push 0x1a
jmp 0x443e1e
nop
nop
nop
nop
mov cl, byte [0x797edd]
test cl, cl
jne 0x443dd6
cmp eax, 1
jge 0x443e26
mov eax, dword [0x79853c]
mov ecx, dword [0x4eb030]
sub eax, ecx
js 0x443e00
mov dword [0x79853c], eax
mov eax, dword [0x516438]
test eax, eax
jne 0x443e26
mov al, byte [0x516458]
test al, al
jne 0x443e26
push 0xe
jmp 0x443e1e
mov eax, dword [0x516438]
mov dword [0x79853c], 0
test eax, eax
jne 0x443e26
mov al, byte [0x516458]
test al, al
jne 0x443e26
push 0x16
call fcn.0044c420
add esp, 4
nop
nop
nop
nop
nop
nop
mov eax, dword [str.2222]
mov ecx, dword [0x786d48]
nop
nop
nop
nop
mov bl, byte [0x797edb]
test bl, bl
jne 0x443f23
mov esi, dword [0x4eb028]
dec esi
cmp eax, esi
jge 0x443f23
mov bl, byte [0x516458]
cmp eax, ecx
jle 0x443e6a
test bl, bl
jne 0x443f29
nop
nop
nop
nop
mov cl, byte [0x797ed9]
test cl, cl
jne 0x443e81
cmp eax, 1
jge 0x443fb0
mov eax, dword [0x798538]
mov ecx, dword [0x4eb030]
sub eax, ecx
js 0x443ece
mov dword [0x798538], eax
mov eax, dword [0x516438]
test eax, eax
jne 0x443fb0
test bl, bl
jne 0x443fb0
mov eax, dword [0x798540]
cmp eax, 0x12
jne 0x443ebb
push 0x13
jmp 0x443fa8
cmp eax, 0xe
jne 0x443ec7
push 0x15
jmp 0x443fa8
push 0x14
jmp 0x443fa8
mov eax, dword [0x516438]
mov dword [0x798538], 0
test eax, eax
jne 0x443fb0
test bl, bl
jne 0x443fb0
mov eax, dword [0x798540]
cmp eax, 0x1a
jne 0x443efe
push 0x1b
jmp 0x443fa8
cmp eax, 0x16
jne 0x443f0a
push 0x1d
jmp 0x443fa8
cmp eax, 0xe
je 0x443fb0
cmp eax, 0x12
je 0x443fb0
push 0x1c
jmp 0x443fa8
mov bl, byte [0x516458]
mov eax, dword [0x517de8]
mov edx, dword [0x4eb030]
shl eax, 5
sub eax, ecx
mov ecx, dword [0x798538]
add ecx, edx
cmp ecx, eax
jg 0x443f73
mov eax, dword [0x516438]
mov dword [0x798538], ecx
test eax, eax
jne 0x443fb0
test bl, bl
jne 0x443fb0
mov eax, dword [0x798540]
cmp eax, 0x12
jne 0x443f66
push 0x11
jmp 0x443fa8
cmp eax, 0xe
jne 0x443f6f
push 0xf
jmp 0x443fa8
push 0x10
jmp 0x443fa8
mov dword [0x798538], eax
mov eax, dword [0x516438]
test eax, eax
jne 0x443fb0
test bl, bl
jne 0x443fb0
mov eax, dword [0x798540]
cmp eax, 0x1a
jne 0x443f93
push 0x19
jmp 0x443fa8
cmp eax, 0x16
jne 0x443f9c
push 0x17
jmp 0x443fa8
cmp eax, 0xe
je 0x443fb0
cmp eax, 0x12
je 0x443fb0
push 0x18
call fcn.0044c420
add esp, 4
mov eax, dword [0x516430]
mov ebx, dword [0x4e41ec]
cmp eax, 1
jne 0x444037
mov al, byte [0x4eb008]
test al, al
je 0x444037
mov cl, byte [0x797ea0]
test cl, cl
je 0x44400c
jmp 0x8d7c30
test al, al
je 0x444037
mov al, byte [0x797e9e]
test al, al
je 0x444037
jmp 0x8d7c00
mov ebp, dword [esp + 0x24]
mov eax, dword [0x798520]
test eax, eax
je 0x44418a
mov al, byte [0x516458]
test al, al
jne 0x44418a
mov al, byte [0x51643c]
test al, al
jne 0x44418a
mov eax, dword [0x4e41e4]
mov edi, dword [esp + 0x1c]
mov edx, dword [str.2222]
lea ecx, [edi + eax]
cmp edx, ecx
jle 0x44418a
mov ecx, dword [0x6d8d98]
sub eax, edi
add eax, dword [ecx]
cmp edx, eax
jge 0x44418a
mov eax, dword [0x4e41e8]
mov esi, dword [esp + 0x30]
lea edx, [esi + eax]
cmp dword [0x4eb04c], edx
jle 0x44418a
mov ecx, dword [ecx + 4]
sub ecx, esi
add ecx, eax
mov eax, dword [0x4eb04c]
cmp eax, ecx
jge 0x44418a
jmp 0x8d4df0
mov ecx, dword [0x798530]
xor eax, eax
cmp ecx, eax
je 0x44462a
mov dword [0x798530], eax
mov dword [0x516438], eax
mov byte [0x516458], al
mov eax, dword [0x516430]
cmp eax, 2
jne 0x44427e
mov ebx, dword [0x4e41fc]
mov eax, dword [str.2222]
cmp eax, ebx
jle 0x444625
mov edi, dword [str.___P_n]
mov ecx, dword [0x4e4204]
add ecx, edi
cmp eax, ecx
jge 0x444625
mov ecx, dword [0x4e4200]
mov eax, dword [0x4eb04c]
cmp eax, ecx
jle 0x444625
mov esi, dword [0x4e41f8]
mov edx, esi
imul edx, dword [0x4e41ec]
add edx, ecx
cmp eax, edx
jge 0x444625
mov al, byte [ebp + 0x262a5]
test al, al
jne 0x44462a
mov eax, dword [0x4eb04c]
xor edx, edx
sub eax, ecx
add ebx, edi
div esi
mov esi, eax
mov eax, dword [str.2222]
shl esi, 1
cmp eax, ebx
jle 0x444235
inc esi
cmp esi, 8
jl 0x44424c
jmp 0x8d1be0
mov esi, dword [ebp + esi*4 + 0x262a8]
cmp esi, 0x3c
jl 0x44426a
push str.Invalid_unitType
push str.HandleGameLoopEvents
call fcn.0042b590
add esp, 8
mov al, byte [0x798544]
push esi
push eax
call fcn.0045a260
add esp, 8
jmp 0x44462a
cmp eax, 3
jne 0x44433b
mov ebx, dword [0x4e41fc]
mov eax, dword [str.2222]
cmp eax, ebx
jle 0x444625
mov edi, dword [str.___P_n]
mov ecx, dword [0x4e4204]
add ecx, edi
cmp eax, ecx
jge 0x444625
mov ecx, dword [0x4e4200]
mov eax, dword [0x4eb04c]
cmp eax, ecx
jle 0x444625
mov esi, dword [0x4e41f8]
mov edx, esi
imul edx, dword [0x4e41ec]
add edx, ecx
cmp eax, edx
jge 0x444625
sub eax, ecx
xor edx, edx
div esi
add ebx, edi
mov esi, eax
mov eax, dword [str.2222]
shl esi, 1
cmp eax, ebx
jle 0x4442f2
inc esi
cmp esi, 8
jl 0x444309
jmp 0x8d1c00
mov esi, dword [ebp + esi*4 + 0x262c8]
cmp esi, 0x64
jl 0x444327
push str.Invalid_unitType
push str.HandleGameLoopEvents
call fcn.0042b590
add esp, 8
mov al, byte [0x798544]
push esi
push eax
call fcn.0045a3a0
add esp, 8
jmp 0x44462a
mov eax, dword [0x4e41fc]
mov edi, dword [str.2222]
mov edx, dword [str.___P_n]
mov ecx, dword [0x4e4200]
mov esi, dword [0x4e41f8]
cmp edi, eax
jle 0x4443c7
add eax, edx
cmp edi, eax
jge 0x4443c7
mov eax, dword [0x4eb04c]
cmp eax, ecx
jle 0x4443c7
mov edi, esi
imul edi, ebx
add edi, ecx
cmp eax, edi
jge 0x4443c7
sub eax, ecx
xor edx, edx
div esi
mov esi, eax
cmp esi, ebx
jl 0x444394
push str.Miscalculation_in_UI
push str.HandleGameLoopEvents
call fcn.0042b590
add esp, 8
mov ecx, dword [0x516440]
add esi, ecx
mov eax, dword [ebp + esi*4 + 0x260bc]
test eax, eax
jl 0x44462a
mov byte [ebp + 0x2652d], 1
jmp 0x8d7600
mov eax, dword [0x4e4204]
mov edi, dword [str.2222]
cmp edi, eax
jle 0x444474
add eax, edx
cmp edi, eax
jge 0x444474
mov eax, dword [0x4eb04c]
cmp eax, ecx
jle 0x444474
mov edx, esi
imul edx, ebx
add edx, ecx
cmp eax, edx
jge 0x444474
sub eax, ecx
xor edx, edx
div esi
mov esi, eax
cmp esi, ebx
jl 0x44441a
push str.Miscalculation_in_UI
push str.HandleGameLoopEvents
call fcn.0042b590
add esp, 8
mov eax, dword [0x516444]
add esi, eax
mov eax, dword [ebp + esi*4 + 0x261b4]
test eax, eax
jl 0x44462a
mov ecx, eax
shl ecx, 8
mov cl, byte [ecx + 0x77e27d]
cmp cl, 9
je 0x44462a
cmp cl, 0xa
je 0x44462a
cmp cl, 4
je 0x44462a
cmp cl, 0xc
je 0x44462a
mov dl, byte [0x798544]
push eax
push edx
call fcn.0045a100
add esp, 8
jmp 0x44462a
push 1
push 1
call fcn.00443040
add esp, 8
test al, al
je 0x4444de
mov ecx, dword [0x4e41ec]
mov esi, dword [0x516440]
mov eax, dword [ebp + 0x260b4]
lea edx, [ecx + esi]
cmp edx, eax
jae 0x4444d3
mov edi, eax
sub edi, esi
sub edi, ecx
cmp edi, ecx
jb 0x4444bd
push 0
push 0
push 0
mov dword [0x516440], edx
push str.S_ICONSCROLL
jmp 0x4445cc
push 0
dec eax
push 0
push 0
mov dword [0x516440], eax
push str.S_ICONSCROLL
jmp 0x4445cc
push 0
push 0
push 0
jmp 0x4445c7
xor edi, edi
push 1
push edi
call fcn.00443040
add esp, 8
test al, al
je 0x44452d
mov eax, dword [0x516440]
cmp eax, edi
jle 0x4445c4
mov ecx, dword [0x4e41ec]
cmp eax, ecx
jl 0x44451a
push edi
sub eax, ecx
push edi
push edi
mov dword [0x516440], eax
push str.S_ICONSCROLL
jmp 0x4445cc
push edi
push edi
push edi
mov dword [0x516440], edi
push str.S_ICONSCROLL
jmp 0x4445cc
push 1
push 3
call fcn.00443040
add esp, 8
test al, al
je 0x444580
mov ecx, dword [0x4e41ec]
mov esi, dword [0x516444]
mov eax, dword [ebp + 0x261ac]
lea edx, [ecx + esi]
cmp edx, eax
jae 0x4445c4
mov ebx, eax
sub ebx, esi
sub ebx, ecx
cmp ebx, ecx
jb 0x444570
push edi
push edi
push edi
mov dword [0x516444], edx
push str.S_ICONSCROLL
jmp 0x4445cc
push edi
dec eax
push edi
push edi
mov dword [0x516444], eax
push str.S_ICONSCROLL
jmp 0x4445cc
push 1
push 2
call fcn.00443040
add esp, 8
test al, al
je 0x4445df
mov eax, dword [0x516444]
cmp eax, edi
jle 0x4445c4
mov ecx, dword [0x4e41ec]
cmp eax, ecx
jl 0x4445b4
push edi
sub eax, ecx
push edi
push edi
mov dword [0x516444], eax
push str.S_ICONSCROLL
jmp 0x4445cc
push edi
push edi
push edi
mov dword [0x516444], edi
push str.S_ICONSCROLL
jmp 0x4445cc
push edi
push edi
push edi
push str.S_ENDSCROLL
call fcn.0048dd90
add esp, 4
push eax
call fcn.0046f820
add esp, 0x10
jmp 0x44462a
mov ecx, dword [str.2222]
mov eax, dword [0x786d48]
mov edx, dword [0x4eb04c]
cmp ecx, eax
jge 0x4445fc
cmp edx, dword [0x4e41dc]
jg 0x444625
mov eax, dword [0x4e41e4]
cmp ecx, eax
jle 0x44462a
mov esi, eax
mov eax, dword [0x6d8d98]
add esi, dword [eax]
cmp ecx, esi
jge 0x44462a
mov ecx, dword [0x4e41e8]
cmp edx, ecx
jle 0x44462a
mov eax, dword [eax + 4]
add eax, ecx
cmp edx, eax
jge 0x44462a
call fcn.004a5790
mov eax, dword [0x798534]
xor edi, edi
cmp eax, edi
je 0x444652
mov eax, 0x5162dc
cmp byte [eax], 2
jne 0x444642
mov byte [eax], 1
add eax, 0x18
cmp eax, 0x516324
jle 0x44463a
mov dword [0x798534], edi
cmp dword [0x798524], edi
je 0x444bf7
mov ecx, dword [0x798498]
mov eax, dword [0x786d48]
cmp ecx, eax
mov dword [0x798524], edi
jge 0x4446a9
mov eax, dword [0x79849c]
jmp 0x8d1690
mov byte [0x516458], 0
mov esi, 1
push esi
push 4
call fcn.00443040
add esp, 8
test al, al
je 0x4446dc
mov ecx, dword [0x516438]
sub ecx, 2
neg ecx
sbb ecx, ecx
and ecx, 2
mov dword [0x516438], ecx
jmp 0x444701
push esi
push 5
call fcn.00443040
add esp, 8
test al, al
je 0x44471f
mov edx, dword [0x516438]
sub edx, 3
neg edx
sbb edx, edx
and edx, 3
mov dword [0x516438], edx
push edi
push edi
push edi
push str.BUTTON
call fcn.0048dd90
add esp, 4
push eax
call fcn.0046f820
add esp, 0x10
jmp 0x444839
cmp dword [0x797e34], edi
jne 0x444730
mov al, byte [0x4eb008]
test al, al
jne 0x444756
push esi
push 6
call fcn.00443040
add esp, 8
test al, al
je 0x444756
mov cl, byte [0x51643c]
xor eax, eax
test cl, cl
sete al
mov byte [0x51643c], al
jmp 0x444839
push esi
push 7
call fcn.00443040
add esp, 8
test al, al
je 0x4447a6
call fcn.004a58b0
test al, al
je 0x444839
mov al, byte [0x798544]
push eax
call fcn.00459980
add esp, 4
push edi
push edi
push edi
push str.H_GUARDING
call fcn.0048dd90
add esp, 4
push eax
push str.O_GUARDING
call fcn.0048dd90
add esp, 4
push eax
push str.S_GUARDING
jmp 0x444810
push esi
push 8
call fcn.00443040
add esp, 8
test al, al
je 0x444823
call fcn.004a57c0
test al, al
je 0x444839
lea ecx, [esp + 0x28]
lea edx, [esp + 0x2c]
push ecx
push edx
mov ecx, ebp
call fcn.0046e3f0
test al, al
je 0x444839
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x2c]
mov dl, byte [0x798544]
push eax
push ecx
push edx
call fcn.00459ab0
add esp, 0xc
push edi
push edi
push edi
push str.H_RETREAT
call fcn.0048dd90
add esp, 4
push eax
push str.O_RETREAT
call fcn.0048dd90
add esp, 4
push eax
push str.S_RETREAT
call fcn.0048dd90
add esp, 4
push eax
call fcn.0046f900
add esp, 0x18
jmp 0x444839
push esi
push 0xb
call fcn.00443040
add esp, 8
test al, al
je 0x444839
mov byte [0x797590], 0
mov eax, dword [0x516430]
cmp eax, esi
jne 0x4449d4
push esi
push esi
call fcn.00443040
add esp, 8
test al, al
je 0x444889
mov eax, dword [0x4e41ec]
mov ecx, dword [0x516440]
add eax, ecx
mov ecx, dword [ebp + 0x260b4]
cmp eax, ecx
jae 0x44491b
mov ebx, dword [0x516440]
push edi
inc ebx
push edi
push edi
mov dword [0x516440], ebx
push str.S_ICONSCROLL
jmp 0x444923
push esi
push edi
call fcn.00443040
add esp, 8
test al, al
je 0x4448b3
mov eax, dword [0x516440]
cmp eax, edi
jle 0x44491b
mov ebx, eax
push edi
dec ebx
push edi
push edi
mov dword [0x516440], ebx
push str.S_ICONSCROLL
jmp 0x444923
push esi
push 3
call fcn.00443040
add esp, 8
test al, al
je 0x4448f0
mov edx, dword [0x4e41ec]
mov eax, dword [0x516444]
add edx, eax
mov eax, dword [ebp + 0x261ac]
cmp edx, eax
jae 0x44491b
mov ebx, dword [0x516444]
push edi
inc ebx
push edi
push edi
mov dword [0x516444], ebx
push str.S_ICONSCROLL
jmp 0x444923
push esi
push 2
call fcn.00443040
add esp, 8
test al, al
je 0x444939
mov eax, dword [0x516444]
cmp eax, edi
jle 0x44491b
mov ebx, eax
push edi
dec ebx
push edi
push edi
mov dword [0x516444], ebx
push str.S_ICONSCROLL
jmp 0x444923
push edi
push edi
push edi
push str.S_ENDSCROLL
call fcn.0048dd90
add esp, 4
push eax
call fcn.0046f820
add esp, 0x10
jmp 0x444bfc
push esi
push 9
call fcn.00443040
add esp, 8
test al, al
je 0x444981
mov dword [0x516430], 3
mov byte [0x5162f4], 0
mov byte [0x5162dc], 0
mov byte [0x516324], 0
mov byte [0x51630c], 0
mov byte [0x5163b4], 0
mov byte [0x5163fc], 1
jmp 0x444bfc
push esi
push 0xa
call fcn.00443040
add esp, 8
test al, al
je 0x444bfc
mov dword [0x516430], 2
mov byte [0x5162f4], 0
mov byte [0x5162dc], 0
mov byte [0x516324], 0
mov byte [0x51630c], 0
mov byte [0x5163cc], 0
mov byte [0x516414], 1
mov byte [0x51642c], 1
jmp 0x444bfc
cmp eax, 2
jne 0x444b6f
push esi
push 0xe
call fcn.00443040
add esp, 8
test al, al
je 0x444a6b
mov cl, byte [0x798544]
mov dword [0x516430], esi
push ecx
mov byte [0x5162f4], 1
mov byte [0x5162dc], 1
mov byte [0x516324], 1
mov byte [0x51630c], 1
mov byte [0x516414], 0
mov byte [0x51642c], 0
call fcn.00443370
add esp, 4
test al, al
je 0x444bfc
mov dl, byte [0x798544]
push edx
call fcn.0045a2b0
add esp, 4
push edi
push edi
push edi
push str.H_PORTORDER
call fcn.0048dd90
add esp, 4
push eax
push str.O_PORTORDER
call fcn.0048dd90
add esp, 4
push eax
push str.S_PORTORDER
jmp 0x444b59
push esi
push 0xd
call fcn.00443040
add esp, 8
test al, al
je 0x444ad0
mov al, byte [0x798544]
mov dword [0x516430], esi
push eax
mov byte [0x5162f4], 1
mov byte [0x5162dc], 1
mov byte [0x516324], 1
mov byte [0x51630c], 1
mov byte [0x5163cc], 1
mov byte [0x516414], 0
mov byte [0x51642c], 0
call fcn.00443370
add esp, 4
test al, al
je 0x444bfc
mov cl, byte [0x798544]
push ecx
jmp 0x444b2d
push esi
push 9
call fcn.00443040
add esp, 8
test al, al
je 0x444bfc
mov dl, byte [0x798544]
mov dword [0x516430], 3
push edx
mov byte [0x5163b4], 0
mov byte [0x5163fc], 1
mov byte [0x516414], 0
mov byte [0x51642c], 0
mov byte [0x5163cc], 1
call fcn.00443370
add esp, 4
test al, al
je 0x444bfc
mov al, byte [0x798544]
push eax
call fcn.0045a310
add esp, 4
push edi
push edi
push edi
push str.H_CANCELLED
call fcn.0048dd90
add esp, 4
push eax
push str.O_CANCELLED
call fcn.0048dd90
add esp, 4
push eax
push str.S_CANCELLED
call fcn.0048dd90
add esp, 4
push eax
call fcn.0046f900
add esp, 0x18
jmp 0x444bfc
cmp eax, 3
jne 0x444bfc
push esi
push 0xc
call fcn.00443040
add esp, 8
test al, al
je 0x444bb9
mov dword [0x516430], esi
mov byte [0x5162f4], 1
mov byte [0x5162dc], 1
mov byte [0x516324], 1
mov byte [0x51630c], 1
mov byte [0x5163b4], 1
mov byte [0x5163fc], 0
jmp 0x444bfc
push esi
push 0xa
call fcn.00443040
add esp, 8
test al, al
je 0x444bfc
mov dword [0x516430], 2
mov byte [0x5163cc], 0
mov byte [0x516414], 1
mov byte [0x51642c], 1
mov byte [0x5163b4], 1
mov byte [0x5163fc], 0
jmp 0x444bfc
mov esi, 1
cmp dword [0x798528], edi
je 0x445dae
cmp byte [0x5163e4], 2
jne 0x444ca5
mov al, byte [0x517400]
test al, al
jne 0x444c6e
mov ecx, dword [0x79759c]
push edi
push 0x4f0f18
push 0xe5
call fcn.00473840
mov al, byte [0x7984c4]
test al, al
je 0x444c4b
mov ecx, dword [0x5178b4]
push ecx
push str.INGAME_MP
jmp 0x444c8c
cmp dword [0x797e34], esi
jne 0x444c61
mov edx, dword [0x5178b4]
push edx
push str.INGAME_SKIRMISH
jmp 0x444c8c
mov eax, dword [0x5178b4]
push eax
push str.INGAME
jmp 0x444c8c
mov al, byte [0x7984c4]
test al, al
je 0x444c97
mov al, byte [0x6b63c8]
test al, al
jne 0x444c97
mov ecx, dword [0x5178b4]
push ecx
push str.ABORT_VM
mov ecx, dword [0x79759c]
call fcn.00470e60
mov byte [0x797590], 0
mov byte [0x5163e4], 1
mov eax, 0x5162dc
cmp byte [eax], 2
jne 0x444cb2
mov byte [eax], 1
add eax, 0x18
cmp eax, 0x516444
jl 0x444caa
mov al, byte [0x516458]
mov ecx, dword [0x79838c]
mov esi, dword [0x798388]
test al, al
je 0x444d57
mov ebx, dword [0x516450]
mov edi, dword [0x798538]
mov eax, ebx
sub eax, edi
sub eax, esi
cdq
xor eax, edx
sub eax, edx
cmp eax, 3
jle 0x444d57
mov edi, dword [0x516454]
mov edx, dword [0x4e41dc]
lea eax, [edx + edi]
mov edx, dword [0x79853c]
sub eax, edx
sub eax, ecx
cdq
xor eax, edx
sub eax, edx
cmp eax, 3
jle 0x444d57
mov eax, dword [0x79853c]
mov edx, dword [0x4e41dc]
sub eax, edx
add eax, ecx
push eax
mov eax, dword [0x798538]
add eax, esi
push eax
push edi
push ebx
call fcn.004a5ae0
add esp, 0x10
test al, al
je 0x4455a7
push 0
call fcn.0049f240
add esp, 4
mov dword [0x516438], 0
jmp 0x445d99
cmp esi, dword [0x4e41fc]
jle 0x445010
mov edx, dword [0x4e4204]
mov edi, dword [str.___P_n]
add edx, edi
cmp esi, edx
jge 0x445010
jmp 0x8d1c20
mov al, byte [0x51643c]
test al, al
jne 0x4450de
mov edi, dword [esp + 0x1c]
mov eax, dword [0x4e41e4]
mov ebx, dword [str.2222]
lea edx, [edi + eax]
cmp ebx, edx
jle 0x44667e
mov edx, dword [0x6d8d98]
sub eax, edi
add eax, dword [edx]
cmp ebx, eax
jge 0x44667e
mov ebx, dword [esp + 0x30]
mov eax, dword [0x4e41e8]
mov edx, dword [0x4eb04c]
add eax, ebx
cmp edx, eax
jle 0x4450e4
mov eax, dword [0x6d8d98]
mov eax, dword [eax + 4]
sub eax, ebx
add eax, dword [0x4e41e8]
cmp edx, eax
jge 0x4450e4
mov cl, byte [0x798544]
push 1
push ecx
call fcn.00442910
add esp, 8
test al, al
je 0x445d99
cmp dword [ebp + 0x245b0], 0x64
jb 0x445d99
call fcn.004a57c0
test al, al
je 0x445d99
mov ecx, dword [0x4eb04c]
mov eax, dword [str.2222]
mov ebp, dword [0x4e41e8]
mov esi, dword [0x4e41e4]
mov dl, byte [0x798544]
sub ecx, ebx
sub eax, edi
sub ecx, ebp
sub eax, esi
push ecx
push eax
push edx
call fcn.00459450
add esp, 0xc
jmp 0x445d8f
mov edx, dword [0x4eb04c]
mov ebx, dword [str.2222]
mov eax, dword [0x516438]
cmp eax, 1
jne 0x4451a4
cmp ebx, dword [0x786d48]
jge 0x445d99
mov edi, dword [0x4e41dc]
cmp edx, edi
jle 0x445d99
mov al, byte [0x51643d]
test al, al
je 0x445178
mov eax, dword [0x79853c]
sub eax, edi
add ecx, eax
mov eax, ecx
and al, 0xe0
cmp eax, 0x20
jae 0x445134
mov eax, 1
jmp 0x445139
shr ecx, 5
mov eax, ecx
mov ecx, dword [0x798538]
push eax
lea eax, [ecx + esi]
cdq
and edx, 0x1f
add eax, edx
mov dl, byte [ebp + 0x2651c]
sar eax, 5
push eax
mov al, byte [0x798544]
push edx
push eax
call fcn.00459fd0
mov byte [ebp + 0x2652d], 1
add esp, 0x10
mov dword [0x516438], 0
jmp 0x445d99
push 0
push 0
push 1
push str.H_CANTBUILD
call fcn.0048dd90
add esp, 4
push eax
push str.O_CANTBUILD
call fcn.0048dd90
add esp, 4
push eax
push str.S_CANTBUILD
jmp 0x445b2d
cmp eax, 2
jne 0x445351
cmp ebx, dword [0x786d48]
jge 0x445d99
mov ecx, dword [0x4e41dc]
cmp edx, ecx
jle 0x445d99
lea eax, [esp + 0x14]
push eax
lea eax, [esp + 0x14]
push eax
lea eax, [esp + 0x20]
push eax
mov eax, dword [0x79853c]
sub eax, ecx
mov ecx, dword [0x798538]
add eax, edx
shr eax, 5
push eax
lea eax, [ecx + ebx]
cdq
and edx, 0x1f
add eax, edx
sar eax, 5
push eax
call fcn.004a5640
add esp, 0x14
test al, al
je 0x445261
mov dl, byte [0x798544]
mov al, byte [esp + 0x10]
cmp al, dl
jne 0x445d99
mov ecx, dword [esp + 0x18]
xor eax, eax
mov al, byte [ecx + 0x34]
mov edx, eax
shl edx, 5
add edx, eax
lea eax, [eax + edx*2]
shl eax, 2
mov edx, dword [eax + 0x6dc598]
test dh, 2
je 0x445d99
mov ecx, dword [ecx + 0x24]
mov edx, dword [eax + 0x6dc540]
cmp ecx, edx
jge 0x445d99
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
push edx
push eax
call fcn.0045a150
add esp, 8
jmp 0x445d99
mov eax, dword [0x79853c]
mov ebp, dword [0x4e41dc]
mov ebx, dword [0x4eb04c]
lea ecx, [esp + 0x14]
push 0
lea edx, [esp + 0x14]
push ecx
mov ecx, dword [str.2222]
push edx
mov edx, dword [0x798538]
sub eax, ebp
add edx, ecx
add eax, ebx
push eax
push edx
call fcn.004a5270
mov esi, eax
add esp, 0x14
test esi, esi
je 0x445d99
mov al, byte [0x798544]
push 6
push eax
call fcn.00442910
add esp, 8
test al, al
je 0x445d99
mov dl, byte [0x798544]
mov al, byte [esp + 0x10]
cmp al, dl
jne 0x445d99
xor ecx, ecx
mov edi, dword [esi + 4]
mov cl, byte [esi + 0x18]
mov eax, ecx
shl eax, 8
cmp edi, dword [eax + 0x77e254]
jge 0x445d99
mov bl, byte [eax + 0x77e261]
test bl, bl
jne 0x445d99
xor eax, eax
mov ebx, 3
mov al, dl
xor edx, edx
shl ecx, 6
mov dl, byte [eax + 0x8cd4f0]
push 0
mov eax, edx
xor edx, edx
push 0
push 0
lea edi, [eax + eax*2]
mov eax, dword [0x5173f4]
div ebx
add edi, edx
add edi, ecx
mov eax, dword [edi*4 + 0x77e2d0]
push eax
call fcn.0046f820
add esp, 0x10
push esi
call fcn.0049f310
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x14]
add esp, 4
push ecx
push edx
call fcn.00459690
add esp, 8
jmp 0x445d99
cmp eax, 3
jne 0x445467
cmp ebx, dword [0x786d48]
jge 0x445d99
mov edi, dword [0x4e41dc]
cmp edx, edi
jle 0x445d99
lea eax, [esp + 0x14]
lea edx, [esp + 0x10]
push eax
lea eax, [esp + 0x1c]
push edx
push eax
mov eax, dword [0x79853c]
sub eax, edi
add eax, ecx
mov ecx, dword [0x798538]
shr eax, 5
push eax
lea eax, [ecx + esi]
cdq
and edx, 0x1f
add eax, edx
sar eax, 5
push eax
call fcn.004a5640
add esp, 0x14
test al, al
je 0x445d99
mov dl, byte [esp + 0x10]
mov al, byte [0x798544]
cmp dl, al
jne 0x4453fa
mov eax, dword [esp + 0x10]
push eax
call fcn.004a4660
mov ecx, dword [esp + 0x18]
mov edx, eax
mov eax, ecx
add esp, 4
and eax, 0xffff
lea esi, [eax + eax*8]
lea eax, [eax + esi*4]
test byte [edx + eax*4 + 0x58], 6
jne 0x4453fe
push ecx
mov ecx, dword [esp + 0x14]
push ecx
call fcn.0045a1a0
add esp, 8
jmp 0x445d99
mov ecx, dword [esp + 0x14]
mov al, byte [0x4eb008]
test al, al
jne 0x445d99
mov al, byte [0x7984c4]
test al, al
jne 0x445d99
mov dl, byte [0x798544]
mov eax, dword [esp + 0x10]
and ecx, 0xffff
push ecx
push edx
push eax
call fcn.0046d6d0
add esp, 0xc
test al, al
je 0x445d99
push 0
push 0
push 1
push str.H_CAPTURE
call fcn.0048dd90
add esp, 4
push eax
push str.O_CAPTURE
call fcn.0048dd90
add esp, 4
push eax
push str.S_CAPTURE
jmp 0x445b2d
cmp eax, 4
jne 0x445504
cmp ebx, dword [0x786d48]
jge 0x445d99
mov eax, dword [0x4e41dc]
cmp edx, eax
jle 0x445d99
mov ecx, dword [0x798538]
mov edx, dword [str.2222]
xor bl, bl
mov edi, 0xa
lea esi, [ecx + edx]
mov ecx, dword [0x79853c]
mov edx, eax
mov eax, dword [0x4eb04c]
sub ecx, edx
mov ebp, 0x5a00
add ecx, eax
mov eax, dword [esp + 0x24]
add eax, 0x26530
mov dx, word [eax]
test dx, dx
jl 0x4454e7
movsx edx, dx
shl edx, 8
cmp byte [edx + 0x77e27d], 9
jne 0x4454e7
cmp word [eax + 2], bp
jne 0x4454e7
mov dl, byte [eax + 0x11]
test dl, dl
jne 0x4454e7
mov bl, 1
mov byte [eax + 0x11], bl
add eax, 0x14
dec edi
jne 0x4454be
test bl, bl
je 0x4455a7
shr ecx, 5
shr esi, 5
push ecx
push esi
push 9
jmp 0x445599
cmp eax, 5
mov eax, dword [0x786d48]
jne 0x4455b6
cmp ebx, eax
jge 0x445d99
mov eax, dword [0x4e41dc]
cmp edx, eax
jle 0x445d99
mov ecx, dword [0x798538]
mov edx, dword [str.2222]
xor bl, bl
mov edi, 0xa
lea esi, [ecx + edx]
mov ecx, dword [0x79853c]
mov edx, eax
mov eax, dword [0x4eb04c]
sub ecx, edx
mov ebp, 0x5a00
add ecx, eax
mov eax, dword [esp + 0x24]
add eax, 0x26530
mov dx, word [eax]
test dx, dx
jl 0x445585
movsx edx, dx
shl edx, 8
cmp byte [edx + 0x77e27d], 0xa
jne 0x445585
cmp word [eax + 2], bp
jne 0x445585
mov dl, byte [eax + 0x11]
test dl, dl
jne 0x445585
mov bl, 1
mov byte [eax + 0x11], bl
add eax, 0x14
dec edi
jne 0x44555c
test bl, bl
je 0x4455a7
shr ecx, 5
shr esi, 5
push ecx
push esi
push 0xa
mov al, byte [0x798544]
push eax
call fcn.0045a440
add esp, 0x10
mov dword [0x516438], 0
jmp 0x445d99
cmp ebx, eax
jge 0x445d99
jmp 0x8d16b0
call fcn.0048dd90
add esp, 4
push eax
call fcn.0046f900
add esp, 0x18
jmp 0x445d99
push 1
call fcn.0049f240
add esp, 4
mov ebp, dword [esp + 0x24]
mov dword [0x798528], 0
mov byte [0x516458], 0
mov edx, dword [0x79759c]
xor esi, esi
cmp dword [edx + 0x110], esi
jne 0x446673
mov al, byte [0x7983d4]
test al, al
je 0x445e90
mov al, byte [0x7984c4]
test al, al
je 0x445e90
cmp dword [0x797e34], 5
jne 0x445e90
mov al, byte [0x4f3d3c]
test al, al
je 0x445e90
mov eax, dword [0x5173f4]
mov ecx, dword [0x4e3ae8]
add ecx, eax
mov al, byte [0x4f3d24]
mov dword [esp + 0x3c], ecx
mov cl, byte [0x4f3d28]
test al, al
mov word [esp + 0x4c], si
mov word [esp + 0x38], 0x3e8
jne 0x445e44
test cl, cl
jne 0x445e44
mov dl, byte [0x798544]
lea eax, [esp + 0x34]
mov byte [esp + 0x57], 0x33
mov byte [esp + 0x58], dl
mov dword [esp + 0x48], 1
push eax
jmp 0x445e81
test al, al
jne 0x445e66
test cl, cl
je 0x445e62
mov cl, byte [0x798544]
lea edx, [esp + 0x34]
mov byte [esp + 0x57], 0x34
mov byte [esp + 0x58], cl
push edx
jmp 0x445e81
test al, al
je 0x445e89
test cl, cl
jne 0x445e89
mov al, byte [0x798544]
lea ecx, [esp + 0x34]
mov byte [esp + 0x57], 0x33
mov byte [esp + 0x58], al
mov dword [esp + 0x48], esi
push ecx
call fcn.0045bf00
add esp, 4
mov byte [0x7983d4], 0
mov al, byte [0x7983e3]
test al, al
je 0x445eaf
mov dl, byte [0x798544]
push edx
call fcn.00459c40
add esp, 4
mov byte [0x7983e3], 0
mov al, byte [0x7983d1]
test al, al
je 0x445ed6
jmp 0x8d86c0
mov al, byte [0x7983e8]
test al, al
je 0x445ef5
mov cl, byte [0x798544]
push ecx
call fcn.00459a20
add esp, 4
mov byte [0x7983e8], 0
mov al, byte [0x7983e0]
test al, al
je 0x445f14
mov dl, byte [0x798544]
push edx
call fcn.00459ea0
add esp, 4
mov byte [0x7983e0], 0
mov al, byte [0x7983d7]
test al, al
je 0x445f70
call fcn.004a58b0
test al, al
je 0x445f69
mov al, byte [0x798544]
push eax
call fcn.00459980
add esp, 4
push esi
push esi
push esi
push str.H_GUARDING
call fcn.0048dd90
add esp, 4
push eax
push str.O_GUARDING
call fcn.0048dd90
add esp, 4
push eax
push str.S_GUARDING
call fcn.0048dd90
add esp, 4
push eax
call fcn.0046f900
add esp, 0x18
mov byte [0x7983d7], 0
mov al, byte [0x7983e2]
test al, al
je 0x445fec
call fcn.004a57c0
test al, al
je 0x445fe5
lea ecx, [esp + 0x28]
lea edx, [esp + 0x2c]
push ecx
push edx
mov ecx, ebp
call fcn.0046e3f0
test al, al
je 0x445fe5
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x2c]
mov dl, byte [0x798544]
push eax
push ecx
push edx
call fcn.00459ab0
add esp, 0xc
push esi
push esi
push esi
push str.H_RETREAT
call fcn.0048dd90
add esp, 4
push eax
push str.O_RETREAT
call fcn.0048dd90
add esp, 4
push eax
push str.S_RETREAT
call fcn.0048dd90
add esp, 4
push eax
call fcn.0046f900
add esp, 0x18
mov byte [0x7983e2], 0
mov al, byte [0x7983d8]
test al, al
je 0x44601d
mov al, byte [0x798544]
push 1
push 0x79853c
push 0x798538
push eax
call fcn.004a4660
add esp, 4
mov ecx, eax
call fcn.0046cf10
mov byte [0x7983d8], 0
mov al, byte [0x7983d5]
test al, al
je 0x446055
mov edx, dword [0x6dc538]
mov ecx, dword [0x79853c]
lea eax, [ecx + edx]
mov edx, dword [0x786d48]
push eax
mov eax, dword [0x798538]
add edx, eax
push edx
push ecx
push eax
call fcn.004a5ae0
add esp, 0x10
mov byte [0x7983d5], 0
mov al, byte [0x7983de]
test al, al
je 0x446082
call fcn.004a5de0
mov al, byte [0x798544]
push 0x79853c
push 0x798538
push eax
call fcn.004a5c00
add esp, 0xc
mov byte [0x7983de], 0
mov al, byte [0x7983e4]
test al, al
je 0x44609c
mov dword [0x516438], 2
mov byte [0x7983e4], 0
mov al, byte [0x7983e9]
test al, al
je 0x4460b6
mov dword [0x516438], 3
mov byte [0x7983e9], 0
mov al, byte [0x7983b4]
test al, al
je 0x4460fc
mov cl, byte [0x798544]
push 0x79853c
push 0x798538
push ecx
call fcn.004a5c00
add esp, 0xc
test al, al
jne 0x4460f5
mov dl, byte [0x798544]
push 0x79853c
push 0x798538
push edx
call fcn.004a5cd0
add esp, 0xc
mov byte [0x7983b4], 0
mov edi, dword [0x79853c]
mov esi, dword [0x798538]
mov dl, byte [0x797e89]
mov ecx, 0x78
mov eax, 0x3c0
mov bl, byte [ecx + 0x797e78]
test bl, bl
je 0x446140
test dl, dl
je 0x446134
mov dword [eax + 0x51609c], esi
mov dword [eax + 0x5160a0], edi
jmp 0x446140
mov esi, dword [eax + 0x51609c]
mov edi, dword [eax + 0x5160a0]
add eax, 8
inc ecx
cmp eax, 0x3d8
jle 0x446118
mov eax, 0x30
mov dword [0x79853c], edi
mov dword [0x798538], esi
mov dword [esp + 0x30], eax
jmp 0x446168
mov dl, byte [0x797e89]
mov cl, byte [eax + 0x797e78]
mov bl, al
sub bl, 0x30
test cl, cl
mov byte [esp + 0x1c], bl
je 0x44635a
test dl, dl
je 0x446191
push ebx
call fcn.0044b170
add esp, 4
jmp 0x44636b
mov al, byte [0x797e8a]
test al, al
je 0x446207
mov al, byte [0x798544]
push 1
push ebx
push eax
call fcn.004a4660
add esp, 4
mov ecx, eax
call fcn.0046cb40
test al, al
je 0x44636b
mov ecx, dword [esp + 0x1c]
and ecx, 0xff
mov al, byte [ecx + 0x5165b0]
lea esi, [ecx + 0x5165b0]
test al, al
jne 0x4461e1
push 0
call fcn.0049f240
add esp, 4
mov byte [esi], 1
mov dl, byte [0x798544]
push 0x79853c
push 0x798538
push ebx
push edx
call fcn.004a4660
add esp, 4
mov ecx, eax
call fcn.0046cbd0
jmp 0x44636b
mov al, byte [0x797e88]
test al, al
je 0x4462bc
mov al, byte [0x798544]
push 0
push ebx
push eax
call fcn.004a4660
add esp, 4
mov ecx, eax
call fcn.0046cb40
test al, al
je 0x44636b
mov ecx, dword [esp + 0x1c]
and ecx, 0xff
lea eax, [ecx + 0x5165b0]
mov cl, byte [ecx + 0x5165b0]
test cl, cl
je 0x44636b
push 0
mov byte [eax], 1
call fcn.0049f240
mov cl, byte [0x798628]
add esp, 4
xor al, al
test cl, cl
mov byte [esp + 0x10], al
jbe 0x44636b
cmp al, byte [0x798544]
je 0x4462a7
mov edx, dword [esp + 0x10]
push edx
call fcn.004a4660
add esp, 4
mov ecx, eax
call fcn.0046cb00
mov eax, dword [esp + 0x10]
push eax
call fcn.004a4660
add esp, 4
mov ecx, eax
call fcn.0046cb20
mov al, byte [esp + 0x10]
mov cl, byte [0x798628]
inc al
cmp al, cl
mov byte [esp + 0x10], al
jb 0x446273
jmp 0x44636b
mov cl, byte [0x798544]
push 1
push ebx
push ecx
call fcn.004a4660
add esp, 4
mov ecx, eax
call fcn.0046cb40
test al, al
je 0x44636b
mov edx, dword [esp + 0x1c]
and edx, 0xff
mov cl, byte [edx + 0x5165b0]
lea eax, [edx + 0x5165b0]
test cl, cl
jne 0x44636b
push 0
mov byte [eax], 1
call fcn.0049f240
mov cl, byte [0x798628]
add esp, 4
xor al, al
test cl, cl
mov byte [esp + 0x10], al
jbe 0x44636b
cmp al, byte [0x798544]
je 0x446348
mov eax, dword [esp + 0x10]
push eax
call fcn.004a4660
add esp, 4
mov ecx, eax
call fcn.0046cb00
mov ecx, dword [esp + 0x10]
push ecx
call fcn.004a4660
add esp, 4
mov ecx, eax
call fcn.0046cb20
mov al, byte [esp + 0x10]
mov cl, byte [0x798628]
inc al
cmp al, cl
mov byte [esp + 0x10], al
jb 0x446314
jmp 0x44636b
mov edx, dword [esp + 0x1c]
and edx, 0xff
mov byte [edx + 0x5165b0], 0
mov eax, dword [esp + 0x30]
inc eax
cmp eax, 0x3a
mov dword [esp + 0x30], eax
jl 0x446162
mov al, byte [0x7984c4]
test al, al
je 0x446504
mov ebp, dword [0x79759c]
mov eax, dword [ebp + 0x110]
test eax, eax
jne 0x446504
mov al, byte [0x7984d0]
test al, al
jne 0x446504
mov al, byte [0x6b8278]
test al, al
jne 0x446504
mov cl, byte [0x7984c0]
xor dl, dl
test cl, cl
mov byte [esp + 0x1c], dl
jbe 0x4463e2
xor ebx, ebx
mov eax, 0x6b922f
mov bl, cl
mov ecx, ebx
cmp byte [eax], 0
je 0x4463dc
inc byte [esp + 0x1c]
add eax, 0x3c
dec ecx
jne 0x4463d3
mov esi, dword [esp + 0x1c]
xor cl, cl
mov byte [esp + 0x24], cl
mov eax, 0x70
mov bl, byte [eax + 0x798390]
test bl, bl
je 0x446419
mov edi, esi
lea ebx, [eax - 0x70]
and edi, 0xff
dec edi
cmp ebx, edi
jge 0x446419
mov cl, al
mov byte [eax + 0x798390], 0
sub cl, 0x70
mov dl, 1
inc eax
cmp eax, 0x74
jle 0x4463f1
test dl, dl
mov byte [esp + 0x24], cl
je 0x446504
mov al, byte [esp + 0x1c]
xor bl, bl
xor dl, dl
test al, al
mov byte [esp + 0x30], dl
jbe 0x446478
mov eax, dword [esp + 0x30]
and eax, 0xff
lea eax, [eax + eax*2]
lea eax, [eax + eax*4]
cmp byte [eax*4 + 0x6b922f], 0
je 0x446462
cmp byte [0x798544], dl
je 0x446462
test cl, cl
je 0x446472
dec cl
mov al, byte [esp + 0x1c]
inc dl
cmp dl, al
mov byte [esp + 0x30], dl
jb 0x44643b
jmp 0x446478
mov byte [esp + 0x24], dl
mov bl, 1
test bl, bl
je 0x446504
mov eax, dword [esp + 0x24]
or ecx, 0xffffffff
and eax, 0xff
lea eax, [eax + eax*2]
lea edx, [eax + eax*4]
xor eax, eax
shl edx, 2
lea edi, [edx + 0x798630]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, 0x7978f8
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x4dcd08
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, 0x7978f8
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [edx + 0x6b9208]
mov edx, dword [0x5178b4]
mov dword [0x797e18], ecx
push edx
push str.GAMEMESSAGE
mov ecx, ebp
call fcn.00470e60
mov al, byte [0x798406]
test al, al
je 0x44658b
mov al, byte [0x7984c4]
test al, al
je 0x446584
cmp dword [0x797e34], 5
jne 0x446584
mov eax, dword [0x79759c]
mov ecx, dword [eax + 0x110]
test ecx, ecx
jne 0x446584
call fcn.00418480
test al, al
je 0x446584
mov edi, 0x4f1d60
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x446561
mov ecx, dword [0x5178b4]
push ecx
mov ecx, dword [0x79759c]
push str.PAGE_INGAME
call fcn.00470e60
jmp 0x446584
push 0xffffffffffffffff
push 1
push str.NoOneToPage
call fcn.0048dc10
add esp, 4
push eax
call fcn.0048dcc0
add esp, 8
push eax
call fcn.00425720
add esp, 8
mov byte [0x798406], 0
mov al, byte [0x798407]
test al, al
je 0x4465f6
mov al, byte [0x7984c4]
test al, al
je 0x4465ef
cmp dword [0x797e34], 5
jne 0x4465ef
mov bl, byte [0x4db9d8]
xor edx, edx
test bl, bl
sete dl
push edx
call fcn.00418140
mov al, byte [0x4db9d8]
add esp, 4
test al, al
push 0xffffffffffffffff
push 1
je 0x4465d0
push str.InPageOnState
jmp 0x4465d5
push str.InPageOffState
call fcn.0048dc10
add esp, 4
push eax
call fcn.0048dcc0
add esp, 8
push eax
call fcn.00425720
add esp, 8
mov byte [0x798407], 0
mov al, byte [0x798405]
test al, al
je 0x446673
mov al, byte [0x7984c4]
test al, al
je 0x44666c
mov eax, dword [0x79759c]
mov ecx, dword [eax + 0x110]
test ecx, ecx
jne 0x44666c
push 1
push str.ToAll
call fcn.0048dc10
add esp, 4
push eax
call fcn.0048dcc0
mov edi, eax
or ecx, 0xffffffff
xor eax, eax
add esp, 8
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, 0x7978f8
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [0x79759c]
mov dword [0x797e18], eax
mov eax, dword [0x5178b4]
push eax
push str.GAMEMESSAGE
call fcn.00470e60
mov byte [0x798405], 0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xcc
ret
mov edx, dword [0x4eb04c]
jmp 0x4450ea