Function at 0x4a98e0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1078
call fcn.005e93e0
mov eax, dword [0x6ab100]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 0x10]
mov eax, ebx
push esi
mov esi, dword [ebp + 0xc]
shr eax, 9
push edi
mov edi, dword [ebp + 8]
not al
and eax, 0xffffff01
mov dword [ebp - 0x1018], edi
push esi
push edi
mov dword [ebp - 0x1024], esi
mov dword [ebp - 0x1048], 0
mov dword [ebp - 0x104c], eax
call fcn.00536780
push 0
push 0
lea eax, [ebp - 0x1044]
push eax
lea eax, [ebp - 0x1014]
push eax
lea eax, [ebp - 0x1040]
push eax
lea eax, [ebp - 0x1020]
push eax
lea eax, [ebp - 0x100c]
push eax
push esi
push edi
call fcn.0053d0d0
push edi
call fcn.0053c5f0
add esp, 0x30
cmp dword [ebp - 0x1014], 0
jne 0x4a9984
cmp dword [ebp - 0x1040], 8
jge 0x4a9984
push edi
call fcn.0053be30
add esp, 4
push 0x10
push esi
push edi
call fcn.0053d2f0
add esp, 0xc
test eax, eax
je 0x4a99c0
test byte [ebp - 0x1014], 1
jne 0x4a99a6
push edi
call fcn.0053be30
add esp, 4
push 0
lea eax, [ebp - 0x1048]
push eax
lea eax, [ebp - 0x1068]
push eax
push esi
push edi
call fcn.0053d260
add esp, 0x14
cmp dword [ebp - 0x1040], 0x10
jne 0x4a99d2
push edi
call fcn.0053bf80
add esp, 4
mov eax, dword [ebp - 0x1014]
test eax, eax
je 0x4a99e1
cmp eax, 4
jne 0x4a99ea
push edi
call fcn.0053bf30
add esp, 4
call fcn.004a9830
fstp qword [ebp - 0x105c]
movsd xmm0, qword [ebp - 0x105c]
ucomisd xmm0, qword [0x6a3cf8]
lahf
test ah, 0x44
jnp 0x4a9a66
lea eax, [ebp - 0x1070]
push eax
push esi
push edi
call fcn.0053d220
add esp, 0xc
test eax, eax
jne 0x4a9a3f
lea eax, [ebp - 0x1078]
push eax
push esi
push edi
call fcn.0053d1c0
add esp, 0xc
test eax, eax
je 0x4a9a3f
movsd xmm0, qword [ebp - 0x1078]
jmp 0x4a9a47
movsd xmm0, qword [0x617540]
sub esp, 0x10
movsd qword [esp + 8], xmm0
movsd xmm0, qword [ebp - 0x105c]
movsd qword [esp], xmm0
push edi
call fcn.0053be70
add esp, 0x14
push edi
call fcn.0053c5c0
push esi
push edi
mov dword [ebp - 0x1038], eax
call fcn.00536de0
add esp, 0xc
test byte [ebp - 0x1014], 1
je 0x4a9b2f
lea eax, [ebp - 0x102c]
push eax
lea eax, [ebp - 0x1028]
push eax
push esi
push edi
call fcn.0053d180
add esp, 0x10
test eax, eax
je 0x4a9b2f
mov edi, dword [ebp - 0x102c]
xor esi, esi
test edi, edi
jle 0x4a9af2
mov edx, dword [ebp - 0x1028]
lea ecx, [ebp - 0x1000]
add edx, 2
cmp esi, 0x100
jge 0x4a9b23
movzx eax, byte [edx - 2]
inc esi
mov dword [ecx - 4], eax
movzx eax, byte [edx - 1]
mov dword [ecx], eax
movzx eax, byte [edx]
add edx, 3
mov dword [ecx + 4], eax
add ecx, 0x10
cmp esi, edi
jl 0x4a9ac4
cmp esi, 0x100
jge 0x4a9b23
mov eax, esi
lea ecx, [ebp - 0x1000]
shl eax, 4
add eax, ecx
mov ecx, 0x100
sub ecx, esi
mov dword [eax + 4], 0
lea eax, [eax + 0x10]
mov dword [eax - 0x10], 0
mov dword [eax - 0x14], 0
sub ecx, 1
jne 0x4a9b06
mov edi, dword [ebp - 0x1018]
mov esi, dword [ebp - 0x1024]
push esi
push edi
call fcn.0053d200
mov ecx, dword [ebp - 0x100c]
xor edx, edx
shl eax, 3
div ecx
push dword [ebp - 0x1020]
mov esi, eax
mov eax, 8
cmp esi, eax
push ecx
cmovl esi, eax
mov dword [ebp - 0x1060], esi
call fcn.0047bd70
add esp, 0x10
mov dword [ebp - 0x102c], eax
test eax, eax
jne 0x4a9bb1
push str.really_load_png
push 0xce
push str.C:dev_allegro_winpkguniversal_allegro_addonsimagepng.c
push 3
push dword [0x6aa6e4]
call fcn.0048b2f0
add esp, 0x14
test al, al
je 0x4a9b9e
push str.al_create_bitmap_failed_while_loading_PNG._n
call fcn.0048b4d0
add esp, 4
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005e8cbe
mov esp, ebp
pop ebp
ret
lea eax, [esi + 7]
cdq
and edx, 7
add eax, edx
sar eax, 3
imul eax, dword [ebp - 0x100c]
cmp dword [ebp - 0x1044], 1
mov dword [ebp - 0x1058], eax
mov ecx, eax
jne 0x4a9be3
imul ecx, dword [ebp - 0x1020]
mov eax, 0xd5
jmp 0x4a9be8
mov eax, 0xd7
push str.really_load_png
push str.C:dev_allegro_winpkguniversal_allegro_addonsimagepng.c
push eax
push ecx
call fcn.0048b6d0
add esp, 0x10
mov dword [ebp - 0x103c], eax
cmp esi, 8
jne 0x4a9c1f
test byte [ebp - 0x1014], 1
je 0x4a9c1f
test ebx, 0x800
je 0x4a9c1f
mov bl, 1
lea eax, [esi + 0x13]
jmp 0x4a9c26
xor bl, bl
mov eax, 0x19
push 2
push eax
push dword [ebp - 0x102c]
mov byte [ebp - 0x1005], bl
call fcn.0047d2e0
mov edx, dword [ebp - 0x1038]
add esp, 0xc
mov dword [ebp - 0x1028], eax
test edx, edx
jle 0x4a9f86
mov ecx, dword [ebp - 0x1020]
nop word [eax + eax]
mov esi, dword [eax]
mov dword [ebp - 0x1050], 0
test ecx, ecx
je 0x4a9f6b
xor eax, eax
mov dword [ebp - 0x1054], eax
nop dword [eax]
cmp dword [ebp - 0x1044], 1
mov edi, dword [ebp - 0x103c]
mov dword [ebp - 0x106c], esi
jne 0x4a9c97
add edi, eax
push edi
push 0
push dword [ebp - 0x1018]
call fcn.00536ab0
mov eax, dword [ebp - 0x1060]
add esp, 0xc
cmp eax, 8
je 0x4a9de3
cmp eax, 0x18
je 0x4a9d95
cmp eax, 0x20
jne 0x4a9f1d
xor ecx, ecx
mov dword [ebp - 0x101c], ecx
cmp dword [ebp - 0x100c], ecx
jbe 0x4a9f1d
nop dword [eax]
mov ebx, dword [edi]
lea edi, [edi + 4]
mov eax, ebx
movzx edx, bl
shr eax, 8
movzx eax, al
mov dword [ebp - 0x1030], eax
mov eax, ebx
shr eax, 0x10
movzx eax, al
shr ebx, 0x18
cmp byte [ebp - 0x104c], 0
mov dword [ebp - 0x1034], eax
je 0x4a9d63
mov ecx, ebx
mov eax, 0x80808081
imul ecx, edx
mul ecx
mov ecx, ebx
mov eax, 0x80808081
imul ecx, dword [ebp - 0x1030]
shr edx, 7
mov dword [ebp - 0x1064], edx
mul ecx
mov ecx, ebx
mov eax, 0x80808081
imul ecx, dword [ebp - 0x1034]
shr edx, 7
mov dword [ebp - 0x1030], edx
mul ecx
mov ecx, dword [ebp - 0x101c]
shr edx, 7
mov dword [ebp - 0x1034], edx
mov edx, dword [ebp - 0x1064]
mov eax, dword [ebp - 0x1030]
inc ecx
mov byte [esi], dl
mov byte [esi + 1], al
mov eax, dword [ebp - 0x1034]
mov byte [esi + 2], al
mov byte [esi + 3], bl
add esi, 4
mov dword [ebp - 0x101c], ecx
cmp ecx, dword [ebp - 0x100c]
jb 0x4a9ce0
jmp 0x4a9f1d
xor edx, edx
cmp dword [ebp - 0x100c], edx
jbe 0x4a9f1d
inc edi
movzx ecx, byte [edi + 1]
lea edi, [edi + 3]
movzx eax, byte [edi - 3]
lea esi, [esi + 4]
shl ecx, 8
inc edx
or ecx, eax
movzx eax, byte [edi - 4]
shl ecx, 8
or ecx, eax
mov byte [esi - 4], cl
mov eax, ecx
shr eax, 8
shr ecx, 0x10
mov byte [esi - 3], al
mov byte [esi - 2], cl
mov byte [esi - 1], 0xff
cmp edx, dword [ebp - 0x100c]
jb 0x4a9da4
jmp 0x4a9f1d
test bl, bl
je 0x4a9e0e
xor ecx, ecx
cmp dword [ebp - 0x100c], ecx
jbe 0x4a9f1d
sub edi, esi
mov al, byte [edi + esi]
lea esi, [esi + 1]
mov byte [esi - 1], al
inc ecx
cmp ecx, dword [ebp - 0x100c]
jb 0x4a9df7
jmp 0x4a9f1d
test byte [ebp - 0x1014], 1
je 0x4a9ef3
xor ebx, ebx
cmp dword [ebp - 0x100c], ebx
jbe 0x4a9f1d
inc esi
nop word [eax + eax]
movzx ecx, byte [edi]
lea edi, [edi + 1]
mov eax, ecx
add eax, eax
mov dl, byte [ebp + eax*8 - 0x1004]
mov byte [esi - 1], dl
mov byte [ebp - 0x100d], dl
mov dl, byte [ebp + eax*8 - 0x1000]
mov al, byte [ebp + eax*8 - 0xffc]
mov byte [esi], dl
mov byte [esi + 1], al
mov byte [ebp - 0x100e], dl
mov byte [ebp - 0x100f], al
cmp ecx, dword [ebp - 0x1048]
jge 0x4a9edd
cmp byte [ebp - 0x104c], 0
mov eax, dword [ebp - 0x1068]
mov al, byte [ecx + eax]
movzx edx, al
mov dword [ebp - 0x101c], edx
mov byte [esi + 2], al
je 0x4a9ee1
movzx ecx, byte [ebp - 0x100d]
mov eax, 0x80808081
imul ecx, edx
mul ecx
movzx ecx, byte [ebp - 0x100e]
mov eax, 0x80808081
imul ecx, dword [ebp - 0x101c]
shr edx, 7
mov byte [esi - 1], dl
mul ecx
movzx ecx, byte [ebp - 0x100f]
mov eax, 0x80808081
imul ecx, dword [ebp - 0x101c]
shr edx, 7
mov byte [esi], dl
mul ecx
shr edx, 7
mov byte [esi + 1], dl
jmp 0x4a9ee1
mov byte [esi + 2], 0xff
inc ebx
add esi, 4
cmp ebx, dword [ebp - 0x100c]
jb 0x4a9e30
jmp 0x4a9f1d
xor ecx, ecx
cmp dword [ebp - 0x100c], ecx
jbe 0x4a9f1d
nop dword [eax]
mov al, byte [edi]
lea edi, [edi + 1]
mov byte [esi], al
lea esi, [esi + 4]
mov byte [esi - 3], al
inc ecx
mov byte [esi - 2], al
mov byte [esi - 1], 0xff
cmp ecx, dword [ebp - 0x100c]
jb 0x4a9f00
mov eax, dword [ebp - 0x1028]
mov edx, dword [ebp - 0x1050]
mov ecx, dword [ebp - 0x1020]
inc edx
mov bl, byte [ebp - 0x1005]
mov esi, dword [eax + 8]
mov eax, dword [ebp - 0x1054]
add eax, dword [ebp - 0x1058]
add esi, dword [ebp - 0x106c]
mov dword [ebp - 0x1050], edx
mov dword [ebp - 0x1054], eax
cmp edx, ecx
jb 0x4a9c80
mov eax, dword [ebp - 0x1028]
mov edx, dword [ebp - 0x1038]
mov bl, byte [ebp - 0x1005]
sub edx, 1
mov dword [ebp - 0x1038], edx
jne 0x4a9c60
mov edi, dword [ebp - 0x1018]
mov ebx, dword [ebp - 0x102c]
push ebx
call fcn.0047d6c0
push str.really_load_png
push str.C:dev_allegro_winpkguniversal_allegro_addonsimagepng.c
push 0x14b
push dword [ebp - 0x103c]
call fcn.0048b6b0
push dword [ebp - 0x1024]
push edi
call fcn.00536380
mov ecx, dword [ebp - 4]
add esp, 0x1c
mov eax, ebx
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.005e8cbe
mov esp, ebp
pop ebp
ret