Function at 0x421760
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 0x4217bf
push 3
mov edx, dword [ebp - 0x20]
push edx
call fcn.004214e0
add esp, 8
mov dword [ebp - 4], eax
mov eax, dword [ebp - 0x20]
cmp eax, dword [ebp - 0x14]
ja 0x421aae
mov ecx, dword [ebp - 0x10]
and ecx, 1
je 0x421843
mov edx, dword [ebp + 0x10]
shr edx, 1
add edx, dword [ebp + 8]
cmp dword [ebp - 0x20], edx
jbe 0x421802
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 0x421802
xor eax, eax
jmp 0x421baa
push 4
mov eax, dword [ebp - 0x1c]
push eax
mov ecx, dword [ebp - 0x10]
shr ecx, 1
or ecx, 0x80000000
push ecx
call fcn.00421700
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.004214e0
add esp, 8
mov dword [ebp - 4], eax
mov edx, dword [ebp - 4]
push edx
call fcn.00421bf0
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 0x421a6b
cmp dword [ebp - 0x2c], 0
je 0x421a6b
mov ecx, dword [ebp - 0x20]
sub ecx, dword [ebp - 0x2c]
cmp ecx, 2
jg 0x4218ed
mov edx, dword [ebp - 0x2c]
add edx, 1
cmp dword [ebp - 0x20], edx
jne 0x421a6b
cmp dword [ebp - 0x18], 3
jb 0x421a6b
mov eax, dword [ebp + 8]
add eax, 3
cmp dword [ebp - 0x20], eax
jbe 0x421a6b
push 6
mov ecx, dword [ebp - 0x20]
sub ecx, 3
push ecx
call fcn.00421bb0
add esp, 8
test eax, eax
je 0x421a6b
cmp dword [ebp - 0x24], 0
je 0x421935
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.00421700
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 0x421a51
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 0x4219fe
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 0x4219fe
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 0x4219bc
mov dword [ebp - 0x48], 0xff
jmp 0x4219c2
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 0x4219fe
mov eax, dword [ebp - 0x20]
sub eax, dword [ebp - 0x34]
cmp eax, dword [ebp - 0x3c]
jae 0x4219fe
mov ecx, dword [ebp - 0x20]
add ecx, 1
mov dword [ebp - 0x20], ecx
jmp 0x4219d1
mov edx, dword [ebp - 0x20]
sub edx, dword [ebp - 0x34]
mov dword [ebp - 0x30], edx
cmp dword [ebp - 0x30], 0x12
jae 0x421a30
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.00421700
add esp, 0xc
mov edx, dword [ebp - 8]
add edx, 2
mov dword [ebp - 8], edx
jmp 0x421a51
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.00421700
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.004214e0
add esp, 8
mov dword [ebp - 4], eax
mov dword [ebp - 0x18], 0
jmp 0x421aa9
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.004214e0
add esp, 8
mov dword [ebp - 4], eax
jmp 0x4217bf
mov eax, dword [ebp - 0x20]
cmp eax, dword [ebp - 0xc]
ja 0x421b5f
mov ecx, dword [ebp - 0x10]
and ecx, 1
je 0x421af1
push 4
mov edx, dword [ebp - 0x1c]
push edx
mov eax, dword [ebp - 0x10]
shr eax, 1
or eax, 0x80000000
push eax
call fcn.00421700
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 0x421b36
push 3
mov ecx, dword [ebp - 0x20]
push ecx
call fcn.004214e0
add esp, 8
mov dword [ebp - 0x40], eax
mov edx, dword [ebp - 0x40]
push edx
call fcn.00421bf0
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 0x421aae
mov eax, dword [ebp - 0x10]
and eax, 1
jne 0x421b71
mov ecx, dword [ebp - 0x10]
shr ecx, 1
mov dword [ebp - 0x10], ecx
jmp 0x421b5f
push 4
mov edx, dword [ebp - 0x1c]
push edx
mov eax, dword [ebp - 0x10]
shr eax, 1
or eax, 0x80000000
push eax
call fcn.00421700
add esp, 0xc
mov ecx, dword [ebp - 8]
sub ecx, dword [ebp + 0xc]
cmp ecx, 9
jge 0x421b9e
mov dword [ebp - 0x4c], 9
jmp 0x421ba7
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