Function at 0x422c40
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 8]
lea edx, [ecx + eax - 1]
mov dword [ebp - 0xc], edx
mov eax, dword [ebp + 8]
mov dword [ebp - 0x20], eax
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x1c], ecx
mov edx, dword [ebp + 0xc]
add edx, 4
mov dword [ebp - 8], edx
mov dword [ebp - 0x10], SysStringLen
mov eax, dword [ebp - 0xc]
sub eax, 0xa
mov dword [ebp - 0x14], eax
mov dword [ebp - 4], 0
mov dword [ebp - 0x18], 0
mov ecx, dword [ebp - 0x20]
cmp ecx, dword [ebp - 0x14]
ja 0x422c9f
push 3
mov edx, dword [ebp - 0x20]
push edx
call fcn.004229c0
add esp, 8
mov dword [ebp - 4], eax
mov eax, dword [ebp - 0x20]
cmp eax, dword [ebp - 0x14]
ja 0x422f8e
mov ecx, dword [ebp - 0x10]
and ecx, 1
je 0x422d23
mov edx, dword [ebp + 0x10]
shr edx, 1
add edx, dword [ebp + 8]
cmp dword [ebp - 0x20], edx
jbe 0x422ce2
mov eax, dword [ebp - 8]
sub eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x20]
sub ecx, dword [ebp + 8]
mov edx, dword [ebp - 0x20]
sub edx, dword [ebp + 8]
sar edx, 5
sub ecx, edx
cmp eax, ecx
jle 0x422ce2
xor eax, eax
jmp 0x42308a
push 4
mov eax, dword [ebp - 0x1c]
push eax
mov ecx, dword [ebp - 0x10]
shr ecx, 1
or ecx, 0x80000000
push ecx
call fcn.00422be0
add esp, 0xc
mov edx, dword [ebp - 8]
mov dword [ebp - 0x1c], edx
mov eax, dword [ebp - 8]
add eax, 4
mov dword [ebp - 8], eax
mov dword [ebp - 0x10], SysStringLen
push 3
mov ecx, dword [ebp - 0x20]
push ecx
call fcn.004229c0
add esp, 8
mov dword [ebp - 4], eax
mov edx, dword [ebp - 4]
push edx
call fcn.004230d0
add esp, 4
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp - 4]
xor edx, dword [ecx + eax*8 + 4]
mov dword [ebp - 0x24], edx
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp - 4]
mov dword [ecx + eax*8 + 4], edx
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp + 0x14]
mov edx, dword [ecx + eax*8 + 8]
mov dword [ebp - 0x2c], edx
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp - 0x20]
mov dword [ecx + eax*8 + 8], edx
mov eax, dword [ebp - 0x24]
and eax, 0xffffff
jne 0x422f4b
cmp dword [ebp - 0x2c], 0
je 0x422f4b
mov ecx, dword [ebp - 0x20]
sub ecx, dword [ebp - 0x2c]
cmp ecx, 2
jg 0x422dcd
mov edx, dword [ebp - 0x2c]
add edx, 1
cmp dword [ebp - 0x20], edx
jne 0x422f4b
cmp dword [ebp - 0x18], 3
jb 0x422f4b
mov eax, dword [ebp + 8]
add eax, 3
cmp dword [ebp - 0x20], eax
jbe 0x422f4b
push 6
mov ecx, dword [ebp - 0x20]
sub ecx, 3
push ecx
call fcn.00423090
add esp, 8
test eax, eax
je 0x422f4b
cmp dword [ebp - 0x24], 0
je 0x422e15
mov edx, dword [ebp - 0x28]
shl edx, 4
mov dword [ebp - 0x28], edx
mov eax, dword [ebp - 0x10]
shr eax, 1
or eax, 0x80000000
mov dword [ebp - 0x10], eax
push 2
mov ecx, dword [ebp - 8]
push ecx
mov edx, dword [ebp - 0x28]
or edx, 1
push edx
call fcn.00422be0
add esp, 0xc
mov eax, dword [ebp - 0x20]
add eax, 3
mov dword [ebp - 0x20], eax
mov ecx, dword [ebp - 8]
add ecx, 2
mov dword [ebp - 8], ecx
jmp 0x422f31
mov edx, dword [ebp - 0x20]
mov dword [ebp - 0x34], edx
mov eax, dword [ebp - 0x28]
shl eax, 4
mov dword [ebp - 0x28], eax
mov ecx, dword [ebp - 0x10]
shr ecx, 1
or ecx, 0x80000000
mov dword [ebp - 0x10], ecx
mov edx, dword [ebp - 0x20]
add edx, 4
mov dword [ebp - 0x20], edx
mov eax, dword [ebp - 0x20]
sub eax, dword [ebp - 0x34]
mov ecx, dword [ebp - 0x2c]
movzx edx, byte [ecx + eax]
mov eax, dword [ebp - 0x20]
movzx ecx, byte [eax]
cmp edx, ecx
jne 0x422ede
mov edx, dword [ebp - 0x20]
add edx, 1
mov dword [ebp - 0x20], edx
mov eax, dword [ebp - 0x20]
sub eax, dword [ebp - 0x34]
mov ecx, dword [ebp - 0x2c]
movzx edx, byte [ecx + eax]
mov eax, dword [ebp - 0x20]
movzx ecx, byte [eax]
cmp edx, ecx
jne 0x422ede
mov edx, dword [ebp - 0xc]
sub edx, 4
mov eax, dword [ebp - 0x20]
sub eax, 5
sub edx, eax
add edx, 1
mov dword [ebp - 0x38], edx
cmp dword [ebp - 0x38], 0xff
jbe 0x422e9c
mov dword [ebp - 0x48], 0xff
jmp 0x422ea2
mov ecx, dword [ebp - 0x38]
mov dword [ebp - 0x48], ecx
mov edx, dword [ebp - 0x48]
mov dword [ebp - 0x3c], edx
mov eax, dword [ebp - 0x20]
add eax, 1
mov dword [ebp - 0x20], eax
mov ecx, dword [ebp - 0x20]
sub ecx, dword [ebp - 0x34]
mov edx, dword [ebp - 0x2c]
movzx eax, byte [edx + ecx]
mov ecx, dword [ebp - 0x20]
movzx edx, byte [ecx]
cmp eax, edx
jne 0x422ede
mov eax, dword [ebp - 0x20]
sub eax, dword [ebp - 0x34]
cmp eax, dword [ebp - 0x3c]
jae 0x422ede
mov ecx, dword [ebp - 0x20]
add ecx, 1
mov dword [ebp - 0x20], ecx
jmp 0x422eb1
mov edx, dword [ebp - 0x20]
sub edx, dword [ebp - 0x34]
mov dword [ebp - 0x30], edx
cmp dword [ebp - 0x30], 0x12
jae 0x422f10
push 2
mov eax, dword [ebp - 8]
push eax
mov ecx, dword [ebp - 0x30]
sub ecx, 2
or ecx, dword [ebp - 0x28]
push ecx
call fcn.00422be0
add esp, 0xc
mov edx, dword [ebp - 8]
add edx, 2
mov dword [ebp - 8], edx
jmp 0x422f31
push 3
mov eax, dword [ebp - 8]
push eax
mov ecx, dword [ebp - 0x30]
shl ecx, 0x10
or ecx, dword [ebp - 0x28]
push ecx
call fcn.00422be0
add esp, 0xc
mov edx, dword [ebp - 8]
add edx, 3
mov dword [ebp - 8], edx
push 3
mov eax, dword [ebp - 0x20]
push eax
call fcn.004229c0
add esp, 8
mov dword [ebp - 4], eax
mov dword [ebp - 0x18], 0
jmp 0x422f89
mov ecx, dword [ebp - 0x18]
add ecx, 1
mov dword [ebp - 0x18], ecx
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x20]
mov cl, byte [eax]
mov byte [edx], cl
mov edx, dword [ebp - 0x20]
add edx, 1
mov dword [ebp - 0x20], edx
mov eax, dword [ebp - 8]
add eax, 1
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 0x10]
shr ecx, 1
mov dword [ebp - 0x10], ecx
push 3
mov edx, dword [ebp - 0x20]
push edx
call fcn.004229c0
add esp, 8
mov dword [ebp - 4], eax
jmp 0x422c9f
mov eax, dword [ebp - 0x20]
cmp eax, dword [ebp - 0xc]
ja 0x42303f
mov ecx, dword [ebp - 0x10]
and ecx, 1
je 0x422fd1
push 4
mov edx, dword [ebp - 0x1c]
push edx
mov eax, dword [ebp - 0x10]
shr eax, 1
or eax, 0x80000000
push eax
call fcn.00422be0
add esp, 0xc
mov ecx, dword [ebp - 8]
mov dword [ebp - 0x1c], ecx
mov edx, dword [ebp - 8]
add edx, 4
mov dword [ebp - 8], edx
mov dword [ebp - 0x10], SysStringLen
mov eax, dword [ebp - 0xc]
sub eax, 3
cmp dword [ebp - 0x20], eax
ja 0x423016
push 3
mov ecx, dword [ebp - 0x20]
push ecx
call fcn.004229c0
add esp, 8
mov dword [ebp - 0x40], eax
mov edx, dword [ebp - 0x40]
push edx
call fcn.004230d0
add esp, 4
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x44]
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp - 0x20]
mov dword [ecx + eax*8 + 8], edx
mov eax, dword [ebp - 0x44]
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp - 0x40]
mov dword [ecx + eax*8 + 4], edx
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x20]
mov dl, byte [ecx]
mov byte [eax], dl
mov eax, dword [ebp - 0x20]
add eax, 1
mov dword [ebp - 0x20], eax
mov ecx, dword [ebp - 8]
add ecx, 1
mov dword [ebp - 8], ecx
mov edx, dword [ebp - 0x10]
shr edx, 1
mov dword [ebp - 0x10], edx
jmp 0x422f8e
mov eax, dword [ebp - 0x10]
and eax, 1
jne 0x423051
mov ecx, dword [ebp - 0x10]
shr ecx, 1
mov dword [ebp - 0x10], ecx
jmp 0x42303f
push 4
mov edx, dword [ebp - 0x1c]
push edx
mov eax, dword [ebp - 0x10]
shr eax, 1
or eax, 0x80000000
push eax
call fcn.00422be0
add esp, 0xc
mov ecx, dword [ebp - 8]
sub ecx, dword [ebp + 0xc]
cmp ecx, 9
jge 0x42307e
mov dword [ebp - 0x4c], 9
jmp 0x423087
mov edx, dword [ebp - 8]
sub edx, dword [ebp + 0xc]
mov dword [ebp - 0x4c], edx
mov eax, dword [ebp - 0x4c]
mov esp, ebp
pop ebp
ret