Function at 0x430550
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x28
mov eax, dword [esp + 0x48]
mov esi, dword [esp + 0x44]
cmp esi, 0x24
ja 0x4305c0
cmp esi, 1
je 0x4305c0
mov ebx, dword [esp + 0x3c]
jmp 0x430571
inc ebx
movzx eax, byte [ebx]
movzx ecx, al
lea edx, [ecx - 9]
cmp edx, 5
jb 0x430570
cmp ecx, 0x20
je 0x430570
cmp ecx, 0x2b
je 0x43058e
cmp ecx, 0x2d
jne 0x4305d5
inc ebx
cmp al, 0x2b
sete dl
test esi, esi
jle 0x4305db
mov ecx, esi
cmp esi, 0x10
jne 0x4305f1
mov ecx, 0x10
cmp byte [ebx], 0x30
jne 0x4305f1
movzx eax, byte [ebx + 1]
and al, 0xdf
xor ecx, ecx
cmp al, 0x58
sete cl
lea ebx, [ebx + ecx*2]
mov ecx, 0x10
jmp 0x4305f1
xor edi, edi
test eax, eax
je 0x4307a3
mov dword [eax], 0x16
jmp 0x4307a3
mov dl, 1
test esi, esi
jg 0x430598
xor eax, eax
xor ecx, ecx
cmp byte [ebx], 0x30
setne al
sete cl
add ebx, ecx
lea ecx, [eax*2 + 8]
mov byte [esp + 7], dl
movzx eax, dl
mov esi, SysReAllocString
mov dword [esp + 0x1c], eax
sub esi, eax
mov dword [esp + 0xc], 0
mov eax, esi
xor edx, edx
div ecx
mov dword [esp + 0x24], eax
mov dword [esp + 8], esi
not esi
mov dword [esp + 0x20], esi
xor ebp, ebp
mov dword [esp], 0
mov dword [esp + 0x10], ecx
mov esi, dword [esp + 0x3c]
inc ebx
jmp 0x430660
mov ebp, esi
mov dword [esp], 0
mov eax, dword [esp + 0x48]
test eax, eax
mov ecx, edx
je 0x43073d
mov dword [eax], 0x22
mov esi, ebx
inc ebx
mov edi, ebp
movsx eax, byte [ebx - 1]
lea ebp, [eax - 0x30]
cmp ebp, 0xa
jb 0x43068b
mov ecx, eax
and ecx, 0xffffffdf
add ecx, 0xffffffbf
cmp ecx, 0x19
mov ecx, dword [esp + 0x10]
ja 0x430772
or al, 0x20
movsx ebp, al
add ebp, 0xffffffa9
cmp ebp, ecx
jge 0x430772
mov edx, ecx
mov eax, edi
mov esi, dword [esp + 8]
xor eax, esi
mov ecx, dword [esp]
or eax, ecx
je 0x430640
mov dword [esp + 0x18], ebx
mov eax, edi
mov esi, edx
mul edx
cmp dword [esp + 0x24], edi
mov edi, 0
sbb edi, ecx
setae bl
jae 0x4306d0
mov dword [esp], 0
mov eax, dword [esp + 8]
mov edx, eax
jmp 0x4306dc
imul ecx, esi
add edx, ecx
mov dword [esp], edx
mov edx, dword [esp + 8]
mov dword [esp + 0x14], eax
mov esi, ebp
sar esi, 0x1f
mov edi, esi
mov eax, 0xffffffff
and edi, eax
mov eax, ebp
and eax, dword [esp + 0x20]
mov ecx, ebp
not ecx
and ecx, edx
sub ecx, eax
mov eax, 0
sbb eax, edi
mov edi, dword [esp + 0x14]
add ebp, edi
mov edx, dword [esp]
adc esi, edx
cmp ecx, edi
sbb eax, edx
setae al
mov ecx, dword [esp + 8]
jae 0x43071f
xor esi, esi
mov ebp, ecx
and bl, al
mov eax, dword [esp + 0x48]
test eax, eax
mov dword [esp], esi
je 0x430757
test bl, bl
jne 0x430757
mov ebx, dword [esp + 0x18]
mov ecx, dword [esp + 0x10]
jmp 0x430657
mov dword [esp + 0xc], 0x22
mov eax, ebx
mov ebp, esi
mov esi, ebx
mov dword [esp], 0
jmp 0x430630
test bl, bl
mov ecx, dword [esp + 0x10]
jne 0x430767
mov dword [esp + 0xc], 0x22
mov ebx, dword [esp + 0x18]
mov esi, ebx
jmp 0x430630
mov eax, dword [esp + 0x40]
test eax, eax
je 0x43077c
mov dword [eax], esi
mov ecx, dword [esp + 0x48]
test ecx, ecx
mov eax, dword [esp + 0xc]
je 0x43078a
mov eax, dword [ecx]
cmp eax, 0x22
jne 0x43079a
mov edi, SysReAllocString
sub edi, dword [esp + 0x1c]
jmp 0x4307a3
cmp byte [esp + 7], 0
jne 0x4307a3
neg edi
mov eax, edi
add esp, 0x28
pop esi
pop edi
pop ebx
pop ebp
ret