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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14c
push ebx
push esi
push edi
xor edi, edi
xor eax, eax
mov ecx, 0x706
mov dword [ebp - 0x10], eax
mov dword [ebp - 4], 0x7a2a
mov dword [ebp - 0x40], 0x39
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x44], 0x75d3
mov dword [ebp - 0x4c], 0x56cd
mov dword [ebp - 0x38], 0x7a53
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x48], eax
mov dword [ebp - 8], eax
mov dword [ebp - 0x54], 0x48d3
mov dword [ebp - 0x3c], 0x66dd
mov eax, 0xd62b80d7
imul ecx
add edx, ecx
sar edx, 7
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
jne 0x401cc5
cmp dword [ebp + 8], edi
je 0x40230c
mov edx, dword [ebp + 0xc]
test edx, edx
je 0x40230c
mov eax, dword [ebp + 0x10]
lea ecx, [eax + 0x308]
mov eax, dword [eax + 0x1bc]
xor eax, dword [ecx]
cmp edx, eax
jl 0x40230c
mov ecx, 0x6fa6
mov edx, 0x89
mov eax, 0x14
cmp eax, 0x89
cmovl eax, edx
dec ecx
jne 0x401d16
mov ebx, 0x3ea5
mov eax, 0x60606061
imul ebx
sar edx, 6
mov ebx, edx
shr ebx, 0x1f
add ebx, edx
jne 0x401d26
call fcn.00403490
mov ecx, dword [ebp + 0x10]
mov dword [ecx + 0x3fc], eax
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 0x401d67
add edi, 2
cmp edi, 0x65c
jl 0x401d47
mov edx, dword [ebp + 0x10]
mov dword [ebp - 0x14], 0x6f
mov eax, dword [edx + 0x308]
xor dword [edx + 0x404], eax
mov edi, dword [edx + 0x404]
mov eax, dword [ebp + 0xc]
lea ecx, [edx + 0x308]
mov dword [edx + 0x3a4], ecx
xor edx, edx
div edi
mov ecx, dword [ebp + 0x10]
mov edx, eax
mov dword [ecx + 0x344], edx
mov ecx, 0x5695
mov eax, 0x4d
cmp eax, 0x6f
cmovg eax, dword [ebp - 0x14]
dec ecx
jne 0x401db3
mov ecx, dword [ebp + 0x10]
imul edx, edi
mov dword [ebp - 0x14], edx
mov dword [ecx + 0x330], edx
mov ebx, 0x4829
mov eax, 0x3e88cb3d
imul ebx
sar edx, 5
mov ebx, edx
shr ebx, 0x1f
add ebx, edx
jne 0x401dd1
xor edi, edi
mov ebx, 0x184f
cmp dword [ebp - 0x14], edi
jbe 0x401e43
mov ebx, dword [ebp + 8]
mov esi, ecx
mov eax, dword [esi + 0x3a4]
inc edi
mov al, byte [eax]
xor byte [edi + ebx - 1], al
movzx ecx, byte [edi + ebx - 1]
mov eax, dword [esi + 0x3a4]
mov dl, byte [eax + 1]
xor dl, cl
mov byte [edi + ebx - 1], dl
mov eax, dword [esi + 0x3a4]
mov cl, byte [eax + 2]
xor cl, dl
mov byte [edi + ebx - 1], cl
mov eax, dword [esi + 0x3a4]
mov al, byte [eax + 3]
xor al, cl
mov byte [edi + ebx - 1], al
cmp edi, dword [esi + 0x330]
jb 0x401df5
mov ebx, 0x184f
mov ecx, esi
mov esi, 0x2b51
jmp 0x401e50
mov eax, 0x4325c53f
imul esi
sar edx, 4
mov esi, edx
shr esi, 0x1f
add esi, edx
jne 0x401e50
mov eax, dword [ecx + 0x404]
xor edi, edi
mov esi, 0x6247
dec eax
je 0x401f2a
jmp 0x401e80
mov eax, dword [ebp - 0x10]
cmp eax, 0x6bed
jge 0x401eab
mov ecx, 0x6bec
sub ecx, eax
mov eax, 0xaaaaaaab
mul ecx
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp + 0x10]
shr edx, 1
add eax, edx
lea eax, [eax + edx*2]
add eax, 3
mov dword [ebp - 0x10], eax
test esi, esi
je 0x401ec3
nop
mov eax, 0x2e8ba2e9
imul esi
sar edx, 4
mov esi, edx
shr esi, 0x1f
add esi, edx
jne 0x401eb0
mov eax, dword [ecx + 0x404]
dec eax
push eax
push 1
push ecx
call fcn.00403310
mov edx, dword [ebp + 0x10]
add esp, 0xc
mov cl, al
xor eax, eax
lea ecx, [ecx]
cmp cl, byte [edx + eax + 0x1fc]
je 0x401ef0
inc eax
cmp eax, edi
jbe 0x401ee0
jmp 0x401ef2
xor cl, cl
test ebx, ebx
je 0x401f0c
mov eax, 0x43b3d5b
imul ebx
sar edx, 2
mov ebx, edx
shr ebx, 0x1f
add ebx, edx
jne 0x401ef6
mov edx, dword [ebp + 0x10]
test cl, cl
je 0x401f18
mov byte [edx + edi + 0x1fc], cl
inc edi
mov ecx, dword [ebp + 0x10]
mov eax, dword [ecx + 0x404]
dec eax
cmp edi, eax
jb 0x401e80
push 0x78
lea eax, [ebp - 0xcf]
push 0
push eax
mov byte [ebp - 0xd0], 0
call fcn.004031d0
lea eax, [ebp - 0xd0]
push eax
call fcn.004029d0
add esp, 0x10
mov eax, 0x2aaaaaab
imul dword [ebp - 4]
sar edx, 3
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [ebp - 4], eax
jne 0x401f50
xor ebx, ebx
lea esp, [esp]
inc ebx
mov eax, 0x92492493
imul ebx
add edx, ebx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
lea ecx, [eax*8]
sub ecx, eax
mov eax, ebx
sub eax, ecx
jne 0x401f96
add ebx, 2
cmp ebx, 0x7079
jl 0x401f70
mov edi, dword [ebp + 0x10]
xorps xmm0, xmm0
movq qword [ebp - 0x20], xmm0
lea ebx, [edi + 0xcc]
mov dword [ebp - 0x34], 0x20436847
mov dword [ebp - 0x30], 0x3a22333f
movq xmm0, qword [ebp - 0x34]
movq qword [ebx], xmm0
mov dword [ebp - 0x2c], 0x733b95ae
mov dword [ebp - 0x28], 0xd392f423
movq xmm0, qword [ebp - 0x2c]
movq qword [ebx + 8], xmm0
mov dword [ebp - 0x24], 0x22d01129
movq xmm0, qword [ebp - 0x24]
movq qword [ebx + 0x10], xmm0
mov dword [ebp - 0x18], 0
movq xmm0, qword [ebp - 0x1c]
movq qword [ebx + 0x18], xmm0
xor eax, eax
xor byte [ebp + eax - 0xd0], 0xb9
inc eax
cmp eax, 0x77
jb 0x402002
xor eax, eax
mov dword [ebp - 4], eax
cmp dword [edi + 0x404], eax
jbe 0x402234
mov edx, 0xaf
jmp 0x402030
movzx ebx, byte [eax + edi + 0x1fc]
imul ebx, dword [edi + 0x344]
add ebx, dword [ebp + 8]
mov ecx, dword [ebp - 0x40]
mov eax, 0x66ce
lea ebx, [ebx]
cmp ecx, 0xaf
cmovg ecx, edx
dec eax
jne 0x402050
mov dword [ebp - 0x40], ecx
mov ecx, dword [ebp - 0xc]
mov dword [edi + 0xf8], ebx
cmp ecx, 0x195a
jge 0x40208d
inc ecx
mov eax, ecx
and eax, 0x80000007
jns 0x40207f
dec eax
or eax, 0xfffffff8
inc eax
jne 0x402082
inc ecx
cmp ecx, 0x195a
jl 0x402070
mov dword [ebp - 0xc], ecx
push 0x78
lea eax, [ebp - 0x14b]
push 0
push eax
mov byte [ebp - 0x14c], 0
call fcn.004031d0
mov ecx, dword [ebp - 0x44]
add esp, 0xc
test ecx, ecx
je 0x4020c8
mov edi, edi
mov eax, 0x8d3dcb09
imul ecx
add edx, ecx
sar edx, 5
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
jne 0x4020b0
mov dword [ebp - 0x44], ecx
push 0x78
lea eax, [ebp - 0x14c]
push ebx
push eax
call fcn.004031a0
mov ecx, dword [ebp - 0x4c]
add esp, 0xc
test ecx, ecx
je 0x4020f9
mov eax, 0x9c09c09d
imul ecx
add edx, ecx
sar edx, 7
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
jne 0x4020e1
mov dword [ebp - 0x4c], ecx
mov ecx, 0x1d
lea esi, [ebp - 0xd0]
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebp - 0x38]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
test ecx, ecx
je 0x402127
mov eax, 0x94f2095
imul ecx
sar edx, 1
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
jne 0x402112
mov dword [ebp - 0x38], ecx
mov edi, dword [ebp + 0x10]
mov eax, dword [edi + 0xf8]
call eax
push 0x78
lea eax, [ebp - 0x14c]
push eax
push ebx
call fcn.004031a0
mov eax, dword [ebp - 0x50]
add esp, 0xc
inc eax
cmp eax, 0x11dd
jl 0x402147
mov esi, dword [ebp - 0x48]
mov dword [ebp - 0x50], eax
cmp esi, 0x25ec
jge 0x40217a
mov ecx, 0x25eb
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 - 0x48], esi
mov eax, dword [ebp - 8]
cmp eax, 0x4cf1
jge 0x4021a2
mov ecx, 0x4cf0
sub ecx, eax
mov eax, 0x38e38e39
mul ecx
mov eax, dword [ebp - 8]
shr edx, 1
add eax, edx
lea eax, [eax + edx*8]
add eax, 9
mov dword [ebp - 8], eax
xor esi, esi
cmp dword [edi + 0x344], esi
jbe 0x4021f7
lea esp, [esp]
mov eax, dword [edi + 0x3a4]
inc esi
mov al, byte [eax + 3]
xor byte [esi + ebx - 1], al
movzx ecx, byte [esi + ebx - 1]
mov eax, dword [edi + 0x3a4]
mov dl, byte [eax + 2]
xor dl, cl
mov byte [esi + ebx - 1], dl
mov eax, dword [edi + 0x3a4]
mov cl, byte [eax + 1]
xor cl, dl
mov byte [esi + ebx - 1], cl
mov eax, dword [edi + 0x3a4]
mov al, byte [eax]
xor al, cl
mov byte [esi + ebx - 1], al
cmp esi, dword [edi + 0x344]
jb 0x4021b0
mov ecx, dword [ebp - 0x54]
test ecx, ecx
je 0x402216
mov edi, edi
mov eax, 0x30c30c31
imul ecx
sar edx, 5
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
jne 0x402200
mov dword [ebp - 0x54], ecx
mov eax, dword [ebp - 4]
inc eax
mov dword [ebp - 4], eax
mov edx, 0xaf
cmp eax, dword [edi + 0x404]
jb 0x402030
lea ebx, [edi + 0xcc]
mov eax, 0x6890
mov edx, 7
mov ecx, 0x7d
cmp ecx, edx
cmovl ecx, edx
dec eax
jne 0x402243
call fcn.00403490
mov ecx, eax
mov dword [edi + 0x34], ecx
xor edx, edx
inc edx
mov eax, edx
and eax, 0x80000003
jns 0x402266
dec eax
or eax, 0xfffffffc
inc eax
jne 0x402269
inc edx
cmp edx, 0x18ea
jl 0x402257
add ecx, 0xfffffffe
push ecx
push dword [edi + 0x3fc]
call fcn.004010f0
push 0xfb943e7
push ebx
call fcn.00401b50
mov eax, dword [ebp + 0xc]
cdq
and edx, 0xff
add esp, 0x10
lea esi, [edx + eax]
sar esi, 8
mov ecx, 0x1b29
mov eax, 0x891ac73b
imul ecx
add edx, ecx
sar edx, 7
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
jne 0x4022a3
test esi, esi
je 0x4022d8
mov edi, dword [ebp + 8]
nop
push ebx
push 0x100
push edi
call fcn.00403200
add esp, 0xc
add edi, 0x100
dec esi
jne 0x4022c0
mov ecx, 0x7e13
lea ecx, [ecx]
mov eax, 0xa16b312f
imul ecx
add edx, ecx
sar edx, 7
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
jne 0x4022e0
mov eax, 0x214d0215
imul dword [ebp - 0x3c]
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [ebp - 0x3c], eax
jne 0x4022f5
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret