Function at 0x56e4d2
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x54
mov dword [ebp - 0x40], ecx
cmp dword [ebp + 8], 0
jl 0x56e4e9
mov eax, dword [ebp + 8]
mov dword [ebp - 0x44], eax
jmp 0x56e4f7
mov ecx, dword [ebp - 0x40]
mov edx, dword [ecx]
mov ecx, dword [ebp - 0x40]
call dword [edx + 0x18]
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x40]
mov ecx, dword [ebp - 0x44]
sub ecx, dword [eax + 0x14]
mov edx, dword [ebp - 0x40]
sub ecx, dword [edx + 0x20]
mov dword [ebp - 0x1c], ecx
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], 0
mov dword [ebp - 4], 0xffffffff
mov dword [ebp - 0x10], 0
cmp dword [ebp - 0x10], 4
je 0x56e7d1
mov ecx, dword [ebp - 0x1c]
sub ecx, 8
mov dword [ebp - 0x1c], ecx
mov edx, dword [ebp - 0x40]
mov eax, dword [ebp - 0x1c]
add eax, dword [edx + 0x14]
test eax, eax
jge 0x56e55c
cmp dword [ebp - 0x10], 3
je 0x56e55c
mov ecx, dword [ebp - 0x40]
mov edx, dword [ecx + 0x14]
neg edx
mov dword [ebp - 0x1c], edx
mov dword [ebp - 0x10], 3
push 8
lea eax, [ebp - 0x18]
push eax
mov ecx, dword [ebp - 0x1c]
push ecx
mov edx, dword [ebp - 0x40]
mov eax, dword [edx]
mov ecx, dword [ebp - 0x40]
call dword [eax + 8]
cmp eax, 8
je 0x56e57e
or eax, 0xffffffff
jmp 0x56e840
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x2c], 1
jmp 0x56e597
mov ecx, dword [ebp - 0x2c]
add ecx, 1
mov dword [ebp - 0x2c], ecx
cmp dword [ebp - 0x2c], 4
jge 0x56e5b3
mov edx, dword [ebp - 0x24]
shl edx, 8
mov eax, dword [ebp - 0x2c]
xor ecx, ecx
mov cl, byte [ebp + eax - 0x18]
add edx, ecx
mov dword [ebp - 0x24], edx
jmp 0x56e58e
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x34], 4
jmp 0x56e5cc
mov edx, dword [ebp - 0x34]
add edx, 1
mov dword [ebp - 0x34], edx
cmp dword [ebp - 0x34], 8
jge 0x56e5e8
mov eax, dword [ebp - 0x28]
shl eax, 8
mov ecx, dword [ebp - 0x34]
xor edx, edx
mov dl, byte [ebp + ecx - 0x18]
add eax, edx
mov dword [ebp - 0x28], eax
jmp 0x56e5c3
mov eax, dword [ebp - 0x18]
and eax, 0xff
cmp eax, 0x80
jne 0x56e60c
cmp dword [ebp - 0x24], 0
jne 0x56e60c
cmp dword [ebp - 0x28], 0
jle 0x56e60c
mov dword [ebp - 0x48], 1
jmp 0x56e613
mov dword [ebp - 0x48], 0
mov cl, byte [ebp - 0x48]
mov byte [ebp - 0x30], cl
mov edx, dword [ebp - 0x18]
and edx, 0xff
cmp edx, 0x80
jne 0x56e63f
cmp dword [ebp - 0x24], 0
jle 0x56e63f
cmp dword [ebp - 0x28], 0
jle 0x56e63f
mov dword [ebp - 0x4c], 1
jmp 0x56e646
mov dword [ebp - 0x4c], 0
mov al, byte [ebp - 0x4c]
mov byte [ebp - 0x38], al
mov ecx, dword [ebp - 0x18]
and ecx, 0xff
cmp ecx, 0x4a
je 0x56e668
mov edx, dword [ebp - 0x18]
and edx, 0xff
cmp edx, 0x4c
jne 0x56e697
mov eax, dword [ebp - 0x18]
and eax, 0xff
mov ecx, dword [ebp - 0x17]
and ecx, 0xff
xor eax, ecx
cmp eax, 6
jne 0x56e697
mov edx, dword [ebp - 0x16]
and edx, 0xff
cmp edx, 0x1a
jne 0x56e697
mov dword [ebp - 0x50], 1
jmp 0x56e69e
mov dword [ebp - 0x50], 0
mov al, byte [ebp - 0x50]
mov byte [ebp - 0x20], al
mov ecx, dword [ebp - 0x10]
mov dword [ebp - 0x54], ecx
cmp dword [ebp - 0x54], 3
ja 0x56e7cc
mov edx, dword [ebp - 0x54]
jmp dword [edx*4 + 0x412c46]
jmp 0x56e524
mov edx, dword [ebp - 0x40]
mov eax, dword [ebp - 8]
add eax, dword [edx + 0x14]
mov dword [ebp - 8], eax
cmp dword [ebp + 8], 0
jl 0x56e82b
mov ecx, dword [ebp - 0x40]
mov edx, dword [ecx + 0x14]
add edx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x40]
mov dword [eax + 0x14], edx
mov ecx, dword [ebp - 0x40]
cmp dword [ecx + 0xc], 0
je 0x56e819
mov edx, dword [ebp - 0x40]
mov eax, dword [edx + 0xc]
add eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x40]
mov dword [ecx + 0xc], eax
mov edx, dword [ebp - 0x40]
mov eax, dword [edx + 0x10]
sub eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x40]
mov dword [ecx + 0x10], eax
mov edx, dword [ebp - 0x40]
mov eax, dword [ebp - 0xc]
mov dword [edx + 0x18], eax
mov ecx, dword [ebp - 0x40]
mov edx, dword [ebp - 4]
mov dword [ecx + 0x1c], edx
movsx eax, byte [ebp - 0x18]
xor ecx, ecx
cmp eax, 0x4a
setne cl
mov edx, dword [ebp - 0x40]
mov byte [edx + 4], cl
mov eax, dword [ebp - 8]
mov esp, ebp
pop ebp
ret 4