Function at 0x4a4c80
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffd4
push ebx
push esi
push edi
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
cmp eax, 0xffffffff
jne 0x4a4ca4
call fcn.004a4c3c
mov dword [ebp - 0x10], eax
jmp 0x4a4ca7
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0xffffffff
je 0x4a4fc4
mov eax, dword [ebp - 0x10]
mov edx, eax
shl eax, 4
add eax, edx
lea ebx, [eax*4 + 0x50cf2c]
mov eax, dword [ebp + 0x14]
mov dword [ebx + 0x2c], eax
mov eax, dword [ebp + 0x10]
mov dword [ebx + 0x28], eax
mov esi, dword [ebp + 0xc]
mov dword [ebx + 0x24], esi
mov eax, dword [ebx + 0x2c]
test eax, eax
je 0x4a4fc4
mov edx, dword [eax + 8]
imul edx, dword [eax + 0xc]
test edx, edx
je 0x4a4fc4
mov eax, dword [ebx + 0x28]
test eax, eax
je 0x4a4fc4
mov edx, dword [eax + 8]
imul edx, dword [eax + 0xc]
test edx, edx
je 0x4a4fc4
mov eax, dword [esi + 0x40]
mov edx, 0x4a4fd8
call fcn.00404ad8
jne 0x4a4d42
mov eax, dword [0x50a50c]
mov eax, dword [eax + 8]
call fcn.00403164
mov edx, eax
mov eax, dword [0x50a50c]
call fcn.0041e688
mov edx, dword [eax + 0xc]
mov eax, dword [0x50a50c]
call fcn.004a57d0
mov dword [ebx + 0x34], eax
jmp 0x4a4d55
mov eax, dword [ebx + 0x24]
mov edx, dword [eax + 0x40]
mov eax, dword [0x50a50c]
call fcn.004a57d0
mov dword [ebx + 0x34], eax
mov eax, dword [ebx + 0x24]
mov eax, dword [eax + 0x40]
mov edx, 0x4a5000
call fcn.00404ad8
je 0x4a4d7c
mov eax, dword [ebx + 0x34]
test eax, eax
je 0x4a4fc4
cmp dword [eax + 8], 0
je 0x4a4fc4
mov dl, 1
mov eax, dword [0x4a0880]
call fcn.004a0e6c
mov esi, eax
mov dword [ebx + 0x30], esi
mov eax, dword [ebx + 0x2c]
mov ecx, dword [eax + 0xc]
mov edx, dword [eax + 8]
mov eax, esi
call fcn.004a1374
mov eax, dword [ebx + 0x2c]
mov eax, dword [eax + 8]
mov ecx, dword [ebx + 0x24]
cdq
idiv dword [ecx + 0x38]
cdq
idiv dword [ecx + 0x3c]
inc eax
mov dword [ebx + 4], eax
mov eax, dword [ebx + 0x2c]
mov eax, dword [eax + 0xc]
mov ecx, dword [ebx + 0x24]
cdq
idiv dword [ecx + 0x38]
cdq
idiv dword [ecx + 0x3c]
mov esi, eax
inc esi
mov dword [ebx + 8], esi
mov eax, dword [ebx + 0x24]
mov eax, dword [eax + 0x40]
mov edx, 0x4a5000
call fcn.00404ad8
je 0x4a4e3a
mov eax, dword [ebx + 0x34]
mov al, byte [eax + 4]
sub al, 1
jb 0x4a4dec
je 0x4a4e1c
jmp 0x4a4f92
mov edi, dword [ebx + 4]
imul edi, esi
mov dword [ebx + 0xc], edi
mov eax, edi
call fcn.004027c0
mov dword [ebx + 0x10], eax
mov eax, dword [ebx + 0x24]
cmp byte [eax + 0x44], 0
je 0x4a4f92
mov eax, dword [ebx + 0xc]
call fcn.004027c0
mov dword [ebx + 0x14], eax
jmp 0x4a4f92
mov eax, dword [ebx + 4]
imul esi
mov edi, eax
add edi, edi
lea edi, [edi + edi*2]
mov dword [ebx + 0xc], edi
mov eax, edi
call fcn.004027c0
mov dword [ebx + 0x18], eax
jmp 0x4a4f92
mov edi, dword [ebx + 4]
imul edi, esi
mov dword [ebx + 0xc], edi
mov eax, edi
call fcn.004027c0
mov dword [ebx + 0x10], eax
mov eax, dword [ebx + 0xc]
call fcn.004027c0
mov dword [ebx + 0x14], eax
mov dl, 1
mov eax, dword [0x428de8]
call fcn.0042ee00
mov dword [ebp - 0x14], eax
mov eax, dword [ebx + 0x24]
mov al, byte [eax + 0x44]
sub al, 1
je 0x4a4e75
sub al, 2
jne 0x4a4eb9
mov edx, dword [ebx + 8]
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax]
call dword [ecx + 0x40]
mov edx, dword [ebx + 4]
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax]
call dword [ecx + 0x34]
mov eax, dword [ebx + 4]
push eax
lea eax, [ebp - 0x2c]
push eax
mov ecx, dword [ebx + 8]
xor edx, edx
xor eax, eax
call fcn.0041cfc8
lea eax, [ebp - 0x2c]
push eax
mov eax, dword [ebp - 0x14]
call fcn.0042f3c8
mov edx, dword [ebx + 0x24]
mov ecx, dword [edx + 0x48]
pop edx
call fcn.0042ac34
jmp 0x4a4efb
mov edx, dword [ebx + 4]
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax]
call dword [ecx + 0x40]
mov edx, dword [ebx + 8]
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax]
call dword [ecx + 0x34]
mov eax, dword [ebx + 8]
push eax
lea eax, [ebp - 0x2c]
push eax
mov ecx, dword [ebx + 4]
xor edx, edx
xor eax, eax
call fcn.0041cfc8
lea eax, [ebp - 0x2c]
push eax
mov eax, dword [ebp - 0x14]
call fcn.0042f3c8
mov edx, dword [ebx + 0x24]
mov ecx, dword [edx + 0x48]
pop edx
call fcn.0042ac34
mov dl, 1
mov eax, dword [0x4a0880]
call fcn.004a0e6c
mov dword [ebp - 0x18], eax
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax]
call dword [ecx + 8]
mov eax, dword [ebx + 4]
dec eax
test eax, eax
jl 0x4a4f82
inc eax
mov dword [ebp - 0x1c], eax
xor edx, edx
mov esi, dword [ebx + 8]
dec esi
test esi, esi
jl 0x4a4f7c
inc esi
xor eax, eax
mov ecx, eax
imul ecx, dword [ebx + 4]
add ecx, edx
mov edi, dword [ebp - 0x18]
mov edi, dword [edi + 4]
mov cl, byte [edi + ecx*4]
and cl, 0xff
push ecx
mov ecx, eax
imul ecx, dword [ebx + 4]
add ecx, edx
mov edi, dword [ebx + 0x10]
add edi, ecx
pop ecx
mov byte [edi], cl
mov ecx, eax
imul ecx, dword [ebx + 4]
add ecx, edx
mov edi, dword [ebp - 0x18]
mov edi, dword [edi + 4]
mov cl, byte [edi + ecx*4]
and cl, 0xff
push ecx
mov ecx, eax
imul ecx, dword [ebx + 4]
add ecx, edx
mov edi, dword [ebx + 0x14]
add edi, ecx
pop ecx
mov byte [edi], cl
inc eax
dec esi
jne 0x4a4f2e
inc edx
dec dword [ebp - 0x1c]
jne 0x4a4f23
mov eax, dword [ebp - 0x18]
call fcn.00403910
mov eax, dword [ebp - 0x14]
call fcn.00403910
mov dword [ebx + 0x20], 0x3c23d70a
mov byte [ebx + 0x1c], 1
mov byte [ebx + 0x1d], 0
mov eax, dword [ebp - 4]
mov dword [ebx + 0x38], eax
mov eax, dword [ebp - 8]
mov dword [ebx + 0x3c], eax
mov eax, dword [ebp - 0xc]
mov dword [ebx + 0x40], eax
call fcn.004a4c64
mov edx, eax
mov eax, dword [0x50cf28]
call fcn.0043c0b0
mov eax, dword [ebp - 0x10]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10