Function at 0x452290
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
sub esp, 0x3c
push ebp
call fcn.0048ea90
mov dword [esp + 4], eax
mov al, byte [0x4f8e80]
xor ebp, ebp
test al, al
jne 0x452a02
mov ecx, dword [esp + 0x44]
mov al, byte [esp + 0x4c]
mov dword [0x4f4c2c], ecx
mov cl, byte [esp + 0x48]
xor edx, edx
push edi
test cl, cl
push esi
push ebx
sete dl
mov byte [0x4f50a0], al
mov byte [0x4f50a8], dl
call fcn.00461a10
call fcn.00479000
push str.Order
call fcn.00465370
add esp, 4
call fcn.004791a0
mov al, byte [0x4f50a0]
mov dword [0x4f4810], ebp
neg al
sbb eax, eax
mov dword [0x4f5084], ebp
and al, 0xf7
mov dword [0x4f56cc], ebp
add eax, 0xa
mov dword [0x4f480c], ebp
mov dword [0x4f5038], ebp
mov dword [0x4f4c20], ebp
mov dword [0x4f50b0], ebp
mov dword [0x4f4c1c], 0xffffffff
mov dword [0x4f50bc], eax
call fcn.004617b0
mov ecx, dword [0x60879c]
mov eax, 0x280
cmp ecx, eax
mov edx, 0x1e0
mov ebx, 8
jne 0x452364
cmp dword [0x608798], edx
jne 0x452364
cmp dword [0x608764], ebx
je 0x4523cc
mov ecx, 0xe
mov esi, 0x4f9ae0
lea edi, [esp + 0x14]
rep movsd dword es:[edi], dword [esi]
lea ecx, [esp + 0x14]
mov dword [esp + 0x18], eax
push ecx
mov dword [esp + 0x20], edx
mov byte [esp + 0x24], bl
call fcn.00461650
add esp, 4
test al, al
jne 0x4523cc
lea edx, [esp + 0x14]
mov byte [esp + 0x30], al
push edx
call fcn.00461650
add esp, 4
test al, al
jne 0x4523cc
mov byte [esp + 0x32], al
mov byte [esp + 0x31], al
lea eax, [esp + 0x14]
push eax
call fcn.00461650
add esp, 4
test al, al
jne 0x4523cc
lea ecx, [esp + 0x14]
push ecx
call fcn.00461610
add esp, 4
push 1
mov byte [0x4f5828], 1
call fcn.004614f0
add esp, 4
push ebx
call fcn.004791f0
add esp, 4
call fcn.00465be0
push 0xd
mov dword [0x4f50b8], ebp
mov dword [0x4f50b4], ebp
mov dword [0x4f4c30], ebp
mov dword [0x4f56c0], ebp
call fcn.00498dc0
add esp, 4
push 0xd
push 0x3d
call fcn.00465590
add esp, 8
push 0xd
push 0x3e
call fcn.00465590
add esp, 8
push 0x12c00
push 0xd
call fcn.00498c80
add esp, 8
mov dword [0x4f5038], eax
push 0x42
push 0x4f5040
push str.Order.Colors
call fcn.00463100
add esp, 0xc
push 0xd
push str.Tiles.Offset
call fcn.004632f0
add esp, 8
mov dword [0x4f56cc], eax
push 0xd
push str.Tiles.Order
call fcn.004632f0
add esp, 8
mov dword [0x4f480c], eax
push 0xd
push str.Order.Palette
call fcn.004632f0
add esp, 8
mov dword [0x4f4c34], eax
push 0xd
push str.Credits.Palette
call fcn.004632f0
add esp, 8
mov dword [0x4f4c24], eax
push 0x1020
call fcn.004987e0
mov dword [0x4f4c20], eax
add esp, 4
add eax, 0x1f
and al, 0xe0
push 0x1000
push eax
push str.Order.ShadeLUT
mov dword [0x4f50b0], eax
call fcn.00463100
add esp, 0xc
xor ecx, ecx
mov eax, 0x4f4818
mov dword [eax], ecx
add eax, 4
add ecx, 0xf
cmp eax, 0x4f4c18
jl 0x4524d3
xor ecx, ecx
mov eax, 0x4f4c38
mov dword [eax], ecx
add eax, 4
add ecx, 3
cmp eax, 0x4f5038
jl 0x4524e9
xor eax, eax
mov edx, dword [0x4f56cc]
mov ecx, dword [edx + eax]
cmp ecx, 0xffffffff
jne 0x452511
mov dword [edx + eax], 0x4d06a8
jmp 0x45251c
mov esi, dword [0x4f480c]
add esi, ecx
mov dword [edx + eax], esi
add eax, 4
cmp eax, 0x6c30
jl 0x4524fa
mov al, byte [0x4f50a0]
test al, al
je 0x45254a
mov eax, dword [0x4f56cc]
push 0x4b0
lea edx, [eax + 0x2ee0]
push edx
push eax
call dword [0x4d3dfc]
add esp, 0xc
push 3
push 0xc
push 3
push 4
push 9
push 0xa
call fcn.00452bd0
add esp, 0x18
xor ebx, ebx
xor ebp, ebp
mov edi, 0x4f50c0
xor ecx, ecx
xor esi, esi
mov eax, esi
cdq
and edx, 0x1f
add eax, edx
sar eax, 5
test al, al
mov byte [esp + 0x58], al
jne 0x452585
mov eax, 0x63
jmp 0x452593
mov eax, dword [esp + 0x58]
and eax, 0xff
add eax, 0x90
mov byte [ecx + edi], al
inc ecx
add esi, ebp
cmp ecx, 0x30
jl 0x45256b
add edi, 0x30
inc ebp
cmp edi, 0x4f56c0
jl 0x452567
mov esi, 0x2489
mov edi, 0xff9
xor ecx, ecx
mov eax, dword [0x4f4c24]
add ecx, 4
mov byte [eax + ecx + 0x23c], 0
mov eax, 0xae4c415d
imul esi
add edx, esi
sub esi, 0xc7
sar edx, 5
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, dword [0x4f4c24]
mov byte [eax + ecx + 0x23d], dl
mov eax, 0xae4c415d
imul edi
add edx, edi
sub edi, 0x57
sar edx, 5
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, dword [0x4f4c24]
cmp ecx, 0x100
mov byte [eax + ecx + 0x23e], dl
jl 0x4525b6
push 0xd
push str.Order.Newspaper
call fcn.004636a0
add esp, 8
mov dword [0x4f4810], eax
push 0xd
push str.Picture.Credits
call fcn.004636a0
add esp, 8
mov dword [0x4f5084], eax
push 0xd
push str.Picture.OrderTexture128x128
call fcn.004636a0
mov ecx, 0x2000
lea esi, [eax + 0x40c]
mov edi, 0x58c300
add esp, 8
rep movsd dword es:[edi], dword [esi]
call fcn.0048ea90
mov dword [0x4f5098], eax
mov dword [0x4f56d4], eax
call fcn.0048ea90
mov ecx, eax
mov eax, 0x51eb851f
mul ecx
mov esi, dword [esp + 0x5c]
shr edx, 4
add edx, 0xbe
cmp esi, ebx
mov dword [0x4f4c28], edx
jne 0x4526a4
cmp dword [0x4f4c30], ebx
je 0x4526a4
call fcn.0048ea90
mov dword [0x4f5098], eax
mov edx, dword [0x4f50bc]
lea eax, [edx - 1]
cmp esi, eax
jne 0x4526d6
cmp dword [0x4f4c30], eax
je 0x4526d6
call fcn.0048ea90
mov ecx, eax
mov eax, 0x51eb851f
mul ecx
shr edx, 4
add edx, 0xc8
mov dword [0x4f4c28], edx
cmp esi, 0x29a
je 0x452706
cmp esi, ebx
jge 0x4526ea
mov dword [0x4f4c30], ebx
jmp 0x45271a
mov edx, dword [0x4f50bc]
lea eax, [edx - 1]
cmp esi, eax
jle 0x4526fe
mov dword [0x4f4c30], eax
jmp 0x45271a
mov dword [0x4f4c30], esi
jmp 0x45271a
push 2
mov dword [0x4f4c30], 0x29a
call fcn.004994d0
add esp, 4
cmp dword [0x4f4c18], ebx
jne 0x452727
call fcn.00452b90
cmp dword [0x4f4c2c], ebx
je 0x45273e
call fcn.0048ea90
add eax, 0x3a98
mov dword [0x4f56d0], eax
cmp dword [0x4f50b8], 0x29d
jge 0x4529f5
mov ebp, dword [esp + 0x10]
mov edi, 1
call fcn.0048f1d0
mov al, byte [0x4f8e80]
test al, al
je 0x45277f
cmp dword [0x4f4c30], 0x29a
jge 0x45277f
push edi
push 0x29a
call fcn.00452a50
add esp, 8
cmp dword [0x4f4c2c], ebx
je 0x4527de
call fcn.0048ea90
cmp eax, dword [0x4f56d0]
jb 0x4527de
cmp dword [0x4f4c2c], edi
jne 0x4527ad
mov eax, dword [0x4f4c30]
push edi
inc eax
cdq
idiv dword [0x4f50bc]
push edx
jmp 0x4527c7
mov ecx, dword [0x4f50bc]
mov eax, dword [0x4f4c30]
dec ecx
cmp eax, ecx
jne 0x4527c4
mov eax, 0x29a
jmp 0x4527c5
inc eax
push edi
push eax
call fcn.00452a50
add esp, 8
call fcn.0048ea90
add eax, 0x3a98
mov dword [0x4f56d0], eax
cmp dword [0x4f4c30], 0x29a
jl 0x4527ef
call fcn.00461a10
call fcn.0048e7e0
and eax, 0xffff
je 0x452845
cmp eax, 0xd
je 0x452805
cmp eax, 0x1b
jne 0x45282f
mov edx, dword [0x4f50bc]
mov ecx, dword [0x4f4c30]
push edi
lea eax, [edx - 1]
cmp ecx, eax
je 0x45281c
push eax
jmp 0x452821
push 0x29a
call fcn.00452a50
add esp, 8
mov dword [0x4f4c2c], ebx
call fcn.0048ea90
mov dword [0x4f56d4], eax
call fcn.0048e7e0
and eax, 0xffff
jne 0x4527fb
cmp dword [0x4f4c2c], 2
jge 0x452932
mov al, byte [0x608926]
mov cl, byte [0x4f5088]
or esi, 0xffffffff
mov byte [0x4f5089], cl
test al, al
mov byte [0x4f5088], al
je 0x452877
test cl, cl
jne 0x452877
mov eax, edi
jmp 0x452879
xor eax, eax
test al, al
jne 0x4528a5
mov al, byte [0x608925]
mov cl, byte [0x4f508a]
test al, al
mov byte [0x4f508b], cl
mov byte [0x4f508a], al
je 0x45289f
test cl, cl
jne 0x45289f
mov eax, edi
jmp 0x4528a1
xor eax, eax
test al, al
je 0x4528ad
mov eax, dword [0x4f4c30]
lea esi, [eax - 1]
push 0x20
push 2
call fcn.00452a10
add esp, 8
test al, al
jne 0x4528e3
push 0x128
push 3
call fcn.00452a10
add esp, 8
test al, al
jne 0x4528e3
push 0x127
push 4
call fcn.00452a10
add esp, 8
test al, al
je 0x4528ec
mov ecx, dword [0x4f4c30]
lea esi, [ecx + 1]
push 0x124
push 5
call fcn.00452a10
add esp, 8
test al, al
je 0x452901
xor esi, esi
push 0x123
push 6
call fcn.00452a10
add esp, 8
test al, al
je 0x45291d
mov edx, dword [0x4f50bc]
lea esi, [edx - 1]
cmp esi, 0xffffffff
je 0x452932
push edi
push esi
call fcn.00452a50
add esp, 8
mov dword [0x4f4c2c], ebx
cmp dword [0x4f4c2c], ebx
jne 0x452964
call fcn.0048ea90
mov ecx, dword [0x4f56d4]
add ecx, 0x9088
cmp eax, ecx
jbe 0x452964
mov dword [0x4f4c2c], edi
call fcn.0048ea90
add eax, 0x3a98
mov dword [0x4f56d0], eax
call fcn.0048ea90
mov esi, eax
sub esi, ebp
shl esi, 6
call fcn.0048ea90
mov ecx, dword [0x4f4c30]
mov edx, dword [0x4f56c0]
mov ebp, eax
mov eax, dword [0x4f4c18]
cmp ecx, edx
jle 0x452993
add eax, esi
mov dword [0x4f4c18], eax
cmp ecx, edx
jg 0x45299e
sub eax, esi
mov dword [0x4f4c18], eax
cmp eax, ebx
jl 0x4529a9
cmp eax, 0xffff
jle 0x4529e0
cmp eax, 0xffff
jle 0x4529c9
mov eax, dword [0x4f50b8]
cmp eax, 0x29a
jl 0x4529c4
inc eax
mov dword [0x4f4c30], eax
jmp 0x4529c9
mov dword [0x4f50b4], eax
mov edx, dword [0x4f50b4]
mov dword [0x4f4c18], ebx
mov dword [0x4f56c0], edx
call fcn.00452b90
call fcn.00452cb0
cmp dword [0x4f50b8], 0x29d
jl 0x452757
call fcn.00479000
call fcn.00452c50
pop ebx
pop esi
pop edi
pop ebp
add esp, 0x3c
ret