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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xd8
cmp dword [ebp + 8], 0
push ebx
push esi
push edi
mov esi, 0x5d
mov ebx, 0x24cd
mov dword [ebp - 0x3c], 0x608a
mov dword [ebp - 0x58], 0x6ab4
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x54], 0x656d
mov dword [ebp - 0x34], 0x2589
mov dword [ebp - 0x4c], 0x1c6
mov dword [ebp - 8], 0
mov dword [ebp - 0x28], 0x10
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x30], 0x7090
mov dword [ebp - 0x38], 0x6211
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x48], 0x7d78
je 0x4021f7
mov edx, dword [ebp + 0xc]
test edx, edx
je 0x4021f7
mov eax, dword [ebp + 0x10]
lea ecx, [eax + 0x88]
mov eax, dword [eax + 0x320]
xor eax, dword [ecx]
cmp edx, eax
jl 0x4021f7
call fcn.004030f0
mov edx, dword [ebp + 0x10]
lea ecx, [edx + 0x88]
mov dword [edx], eax
mov eax, dword [ecx]
xor dword [edx + 0xcc], eax
mov eax, 0x7835
mov edx, 0x63
cmp esi, edx
cmovg esi, edx
dec eax
jne 0x401d18
mov edi, 0x4ace
mov eax, 0x66666667
imul edi
sar edx, 2
mov edi, edx
shr edi, 0x1f
add edi, edx
jne 0x401d25
mov edi, 0xa7
lea ecx, [ecx]
mov eax, 0x84210843
imul ebx
add edx, ebx
sar edx, 4
mov ebx, edx
shr ebx, 0x1f
add ebx, edx
jne 0x401d40
mov eax, 0x6c8d
mov edx, 0xe5
nop
cmp edi, edx
cmovl edi, edx
dec eax
jne 0x401d60
mov edi, dword [ebp + 0x10]
mov eax, dword [ebp + 0xc]
mov dword [edi + 0x138], ecx
mov ecx, dword [edi + 0xcc]
xor edx, edx
div ecx
xor esi, esi
mov dword [edi + 0x8c], eax
imul eax, ecx
mov dword [edi + 0x12c], eax
test eax, eax
je 0x401de0
mov ebx, dword [ebp + 8]
mov eax, dword [edi + 0x138]
inc esi
mov al, byte [eax]
xor byte [esi + ebx - 1], al
movzx ecx, byte [esi + ebx - 1]
mov eax, dword [edi + 0x138]
mov dl, byte [eax + 1]
xor dl, cl
mov byte [esi + ebx - 1], dl
mov eax, dword [edi + 0x138]
mov cl, byte [eax + 2]
xor cl, dl
mov byte [esi + ebx - 1], cl
mov eax, dword [edi + 0x138]
mov al, byte [eax + 3]
xor al, cl
mov byte [esi + ebx - 1], al
cmp esi, dword [edi + 0x12c]
jb 0x401d96
lea ecx, [ecx]
mov eax, 0x3e0f83e1
imul dword [ebp - 0x3c]
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [ebp - 0x3c], eax
jne 0x401de0
mov ecx, 0x31a7
lea esp, [esp]
mov eax, 0xb21642c9
imul ecx
add edx, ecx
sar edx, 7
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
jne 0x401e00
mov eax, dword [edi + 0xcc]
xor esi, esi
dec eax
je 0x401f4b
xor ebx, ebx
mov eax, dword [edi + 0xcc]
dec eax
push eax
push 1
push edi
call fcn.00402f70
add esp, 0xc
mov byte [ebp - 1], al
xor ecx, ecx
mov edi, edi
cmp al, byte [edi + ecx + 0x170]
je 0x401e50
inc ecx
cmp ecx, esi
jbe 0x401e40
jmp 0x401e54
mov byte [ebp - 1], 0
mov ecx, dword [ebp - 0x58]
test ecx, ecx
je 0x401e76
jmp 0x401e60
mov eax, 0x5397829d
imul ecx
sar edx, 6
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
jne 0x401e60
mov dword [ebp - 0x58], ecx
cmp ebx, 0x3961
jge 0x401eac
mov edi, edi
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 0x401ea4
inc ebx
cmp ebx, 0x3961
jl 0x401e80
mov eax, dword [ebp - 0x50]
nop
inc eax
cmp eax, 0x7a88
jl 0x401eb0
mov ecx, dword [ebp - 0x54]
mov dword [ebp - 0x50], eax
test ecx, ecx
je 0x401ed8
mov eax, 0x487ede05
imul ecx
sar edx, 5
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
jne 0x401ec2
mov dword [ebp - 0x54], ecx
mov ecx, dword [ebp - 0x34]
test ecx, ecx
je 0x401ef6
nop
mov eax, 0x66666667
imul ecx
sar edx, 2
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
jne 0x401ee0
mov dword [ebp - 0x34], ecx
mov ecx, dword [ebp - 0x4c]
test ecx, ecx
je 0x401f18
lea ecx, [ecx]
mov eax, 0x94458095
imul ecx
add edx, ecx
sar edx, 7
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
jne 0x401f00
mov dword [ebp - 0x4c], ecx
mov eax, dword [ebp - 8]
jmp 0x401f20
add eax, 2
cmp eax, 0x7ee3
jl 0x401f20
mov dword [ebp - 8], eax
mov al, byte [ebp - 1]
test al, al
je 0x401f3c
mov byte [edi + esi + 0x170], al
inc esi
mov eax, dword [edi + 0xcc]
dec eax
cmp esi, eax
jb 0x401e26
push 0x3e
lea eax, [ebp - 0x97]
push 0
push eax
mov byte [ebp - 0x98], 0
call fcn.00402e00
lea eax, [ebp - 0x98]
push eax
call fcn.004028e0
lea ebx, [edi + 4]
mov dword [ebp - 0x24], 0x56714fd9
mov dword [ebp - 0x20], 0xce41b311
movq xmm0, qword [ebp - 0x24]
movq qword [ebx], xmm0
add esp, 0x10
xor eax, eax
mov dword [ebp - 0x1c], 0xbe5e57d4
mov dword [ebp - 0x18], 0x31d1dc0
movq xmm0, qword [ebp - 0x1c]
movq qword [ebx + 8], xmm0
mov dword [ebp - 0x14], 0x631e8550
mov dword [ebp - 0x10], eax
movq xmm0, qword [ebp - 0x14]
movq qword [ebx + 0x10], xmm0
mov word [ebx + 0x18], ax
mov byte [ebx + 0x1a], al
xor byte [ebp + eax - 0x98], 0x9a
inc eax
cmp eax, 0x3d
jb 0x401fc0
mov edi, 0x4ec9
mov eax, 0x621b97c3
imul edi
sar edx, 6
mov edi, edx
shr edi, 0x1f
add edi, edx
jne 0x401fd3
mov edi, dword [ebp + 0x10]
xor eax, eax
mov dword [ebp - 8], eax
cmp dword [edi + 0xcc], eax
jbe 0x402164
mov edx, 0xc9
nop
movzx ebx, byte [edi + eax + 0x170]
imul ebx, dword [edi + 0x8c]
add ebx, dword [ebp + 8]
mov ecx, dword [ebp - 0x28]
mov dword [edi + 0xf4], ebx
mov eax, 0x5e2a
cmp ecx, 0xc9
cmovl ecx, edx
dec eax
jne 0x402020
push 0x3e
push eax
mov byte [ebp - 0xd8], al
lea eax, [ebp - 0xd7]
push eax
mov dword [ebp - 0x28], ecx
call fcn.00402e00
push 0x3e
lea eax, [ebp - 0xd8]
push ebx
push eax
call fcn.00402dd0
mov eax, dword [ebp - 0x44]
add esp, 0x18
lea esp, [esp]
inc eax
cmp eax, 0x3dc4
jl 0x402060
mov ecx, 0xf
lea esi, [ebp - 0x98]
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x2c]
movsb byte es:[edi], byte [esi]
mov edi, edi
inc eax
cmp eax, 0x290e
jl 0x402080
mov edi, dword [ebp + 0x10]
mov dword [ebp - 0x2c], eax
mov eax, dword [edi + 0xf4]
call eax
push 0x3e
lea eax, [ebp - 0xd8]
push eax
push ebx
call fcn.00402dd0
mov ecx, dword [ebp - 0x30]
add esp, 0xc
test ecx, ecx
je 0x4020c6
nop
mov eax, 0x2c0b02c1
imul ecx
sar edx, 4
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
jne 0x4020b0
mov dword [ebp - 0x30], ecx
mov ecx, dword [ebp - 0x38]
test ecx, ecx
je 0x4020e6
lea ecx, [ecx]
mov eax, 0x22b63cbf
imul ecx
sar edx, 3
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
jne 0x4020d0
mov dword [ebp - 0x38], ecx
xor esi, esi
cmp dword [edi + 0x8c], esi
jbe 0x402137
mov eax, dword [edi + 0x138]
inc esi
mov al, byte [eax + 3]
xor byte [esi + ebx - 1], al
movzx ecx, byte [esi + ebx - 1]
mov eax, dword [edi + 0x138]
mov dl, byte [eax + 2]
xor dl, cl
mov byte [esi + ebx - 1], dl
mov eax, dword [edi + 0x138]
mov cl, byte [eax + 1]
xor cl, dl
mov byte [esi + ebx - 1], cl
mov eax, dword [edi + 0x138]
mov al, byte [eax]
xor al, cl
mov byte [esi + ebx - 1], al
cmp esi, dword [edi + 0x8c]
jb 0x4020f0
mov eax, dword [ebp - 0x40]
lea ebx, [ebx]
inc eax
cmp eax, 5
jl 0x402140
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 8]
inc eax
mov dword [ebp - 8], eax
mov edx, 0xc9
cmp eax, dword [edi + 0xcc]
jb 0x402000
lea ebx, [edi + 4]
call fcn.004030f0
mov dword [edi + 0x118], eax
add eax, 0xfffffffe
push eax
push dword [edi]
call fcn.00401180
push 0x3757383
push ebx
call fcn.00401bb0
add esp, 0x10
mov ecx, 0x7a9a
lea ecx, [ecx]
mov eax, 0x99d722db
imul ecx
add edx, ecx
sar edx, 7
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
jne 0x402190
mov eax, dword [ebp + 0xc]
cdq
and edx, 0xff
lea esi, [edx + eax]
sar esi, 8
test esi, esi
je 0x4021e0
mov edi, dword [ebp + 8]
lea esp, [esp]
push ebx
push 0x100
push edi
call fcn.00402e60
add esp, 0xc
add edi, 0x100
dec esi
jne 0x4021c0
jmp 0x4021e0
mov eax, 0x63e7063f
imul dword [ebp - 0x48]
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [ebp - 0x48], eax
jne 0x4021e0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret