Function at 0x514b77
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
push 2
xor ebx, ebx
mov eax, dword [esi + 0x1064]
pop edi
mov dword [esi + 0x109c], eax
lea eax, [ebp + 0xa]
push edi
push eax
push esi
mov dword [esi + 0x1068], ebx
mov dword [esi + 0x106c], 0x18
mov byte [ebp + 0xa], bl
mov byte [ebp + 0xb], bl
call fcn.005131d5
add esp, 0xc
lea eax, [ebp + 0xa]
mov byte [ebp + 0xa], bl
mov byte [ebp + 0xb], 2
push edi
push eax
push esi
call fcn.005131d5
add esp, 0xc
lea eax, [ebp + 0xa]
mov byte [ebp + 0xa], bl
mov byte [ebp + 0xb], 1
push edi
push eax
push esi
call fcn.005131d5
add esp, 0xc
lea eax, [ebp + 0xa]
mov byte [ebp + 0xa], bl
mov byte [ebp + 0xb], bl
push edi
push eax
push esi
call fcn.005131d5
add esp, 0xc
lea eax, [ebp + 8]
mov byte [ebp + 8], bl
mov byte [ebp + 9], bl
push 4
push eax
push esi
mov byte [ebp + 0xa], bl
mov byte [ebp + 0xb], 0x14
call fcn.005131d5
add esp, 0xc
lea eax, [ebp + 0xa]
mov byte [ebp + 0xa], bl
mov byte [ebp + 0xb], 3
push edi
push eax
push esi
call fcn.005131d5
add esp, 0xc
lea eax, [ebp + 0xa]
mov byte [ebp + 0xa], bl
mov byte [ebp + 0xb], bl
push edi
push eax
push esi
call fcn.005131d5
add esp, 0xc
lea eax, [ebp + 8]
mov byte [ebp + 8], bl
mov byte [ebp + 9], bl
push 4
push eax
push esi
mov byte [ebp + 0xa], 1
mov byte [ebp + 0xb], 0x1a
call fcn.005131d5
add esp, 0xc
mov byte [ebp + 0xa], bl
mov byte [ebp + 0xb], bl
lea eax, [ebp + 0xa]
push edi
push eax
push esi
call fcn.005131d5
add esp, 0xc
lea eax, [ebp + 0xa]
mov byte [ebp + 0xa], 1
mov byte [ebp + 0xb], 6
push edi
push eax
push esi
call fcn.005131d5
add esp, 0xc
lea eax, [ebp + 0xa]
mov byte [ebp + 0xa], bl
mov byte [ebp + 0xb], bl
push edi
push eax
push esi
call fcn.005131d5
add esp, 0xc
mov dword [ebp - 4], ebx
mov eax, dword [ebp - 4]
push 1
movzx eax, byte [esi + eax + 0x11c8]
mov byte [ebp + 0xb], al
lea eax, [ebp + 0xb]
push eax
push esi
call fcn.005131d5
add esp, 0xc
inc dword [ebp - 4]
cmp dword [ebp - 4], 0x100
jl 0x514c97
lea eax, [ebp + 0xa]
push edi
push eax
push esi
mov byte [ebp + 0xa], bl
mov byte [ebp + 0xb], 4
call fcn.005131d5
add esp, 0xc
lea eax, [ebp + 0xa]
mov byte [ebp + 0xa], 7
mov byte [ebp + 0xb], 0x18
push edi
push eax
push esi
call fcn.005131d5
add esp, 0xc
lea eax, [ebp + 0xa]
mov byte [ebp + 0xa], bl
mov byte [ebp + 0xb], bl
push edi
push eax
push esi
call fcn.005131d5
add esp, 0xc
lea eax, [ebp + 0xa]
mov byte [ebp + 0xa], 1
mov byte [ebp + 0xb], 0xc2
push edi
push eax
push esi
call fcn.005131d5
add esp, 0xc
lea eax, [ebp + 0xa]
mov byte [ebp + 0xa], 1
mov byte [ebp + 0xb], bl
push edi
push eax
push esi
call fcn.005131d5
add esp, 0xc
lea eax, [ebp + 0xa]
mov byte [ebp + 0xa], bl
mov byte [ebp + 0xb], 7
push edi
push eax
push esi
call fcn.005131d5
add esp, 0xc
lea eax, [ebp + 0xa]
mov byte [ebp + 0xa], bl
mov byte [ebp + 0xb], 0xc2
push edi
push eax
push esi
call fcn.005131d5
add esp, 0xc
mov dword [ebp - 4], 0x20
mov eax, dword [ebp - 4]
xor edx, edx
add eax, 0xf000
mov ecx, 0xffff
div ecx
push edi
mov eax, edx
mov byte [ebp + 0xb], dl
sar eax, 8
mov byte [ebp + 0xa], al
lea eax, [ebp + 0xa]
push eax
push esi
call fcn.005131d5
add esp, 0xc
inc dword [ebp - 4]
cmp dword [ebp - 4], 0x100
jl 0x514d5b
or byte [ebp + 0xa], 0xff
or byte [ebp + 0xb], 0xff
lea eax, [ebp + 0xa]
push edi
push eax
push esi
call fcn.005131d5
add esp, 0xc
lea eax, [ebp + 0xa]
mov byte [ebp + 0xa], bl
mov byte [ebp + 0xb], bl
push edi
push eax
push esi
call fcn.005131d5
add esp, 0xc
mov dword [ebp - 4], 0x20
mov eax, dword [ebp - 4]
xor edx, edx
add eax, 0xf000
mov ecx, 0xffff
div ecx
push edi
mov eax, edx
mov byte [ebp + 0xb], dl
sar eax, 8
mov byte [ebp + 0xa], al
lea eax, [ebp + 0xa]
push eax
push esi
call fcn.005131d5
add esp, 0xc
inc dword [ebp - 4]
cmp dword [ebp - 4], 0x100
jl 0x514dc2
push 0xffff
push esi
call fcn.00514605
pop ecx
pop ecx
push 0x20
pop edi
movzx ax, byte [esi + edi + 0x11c8]
sub eax, edi
add eax, 0x1000
movzx eax, ax
push eax
push esi
call fcn.00514605
inc edi
pop ecx
cmp edi, 0x100
pop ecx
jl 0x514e08
push 1
push esi
call fcn.00514605
pop ecx
mov edi, 0xe0
pop ecx
push ebx
push esi
call fcn.00514605
pop ecx
dec edi
pop ecx
jne 0x514e3c
push ebx
push esi
call fcn.00514605
pop ecx
lea eax, [esi + 0x1094]
pop ecx
push eax
push esi
call fcn.0051377d
pop ecx
pop ecx
pop edi
pop esi
pop ebx
leave
ret