Function at 0x4c0199
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
mov eax, 0x5b4592
call fcn.00576dcc
push ecx
mov eax, dword [ebp + 0xc]
push ebx
xor ebx, ebx
push esi
mov dword [eax], ebx
mov eax, dword [ebp + 0x10]
push edi
mov edi, ecx
mov dword [eax], ebx
mov eax, dword [ebp + 0x1c]
and eax, 2
push 0x4a8
cmp al, 2
push 0x40
mov dword [ebp - 0x10], edi
mov dword [edi], ebx
sete byte [ebp + 0x1f]
call dword [fcn.005b73ec]
mov esi, eax
cmp esi, ebx
jne 0x4c01e4
mov dword [edi], 1
jmp 0x4c04d5
lea eax, [esi + 4]
push 0x400
push ebx
push eax
call fcn.005771b0
lea ebx, [esi + 0x428]
push ebx
push dword [ebp + 8]
call fcn.004d7423
add esp, 0x14
test eax, eax
je 0x4c04c8
push ebx
call fcn.004d76d2
movzx eax, ax
push ebx
mov dword [esi + 0x41c], eax
call fcn.004d76ea
movsx edx, byte [esi + 0x42b]
pop ecx
pop ecx
movzx ecx, ax
movsx eax, byte [esi + 0x469]
imul eax, edx
test eax, eax
mov dword [esi + 0x420], ecx
mov dword [esi + 0x404], eax
je 0x4c04c8
cmp eax, 0x20
jg 0x4c04c8
cmp dword [esi + 0x41c], 0
je 0x4c04c8
test ecx, ecx
je 0x4c04c8
cmp byte [ebp + 0x1f], 0
mov edx, dword [ebp + 0x18]
jne 0x4c028d
mov eax, dword [edx]
dec eax
je 0x4c028f
sub eax, 7
je 0x4c028f
sub eax, 0x10
je 0x4c028f
mov dword [edi], 5
jmp 0x4c04d5
mov dword [edx], eax
mov eax, dword [edx]
mov ecx, dword [esi + 0x404]
mov dword [esi], eax
cmp ecx, dword [edx]
jbe 0x4c02a8
mov dword [edi], 0x1c
jmp 0x4c04d5
xor edi, edi
cmp ecx, 0x18
jl 0x4c02b5
and dword [ebp + 0x18], edi
inc edi
jmp 0x4c02bd
inc edi
mov eax, edi
shl eax, cl
mov dword [ebp + 0x18], eax
mov ecx, dword [ebp + 0xc]
mov eax, dword [esi + 0x41c]
push ebx
mov dword [ecx], eax
mov ecx, dword [ebp + 0x10]
mov eax, dword [esi + 0x420]
mov dword [ecx], eax
call fcn.004d7702
test eax, eax
pop ecx
je 0x4c02f2
lea eax, [esi + 4]
push eax
push ebx
push dword [ebp + 8]
call fcn.004d75c8
add esp, 0xc
test eax, eax
jne 0x4c030b
xor ecx, ecx
lea eax, [esi + 5]
mov byte [eax + 1], cl
mov byte [eax], cl
mov byte [eax - 1], cl
inc ecx
add eax, 4
cmp ecx, 0x100
jl 0x4c02f7
cmp dword [esi + 0x404], 8
jge 0x4c03a4
cmp byte [esi + 0x469], 1
jne 0x4c0347
cmp byte [esi + 0x42b], 1
jne 0x4c0347
and byte [esi + 4], 0
and byte [esi + 5], 0
and byte [esi + 6], 0
or byte [esi + 8], 0xff
or byte [esi + 9], 0xff
or byte [esi + 0xa], 0xff
push 2
pop edx
jmp 0x4c0381
mov edi, dword [ebp + 0x18]
xor edx, edx
test edi, edi
jle 0x4c0381
lea ecx, [esi + 5]
lea eax, [esi + 0x439]
mov dword [ebp + 0x18], edi
mov edx, edi
mov bl, byte [eax + 1]
mov byte [ecx + 1], bl
mov bl, byte [eax]
mov byte [ecx], bl
mov bl, byte [eax - 1]
mov byte [ecx - 1], bl
add eax, 3
add ecx, 4
dec dword [ebp + 0x18]
jne 0x4c035e
cmp edi, 0x100
jge 0x4c03a1
mov edi, 0x100
lea ebx, [esi + edx*4 + 4]
sub edi, edx
lea eax, [esi + 4]
push 4
push eax
push ebx
call fcn.00576e70
add esp, 0xc
add ebx, 4
dec edi
jne 0x4c038c
xor edi, edi
inc edi
cmp dword [esi], 8
ja 0x4c03bd
lea eax, [esi + 4]
push 0x400
push eax
push dword [ebp + 0x14]
call fcn.00576e70
add esp, 0xc
mov eax, dword [esi + 0x41c]
lea eax, [eax + eax*2]
push eax
call fcn.0058f420
test eax, eax
pop ecx
mov dword [esi + 0x418], eax
jne 0x4c03de
mov eax, dword [ebp - 0x10]
mov dword [eax], edi
jmp 0x4c0438
lea eax, [esi + 0x428]
push eax
call fcn.004d7925
push eax
call fcn.0058f420
pop ecx
mov dword [esi + 0x414], eax
test eax, eax
pop ecx
jne 0x4c040e
mov eax, dword [ebp - 0x10]
mov dword [eax], edi
push dword [esi + 0x418]
call fcn.0058f449
jmp 0x4c0437
push dword [ebp + 8]
call fcn.004d772c
test eax, eax
pop ecx
jne 0x4c0444
mov eax, dword [ebp - 0x10]
mov dword [eax], edi
push dword [esi + 0x418]
call fcn.0058f449
push dword [esi + 0x414]
call fcn.0058f449
pop ecx
pop ecx
push esi
call dword [fcn.005b73dc]
jmp 0x4c04d5
mov ecx, dword [esi + 0x404]
push 8
pop eax
and dword [esi + 0x424], 0
cdq
idiv ecx
cmp ecx, 0x18
mov dword [esi + 0x408], edi
mov dword [esi + 0x40c], eax
je 0x4c047e
lea edx, [ecx - 1]
test edx, edx
jle 0x4c047e
mov eax, edi
dec edx
lea eax, [eax + eax + 1]
jne 0x4c0471
mov dword [esi + 0x408], eax
cmp ecx, edi
jne 0x4c049a
and byte [esi + 4], 0
and byte [esi + 5], 0
and byte [esi + 6], 0
or byte [esi + 8], 0xff
or byte [esi + 9], 0xff
or byte [esi + 0xa], 0xff
push 0x15c
call fcn.0058f420
pop ecx
mov dword [ebp + 0x18], eax
and dword [ebp - 4], 0
test eax, eax
je 0x4c04bc
push dword [ebp + 8]
mov ecx, eax
call fcn.004b8a3a
jmp 0x4c04be
xor eax, eax
mov dword [esi + 0x410], eax
mov eax, esi
jmp 0x4c04d7
push esi
call dword [fcn.005b73dc]
mov dword [edi], 0x16
xor eax, eax
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 0x18