Function at 0x417961
Capabilities:
Encode data using xor
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x68
mov ecx, dword [ebp + 0x10]
push ebx
xor ebx, ebx
push esi
cmp ecx, ebx
push edi
mov dword [ebp - 8], 3
je 0x417983
mov eax, dword [ecx]
cmp eax, ebx
jl 0x417983
mov dword [ebp - 8], eax
mov eax, dword [ebp + 0xc]
cmp eax, ebx
je 0x41798d
and byte [eax], 0
cmp ecx, ebx
je 0x417993
mov dword [ecx], ebx
mov eax, dword [ebp + 0x14]
cmp eax, ebx
je 0x41799c
mov dword [eax], ebx
mov esi, dword [ebp + 8]
cmp esi, ebx
je 0x417b91
push esi
call fcn.00481630
cmp eax, 0x17
pop ecx
jne 0x417b91
and byte [ebp - 0x44], 0
xor eax, eax
lea edi, [ebp - 0x43]
push esi
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
xor edi, edi
call fcn.00481630
test eax, eax
pop ecx
jbe 0x4179ff
movsx eax, byte [edi + esi]
push eax
call fcn.00482ffc
cmp al, 0x2d
pop ecx
je 0x4179f3
cmp al, 0x30
jl 0x4179f3
cmp al, 0x5a
jg 0x4179f3
mov byte [ebp + ebx - 0x44], al
inc ebx
cmp ebx, 0x14
jge 0x4179ff
push esi
inc edi
call fcn.00481630
cmp edi, eax
pop ecx
jb 0x4179d2
lea eax, [ebp - 0x44]
push eax
call fcn.00481630
cmp eax, 0x14
pop ecx
jb 0x417b91
and byte [ebp - 0x2c], 0
xor eax, eax
lea edi, [ebp - 0x2b]
push 8
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
pop ecx
mov esi, 0x4bba0c
lea edi, [ebp - 0x68]
push 0
rep movsd dword es:[edi], dword [esi]
lea eax, [ebp - 0x68]
push 0x49b2d0
push eax
movsw word es:[edi], word [esi]
call fcn.0041aed2
add esp, 0xc
xor esi, esi
movsx eax, byte [ebp + esi - 0x44]
push eax
lea eax, [ebp - 0x68]
push eax
call fcn.00482f40
pop ecx
test eax, eax
pop ecx
je 0x417a6a
lea ecx, [ebp - 0x68]
sub al, cl
mov byte [ebp + esi - 0x2c], al
inc esi
cmp esi, 0x14
jl 0x417a46
lea eax, [ebp - 0x68]
push eax
call fcn.0041aec0
pop ecx
xor eax, eax
push 0x1e
mov esi, 0x20000000
mov dl, 0x10
lea ecx, [ebp - 0x2c]
pop edi
test byte [ecx], dl
je 0x417a89
or eax, esi
shr esi, 1
shr dl, 1
jne 0x417a92
mov dl, 0x10
inc ecx
dec edi
jne 0x417a83
mov edx, eax
mov ecx, 0xffff
or eax, 0x10000
and edx, ecx
shr eax, 0x10
push 6
mov dword [ebp - 0xc], edx
mov edi, eax
pop esi
imul edi, edi, 0x5d588b65
inc edi
xor edx, edx
mov eax, edi
mov ebx, ecx
div ebx
mov eax, edi
shr eax, 0x16
shr edx, 6
xor dl, al
and dl, 0x1f
xor byte [ebp + esi - 0x2c], dl
inc esi
cmp esi, 0x14
jl 0x417aae
and byte [ebp - 0x18], 0
xor eax, eax
and dword [ebp + 8], 0
lea edi, [ebp - 0x17]
stosd dword es:[edi], eax
push 6
stosd dword es:[edi], eax
mov al, 0x80
pop esi
mov dl, byte [ebp + esi - 0x2c]
mov bl, 0x10
mov dword [ebp - 4], 5
test bl, dl
je 0x417b02
mov edi, dword [ebp + 8]
lea edi, [ebp + edi - 0x18]
or byte [edi], al
shr al, 1
jne 0x417b0b
inc dword [ebp + 8]
mov al, 0x80
shr bl, 1
dec dword [ebp - 4]
jne 0x417af5
inc esi
cmp esi, 0x14
jl 0x417ae8
mov eax, ecx
xor esi, esi
mov edx, eax
shr edx, 8
movzx edx, dl
shl eax, 8
or edx, eax
movzx eax, byte [ebp + esi - 0x18]
xor eax, edx
movzx edx, al
shr edx, 4
xor eax, edx
mov edx, eax
shl edx, 0xc
xor eax, edx
mov edx, eax
and edx, 0xff
shl edx, 5
xor eax, edx
inc esi
cmp esi, 9
jl 0x417b1c
and eax, ecx
cmp dword [ebp - 0xc], eax
jne 0x417b91
mov eax, dword [ebp + 0x10]
mov edx, dword [ebp - 0x18]
test eax, eax
je 0x417b65
mov dword [eax], edx
mov ecx, dword [ebp + 0x14]
mov eax, dword [ebp - 0x14]
test ecx, ecx
je 0x417b71
mov dword [ecx], eax
cmp edx, dword [ebp - 8]
jne 0x417b91
test eax, eax
jl 0x417b91
cmp eax, 0x10c8d5
jg 0x417b91
push 0xb
cdq
pop ecx
idiv ecx
test edx, edx
jne 0x417b91
mov eax, dword [ebp + 0xc]
mov byte [eax], 1
pop edi
pop esi
pop ebx
leave
ret