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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x74
push ebx
push esi
push edi
xor edi, edi
xor ebx, ebx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 8], ebx
mov esi, 0x5d68
mov dword [ebp - 0x14], 0x6aee
mov dword [ebp - 0x18], 0x154b
mov dword [ebp - 0x1c], 0x4b39
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x20], 0x2282
inc edi
mov eax, 0x92492493
imul edi
add edx, edi
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
lea ecx, [eax*8]
sub ecx, eax
mov eax, edi
sub eax, ecx
jne 0x401ddb
inc edi
cmp edi, 0x299f
jl 0x401db7
inc ebx
mov eax, ebx
and eax, 0x80000001
jns 0x401df2
dec eax
or eax, 0xfffffffe
inc eax
jne 0x401df5
inc ebx
cmp ebx, 0x358b
jl 0x401de3
mov eax, 0x7d36
dec eax
jne 0x401e02
cmp dword [ebp + 8], eax
je 0x402315
mov ecx, dword [ebp + 0xc]
test ecx, ecx
je 0x402315
mov ebx, dword [ebp + 0x10]
mov eax, dword [ebx + 0x90]
xor eax, dword [ebx + 0xd4]
lea edi, [ebx + 0xd4]
cmp ecx, eax
jl 0x402315
mov ebx, 0x2a67
jmp 0x401e40
mov eax, 0x60606061
imul ebx
sar edx, 5
mov ebx, edx
shr ebx, 0x1f
add ebx, edx
jne 0x401e40
call fcn.004032f0
mov ebx, dword [ebp + 0x10]
mov ecx, 0x1486
mov dword [ebx + 0x240], eax
mov eax, dword [edi]
xor dword [ebx + 0x2c0], eax
mov dword [ebx + 0xc8], edi
mov edx, 0x83
mov eax, 0x7a
mov edi, edi
cmp eax, 0x83
cmovg eax, edx
dec ecx
jne 0x401e80
mov ecx, dword [ebx + 0x2c0]
mov eax, dword [ebp + 0xc]
xor edx, edx
div ecx
xor edi, edi
mov dword [ebx + 4], eax
imul eax, ecx
mov dword [ebx + 0xc], eax
test eax, eax
je 0x401ef9
mov esi, dword [ebp + 8]
lea ebx, [ebx]
mov eax, dword [ebx + 0xc8]
inc edi
mov al, byte [eax]
xor byte [edi + esi - 1], al
movzx ecx, byte [edi + esi - 1]
mov eax, dword [ebx + 0xc8]
mov dl, byte [eax + 1]
xor dl, cl
mov byte [edi + esi - 1], dl
mov eax, dword [ebx + 0xc8]
mov cl, byte [eax + 2]
xor cl, dl
mov byte [edi + esi - 1], cl
mov eax, dword [ebx + 0xc8]
mov al, byte [eax + 3]
xor al, cl
mov byte [edi + esi - 1], al
cmp edi, dword [ebx + 0xc]
jb 0x401eb0
mov esi, 0x5d68
mov ecx, 0x708b
mov edi, edi
mov eax, 0x939a85c5
imul ecx
add edx, ecx
sar edx, 7
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
jne 0x401f00
mov ecx, 0x3be3
mov edx, 0x4c
mov eax, 0xe1
cmp eax, 0x4c
cmovl eax, edx
dec ecx
jne 0x401f24
mov ecx, 0x3ae6
mov eax, 0x9cc8e161
imul ecx
add edx, ecx
sar edx, 7
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
jne 0x401f32
mov eax, dword [ebx + 0x2c0]
xor edi, edi
dec eax
je 0x401ff4
mov eax, dword [ebx + 0x2c0]
dec eax
push eax
push 1
push ebx
call fcn.00403100
mov cl, al
mov eax, dword [ebp - 0x10]
add esp, 0xc
mov byte [ebp - 1], cl
inc eax
cmp eax, 0x3196
jl 0x401f71
mov dword [ebp - 0x10], eax
xor eax, eax
mov edi, edi
cmp cl, byte [ebx + eax + 0xe0]
je 0x401f90
inc eax
cmp eax, edi
jbe 0x401f80
jmp 0x401f94
mov byte [ebp - 1], 0
mov edx, dword [ebp - 8]
cmp edx, 0x6a21
jge 0x401fbf
mov ecx, 0x6a20
sub ecx, edx
mov eax, 0xcccccccd
mul ecx
shr edx, 3
lea eax, [edx + edx*4]
mov edx, dword [ebp - 8]
lea edx, [edx + eax*2]
add edx, 0xa
mov dword [ebp - 8], edx
test esi, esi
je 0x401fd6
mov eax, 0x2e8ba2e9
imul esi
sar edx, 5
mov esi, edx
shr esi, 0x1f
add esi, edx
jne 0x401fc3
mov al, byte [ebp - 1]
test al, al
je 0x401fe5
mov byte [ebx + edi + 0xe0], al
inc edi
mov eax, dword [ebx + 0x2c0]
dec eax
cmp edi, eax
jb 0x401f56
xor ecx, ecx
inc ecx
mov eax, ecx
and eax, 0x80000003
jns 0x402005
dec eax
or eax, 0xfffffffc
inc eax
jne 0x40200b
add ecx, ecx
jmp 0x402014
mov eax, ecx
cdq
sub eax, edx
sar eax, 1
add ecx, eax
cmp ecx, 0x3946
jl 0x401ff6
xorps xmm0, xmm0
lea edi, [ebx + 0x2c]
movq qword [ebp - 0x60], xmm0
mov eax, dword [ebp - 0x5c]
movq qword [ebp - 0x48], xmm0
mov dword [ebp - 0x74], 0xcf3d392f
mov dword [ebp - 0x70], 0x5943d8e8
movq xmm0, qword [ebp - 0x74]
movq qword [edi], xmm0
mov dword [ebp - 0x6c], 0x533c853c
mov dword [ebp - 0x68], 0x49c47e48
movq xmm0, qword [ebp - 0x6c]
movq qword [edi + 8], xmm0
mov dword [ebp - 0x64], 0xbfffc053
movq xmm0, qword [ebp - 0x64]
movq qword [edi + 0x10], xmm0
mov dword [edi + 0x18], eax
xor cl, cl
mov word [edi + 0x1c], 0
mov dword [ebp - 0x54], 0xddbadd03
mov dword [ebp - 0x50], 0x58b6d597
mov dword [ebp - 0x4c], 0x950bb3dd
mov dword [ebp - 0x40], 0
mov word [ebp - 0x3c], 0
mov byte [edi + 0x1e], cl
xor eax, eax
xor byte [ebp + eax - 0x54], 0x56
inc eax
cmp eax, 0xc
jb 0x4020a1
mov eax, 0x24c7
mov edx, 0x43
mov ecx, 0x9b
jmp 0x4020c0
cmp ecx, edx
cmovg ecx, edx
dec eax
jne 0x4020c0
xor ecx, ecx
lea ebx, [ebx]
mov eax, ecx
and eax, 0x80000007
jns 0x4020de
dec eax
or eax, 0xfffffff8
inc eax
jne 0x4020e5
add ecx, 3
jmp 0x4020e6
inc ecx
cmp ecx, 0x2e93
jl 0x4020d0
xor esi, esi
mov dword [ebp - 8], esi
cmp dword [ebx + 0x2c0], esi
jbe 0x4022a1
nop
mov ecx, dword [ebp - 0x14]
test ecx, ecx
je 0x402126
jmp 0x402110
mov eax, 0x4da637d
imul ecx
sar edx, 2
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
jne 0x402110
mov dword [ebp - 0x14], ecx
movzx ecx, byte [esi + ebx + 0xe0]
imul ecx, dword [ebx + 4]
add ecx, dword [ebp + 8]
mov esi, dword [ebp - 0x18]
mov dword [ebp - 0x10], ecx
test esi, esi
je 0x402158
nop
mov eax, 0xf2b9d649
imul esi
add edx, esi
sar edx, 7
mov esi, edx
shr esi, 0x1f
add esi, edx
jne 0x402140
mov dword [ebp - 0x18], esi
mov eax, dword [ebp - 0x4c]
mov dword [ebx + 0x1f8], ecx
movq xmm0, qword [ecx]
mov esi, dword [ecx + 0x18]
mov di, word [ecx + 0x1c]
mov bl, byte [ecx + 0x1e]
movq qword [ebp - 0x28], xmm0
movq xmm0, qword [ecx + 8]
movq qword [ebp - 0x30], xmm0
movq xmm0, qword [ecx + 0x10]
movq qword [ebp - 0x38], xmm0
movq xmm0, qword [ebp - 0x54]
movq qword [ecx], xmm0
mov dword [ecx + 8], eax
mov eax, dword [ebp + 0x10]
mov eax, dword [eax + 0x1f8]
call eax
mov eax, dword [ebp - 0x10]
movq xmm0, qword [ebp - 0x28]
movq qword [eax], xmm0
movq xmm0, qword [ebp - 0x30]
movq qword [eax + 8], xmm0
movq xmm0, qword [ebp - 0x38]
movq qword [eax + 0x10], xmm0
mov dword [eax + 0x18], esi
mov word [eax + 0x1c], di
mov edi, eax
xor esi, esi
mov byte [edi + 0x1e], bl
mov ebx, dword [ebp + 0x10]
cmp dword [ebx + 4], esi
jbe 0x402219
mov eax, dword [ebx + 0xc8]
inc esi
mov al, byte [eax + 3]
xor byte [esi + edi - 1], al
movzx ecx, byte [esi + edi - 1]
mov eax, dword [ebx + 0xc8]
mov dl, byte [eax + 2]
xor dl, cl
mov byte [esi + edi - 1], dl
mov eax, dword [ebx + 0xc8]
mov cl, byte [eax + 1]
xor cl, dl
mov byte [esi + edi - 1], cl
mov eax, dword [ebx + 0xc8]
mov al, byte [eax]
xor al, cl
mov byte [esi + edi - 1], al
cmp esi, dword [ebx + 4]
jb 0x4021d5
mov ecx, dword [ebp - 0x1c]
test ecx, ecx
je 0x402238
mov eax, 0xb21642c9
imul ecx
add edx, ecx
sar edx, 7
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
jne 0x402220
mov dword [ebp - 0x1c], ecx
mov edi, dword [ebp - 0xc]
cmp edi, 0x65c7
jge 0x40226c
inc edi
mov eax, 0x66666667
imul edi
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
lea ecx, [eax + eax*4]
add ecx, ecx
mov eax, edi
sub eax, ecx
jne 0x402261
inc edi
cmp edi, 0x65c7
jl 0x402243
mov dword [ebp - 0xc], edi
mov edi, dword [ebp - 0x20]
test edi, edi
je 0x40228b
mov eax, 0x8ca29c05
imul edi
add edx, edi
sar edx, 7
mov edi, edx
shr edi, 0x1f
add edi, edx
jne 0x402273
mov dword [ebp - 0x20], edi
mov esi, dword [ebp - 8]
inc esi
mov dword [ebp - 8], esi
cmp esi, dword [ebx + 0x2c0]
jb 0x402100
lea edi, [ebx + 0x2c]
call fcn.004032f0
lea ecx, [eax - 2]
push ecx
push dword [ebx + 0x240]
mov dword [ebx + 0x204], eax
call fcn.00401120
push 0x1e5cf064
push edi
call fcn.00401c80
mov eax, dword [ebp + 0xc]
cdq
and edx, 0xff
add esp, 0x10
lea esi, [edx + eax]
sar esi, 8
test esi, esi
je 0x4022f8
mov ebx, dword [ebp + 8]
push edi
push 0x100
push ebx
call fcn.00402fd0
add esp, 0xc
add ebx, 0x100
dec esi
jne 0x4022e0
mov ecx, 0x4310
lea ecx, [ecx]
mov eax, 0x82082083
imul ecx
add edx, ecx
sar edx, 5
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
jne 0x402300
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret