Function at 0x403d9b
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
lea eax, [ecx + edx]
mov dword [ebp - 0xc], ecx
mov edx, dword [ebp + 8]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp + 0xc]
add eax, edx
push ebx
push esi
lea esi, [edx + 1]
mov dword [ebp - 8], eax
movzx edx, byte [ecx]
xor ebx, ebx
movzx eax, byte [ecx + 1]
shl edx, 8
or edx, eax
mov eax, dword [ebp - 0x18]
add eax, 0xfffffffe
mov dword [ebp - 4], eax
push edi
mov edi, ecx
cmp ecx, eax
jae 0x403fe0
movzx eax, byte [edi + 2]
shl edx, 8
or edx, eax
imul eax, edx, 5
mov ecx, edx
shr ecx, 5
xor ecx, edx
mov dword [ebp - 0x24], edx
shr ecx, 3
sub ecx, eax
mov eax, dword [ebp + 0x10]
and ecx, 0xffff
mov edx, dword [eax + ecx*4]
mov eax, edi
add edx, dword [ebp - 0xc]
sub eax, dword [ebp - 0xc]
mov dword [ebp + 0xc], edx
mov edx, dword [ebp + 0x10]
mov dword [edx + ecx*4], eax
mov eax, edi
mov edx, dword [ebp + 0xc]
sub eax, edx
dec eax
mov dword [ebp - 0x14], eax
cmp eax, 0x2000
jge 0x403fed
cmp edx, dword [ebp - 0xc]
jbe 0x403fed
mov al, byte [edx + 2]
cmp al, byte [edi + 2]
jne 0x403fed
mov eax, dword [ebp + 0xc]
lea ecx, [edi + 1]
movzx edx, byte [edx + 1]
mov dword [ebp - 0x20], ecx
movzx ecx, byte [ecx]
movzx eax, byte [eax]
shl edx, 8
or edx, eax
shl ecx, 8
movzx eax, byte [edi]
or ecx, eax
cmp edx, ecx
jne 0x403fed
mov eax, dword [ebp - 4]
mov ecx, 0x108
sub eax, edi
cmp eax, ecx
push 2
cmova eax, ecx
mov dword [ebp - 0x10], eax
lea eax, [esi + 4]
pop edx
cmp eax, dword [ebp - 8]
jb 0x403e9b
xor ecx, ecx
mov eax, esi
test ebx, ebx
sete cl
sub eax, ecx
add eax, 4
cmp eax, dword [ebp - 8]
jae 0x404014
mov eax, esi
lea ecx, [ebx - 1]
sub eax, ebx
mov byte [eax - 1], cl
xor eax, eax
mov ecx, dword [ebp + 0xc]
test ebx, ebx
sete al
sub esi, eax
cmp dword [ebp - 0x10], 0x10
mov dword [ebp - 0x1c], esi
jbe 0x403f86
mov al, byte [ecx + 3]
push 3
pop edx
cmp al, byte [edi + 3]
jne 0x403f9e
mov al, byte [ecx + 4]
push 4
pop edx
cmp al, byte [edi + 4]
jne 0x403f9e
mov al, byte [ecx + 5]
push 5
pop edx
cmp al, byte [edi + 5]
jne 0x403f9e
mov al, byte [ecx + 6]
push 6
pop edx
cmp al, byte [edi + 6]
jne 0x403f9e
mov al, byte [ecx + 7]
push 7
pop edx
cmp al, byte [edi + 7]
jne 0x403f9e
mov al, byte [ecx + 8]
push 8
pop edx
cmp al, byte [edi + 8]
jne 0x403f9e
mov al, byte [ecx + 9]
push 9
pop edx
cmp al, byte [edi + 9]
jne 0x403f9e
mov al, byte [ecx + 0xa]
push 0xa
pop edx
cmp al, byte [edi + 0xa]
jne 0x403f9e
mov al, byte [ecx + 0xb]
push 0xb
pop edx
cmp al, byte [edi + 0xb]
jne 0x403f9e
mov al, byte [ecx + 0xc]
push 0xc
pop edx
cmp al, byte [edi + 0xc]
jne 0x403f9e
mov al, byte [ecx + 0xd]
push 0xd
pop edx
cmp al, byte [edi + 0xd]
jne 0x403f9e
mov al, byte [ecx + 0xe]
push 0xe
pop edx
cmp al, byte [edi + 0xe]
jne 0x403f9e
mov al, byte [ecx + 0xf]
push 0xf
pop edx
cmp al, byte [edi + 0xf]
jne 0x403f9e
mov al, byte [ecx + 0x10]
push 0x10
pop edx
cmp al, byte [edi + 0x10]
jne 0x403f9e
mov al, byte [ecx + 0x11]
push 0x11
pop edx
cmp al, byte [edi + 0x11]
jne 0x403f9e
mov al, byte [ecx + 0x12]
push 0x12
pop edx
cmp al, byte [edi + 0x12]
jne 0x403f9e
mov esi, dword [ebp - 0x10]
lea ebx, [edx + edi]
sub ecx, edi
inc edx
inc ebx
cmp edx, esi
jae 0x403f9b
mov al, byte [ecx + ebx]
cmp al, byte [ebx]
je 0x403f8e
mov esi, dword [ebp - 0x1c]
mov ebx, dword [ebp - 0x14]
sub edx, 2
cmp edx, 7
jae 0x403fba
mov ecx, ebx
mov al, dl
sar ecx, 8
shl al, 5
add cl, al
mov byte [esi], cl
inc esi
jmp 0x403fcc
mov eax, ebx
sar eax, 8
sub al, 0x20
mov byte [esi], al
lea eax, [edx - 7]
mov byte [esi + 1], al
add esi, 2
mov edi, dword [ebp - 0x20]
mov eax, dword [ebp - 4]
inc edi
mov byte [esi], bl
add edi, edx
xor ebx, ebx
add esi, 2
cmp edi, eax
jb 0x404008
lea eax, [esi + 3]
cmp eax, dword [ebp - 8]
ja 0x404014
mov ecx, dword [ebp - 0x18]
jmp 0x40402b
cmp esi, dword [ebp - 8]
jae 0x404014
mov al, byte [edi]
inc ebx
mov byte [esi], al
inc esi
mov eax, dword [ebp - 4]
inc edi
cmp ebx, 0x20
jne 0x404008
mov byte [esi - 0x21], 0x1f
xor ebx, ebx
inc esi
cmp edi, eax
jae 0x403fe0
mov edx, dword [ebp - 0x24]
jmp 0x403ddc
xor eax, eax
jmp 0x404047
mov al, byte [edi]
inc ebx
mov byte [esi], al
inc esi
inc edi
cmp ebx, 0x20
jne 0x40402b
mov byte [esi - 0x21], 0x1f
xor ebx, ebx
inc esi
cmp edi, ecx
jb 0x404018
mov ecx, esi
lea edx, [ebx - 1]
sub ecx, ebx
mov byte [ecx - 1], dl
xor ecx, ecx
test ebx, ebx
sete cl
sub esi, ecx
sub esi, dword [ebp + 8]
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret