Function at 0x4c5377
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
mov eax, 0x5bdd26
call fcn.0057ffbc
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 [sym.imp.KERNEL32.dll_GlobalAlloc]
mov esi, eax
cmp esi, ebx
jne 0x4c53c2
mov dword [edi], 1
jmp 0x4c56b5
lea eax, [esi + 4]
push 0x400
push ebx
push eax
call fcn.005803a0
lea ebx, [esi + 0x428]
push ebx
push dword [ebp + 8]
call fcn.004dd2ac
add esp, 0x14
test eax, eax
je 0x4c56a8
push ebx
call fcn.004dd55b
movzx eax, ax
push ebx
mov dword [esi + 0x41c], eax
call fcn.004dd573
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 0x4c56a8
cmp eax, 0x20
jg 0x4c56a8
cmp dword [esi + 0x41c], 0
je 0x4c56a8
test ecx, ecx
je 0x4c56a8
cmp byte [ebp + 0x1f], 0
mov edx, dword [ebp + 0x18]
jne 0x4c546b
mov eax, dword [edx]
dec eax
je 0x4c546d
sub eax, 7
je 0x4c546d
sub eax, 0x10
je 0x4c546d
mov dword [edi], 5
jmp 0x4c56b5
mov dword [edx], eax
mov eax, dword [edx]
mov ecx, dword [esi + 0x404]
mov dword [esi], eax
cmp ecx, dword [edx]
jbe 0x4c5486
mov dword [edi], 0x1c
jmp 0x4c56b5
xor edi, edi
cmp ecx, 0x18
jl 0x4c5493
and dword [ebp + 0x18], edi
inc edi
jmp 0x4c549b
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.004dd58b
test eax, eax
pop ecx
je 0x4c54d0
lea eax, [esi + 4]
push eax
push ebx
push dword [ebp + 8]
call fcn.004dd451
add esp, 0xc
test eax, eax
jne 0x4c54e9
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 0x4c54d5
cmp dword [esi + 0x404], 8
jge 0x4c5583
cmp byte [esi + 0x469], 1
jne 0x4c5525
cmp byte [esi + 0x42b], 1
jne 0x4c5525
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 0x4c555f
mov edi, dword [ebp + 0x18]
xor edx, edx
test edi, edi
jle 0x4c555f
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 0x4c553c
cmp edi, 0x100
jge 0x4c5580
mov edi, 0x100
lea ebx, [esi + edx*4 + 4]
sub edi, edx
lea eax, [esi + 4]
push 4
push eax
push ebx
call dword [0x63878c]
add esp, 0xc
add ebx, 4
dec edi
jne 0x4c556a
xor edi, edi
inc edi
cmp dword [esi], 8
ja 0x4c559d
lea eax, [esi + 4]
push 0x400
push eax
push dword [ebp + 0x14]
call dword [0x63878c]
add esp, 0xc
mov eax, dword [esi + 0x41c]
lea eax, [eax + eax*2]
push eax
call fcn.005985a0
test eax, eax
pop ecx
mov dword [esi + 0x418], eax
jne 0x4c55be
mov eax, dword [ebp - 0x10]
mov dword [eax], edi
jmp 0x4c5618
lea eax, [esi + 0x428]
push eax
call fcn.004dd7c1
push eax
call fcn.005985a0
pop ecx
mov dword [esi + 0x414], eax
test eax, eax
pop ecx
jne 0x4c55ee
mov eax, dword [ebp - 0x10]
mov dword [eax], edi
push dword [esi + 0x418]
call fcn.005985c9
jmp 0x4c5617
push dword [ebp + 8]
call fcn.004dd5b5
test eax, eax
pop ecx
jne 0x4c5624
mov eax, dword [ebp - 0x10]
mov dword [eax], edi
push dword [esi + 0x418]
call fcn.005985c9
push dword [esi + 0x414]
call fcn.005985c9
pop ecx
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
jmp 0x4c56b5
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 0x4c565e
lea edx, [ecx - 1]
test edx, edx
jle 0x4c565e
mov eax, edi
dec edx
lea eax, [eax + eax + 1]
jne 0x4c5651
mov dword [esi + 0x408], eax
cmp ecx, edi
jne 0x4c567a
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.005985a0
pop ecx
mov dword [ebp + 0x18], eax
and dword [ebp - 4], 0
test eax, eax
je 0x4c569c
push dword [ebp + 8]
mov ecx, eax
call fcn.004bde2f
jmp 0x4c569e
xor eax, eax
mov dword [esi + 0x410], eax
mov eax, esi
jmp 0x4c56b7
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
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