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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x120
push esi
push edi
xor edi, edi
mov esi, 0x3571
mov dword [ebp - 0x48], 0x1f7f
mov dword [ebp - 0x44], 0x5b15
mov dword [ebp - 0x40], 0x2ee8
mov dword [ebp - 4], edi
mov dword [ebp - 0x34], 0xd8
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x3c], edi
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x30], edi
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x38], 0xec
mov dword [ebp - 8], edi
cmp dword [ebp + 8], edi
je 0x40222a
mov ecx, dword [ebp + 0xc]
test ecx, ecx
je 0x40222a
mov eax, dword [ebp + 0x10]
push ebx
lea ebx, [eax + 0x3d8]
mov eax, dword [eax + 0xc0]
xor eax, dword [ebx]
cmp ecx, eax
jl 0x402229
call fcn.004032b0
mov ecx, dword [ebp + 0x10]
mov dword [ecx + 0x31c], eax
mov eax, 0x95a02569
imul esi
add edx, esi
sar edx, 7
mov esi, edx
shr esi, 0x1f
add esi, edx
jne 0x401cd6
mov eax, dword [ebx]
xor dword [ecx + 0x370], eax
mov edx, dword [ebp + 0x10]
mov ecx, dword [ecx + 0x370]
mov eax, dword [ebp + 0xc]
mov dword [edx + 0x9c], ebx
xor edx, edx
div ecx
mov ebx, dword [ebp + 0x10]
mov dword [ebx + 0xb8], eax
imul eax, ecx
mov dword [ebx + 0x3c4], eax
test eax, eax
je 0x401d6b
mov edi, dword [ebp + 8]
mov eax, dword [ebx + 0x9c]
inc esi
mov al, byte [eax]
xor byte [esi + edi - 1], al
movzx ecx, byte [esi + edi - 1]
mov eax, dword [ebx + 0x9c]
mov dl, byte [eax + 1]
xor dl, cl
mov byte [esi + edi - 1], dl
mov eax, dword [ebx + 0x9c]
mov cl, byte [eax + 2]
xor cl, dl
mov byte [esi + edi - 1], cl
mov eax, dword [ebx + 0x9c]
mov al, byte [eax + 3]
xor al, cl
mov byte [esi + edi - 1], al
cmp esi, dword [ebx + 0x3c4]
jb 0x401d22
xor edi, edi
mov eax, dword [ebx + 0x370]
xor esi, esi
dec eax
je 0x401e7a
lea ebx, [ebx]
mov eax, dword [ebx + 0x370]
dec eax
push eax
push 1
push ebx
call fcn.00403140
mov ecx, dword [ebp - 0x48]
add esp, 0xc
mov bl, al
test ecx, ecx
je 0x401db6
lea esp, [esp]
mov eax, 0x38e38e39
imul ecx
sar edx, 5
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
jne 0x401da0
mov dword [ebp - 0x48], ecx
mov edx, dword [ebp + 0x10]
xor eax, eax
jmp 0x401dc0
cmp bl, byte [eax + edx + 0x100]
je 0x401dd0
inc eax
cmp eax, esi
jbe 0x401dc0
jmp 0x401dd2
xor bl, bl
mov ecx, dword [ebp - 0x44]
test ecx, ecx
je 0x401df8
lea esp, [esp]
mov eax, 0xaf3addc7
imul ecx
add edx, ecx
sar edx, 7
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
jne 0x401de0
mov dword [ebp - 0x44], ecx
cmp edi, 0x7a42
jge 0x401e23
inc edi
mov eax, 0x38e38e39
imul edi
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
mov ecx, edi
lea eax, [eax + eax*8]
sub ecx, eax
jne 0x401e1b
inc edi
cmp edi, 0x7a42
jl 0x401e00
mov ecx, dword [ebp - 0x40]
test ecx, ecx
je 0x401e46
lea ebx, [ebx]
mov eax, 0x78787879
imul ecx
sar edx, 3
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
jne 0x401e30
mov dword [ebp - 0x40], ecx
mov eax, dword [ebp - 4]
cmp eax, 0x7842
mov ecx, 0x7842
cmovl eax, ecx
mov dword [ebp - 4], eax
test bl, bl
je 0x401e68
mov eax, dword [ebp + 0x10]
inc esi
mov byte [esi + eax + 0xff], bl
mov ebx, dword [ebp + 0x10]
mov eax, dword [ebx + 0x370]
dec eax
cmp esi, eax
jb 0x401d80
push 0x6a
lea eax, [ebp - 0xb3]
push 0
push eax
mov byte [ebp - 0xb4], 0
call fcn.00402ff0
lea eax, [ebp - 0xb4]
push eax
call fcn.00402820
add esp, 0x10
mov dword [ebp - 0x20], 0x49d566fb
mov dword [ebp - 0x1c], 0x13dbfc39
mov dword [ebp - 0x18], 0x422d05d9
mov dword [ebp - 0x14], 0x8f66838f
mov dword [ebp - 0x10], 0x94bbccaf
mov dword [ebp - 0xc], 0
xor ecx, ecx
lea esp, [esp]
inc ecx
mov eax, ecx
and eax, 0x80000007
jns 0x401edf
dec eax
or eax, 0xfffffff8
inc eax
jne 0x401ee2
inc ecx
cmp ecx, 0x5ab2
jl 0x401ed0
mov edi, dword [ebp + 0x10]
movq xmm0, qword [ebp - 0x20]
movq qword [edi + 0x3a4], xmm0
movq xmm0, qword [ebp - 0x18]
movq qword [edi + 0x3ac], xmm0
movq xmm0, qword [ebp - 0x10]
movq qword [edi + 0x3b4], xmm0
xor eax, eax
jmp 0x401f20
xor byte [ebp + eax - 0xb4], 0x28
inc eax
cmp eax, 0x69
jb 0x401f20
xor ecx, ecx
inc ecx
mov eax, ecx
and eax, 0x80000001
jns 0x401f3f
dec eax
or eax, 0xfffffffe
inc eax
jne 0x401f42
inc ecx
cmp ecx, 0x7de4
jl 0x401f30
mov ecx, 0x725d
nop
mov eax, 0x964fda6d
imul ecx
add edx, ecx
sar edx, 7
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
jne 0x401f50
xor eax, eax
mov dword [ebp - 4], eax
cmp dword [edi + 0x370], eax
jbe 0x402164
mov edx, 0x9d
jmp 0x401f80
movzx ebx, byte [eax + edi + 0x100]
imul ebx, dword [edi + 0xb8]
add ebx, dword [ebp + 8]
mov ecx, dword [ebp - 0x34]
mov eax, 0x440f
lea ebx, [ebx]
cmp ecx, 0x9d
cmovl ecx, edx
dec eax
jne 0x401fa0
mov dword [ebp - 0x34], ecx
mov ecx, dword [ebp - 0x28]
cmp ecx, 0x2518
jge 0x401fcc
mov eax, 0x2517
sub eax, ecx
shr eax, 1
lea ecx, [ecx + eax*2]
add ecx, 2
mov dword [ebp - 0x28], ecx
mov eax, dword [ebp - 0x3c]
nop
inc eax
cmp eax, 0x1633
jl 0x401fd0
mov esi, dword [ebp - 0x2c]
mov dword [ebp - 0x3c], eax
mov dword [edi + 0x374], ebx
cmp esi, 0x4087
jge 0x402009
mov ecx, 0x4086
sub ecx, esi
mov eax, 0xcccccccd
mul ecx
shr edx, 3
lea eax, [edx + edx*4]
lea esi, [esi + eax*2]
add esi, 0xa
mov dword [ebp - 0x2c], esi
push 0x6a
lea eax, [ebp - 0x11f]
push 0
push eax
mov byte [ebp - 0x120], 0
call fcn.00402ff0
mov eax, dword [ebp - 0x30]
add esp, 0xc
inc eax
cmp eax, 0x3acf
jl 0x402026
mov esi, dword [ebp - 0x24]
mov dword [ebp - 0x30], eax
cmp esi, 0x5e50
jge 0x40206f
lea esp, [esp]
inc esi
mov eax, 0x92492493
imul esi
add edx, esi
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
lea ecx, [eax*8]
sub ecx, eax
mov eax, esi
sub eax, ecx
jne 0x402064
inc esi
cmp esi, 0x5e50
jl 0x402040
mov dword [ebp - 0x24], esi
push 0x6a
lea eax, [ebp - 0x120]
push ebx
push eax
call fcn.00402fc0
mov ecx, 0x1a
lea esi, [ebp - 0xb4]
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebp - 0x38]
add esp, 0xc
movsb byte es:[edi], byte [esi]
mov eax, 0x225d
mov edx, 0x21
mov edi, edi
cmp ecx, edx
cmovl ecx, edx
dec eax
jne 0x4020a0
mov edi, dword [ebp + 0x10]
mov dword [ebp - 0x38], ecx
mov eax, dword [edi + 0x374]
call eax
mov esi, dword [ebp - 8]
cmp esi, 0x6a5c
jge 0x4020e9
inc esi
mov eax, 0x66666667
imul esi
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
mov ecx, esi
lea eax, [eax + eax*4]
sub ecx, eax
jne 0x4020de
add esi, 2
cmp esi, 0x6a5c
jl 0x4020c1
mov dword [ebp - 8], esi
push 0x6a
lea eax, [ebp - 0x120]
push eax
push ebx
call fcn.00402fc0
xor esi, esi
add esp, 0xc
cmp dword [edi + 0xb8], esi
jbe 0x40214c
mov eax, dword [edi + 0x9c]
inc esi
mov al, byte [eax + 3]
xor byte [esi + ebx - 1], al
movzx ecx, byte [esi + ebx - 1]
mov eax, dword [edi + 0x9c]
mov dl, byte [eax + 2]
xor dl, cl
mov byte [esi + ebx - 1], dl
mov eax, dword [edi + 0x9c]
mov cl, byte [eax + 1]
xor cl, dl
mov byte [esi + ebx - 1], cl
mov eax, dword [edi + 0x9c]
mov al, byte [eax]
xor al, cl
mov byte [esi + ebx - 1], al
cmp esi, dword [edi + 0xb8]
jb 0x402105
mov eax, dword [ebp - 4]
inc eax
mov dword [ebp - 4], eax
mov edx, 0x9d
cmp eax, dword [edi + 0x370]
jb 0x401f80
call fcn.004032b0
mov ecx, eax
mov dword [edi], ecx
mov ebx, 0x21b0
mov eax, 0x10624dd3
imul ebx
sar edx, 3
mov ebx, edx
shr ebx, 0x1f
add ebx, edx
jne 0x402172
lea ebx, [edi + 0x3a4]
mov esi, 0x341e
mov eax, 0xb92143fb
imul esi
add edx, esi
sar edx, 7
mov esi, edx
shr esi, 0x1f
add esi, edx
jne 0x402190
lea eax, [ecx - 2]
push eax
push dword [edi + 0x31c]
call fcn.004010f0
push 0xd6a6911
push ebx
call fcn.00401b40
add esp, 0x10
mov ecx, 0xbb1
mov eax, 0x97012e03
imul ecx
add edx, ecx
sar edx, 7
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
jne 0x4021c7
mov eax, dword [ebp + 0xc]
cdq
and edx, 0xff
mov ebx, 0x22cd
lea esi, [edx + eax]
sar esi, 8
mov eax, 0x1b4e81b5
imul ebx
sar edx, 3
mov ebx, edx
shr ebx, 0x1f
add ebx, edx
jne 0x4021f1
lea ebx, [edi + 0x3a4]
test esi, esi
je 0x402229
mov edi, dword [ebp + 8]
push ebx
push 0x100
push edi
call fcn.00403020
add esp, 0xc
add edi, 0x100
dec esi
jne 0x402211
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret