Function at 0x401280
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
push edi
push esi
push ebx
mov eax, dword [ebp + 8]
mov edx, dword [eax]
test edx, edx
jne 0x4012c8
movzx ecx, word [eax + 4]
mov edi, dword [ebp + 0x10]
imul edi, ecx
mov dword [ebp - 0x44], edi
mov ebx, edx
cmp ebx, edi
jae 0x401520
lea esi, [esi]
mov eax, dword [ebp + 8]
mov al, byte [eax + edx + 0xc]
mov ecx, dword [ebp + 0xc]
mov byte [ebx + ecx], al
inc edx
add ebx, dword [ebp + 0x10]
cmp dword [ebp - 0x44], ebx
ja 0x4012ac
jmp 0x401520
mov edi, dword [ebp + 8]
movzx eax, word [edi + 0xa]
mov dword [ebp - 0x1c], eax
mov edi, 1
mov ecx, eax
shl edi, cl
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x24], edx
mov dword [ebp - 0x44], 0x402780
xor edx, edx
mov edi, dword [ebp - 0x44]
mov ecx, 0x204
mov eax, edx
cld
rep stosb byte es:[edi], al
mov ebx, 1
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x34], 0x402782
mov dword [ebp - 0x38], edx
cmp ebx, 0x100
ja 0x4013d4
mov ecx, dword [ebp + 8]
movzx edx, word [ecx + 4]
mov edi, dword [ebp - 0x30]
mov eax, dword [ebp - 0x38]
movzx ecx, word [eax + edi]
sub edx, ecx
mov dword [ebp - 0x44], edx
mov edi, dword [ebp - 0x2c]
cmp edx, edi
jae 0x40134f
mov dword [ebp - 0x1c], 1
mov eax, edx
jmp 0x401346
inc dword [ebp - 0x1c]
mov eax, dword [ebp - 0x44]
mov ecx, dword [ebp - 0x1c]
shr eax, cl
test eax, eax
jne 0x401340
cmp dword [ebp - 0x44], 0
jg 0x401368
mov edi, dword [ebp - 0x30]
mov eax, dword [ebp - 0x38]
mov di, word [eax + edi]
mov eax, dword [ebp - 0x34]
mov word [eax], di
jmp 0x4013c6
mov dword [ebp - 0x44], 0
mov esi, dword [ebp - 0x44]
mov esi, esi
mov ecx, dword [ebp - 0x1c]
cmp dword [ebp - 0x44], ecx
jae 0x4013b4
mov edi, dword [ebp - 0x24]
mov dword [ebp - 0x3c], edi
inc edi
mov dword [ebp - 0x24], edi
mov edx, dword [ebp - 0x3c]
shr edx, 5
mov eax, dword [ebp - 0x3c]
and eax, 0x1f
mov ecx, 0x1f
sub ecx, eax
mov edi, dword [ebp + 8]
mov edx, dword [edi + edx*4 + 0xc]
shr edx, cl
mov eax, edx
and eax, 1
mov ecx, dword [ebp - 0x44]
shl eax, cl
or esi, eax
inc ecx
mov dword [ebp - 0x44], ecx
jmp 0x401374
mov edi, dword [ebp - 0x30]
mov eax, dword [ebp - 0x38]
mov cx, word [eax + edi]
add ecx, esi
mov edi, dword [ebp - 0x34]
mov word [edi], cx
add dword [ebp - 0x34], 2
add dword [ebp - 0x38], 2
inc ebx
jmp 0x40130c
mov dword [ebp - 0x20], 0
mov ebx, 0x7fffffff
mov dword [ebp - 0x24], 0x20
mov edi, dword [ebp + 8]
mov edi, dword [edi + 0xc]
mov dword [ebp - 0x1c], edi
mov eax, dword [ebp + 8]
movzx ecx, word [eax + 4]
mov dword [ebp - 0x44], ecx
mov esi, esi
cmp dword [ebp - 0x44], 0
je 0x401520
sub ebx, dword [ebp - 0x20]
mov edi, ebx
dec edi
mov dword [ebp - 0x28], edi
mov ebx, dword [ebp - 0x1c]
inc ebx
mov eax, dword [ebp + 8]
movzx ecx, word [eax + 4]
mov dword [ebp - 4], ecx
mov dword [ebp - 8], edi
mov eax, ebx
mul dword [ebp - 4]
div dword [ebp - 8]
mov esi, eax
mov ebx, 1
mov edx, 0x402780
movzx ecx, word [0x402782]
cmp esi, ecx
jb 0x401451
nop
cmp ebx, 0xff
ja 0x401451
inc ebx
movzx eax, word [edx + ebx*2]
cmp esi, eax
jae 0x401440
dec ebx
mov edi, dword [ebp + 0xc]
mov byte [edi], bl
mov eax, dword [ebp + 0x10]
add edi, eax
mov dword [ebp + 0xc], edi
lea ecx, [ebx*2]
mov dword [ebp - 0x40], ecx
movzx esi, word [ecx + 0x402780]
mov edi, dword [ebp - 0x28]
mov dword [ebp - 0xc], edi
mov eax, dword [ebp + 8]
movzx ecx, word [eax + 4]
mov dword [ebp - 0x10], ecx
mov eax, esi
mul dword [ebp - 0xc]
div dword [ebp - 0x10]
mov esi, eax
add dword [ebp - 0x20], esi
movzx ecx, word [ebx*2 + 0x402782]
mov edi, dword [ebp - 0x40]
movzx edx, word [edi + 0x402780]
sub ecx, edx
mov ebx, ecx
dec ebx
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp + 8]
movzx edi, word [ecx + 4]
mov dword [ebp - 0x18], edi
mov eax, ebx
mul dword [ebp - 0x14]
div dword [ebp - 0x18]
mov ebx, eax
add ebx, dword [ebp - 0x20]
sub dword [ebp - 0x1c], esi
mov eax, dword [ebp - 0x20]
xor eax, ebx
test eax, 0x40000000
jne 0x401518
mov ecx, dword [ebp - 0x24]
mov dword [ebp - 0x3c], ecx
inc ecx
mov dword [ebp - 0x24], ecx
mov edx, dword [ebp - 0x3c]
shr edx, 5
mov edi, dword [ebp - 0x3c]
and edi, 0x1f
mov esi, 0x1f
sub esi, edi
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + edx*4 + 0xc]
mov ecx, esi
shr edx, cl
and edx, 1
mov edi, dword [ebp - 0x1c]
add edi, edi
mov dword [ebp - 0x3c], edi
or edx, edi
mov eax, edx
and eax, 0x7fffffff
mov dword [ebp - 0x1c], eax
shl dword [ebp - 0x20], 1
add ebx, ebx
inc ebx
jmp 0x4014c4
dec dword [ebp - 0x44]
jmp 0x4013fc
mov ecx, dword [ebp + 8]
movzx edx, word [ecx + 4]
mov eax, edx
lea esp, [ebp - 0x54]
pop ebx
pop esi
pop edi
leave
ret