Function at 0x422070
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 0x4220cf
push 3
mov edx, dword [ebp - 0x20]
push edx
call fcn.00421df0
add esp, 8
mov dword [ebp - 4], eax
mov eax, dword [ebp - 0x20]
cmp eax, dword [ebp - 0x14]
ja 0x4223be
mov ecx, dword [ebp - 0x10]
and ecx, 1
je 0x422153
mov edx, dword [ebp + 0x10]
shr edx, 1
add edx, dword [ebp + 8]
cmp dword [ebp - 0x20], edx
jbe 0x422112
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 0x422112
xor eax, eax
jmp 0x4224ba
push 4
mov eax, dword [ebp - 0x1c]
push eax
mov ecx, dword [ebp - 0x10]
shr ecx, 1
or ecx, 0x80000000
push ecx
call fcn.00422010
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.00421df0
add esp, 8
mov dword [ebp - 4], eax
mov edx, dword [ebp - 4]
push edx
call fcn.00422500
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 0x42237b
cmp dword [ebp - 0x2c], 0
je 0x42237b
mov ecx, dword [ebp - 0x20]
sub ecx, dword [ebp - 0x2c]
cmp ecx, 2
jg 0x4221fd
mov edx, dword [ebp - 0x2c]
add edx, 1
cmp dword [ebp - 0x20], edx
jne 0x42237b
cmp dword [ebp - 0x18], 3
jb 0x42237b
mov eax, dword [ebp + 8]
add eax, 3
cmp dword [ebp - 0x20], eax
jbe 0x42237b
push 6
mov ecx, dword [ebp - 0x20]
sub ecx, 3
push ecx
call fcn.004224c0
add esp, 8
test eax, eax
je 0x42237b
cmp dword [ebp - 0x24], 0
je 0x422245
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.00422010
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 0x422361
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 0x42230e
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 0x42230e
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 0x4222cc
mov dword [ebp - 0x48], 0xff
jmp 0x4222d2
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 0x42230e
mov eax, dword [ebp - 0x20]
sub eax, dword [ebp - 0x34]
cmp eax, dword [ebp - 0x3c]
jae 0x42230e
mov ecx, dword [ebp - 0x20]
add ecx, 1
mov dword [ebp - 0x20], ecx
jmp 0x4222e1
mov edx, dword [ebp - 0x20]
sub edx, dword [ebp - 0x34]
mov dword [ebp - 0x30], edx
cmp dword [ebp - 0x30], 0x12
jae 0x422340
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.00422010
add esp, 0xc
mov edx, dword [ebp - 8]
add edx, 2
mov dword [ebp - 8], edx
jmp 0x422361
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.00422010
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.00421df0
add esp, 8
mov dword [ebp - 4], eax
mov dword [ebp - 0x18], 0
jmp 0x4223b9
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.00421df0
add esp, 8
mov dword [ebp - 4], eax
jmp 0x4220cf
mov eax, dword [ebp - 0x20]
cmp eax, dword [ebp - 0xc]
ja 0x42246f
mov ecx, dword [ebp - 0x10]
and ecx, 1
je 0x422401
push 4
mov edx, dword [ebp - 0x1c]
push edx
mov eax, dword [ebp - 0x10]
shr eax, 1
or eax, 0x80000000
push eax
call fcn.00422010
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 0x422446
push 3
mov ecx, dword [ebp - 0x20]
push ecx
call fcn.00421df0
add esp, 8
mov dword [ebp - 0x40], eax
mov edx, dword [ebp - 0x40]
push edx
call fcn.00422500
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 0x4223be
mov eax, dword [ebp - 0x10]
and eax, 1
jne 0x422481
mov ecx, dword [ebp - 0x10]
shr ecx, 1
mov dword [ebp - 0x10], ecx
jmp 0x42246f
push 4
mov edx, dword [ebp - 0x1c]
push edx
mov eax, dword [ebp - 0x10]
shr eax, 1
or eax, 0x80000000
push eax
call fcn.00422010
add esp, 0xc
mov ecx, dword [ebp - 8]
sub ecx, dword [ebp + 0xc]
cmp ecx, 9
jge 0x4224ae
mov dword [ebp - 0x4c], 9
jmp 0x4224b7
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