Function at 0x422d50
Capabilities:
Encrypt data using rc4 prga

Disassembly:
sub esp, 0x18
mov eax, dword [esp + 0x1c]
push ebx
mov ebx, ecx
mov ecx, dword [ebx + 0x94]
inc ecx
mov dword [ebx + 0x94], ecx
fld dword [eax + 8]
push ebp
mov ebp, dword [eax + 4]
xor ecx, ecx
mov cx, word [eax]
mov eax, dword [0x9b38c0]
push esi
push edi
movsx edi, cx
imul edi, edi, 0x16
mov dword [esp + 0x2c], ecx
add edi, eax
mov ax, word [edi + 0xa]
mov dl, al
shr dl, 6
test dl, 1
je 0x422d9c
test ebp, ebp
je 0x422ff7
movzx edx, word [edi + 4]
mov dword [esp + 0x14], edx
mov dl, byte [esp + 0x38]
test dl, dl
fild dword [esp + 0x14]
fmul dword [0x8eb34c]
jne 0x422dcb
mov dl, al
shr dl, 5
shr al, 1
not dl
xor dl, al
test dl, 1
mov byte [esp + 0x38], 0
jne 0x422dd0
mov byte [esp + 0x38], 1
fld dword [esp + 0x30]
fcomp dword [0x890968]
fnstsw ax
test ah, 0x41
jne 0x422e25
fld dword [esp + 0x30]
fdiv st(1)
fadd st(2)
fcom dword [0x89096c]
fnstsw ax
test ah, 0x41
jp 0x422e23
mov word [esp + 0x18], cx
fstp dword [esp + 0x20]
mov edx, dword [esp + 0x18]
lea eax, [ebx + 0x64]
mov dword [eax], edx
mov edx, dword [esp + 0x20]
mov dword [eax + 4], ebp
mov dword [eax + 8], edx
mov dword [esp + 0x24], 0
mov edx, dword [esp + 0x24]
mov dword [eax + 0xc], edx
jmp 0x422e25
fstp st(0)
fld dword [esp + 0x34]
fdiv st(1)
fst dword [esp + 0x14]
fadd st(2)
fcomp dword [0x89096c]
fnstsw ax
test ah, 0x41
jnp 0x422ead
fld dword [0x89096c]
movzx esi, word [edi + ebp*2]
mov eax, dword [0x9b38bc]
fsubrp st(2)
fxch st(1)
shl esi, 5
fmulp st(1)
add esi, eax
fld dword [esp + 0x30]
push ecx
fsub st(1)
push esi
fstp dword [esp + 0x38]
fld dword [esp + 0x3c]
fsub st(1)
fstp dword [esp + 0x3c]
fstp st(0)
call fcn.00766680
add esp, 8
test eax, eax
je 0x422ee7
movzx edx, word [eax]
fld dword [0x890968]
mov cx, word [eax + 8]
mov ebp, dword [0x9b38bc]
shl edx, 5
mov word [esp + 0x2c], cx
xor ecx, ecx
add edx, ebp
cmp esi, edx
sete cl
mov edi, eax
mov ebp, ecx
mov ecx, dword [esp + 0x2c]
jmp 0x422d86
mov edx, dword [esp + 0x38]
fstp st(0)
fld dword [esp + 0x14]
push edx
fadd st(1)
lea eax, [esp + 0x1c]
mov word [esp + 0x1c], cx
push eax
fstp dword [esp + 0x28]
mov ecx, ebx
mov dword [esp + 0x24], ebp
fstp st(0)
mov dword [esp + 0x2c], 0
call fcn.00415f60
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret 0x10
movzx edi, word [edi + ebp*2]
mov ecx, dword [0x9b38bc]
mov eax, dword [ebx + 0x98]
shl edi, 5
add edi, ecx
cmp eax, 0xa
mov dword [esp + 0x10], 0
jge 0x422ff9
lea ecx, [edi + 0x12]
mov dword [esp + 0x14], ecx
jmp 0x422f20
cmp dword [ebx + 0x94], 0x20
jge 0x422ff9
movzx edx, byte [edi + 0x10]
cmp dword [esp + 0x10], edx
jge 0x422ff9
mov eax, dword [esp + 0x14]
mov si, word [eax]
cmp si, word [esp + 0x2c]
je 0x422fca
mov ebp, dword [0x9b38c0]
movzx eax, si
imul eax, eax, 0x16
add eax, ebp
xor ebp, ebp
mov bp, word [eax + 0xa]
mov ecx, ebp
mov edx, ebp
shr ecx, 0xd
shr edx, 0xc
or cl, dl
test cl, 1
jne 0x422fca
cmp byte [ebx], 0
je 0x422f81
mov ecx, ebp
shr ecx, 0xf
test cl, 1
je 0x422fca
movzx eax, word [eax]
mov ecx, dword [0x9b38bc]
mov edx, dword [esp + 0x38]
shl eax, 5
add eax, ecx
mov ecx, dword [esp + 0x30]
sub eax, edi
neg eax
sbb eax, eax
inc eax
push edx
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x38]
push eax
push ecx
lea edx, [esp + 0x24]
push edx
mov ecx, ebx
mov word [esp + 0x28], si
mov dword [esp + 0x30], 0
mov dword [esp + 0x34], 0
call fcn.00422d50
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
mov eax, dword [ebx + 0x98]
inc edx
add ecx, 2
cmp eax, 0xa
mov dword [esp + 0x10], edx
mov dword [esp + 0x14], ecx
jl 0x422f20
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret 0x10
fstp st(0)
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret 0x10