Function at 0x4c7cd5
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x58
mov eax, dword [0x5d061c]
xor eax, ebp
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 8]
lea edx, [ebp - 0xc]
push ebx
push esi
push edi
mov eax, dword [ecx]
push 8
push edx
mov dword [ebp - 0x54], ecx
call dword [eax]
push 8
xor ebx, ebx
lea eax, [ebp - 0xc]
push ebx
push eax
call fcn.0054180b
add esp, 0xc
test eax, eax
je 0x4c7d14
xor eax, eax
jmp 0x4c81c9
push ebx
push ebx
push ebx
push str.1.5.19
call fcn.00543277
push eax
mov dword [ebp - 0x10], eax
call fcn.00540ce1
push 0x40
push 0x4d299e
push dword [ebp - 0x10]
mov dword [ebp - 0x14], eax
call fcn.0053f95d
push ebx
push eax
call fcn.004d29b0
add esp, 0x28
test eax, eax
je 0x4c7d51
mov edi, ebx
jmp 0x4c81b6
push 0x4c81d8
push dword [ebp - 0x54]
push dword [ebp - 0x10]
call fcn.005496f0
push 8
push dword [ebp - 0x10]
call fcn.005417d9
mov ecx, dword [ebp - 0x10]
add esp, 0x14
cmp byte [ecx + 0x13c], 8
jb 0x4c7d8c
cmp byte [ecx + 0x13b], 3
je 0x4c7d8c
mov eax, dword [ebp - 0x14]
test byte [eax + 8], 0x10
je 0x4c7d96
push ecx
call fcn.00548579
pop ecx
mov ecx, dword [ebp - 0x10]
push 1
push 0xff
push ecx
call fcn.00549516
push dword [ebp - 0x10]
call fcn.005495a9
push dword [ebp - 0x10]
call fcn.0054863d
push dword [ebp - 0x10]
call fcn.00548fd7
push dword [ebp - 0x14]
push dword [ebp - 0x10]
call fcn.00543a6d
push dword [ebp - 0x14]
push dword [ebp - 0x10]
call fcn.00544397
mov eax, dword [ebp - 0x10]
push 0x18
mov ebx, dword [eax + 0xe4]
mov esi, dword [eax + 0xe8]
shl ebx, 2
imul esi, ebx
mov dword [ebp - 0x58], ebx
mov dword [ebp - 0x30], esi
call fcn.004fa51d
push 0x18
mov edi, eax
push 0
push edi
mov dword [ebp - 0x3c], edi
call fcn.004cf7f0
mov ecx, dword [ebp - 0x10]
mov ecx, dword [ecx + 0xe4]
mov dword [edi + 8], ecx
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0xe8]
mov dword [edi + 0xc], eax
imul eax, ebx
push eax
call fcn.004fa51d
push esi
push 0
push eax
mov dword [ebp - 0x34], eax
call fcn.004cf7f0
mov ecx, dword [edi + 0xc]
add esp, 0x48
shl ecx, 2
push ecx
call fcn.004fa51d
pop ecx
xor ecx, ecx
mov dword [ebp - 0x48], eax
cmp dword [edi + 0xc], ecx
jle 0x4c7e57
mov edx, dword [ebp - 0x34]
mov dword [eax + ecx*4], edx
inc ecx
add edx, ebx
cmp ecx, dword [edi + 0xc]
jl 0x4c7e4c
push 0x10000
push dword [ebp - 0x14]
push dword [ebp - 0x10]
call fcn.0054a735
add esp, 0xc
test eax, eax
jne 0x4c7e88
push dword [ebp - 0x48]
push dword [ebp - 0x10]
call fcn.005439cf
mov eax, dword [ebp - 0x34]
mov dword [edi + 0x10], 1
jmp 0x4c819a
push dword [ebp - 0x14]
push dword [ebp - 0x10]
call fcn.0054a0ad
mov dword [edi + 0x10], eax
imul eax, esi
push eax
call fcn.004fa51d
push esi
mov dword [ebp - 0x50], eax
call fcn.004fa51d
push esi
push 0
push eax
mov dword [ebp - 0x24], eax
call fcn.004cf7f0
push dword [ebp - 0x14]
push dword [ebp - 0x10]
call fcn.0054a0c9
mov dword [edi + 0x14], eax
mov eax, dword [edi + 0x10]
add eax, eax
push eax
call fcn.004fa51d
and dword [ebp - 0x18], 0
add esp, 0x28
cmp dword [edi + 0x10], 0
mov dword [edi + 4], eax
jle 0x4c8187
mov eax, dword [ebp - 0x50]
mov edx, dword [ebp - 0x14]
mov dword [ebp - 0x40], eax
sub eax, esi
mov dword [ebp - 0x44], eax
push edx
push dword [ebp - 0x10]
call fcn.005438d7
push 0x20000
push dword [ebp - 0x14]
push dword [ebp - 0x10]
call fcn.0054a735
add esp, 0x14
test eax, eax
je 0x4c7f6b
mov eax, dword [ebp - 0x14]
movzx ecx, word [eax + 0x106]
movzx edx, word [eax + 0x104]
test cx, cx
je 0x4c7f6d
cmp ecx, 0x64
je 0x4c7f6d
mov eax, dword [ebp - 0x18]
push 0xa
add eax, eax
pop esi
mov dword [ebp - 0x20], eax
cmp cx, si
jne 0x4c7f49
mov eax, dword [edi + 4]
imul ecx, edx, 0xa
mov edx, dword [ebp - 0x20]
mov word [edx + eax], cx
jmp 0x4c7f77
mov esi, dword [edi + 4]
add esi, eax
mov eax, 0x3e8
cmp cx, ax
jne 0x4c7f66
push 0xa
mov eax, edx
pop ecx
xor edx, edx
div ecx
mov word [esi], ax
jmp 0x4c7f77
imul eax, edx, 0x64
jmp 0x4c7f5d
xor edx, edx
mov ecx, dword [ebp - 0x18]
mov eax, dword [edi + 4]
mov word [eax + ecx*2], dx
push dword [ebp - 0x48]
push dword [ebp - 0x10]
call fcn.005439cf
mov edx, dword [ebp - 0x14]
pop ecx
pop ecx
mov ecx, dword [edx + 0x100]
mov eax, dword [edx + 0xfc]
movzx esi, byte [edx + 0x109]
imul ecx, ebx
add ecx, dword [ebp - 0x24]
sub esi, 0
mov dword [ebp - 0x1c], esi
mov esi, dword [ebp - 0x30]
lea ecx, [ecx + eax*4]
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0x2c], ecx
mov dword [ebp - 0x38], eax
je 0x4c809c
sub dword [ebp - 0x1c], 1
jne 0x4c80df
and dword [ebp - 0x1c], 0
cmp dword [edx + 0xf8], 0
jbe 0x4c80df
mov esi, dword [edx + 0xf4]
mov dword [ebp - 0x20], esi
mov esi, dword [ebp - 0x1c]
and dword [ebp - 0x4c], 0
mov edi, ecx
cmp dword [ebp - 0x20], 0
mov dword [ebp - 0x28], eax
jbe 0x4c8080
mov ebx, eax
movzx edx, byte [ebx + 3]
mov esi, 0xff
movzx ecx, byte [ebx]
sub esi, edx
movzx eax, byte [edi]
lea ebx, [ebx + 4]
imul ecx, edx
imul eax, esi
add ecx, eax
sar ecx, 8
mov byte [edi], cl
lea edi, [edi + 4]
movzx ecx, byte [ebx - 3]
movzx eax, byte [edi - 3]
imul ecx, edx
imul eax, esi
add ecx, eax
movzx eax, byte [edi - 2]
sar ecx, 8
mov byte [edi - 3], cl
movzx ecx, byte [ebx - 2]
imul ecx, edx
imul eax, esi
add ecx, eax
movzx eax, byte [edi - 1]
sar ecx, 8
mov byte [edi - 2], cl
movzx ecx, byte [ebx - 1]
imul ecx, edx
imul eax, esi
add ecx, eax
sar ecx, 8
mov byte [edi - 1], cl
mov edx, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x4c]
inc ecx
mov dword [ebp - 0x4c], ecx
mov eax, dword [edx + 0xf4]
mov dword [ebp - 0x20], eax
cmp ecx, eax
jb 0x4c7ff7
mov ebx, dword [ebp - 0x58]
mov ecx, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x38]
mov esi, dword [ebp - 0x1c]
add ecx, ebx
add eax, ebx
inc esi
mov dword [ebp - 0x2c], ecx
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x1c], esi
cmp esi, dword [edx + 0xf8]
jb 0x4c7fe2
jmp 0x4c80d9
and dword [ebp - 0x28], 0
cmp dword [edx + 0xf8], 0
jbe 0x4c80df
mov esi, dword [ebp - 0x38]
mov edi, dword [ebp - 0x28]
mov eax, dword [edx + 0xf4]
shl eax, 2
push eax
push esi
push ecx
call fcn.004ce9e0
mov ecx, dword [ebp - 0x2c]
add esp, 0xc
mov edx, dword [ebp - 0x14]
add ecx, ebx
add esi, ebx
mov dword [ebp - 0x2c], ecx
inc edi
cmp edi, dword [edx + 0xf8]
jb 0x4c80af
mov esi, dword [ebp - 0x30]
mov edi, dword [ebp - 0x3c]
push esi
push dword [ebp - 0x24]
push dword [ebp - 0x40]
call fcn.004ce9e0
mov edx, dword [ebp - 0x14]
add esp, 0xc
mov ecx, dword [edx + 0x100]
mov eax, dword [edx + 0xfc]
imul ecx, ebx
add ecx, dword [ebp - 0x24]
lea eax, [ecx + eax*4]
mov dword [ebp - 0x20], eax
movzx eax, byte [edx + 0x108]
sub eax, 1
je 0x4c8135
sub eax, 1
mov eax, dword [ebp - 0x18]
jne 0x4c8174
test eax, eax
jle 0x4c8174
push esi
push dword [ebp - 0x44]
push dword [ebp - 0x24]
call fcn.004ce9e0
mov edx, dword [ebp - 0x14]
add esp, 0xc
jmp 0x4c8171
and dword [ebp - 0x28], 0
cmp dword [edx + 0xf8], 0
jbe 0x4c8171
mov esi, dword [ebp - 0x28]
mov edi, dword [ebp - 0x20]
mov eax, dword [edx + 0xf4]
shl eax, 2
push eax
push 0
push edi
call fcn.004cf7f0
mov edx, dword [ebp - 0x14]
add esp, 0xc
add edi, ebx
inc esi
cmp esi, dword [edx + 0xf8]
jb 0x4c8148
mov edi, dword [ebp - 0x3c]
mov esi, dword [ebp - 0x30]
mov eax, dword [ebp - 0x18]
add dword [ebp - 0x40], esi
inc eax
add dword [ebp - 0x44], esi
mov dword [ebp - 0x18], eax
cmp eax, dword [edi + 0x10]
jl 0x4c7eef
push dword [ebp - 0x24]
call fcn.004f5b30
push dword [ebp - 0x34]
call fcn.004f5b30
mov eax, dword [ebp - 0x50]
pop ecx
pop ecx
push dword [ebp - 0x48]
mov dword [edi], eax
call fcn.004f5b30
push dword [ebp - 0x14]
push dword [ebp - 0x10]
call fcn.0054368f
add esp, 0xc
xor ebx, ebx
push ebx
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x10]
push eax
call fcn.0054346a
add esp, 0xc
mov eax, edi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004cc144
leave
ret