Function at 0x4e5577
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
push esi
push edi
push 0
push 0x58c454
push 0x58c438
push 0
push dword [ebp + 8]
mov ebx, ecx
mov dword [ebp - 4], ebx
call fcn.0050caf3
mov edi, dword [ebx + 0x3c]
mov esi, eax
add esp, 0x14
add edi, 0xd8
test esi, esi
je 0x4e5e69
mov eax, dword [esi + 0x20]
test eax, eax
mov dword [ebp - 8], eax
jne 0x4e5a08
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x60]
mov dword [ebp - 0x28], eax
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 0x60]
mov ecx, dword [ebx + 4]
imul ecx, dword [ebp + 0x10]
add ecx, dword [ebp + 0xc]
mov ebx, dword [ebp + 0x14]
lea eax, [eax + ecx*4]
mov ecx, dword [ebp + 8]
mov dword [ebp + 0x10], eax
mov eax, dword [ebx + 4]
imul eax, dword [ecx + 4]
add eax, dword [ebx]
mov ecx, dword [ebp - 0x28]
push 0x5942a0
push dword [ebp + 0x18]
lea eax, [ecx + eax*4]
mov dword [ebp + 0xc], eax
call fcn.004be4c1
test al, al
pop ecx
pop ecx
je 0x4e57db
cmp byte [esi + 0x2a], 0
je 0x4e570b
and dword [ebp - 0x10], 0
cmp dword [ebx + 0xc], 0
jle 0x4e5e61
mov esi, 0xff0000
mov ecx, 0xff00
mov eax, dword [ebp + 0x10]
and dword [ebp - 0xc], 0
cmp dword [ebx + 8], 0
mov dword [ebp - 0x14], eax
jle 0x4e56d9
mov edx, dword [ebp + 0xc]
sub edx, eax
mov dword [ebp + 0x18], edx
jmp 0x4e5652
mov edx, dword [ebp + 0x18]
mov ebx, dword [edx + eax]
mov eax, dword [eax]
mov edx, ebx
mov dword [ebp - 0x18], ebx
and ebx, esi
shr edx, 0x18
imul ebx, edx
shr ebx, 8
mov dword [ebp - 8], eax
and eax, esi
add ebx, eax
shr ebx, 0x10
xor eax, eax
mov ah, byte [ebx + edi]
mov ebx, dword [ebp - 0x18]
and ebx, ecx
imul ebx, edx
mov dword [ebp - 0x28], edx
mov edx, dword [ebp - 8]
shr ebx, 8
and edx, ecx
add ebx, edx
movzx edx, byte [ebp - 0x18]
imul edx, dword [ebp - 0x28]
shr ebx, 8
mov al, byte [ebx + edi]
mov ebx, dword [ebp - 8]
shr edx, 8
and ebx, 0xff
add edx, edi
movzx edx, byte [ebx + edx]
shl eax, 8
or eax, edx
mov ebx, eax
mov eax, dword [ebp - 8]
and eax, 0xff000000
or ebx, eax
mov eax, dword [ebp - 0x14]
mov dword [eax], ebx
mov ebx, dword [ebp + 0x14]
mov edx, dword [ebx + 8]
add eax, 4
inc dword [ebp - 0xc]
cmp dword [ebp - 0xc], edx
mov dword [ebp - 0x14], eax
jl 0x4e564f
mov eax, dword [ebp - 4]
mov eax, dword [eax + 4]
mov edx, dword [ebp + 0x10]
inc dword [ebp - 0x10]
lea eax, [edx + eax*4]
mov edx, dword [ebp + 0xc]
mov dword [ebp + 0x10], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 4]
lea eax, [edx + eax*4]
mov dword [ebp + 0xc], eax
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebx + 0xc]
jl 0x4e5631
jmp 0x4e5e61
and dword [ebp - 8], 0
cmp dword [ebx + 0xc], 0
jle 0x4e5e61
mov esi, 0xff0000
mov ecx, 0xff00
mov eax, dword [ebp + 0x10]
and dword [ebp - 0xc], 0
cmp dword [ebx + 8], 0
mov dword [ebp - 0x18], eax
jle 0x4e57a9
mov edx, dword [ebp + 0xc]
sub edx, eax
mov dword [ebp + 0x18], edx
jmp 0x4e5740
mov edx, dword [ebp + 0x18]
mov edx, dword [edx + eax]
mov eax, dword [eax]
mov dword [ebp - 0x10], eax
and eax, esi
mov ebx, edx
and ebx, esi
add eax, ebx
shr eax, 0x10
xor ebx, ebx
mov bh, byte [eax + edi]
mov eax, dword [ebp - 0x10]
and eax, ecx
mov dword [ebp - 0x28], edx
and edx, ecx
add eax, edx
mov edx, dword [ebp - 0x10]
shr eax, 8
mov bl, byte [eax + edi]
mov eax, dword [ebp - 0x28]
and eax, 0xff
and edx, 0xff
add edx, edi
movzx eax, byte [eax + edx]
shl ebx, 8
or ebx, eax
mov eax, dword [ebp - 0x10]
and eax, 0xff000000
or ebx, eax
mov eax, dword [ebp - 0x18]
mov dword [eax], ebx
mov ebx, dword [ebp + 0x14]
mov edx, dword [ebx + 8]
add eax, 4
inc dword [ebp - 0xc]
cmp dword [ebp - 0xc], edx
mov dword [ebp - 0x18], eax
jl 0x4e573d
mov eax, dword [ebp - 4]
mov eax, dword [eax + 4]
mov edx, dword [ebp + 0x10]
inc dword [ebp - 8]
lea eax, [edx + eax*4]
mov edx, dword [ebp + 0xc]
mov dword [ebp + 0x10], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 4]
lea eax, [edx + eax*4]
mov dword [ebp + 0xc], eax
mov eax, dword [ebp - 8]
cmp eax, dword [ebx + 0xc]
jl 0x4e5723
jmp 0x4e5e61
mov eax, dword [ebp + 0x18]
mov ecx, dword [eax + 0xc]
mov eax, dword [eax]
imul eax, ecx
cdq
mov dword [ebp - 0x18], ecx
mov ecx, 0xff
idiv ecx
and dword [ebp - 8], 0
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp + 0x18]
mov eax, dword [eax + 4]
imul eax, dword [ebp - 0x18]
cdq
idiv ecx
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0x18]
mov eax, dword [eax + 8]
imul eax, dword [ebp - 0x18]
cdq
idiv ecx
cmp byte [esi + 0x2a], 0
mov dword [ebp - 0x24], eax
je 0x4e5925
cmp dword [ebx + 0xc], 0
jle 0x4e5e61
mov esi, 0xff0000
mov ecx, 0xff00
mov eax, dword [ebp + 0x10]
and dword [ebp - 0xc], 0
cmp dword [ebx + 8], 0
mov dword [ebp - 0x14], eax
jle 0x4e58f3
mov edx, dword [ebp + 0xc]
sub edx, eax
mov dword [ebp + 0x18], edx
jmp 0x4e5857
mov edx, dword [ebp + 0x18]
mov ebx, dword [edx + eax]
mov dword [ebp - 0x18], ebx
mov edx, ebx
mov eax, dword [eax]
and ebx, esi
imul ebx, dword [ebp - 0x1c]
shr ebx, 8
shr edx, 0x18
imul ebx, edx
shr ebx, 8
mov dword [ebp - 0x10], eax
and eax, esi
add ebx, eax
shr ebx, 0x10
xor eax, eax
mov ah, byte [ebx + edi]
mov ebx, dword [ebp - 0x18]
and ebx, ecx
imul ebx, dword [ebp - 0x20]
shr ebx, 8
imul ebx, edx
mov dword [ebp - 0x28], edx
mov edx, dword [ebp - 0x10]
and edx, ecx
shr ebx, 8
add ebx, edx
movzx edx, byte [ebp - 0x18]
imul edx, dword [ebp - 0x24]
shr edx, 8
imul edx, dword [ebp - 0x28]
shr ebx, 8
mov al, byte [ebx + edi]
mov ebx, dword [ebp - 0x10]
shr edx, 8
and ebx, 0xff
add edx, edi
movzx edx, byte [ebx + edx]
shl eax, 8
or eax, edx
mov ebx, eax
mov eax, dword [ebp - 0x10]
and eax, 0xff000000
or ebx, eax
mov eax, dword [ebp - 0x14]
mov dword [eax], ebx
mov ebx, dword [ebp + 0x14]
mov edx, dword [ebx + 8]
add eax, 4
inc dword [ebp - 0xc]
cmp dword [ebp - 0xc], edx
mov dword [ebp - 0x14], eax
jl 0x4e5854
mov eax, dword [ebp - 4]
mov eax, dword [eax + 4]
mov edx, dword [ebp + 0x10]
inc dword [ebp - 8]
lea eax, [edx + eax*4]
mov edx, dword [ebp + 0xc]
mov dword [ebp + 0x10], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 4]
lea eax, [edx + eax*4]
mov dword [ebp + 0xc], eax
mov eax, dword [ebp - 8]
cmp eax, dword [ebx + 0xc]
jl 0x4e5836
jmp 0x4e5e61
cmp dword [ebx + 0xc], 0
jle 0x4e5e61
mov esi, 0xff0000
mov ecx, 0xff00
mov eax, dword [ebp + 0x10]
and dword [ebp - 0xc], 0
cmp dword [ebx + 8], 0
mov dword [ebp - 0x18], eax
jle 0x4e59d6
mov edx, dword [ebp + 0xc]
sub edx, eax
mov dword [ebp + 0x18], edx
jmp 0x4e595a
mov edx, dword [ebp + 0x18]
mov edx, dword [edx + eax]
mov eax, dword [eax]
mov ebx, edx
and ebx, esi
imul ebx, dword [ebp - 0x1c]
mov dword [ebp - 0x28], edx
and edx, ecx
imul edx, dword [ebp - 0x20]
mov dword [ebp - 0x10], eax
and eax, esi
shr ebx, 8
add ebx, eax
shr ebx, 0x10
xor eax, eax
mov ah, byte [ebx + edi]
mov ebx, dword [ebp - 0x10]
shr edx, 8
and ebx, ecx
add edx, ebx
mov ebx, dword [ebp - 0x10]
shr edx, 8
mov al, byte [edx + edi]
movzx edx, byte [ebp - 0x28]
imul edx, dword [ebp - 0x24]
shr edx, 8
and ebx, 0xff
add edx, edi
movzx edx, byte [ebx + edx]
shl eax, 8
or eax, edx
mov ebx, eax
mov eax, dword [ebp - 0x10]
and eax, 0xff000000
or ebx, eax
mov eax, dword [ebp - 0x18]
mov dword [eax], ebx
mov ebx, dword [ebp + 0x14]
mov edx, dword [ebx + 8]
add eax, 4
inc dword [ebp - 0xc]
cmp dword [ebp - 0xc], edx
mov dword [ebp - 0x18], eax
jl 0x4e5957
mov eax, dword [ebp - 4]
mov eax, dword [eax + 4]
mov edx, dword [ebp + 0x10]
inc dword [ebp - 8]
lea eax, [edx + eax*4]
mov edx, dword [ebp + 0xc]
mov dword [ebp + 0x10], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 4]
lea eax, [edx + eax*4]
mov dword [ebp + 0xc], eax
mov eax, dword [ebp - 8]
cmp eax, dword [ebx + 0xc]
jl 0x4e5939
jmp 0x4e5e61
mov eax, dword [esi + 0x24]
mov dword [ebp - 0x28], eax
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 0x60]
mov ecx, dword [ebx + 4]
imul ecx, dword [ebp + 0x10]
add ecx, dword [ebp + 0xc]
push 0x5942a0
push dword [ebp + 0x18]
lea eax, [eax + ecx*4]
mov ecx, dword [ebp + 8]
mov dword [ebp + 0x10], eax
mov eax, dword [ebp + 0x14]
mov ebx, dword [eax + 4]
imul ebx, dword [ecx + 4]
add ebx, dword [eax]
add ebx, dword [ebp - 0x28]
mov dword [ebp + 0xc], ebx
call fcn.004be4c1
test al, al
pop ecx
pop ecx
je 0x4e5c2a
cmp byte [esi + 0x2a], 0
mov eax, dword [ebp + 0x14]
je 0x4e5b54
and dword [ebp - 0x18], 0
cmp dword [eax + 0xc], 0
jle 0x4e5e61
mov esi, 0xff0000
mov ecx, 0xff00
mov eax, dword [ebp + 0x10]
and dword [ebp - 0x14], 0
mov dword [ebp + 0x18], eax
mov eax, dword [ebp + 0x14]
cmp dword [eax + 8], 0
mov dword [ebp - 0x10], ebx
jle 0x4e5b25
mov eax, dword [ebp - 0x10]
movzx eax, byte [eax]
mov edx, dword [ebp - 8]
mov ebx, dword [edx + eax*4]
mov eax, dword [ebp + 0x18]
mov edx, dword [eax]
mov eax, ebx
shr eax, 0x18
mov dword [ebp - 0x24], ebx
and ebx, esi
imul ebx, eax
mov dword [ebp - 0xc], edx
shr ebx, 8
and edx, esi
add ebx, edx
shr ebx, 0x10
xor edx, edx
mov dh, byte [ebx + edi]
mov ebx, dword [ebp - 0x24]
and ebx, ecx
imul ebx, eax
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0xc]
and eax, ecx
shr ebx, 8
add ebx, eax
movzx eax, byte [ebp - 0x24]
imul eax, dword [ebp - 0x28]
inc dword [ebp - 0x10]
shr ebx, 8
mov dl, byte [ebx + edi]
mov ebx, dword [ebp - 0xc]
shr eax, 8
add eax, edi
and ebx, 0xff
movzx eax, byte [ebx + eax]
shl edx, 8
or edx, eax
mov eax, dword [ebp - 0xc]
and eax, 0xff000000
or edx, eax
mov eax, dword [ebp + 0x18]
add dword [ebp + 0x18], 4
inc dword [ebp - 0x14]
mov dword [eax], edx
mov eax, dword [ebp + 0x14]
mov edx, dword [ebp - 0x14]
cmp edx, dword [eax + 8]
jl 0x4e5a90
mov ebx, dword [ebp + 0xc]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 4]
mov edx, dword [ebp + 0x10]
lea eax, [edx + eax*4]
mov dword [ebp + 0x10], eax
mov eax, dword [ebp + 8]
add ebx, dword [eax + 4]
inc dword [ebp - 0x18]
mov eax, dword [ebp + 0x14]
mov edx, dword [ebp - 0x18]
cmp edx, dword [eax + 0xc]
mov dword [ebp + 0xc], ebx
jl 0x4e5a76
jmp 0x4e5e61
and dword [ebp - 0xc], 0
cmp dword [eax + 0xc], 0
jle 0x4e5e61
mov esi, 0xff0000
mov ecx, 0xff00
mov eax, dword [ebp + 0x10]
and dword [ebp - 0x10], 0
mov dword [ebp + 0x18], eax
mov eax, dword [ebp + 0x14]
cmp dword [eax + 8], 0
mov dword [ebp - 0x18], ebx
jle 0x4e5bfb
mov eax, dword [ebp - 0x18]
movzx eax, byte [eax]
mov edx, dword [ebp - 8]
mov eax, dword [edx + eax*4]
mov edx, dword [ebp + 0x18]
mov edx, dword [edx]
mov dword [ebp - 0x14], edx
and edx, esi
mov ebx, eax
and ebx, esi
add edx, ebx
shr edx, 0x10
xor ebx, ebx
mov bh, byte [edx + edi]
mov edx, dword [ebp - 0x14]
inc dword [ebp - 0x18]
mov dword [ebp - 0x28], eax
and eax, ecx
and edx, ecx
add edx, eax
mov eax, dword [ebp - 0x28]
shr edx, 8
mov bl, byte [edx + edi]
mov edx, dword [ebp - 0x14]
and eax, 0xff
and edx, 0xff
add edx, edi
movzx eax, byte [eax + edx]
shl ebx, 8
or ebx, eax
mov eax, dword [ebp - 0x14]
and eax, 0xff000000
or ebx, eax
mov eax, dword [ebp + 0x18]
add dword [ebp + 0x18], 4
inc dword [ebp - 0x10]
mov edx, dword [ebp - 0x10]
mov dword [eax], ebx
mov eax, dword [ebp + 0x14]
cmp edx, dword [eax + 8]
jl 0x4e5b82
mov ebx, dword [ebp + 0xc]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 4]
mov edx, dword [ebp + 0x10]
lea eax, [edx + eax*4]
mov dword [ebp + 0x10], eax
mov eax, dword [ebp + 8]
add ebx, dword [eax + 4]
inc dword [ebp - 0xc]
mov eax, dword [ebp + 0x14]
mov edx, dword [ebp - 0xc]
cmp edx, dword [eax + 0xc]
mov dword [ebp + 0xc], ebx
jl 0x4e5b6c
jmp 0x4e5e61
mov eax, dword [ebp + 0x18]
mov ecx, dword [eax + 0xc]
mov eax, dword [eax]
imul eax, ecx
cdq
mov dword [ebp - 0x24], ecx
mov ecx, 0xff
idiv ecx
and dword [ebp - 0xc], 0
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0x18]
mov eax, dword [eax + 4]
imul eax, dword [ebp - 0x24]
cdq
idiv ecx
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp + 0x18]
mov eax, dword [eax + 8]
imul eax, dword [ebp - 0x24]
cdq
idiv ecx
cmp byte [esi + 0x2a], 0
mov dword [ebp - 0x28], eax
mov eax, dword [ebp + 0x14]
je 0x4e5d7b
cmp dword [eax + 0xc], 0
jle 0x4e5e61
mov esi, 0xff0000
mov ecx, 0xff00
mov eax, dword [ebp + 0x10]
and dword [ebp - 0x10], 0
mov dword [ebp + 0x18], eax
mov eax, dword [ebp + 0x14]
cmp dword [eax + 8], 0
mov dword [ebp - 0x18], ebx
jle 0x4e5d4c
mov eax, dword [ebp - 0x18]
movzx eax, byte [eax]
mov edx, dword [ebp - 8]
mov ebx, dword [edx + eax*4]
mov eax, dword [ebp + 0x18]
mov edx, dword [eax]
mov dword [ebp - 0x24], ebx
mov eax, ebx
and ebx, esi
imul ebx, dword [ebp - 0x20]
shr eax, 0x18
shr ebx, 8
imul ebx, eax
shr ebx, 8
mov dword [ebp - 0x14], edx
and edx, esi
add ebx, edx
shr ebx, 0x10
xor edx, edx
mov dh, byte [ebx + edi]
mov ebx, dword [ebp - 0x24]
and ebx, ecx
imul ebx, dword [ebp - 0x1c]
shr ebx, 8
imul ebx, eax
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x14]
and eax, ecx
shr ebx, 8
add ebx, eax
movzx eax, byte [ebp - 0x24]
imul eax, dword [ebp - 0x28]
shr eax, 8
imul eax, dword [ebp - 0x2c]
inc dword [ebp - 0x18]
shr ebx, 8
mov dl, byte [ebx + edi]
mov ebx, dword [ebp - 0x14]
shr eax, 8
add eax, edi
and ebx, 0xff
movzx eax, byte [ebx + eax]
shl edx, 8
or edx, eax
mov eax, dword [ebp - 0x14]
and eax, 0xff000000
or edx, eax
mov eax, dword [ebp + 0x18]
add dword [ebp + 0x18], 4
inc dword [ebp - 0x10]
mov dword [eax], edx
mov eax, dword [ebp + 0x14]
mov edx, dword [ebp - 0x10]
cmp edx, dword [eax + 8]
jl 0x4e5ca2
mov ebx, dword [ebp + 0xc]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 4]
mov edx, dword [ebp + 0x10]
lea eax, [edx + eax*4]
mov dword [ebp + 0x10], eax
mov eax, dword [ebp + 8]
add ebx, dword [eax + 4]
inc dword [ebp - 0xc]
mov eax, dword [ebp + 0x14]
mov edx, dword [ebp - 0xc]
cmp edx, dword [eax + 0xc]
mov dword [ebp + 0xc], ebx
jl 0x4e5c88
jmp 0x4e5e61
cmp dword [eax + 0xc], 0
jle 0x4e5e61
mov esi, 0xff0000
mov ecx, 0xff00
mov eax, dword [ebp + 0x10]
and dword [ebp - 0x10], 0
mov dword [ebp + 0x18], eax
mov eax, dword [ebp + 0x14]
cmp dword [eax + 8], 0
mov dword [ebp - 0x18], ebx
jle 0x4e5e37
mov eax, dword [ebp - 0x18]
movzx eax, byte [eax]
mov edx, dword [ebp - 8]
mov eax, dword [edx + eax*4]
mov edx, dword [ebp + 0x18]
mov edx, dword [edx]
mov ebx, eax
and ebx, esi
imul ebx, dword [ebp - 0x20]
mov dword [ebp - 0x2c], eax
and eax, ecx
imul eax, dword [ebp - 0x1c]
mov dword [ebp - 0x14], edx
and edx, esi
shr ebx, 8
add ebx, edx
xor edx, edx
shr eax, 8
shr ebx, 0x10
mov dh, byte [ebx + edi]
mov ebx, dword [ebp - 0x14]
and ebx, ecx
add eax, ebx
mov ebx, dword [ebp - 0x14]
shr eax, 8
inc dword [ebp - 0x18]
mov dl, byte [eax + edi]
movzx eax, byte [ebp - 0x2c]
imul eax, dword [ebp - 0x28]
shr eax, 8
add eax, edi
and ebx, 0xff
movzx eax, byte [ebx + eax]
shl edx, 8
or edx, eax
mov eax, dword [ebp - 0x14]
and eax, 0xff000000
or edx, eax
mov eax, dword [ebp + 0x18]
add dword [ebp + 0x18], 4
inc dword [ebp - 0x10]
mov dword [eax], edx
mov eax, dword [ebp + 0x14]
mov edx, dword [ebp - 0x10]
cmp edx, dword [eax + 8]
jl 0x4e5da9
mov ebx, dword [ebp + 0xc]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 4]
mov edx, dword [ebp + 0x10]
lea eax, [edx + eax*4]
mov dword [ebp + 0x10], eax
mov eax, dword [ebp + 8]
add ebx, dword [eax + 4]
inc dword [ebp - 0xc]
mov eax, dword [ebp + 0x14]
mov edx, dword [ebp - 0xc]
cmp edx, dword [eax + 0xc]
mov dword [ebp + 0xc], ebx
jl 0x4e5d8f
mov ecx, dword [ebp - 4]
mov eax, dword [ecx]
call dword [eax + 0x48]
pop edi
pop esi
pop ebx
leave
ret 0x14