Function at 0x403020
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x18
mov esi, dword [ecx]
xor ebp, ebp
cmp byte [esi], 0x22
jne 0x4032ad
mov eax, esi
jmp 0x40304f
lea eax, [ebx + 2]
mov dword [ecx], eax
cmp byte [ebx + 2], 0
je 0x4032ad
mov ebx, eax
inc eax
mov dword [ecx], eax
movzx edi, byte [ebx + 1]
cmp edi, 0x5c
je 0x403040
test edi, edi
je 0x4032ad
cmp edi, 0x22
jne 0x40304f
mov dword [esp + 0xc], edx
add ebx, 2
mov dword [ecx], ebx
sub ebx, esi
lea eax, [ebx - 1]
push eax
call dword [0x440a90]
add esp, 4
mov dword [esp + 4], eax
test eax, eax
je case.0x4030fe.35
inc esi
movzx ecx, byte [esi]
mov edi, dword [esp + 4]
test cl, cl
je 0x403263
add ebx, 0xfffffffe
mov eax, esi
not eax
mov dword [esp + 0x10], eax
mov edi, dword [esp + 4]
mov ebp, esi
jmp 0x4030d0
mov byte [edi], 9
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
inc edi
movzx ecx, byte [eax + 1]
inc eax
mov ebp, eax
test cl, cl
je 0x403263
mov eax, ebp
and eax, dword [esp + 0x10]
add eax, eax
mov edx, ebp
xor edx, esi
sub eax, edx
cmp eax, ebx
jae 0x403263
cmp cl, 0x5c
jne 0x403110
movsx ecx, byte [ebp + 1]
add ecx, 0xffffffde
cmp ecx, 0x53
ja case.0x4030fe.35
lea eax, [ebp + 1]
jmp dword [ecx*4 + 0x43d8c8]
mov byte [edi], 0x22
jmp 0x4030c0
cmp cl, 0x20
jb case.0x4030fe.35
mov byte [edi], cl
mov eax, ebp
jmp 0x4030c0
mov byte [edi], 0x2f
jmp 0x4030c0
mov byte [edi], 0x5c
jmp 0x4030c0
mov byte [edi], 8
jmp 0x4030c0
mov byte [edi], 0xc
jmp 0x4030c0
mov byte [edi], 0xa
jmp 0x4030c0
mov byte [edi], 0xd
jmp 0x4030c0
lea ecx, [ebp + 2]
mov edx, esp
call fcn.004032c0
test eax, eax
jne case.0x4030fe.35
mov edx, dword [esp]
cmp edx, 0x7f
ja 0x40315b
mov byte [edi], dl
jmp 0x4031ac
cmp edx, 0x7ff
ja 0x403179
shr edx, 6
or dl, 0xc0
mov byte [edi], dl
movzx eax, byte [esp]
and al, 0x3f
or al, 0x80
mov byte [edi + 1], al
inc edi
jmp 0x4031ac
lea eax, [edx - 0xe000]
cmp eax, 0xfffff7ff
ja 0x4031bb
shr edx, 0xc
and dl, 0xf
or dl, 0xe0
mov byte [edi], dl
mov eax, dword [esp]
shr eax, 6
and al, 0x3f
or al, 0x80
mov byte [edi + 1], al
movzx eax, byte [esp]
and al, 0x3f
or al, 0x80
mov byte [edi + 2], al
add edi, 2
mov eax, 1
add eax, ebp
add eax, 4
jmp 0x4030c0
cmp edx, 0xdbff
ja case.0x4030fe.35
cmp byte [ebp + 6], 0x5c
jne case.0x4030fe.35
cmp byte [ebp + 7], 0x75
jne case.0x4030fe.35
lea ecx, [ebp + 8]
mov dword [esp + 8], edx
lea edx, [esp + 0x14]
call fcn.004032c0
mov edx, dword [esp + 8]
test eax, eax
jne case.0x4030fe.35
mov eax, dword [esp + 0x14]
lea ecx, [eax - 0xe000]
cmp ecx, 0xfffffc00
jb case.0x4030fe.35
shl edx, 0xa
and edx, 0xffc00
add eax, 0xffff2400
or eax, edx
add eax, 0x10000
mov dword [esp], eax
shr eax, 0x12
or al, 0xf0
mov byte [edi], al
mov eax, dword [esp]
shr eax, 0xc
and al, 0x3f
or al, 0x80
mov byte [edi + 1], al
mov eax, dword [esp]
shr eax, 6
and al, 0x3f
or al, 0x80
mov byte [edi + 2], al
movzx eax, byte [esp]
and al, 0x3f
or al, 0x80
mov byte [edi + 3], al
add edi, 3
mov eax, 7
add eax, ebp
add eax, 4
jmp 0x4030c0
mov byte [edi], 0
sub edi, dword [esp + 4]
lea esi, [edi + 1]
push esi
call dword [0x440a90]
add esp, 4
test eax, eax
je case.0x4030fe.35
mov ebp, eax
push esi
mov esi, dword [esp + 8]
push esi
push eax
call fcn.00408a80
add esp, 0xc
mov eax, dword [esp + 0xc]
mov dword [eax], edi
push esi
call dword [0x440a8c]
add esp, 4
jmp 0x4032ad
push dword [esp + 4]
call dword [0x440a8c]
add esp, 4
xor ebp, ebp
mov eax, ebp
add esp, 0x18
pop esi
pop edi
pop ebx
pop ebp
ret