Function at 0x549570
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0xc]
mov edx, dword [ecx]
mov dword [ebp - 8], edx
mov eax, dword [ebp - 8]
movzx ecx, word [eax]
mov edx, dword [ebp + 8]
cmp dword [edx + 4], ecx
jb 0x5495c2
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0xc]
mov edx, dword [ecx]
mov dword [ebp - 0xc], edx
mov eax, dword [ebp - 0xc]
movzx ecx, word [eax]
mov edx, dword [ebp + 8]
mov dword [edx + 4], ecx
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 4]
xor ecx, 1
mov dword [ebp - 4], ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0xc]
mov ecx, dword [ebp - 0xc]
mov edx, dword [ecx + 0xc]
mov dword [eax], edx
jmp 0x5495f0
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0xc]
mov edx, dword [ecx]
mov dword [ebp - 0x10], edx
mov eax, dword [ebp - 0x10]
movzx ecx, word [eax]
mov edx, dword [ebp + 8]
mov dword [edx + 4], ecx
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 4]
mov dword [ebp - 4], ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0xc]
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx + 8]
mov dword [eax], edx
mov eax, dword [ebp + 8]
cmp dword [eax + 8], 0
jne 0x549790
mov ecx, dword [ebp + 8]
cmp dword [ecx + 0x20], 0
jne 0x549776
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x18]
mov ecx, dword [eax + 8]
and ecx, 7
jne 0x5496d8
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x18]
cmp dword [eax + 0x40], 0
jl 0x54965a
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x18]
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x18]
mov edx, dword [edx + 0x3c]
cmp edx, dword [ecx + 0x40]
jl 0x54965a
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x18]
mov edx, dword [ecx + 8]
or edx, 4
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x18]
mov dword [ecx + 8], edx
mov dword [ebp - 0x1c], 0xffffffff
jmp 0x5496d0
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x18]
mov ecx, dword [eax + 0x1c]
sub ecx, 1
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x18]
mov dword [eax + 0x1c], ecx
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x18]
cmp dword [edx + 0x1c], 0
jge 0x549691
push 1
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x18]
push ecx
call fcn.00529570
add esp, 8
mov dword [ebp - 0x20], eax
jmp 0x5496ca
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x18]
mov ecx, dword [eax + 0x3c]
add ecx, 1
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x18]
mov dword [eax + 0x3c], ecx
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x18]
mov eax, dword [edx + 0x18]
movzx ecx, byte [eax]
mov dword [ebp - 0x20], ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x18]
mov ecx, dword [eax + 0x18]
add ecx, 1
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x18]
mov dword [eax + 0x18], ecx
mov ecx, dword [ebp - 0x20]
mov dword [ebp - 0x1c], ecx
mov edx, dword [ebp - 0x1c]
mov dword [ebp - 0x24], edx
jmp 0x5496df
mov dword [ebp - 0x24], 0xffffffff
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0xffffffff
jne 0x5496fc
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x20], 1
mov dword [ebp - 0x18], 0xff
mov edx, dword [ebp + 8]
mov al, byte [edx + 0x1c]
mov byte [ebp - 0x11], al
mov ecx, dword [ebp + 8]
mov dl, byte [ebp - 0x18]
mov byte [ecx + 0x1c], dl
movzx eax, byte [ebp - 0x11]
cmp eax, 0xff
jne 0x54975a
cmp dword [ebp - 0x18], 0x8f
jle 0x54973e
mov ecx, dword [ebp + 8]
mov edx, dword [ecx]
add edx, 0xff00
mov eax, dword [ebp + 8]
mov dword [eax], edx
mov ecx, dword [ebp + 8]
mov dword [ecx + 8], 8
jmp 0x549758
mov edx, dword [ebp - 0x18]
shl edx, 9
mov eax, dword [ebp + 8]
add edx, dword [eax]
mov ecx, dword [ebp + 8]
mov dword [ecx], edx
mov edx, dword [ebp + 8]
mov dword [edx + 8], 7
jmp 0x549774
mov eax, dword [ebp - 0x18]
shl eax, 8
mov ecx, dword [ebp + 8]
add eax, dword [ecx]
mov edx, dword [ebp + 8]
mov dword [edx], eax
mov eax, dword [ebp + 8]
mov dword [eax + 8], 8
jmp 0x549790
mov ecx, dword [ebp + 8]
mov edx, dword [ecx]
add edx, 0xff00
mov eax, dword [ebp + 8]
mov dword [eax], edx
mov ecx, dword [ebp + 8]
mov dword [ecx + 8], 8
mov edx, dword [ebp + 8]
mov eax, dword [edx + 4]
shl eax, 1
mov ecx, dword [ebp + 8]
mov dword [ecx + 4], eax
mov edx, dword [ebp + 8]
mov eax, dword [edx]
shl eax, 1
mov ecx, dword [ebp + 8]
mov dword [ecx], eax
mov edx, dword [ebp + 8]
mov eax, dword [edx + 8]
sub eax, 1
mov ecx, dword [ebp + 8]
mov dword [ecx + 8], eax
mov edx, dword [ebp + 8]
mov eax, dword [edx + 4]
and eax, 0x8000
je 0x5495f0
mov eax, dword [ebp - 4]
mov esp, ebp
pop ebp
ret