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

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff0
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
sub esp, 0x268
push esi
push edi
mov edx, dword [0x512180]
mov esi, 5
nop dword [eax]
mov eax, dword [0x414db8]
xor ecx, ecx
mov dword [ebp - 0x30], eax
mov edi, 0x1f
mov ax, word [0x414dbc]
mov word [ebp - 0x2c], ax
mov al, byte [0x414dbe]
mov byte [ebp - 0x2a], al
movups xmm0, xmmword [0x414da8]
movups xmmword [ebp - 0x40], xmm0
cmp edx, 2
jl 0x4011a4
movaps xmm0, xmmword [str.9999999999999999]
movaps xmm4, xmmword [0x414e30]
movaps xmm3, xmmword [0x414e80]
movaps xmm6, xmmword [0x414e50]
movaps xmmword [ebp - 0x60], xmm0
mov edx, dword [ebp - 0x60]
movd xmm5, esi
movd xmm7, edi
movd xmm0, ecx
lea eax, [ecx + 4]
pshufd xmm2, xmm0, 0
paddd xmm2, xmm4
movaps xmm1, xmm2
movaps xmm0, xmm2
punpckhdq xmm0, xmm2
punpckldq xmm1, xmm2
pmuldq xmm0, xmm3
pmuldq xmm1, xmm3
shufps xmm1, xmm0, 0xdd
paddd xmm1, xmm2
psrad xmm1, xmm5
movaps xmm0, xmm1
psrld xmm0, xmm7
paddd xmm0, xmm1
pmulld xmm0, xmm6
psubd xmm2, xmm0
pshuflw xmm0, xmm2, 0xd8
pshufhw xmm0, xmm0, 0xd8
pshufd xmm1, xmm0, 0xd8
pand xmm1, xmmword [0x414e60]
packuswb xmm1, xmm1
movd xmm0, edx
paddb xmm1, xmm0
movd xmm0, dword [ebp + ecx - 0x40]
pxor xmm1, xmm0
movd xmm0, eax
pshufd xmm2, xmm0, 0
movd dword [ebp + ecx - 0x40], xmm1
paddd xmm2, xmm4
movaps xmm1, xmm2
movaps xmm0, xmm2
punpckldq xmm1, xmm2
punpckhdq xmm0, xmm2
pmuldq xmm0, xmm3
pmuldq xmm1, xmm3
shufps xmm1, xmm0, 0xdd
paddd xmm1, xmm2
psrad xmm1, xmm5
movaps xmm0, xmm1
psrld xmm0, xmm7
paddd xmm0, xmm1
pmulld xmm0, xmm6
psubd xmm2, xmm0
pshuflw xmm0, xmm2, 0xd8
pshufhw xmm0, xmm0, 0xd8
pshufd xmm1, xmm0, 0xd8
pand xmm1, xmmword [0x414e60]
packuswb xmm1, xmm1
movd xmm0, edx
paddb xmm1, xmm0
movd xmm0, dword [ebp + ecx - 0x3c]
pxor xmm1, xmm0
movd dword [ebp + ecx - 0x3c], xmm1
add ecx, 8
cmp ecx, 0x10
jl 0x4010a0
cmp ecx, 0x17
jge 0x4011d1
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dl, al
shl dl, 3
sub dl, al
mov al, cl
shl dl, 3
sub al, dl
add al, 0x39
xor byte [ebp + ecx - 0x40], al
inc ecx
cmp ecx, 0x17
jl 0x4011a4
lea esi, [ebp - 0x40]
lea ecx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x4011d7
sub esi, ecx
xor edi, edi
xor ecx, ecx
mov eax, ecx
mov byte [ebp + ecx - 0x160], cl
cdq
idiv esi
mov al, byte [ebp + edx - 0x40]
mov byte [ebp + ecx - 0x260], al
inc ecx
cmp ecx, 0x100
jl 0x4011e4
xor esi, esi
nop word [eax + eax]
mov dl, byte [ebp + esi - 0x160]
movzx eax, byte [ebp + esi - 0x260]
add edi, eax
movzx ecx, dl
add edi, ecx
and edi, 0x800000ff
jns 0x401236
dec edi
or edi, 0xffffff00
inc edi
mov al, byte [ebp + edi - 0x160]
mov byte [ebp + edi - 0x160], dl
mov byte [ebp + esi - 0x160], al
inc esi
cmp esi, 0x100
jl 0x401210
xor esi, esi
xor edx, edx
mov edi, edx
nop word [eax + eax]
inc edi
and edi, 0x800000ff
jns 0x401271
dec edi
or edi, 0xffffff00
inc edi
mov cl, byte [ebp + edi - 0x160]
movzx eax, cl
add esi, eax
and esi, 0x800000ff
jns 0x40128d
dec esi
or esi, 0xffffff00
inc esi
mov al, byte [ebp + esi - 0x160]
mov byte [ebp + esi - 0x160], cl
mov byte [ebp + edi - 0x160], al
movzx ecx, byte [ebp + esi - 0x160]
movzx eax, al
add ecx, eax
movzx eax, cl
movzx eax, byte [ebp + eax - 0x160]
xor byte [edx + 0x417880], al
inc edx
cmp edx, 0xfa800
jl 0x401260
sub esp, 0x18
call fcn.00402100
mov edx, dword [0x512180]
mov edi, eax
add esp, 0x18
mov dword [ebp - 0x14], edi
mov esi, 5
test edi, edi
je 0x401040
mov eax, dword [str.uUZX]
xor ecx, ecx
mov dword [ebp - 9], eax
mov al, byte [0x414dfc]
mov byte [ebp - 5], al
mov dword [ebp - 4], ecx
mov eax, 0x24924925
mul ecx
mov eax, ecx
sub eax, edx
shr eax, 1
add eax, edx
shr eax, 5
mov cl, al
shl cl, 3
sub cl, al
mov al, byte [ebp - 4]
shl cl, 3
sub al, cl
mov ecx, dword [ebp - 4]
add al, 0x39
xor byte [ebp + ecx - 9], al
inc ecx
mov dword [ebp - 4], ecx
cmp ecx, esi
jl 0x401301
mov ecx, dword [edi + 4]
lea eax, [ebp - 9]
mov dword [ebp - 0x48], eax
mov eax, dword [edi]
mov dword [ebp - 0x10], ecx
cmp dword [eax + 0x7c], 0
je 0x401473
mov esi, dword [eax + 0x78]
add esi, ecx
mov edx, dword [esi + 0x18]
test edx, edx
je 0x401473
cmp dword [esi + 0x14], 0
je 0x401473
lea eax, [ebp - 9]
shr eax, 0x10
test eax, eax
jne 0x401387
lea eax, [ebp - 9]
movzx edx, ax
mov eax, dword [esi + 0x10]
cmp edx, eax
jb 0x401473
sub edx, eax
jmp 0x401449
mov eax, dword [edi + 0x30]
test eax, eax
jne 0x401429
mov eax, dword [esi + 0x24]
mov edi, dword [esi + 0x20]
add eax, ecx
mov dword [ebp - 0x44], eax
add edi, ecx
lea eax, [edx*8]
push eax
call fcn.00405f7d
mov ecx, eax
add esp, 4
mov eax, dword [ebp - 0x14]
mov dword [eax + 0x30], ecx
test ecx, ecx
jne 0x4013c8
push 0xe
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x40102e
mov eax, dword [esi + 0x18]
mov dword [ebp - 4], 0
test eax, eax
je 0x40140f
mov edx, dword [ebp - 0x44]
nop dword [eax]
mov eax, dword [edi]
lea edi, [edi + 4]
add eax, dword [ebp - 0x10]
lea edx, [edx + 2]
inc dword [ebp - 4]
lea ecx, [ecx + 8]
mov dword [ecx - 8], eax
mov ax, word [edx - 2]
mov word [ecx - 4], ax
mov eax, dword [ebp - 4]
cmp eax, dword [esi + 0x18]
jb 0x4013e0
mov edi, dword [ebp - 0x14]
mov eax, dword [esi + 0x18]
mov ecx, dword [edi + 0x30]
jmp 0x401412
mov edi, dword [ebp - 0x14]
push 0x402620
push 8
push eax
push ecx
call fcn.004058e0
mov edx, dword [esi + 0x18]
add esp, 0x10
mov eax, dword [edi + 0x30]
push 0x402620
push 8
push edx
push eax
lea eax, [ebp - 0x48]
push eax
call fcn.00405dce
add esp, 0x14
test eax, eax
je 0x401473
movzx edx, word [eax + 4]
mov ecx, dword [ebp - 0x10]
mov eax, dword [esi + 0x14]
cmp edx, eax
ja 0x401473
mov eax, dword [esi + 0x1c]
lea eax, [eax + edx*4]
mov eax, dword [eax + ecx]
add eax, ecx
je 0x40102e
call eax
mov ecx, edi
call fcn.00402660
pop edi
pop esi
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
push 0x7f
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x40102e
jmp 0x401010