Function at 0x51f92d
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xffffffd0
mov esi, ecx
mov edi, edx
mov ebx, eax
mov eax, dword [ebx + 0x318]
call fcn.0041d944
cmp esi, eax
jge 0x51f798
test esi, esi
jge 0x51f79c
xor eax, eax
jmp 0x51f79e
mov al, 1
test al, al
je 0x51f7b3
mov edx, esi
mov eax, dword [ebx + 0x318]
call fcn.0054cdc4
movzx eax, byte [eax + 0x30]
test al, al
je 0x51f7d9
mov edx, esi
mov eax, dword [ebx + 0x318]
call fcn.0054cdc4
mov ebp, dword [eax + 0xc]
mov edx, esi
mov eax, dword [ebx + 0x318]
call fcn.0054cdc4
mov eax, dword [eax + 0x10]
jmp 0x51f7e5
mov eax, dword [ebx + 0x2d0]
mov ebp, dword [eax + 0x1c]
mov eax, dword [eax + 0x18]
mov byte [esp], 1
mov edx, dword [ebx + 0x2c4]
movzx edx, byte [edx + 0xc]
cmp edx, 8
ja case.default.0x51f7fc
jmp dword [edx*4 + 0x51f803]
cmp ebp, edi
jg 0x51f833
cmp eax, edi
jle 0x51f833
xor eax, eax
jmp 0x51f835
mov al, 1
mov byte [esp], al
jmp case.default.0x51f7fc
mov eax, dword [ebx + 0x2c4]
push dword [eax + 0x10]
mov eax, edi
pop edx
sub eax, edx
mov ecx, 7
cdq
idiv ecx
sub edx, 2
setb al
mov byte [esp], al
jmp case.default.0x51f7fc
mov eax, dword [ebx + 0x2c4]
call fcn.00545620
mov dword [esp + 0x20], edi
fild dword [esp + 0x20]
faddp st(1)
fstp qword [esp + 8]
wait
push dword [esp + 0xc]
push dword [esp + 0xc]
call fcn.0040ccd8
cmp ax, 0xff
ja 0x51f898
movzx eax, ax
bt dword [ebx + 0x328], eax
setb al
mov byte [esp], al
jmp case.default.0x51f7fc
mov eax, dword [ebx + 0x2c4]
call fcn.005455cc
mov dword [esp + 0x20], edi
fild dword [esp + 0x20]
faddp st(1)
fstp qword [esp + 8]
wait
push dword [esp + 0xc]
push dword [esp + 0xc]
call fcn.0040ccd8
cmp ax, 0xff
ja 0x51f8da
movzx eax, ax
bt dword [ebx + 0x328], eax
setb al
mov byte [esp], al
jmp case.default.0x51f7fc
mov eax, dword [ebx + 0x2c4]
call fcn.005455cc
mov dword [esp + 0x20], edi
fild dword [esp + 0x20]
fdiv dword [0x51fa70]
faddp st(1)
fstp qword [esp + 8]
wait
push dword [esp + 0xc]
push dword [esp + 0xc]
call fcn.0040ccd8
cmp ax, 0xff
ja 0x51f922
movzx eax, ax
bt dword [ebx + 0x328], eax
setb al
mov byte [esp], al
jmp case.default.0x51f7fc
mov eax, dword [ebx + 0x2c4]
mov ebp, dword [eax + 0x18]
add ebp, esi
mov eax, dword [ebx + 0x2c4]
mov eax, dword [eax + 0x14]
mov dword [esp + 0x10], eax
cmp ebp, 0xc
jle 0x51f956
sub ebp, 0xc
inc dword [esp + 0x10]
cmp ebp, 0xc
jg 0x51f94a
movzx edx, word [esp + 0x10]
mov eax, ebp
call fcn.0050df6c
movzx eax, ax
cmp edi, eax
jge case.default.0x51f7fc
mov ecx, edi
inc ecx
mov edx, ebp
movzx eax, word [esp + 0x10]
call fcn.0040cb3c
fstp qword [esp + 8]
wait
push dword [esp + 0xc]
push dword [esp + 0xc]
call fcn.0040ccd8
cmp ax, 0xff
ja 0x51f99e
movzx eax, ax
bt dword [ebx + 0x328], eax
setb al
mov byte [esp], al
jmp case.default.0x51f7fc
mov byte [esp], 0
jmp case.default.0x51f7fc
mov eax, dword [ebx + 0x2d0]
mov eax, dword [eax + 0x14]
mov edx, eax
imul edx, edi
mov dword [esp + 0x20], edx
fild dword [esp + 0x20]
mov edx, dword [ebx + 0x2c4]
mov edx, dword [edx + 0x4c]
mov ecx, dword [ebx + 0x2c4]
add edx, dword [ecx + 0x48]
imul edx, eax
mov eax, 0x5a0
sub eax, edx
mov dword [esp + 0x24], eax
fild dword [esp + 0x24]
fdivp st(1)
fstp qword [esp + 0x18]
wait
fld qword [esp + 0x18]
call fcn.00403568
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], edx
fild qword [esp + 0x28]
mov eax, dword [ebx + 0x2c4]
fadd qword [eax + 0x40]
fstp qword [esp + 8]
wait
push dword [esp + 0xc]
push dword [esp + 0xc]
call fcn.0040ccd8
cmp ax, 0xff
ja 0x51fa33
movzx eax, ax
bt dword [ebx + 0x328], eax
setb al
mov byte [esp], al
movzx eax, byte [esp]
xor al, 1
mov byte [esp], al
cmp word [ebx + 0x482], 0
je 0x51fa62
push esi
lea eax, [esp + 4]
push eax
mov ecx, edi
mov edx, ebx
mov eax, dword [ebx + 0x484]
call dword [ebx + 0x480]
movzx eax, byte [esp]
add esp, 0x30
pop ebp
pop edi
pop esi
pop ebx
ret