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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xe8
push ebx
push esi
push edi
mov ecx, 0x454c
mov edi, 0x4cf9
mov esi, 0x40b8
mov dword [ebp - 0x4c], 0
mov dword [ebp - 8], 0x711f
mov ebx, 0x67ea
mov dword [ebp - 4], 0x440e
mov dword [ebp - 0x48], 0
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x3c], 0x2e3c
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x44], 0x6b
mov dword [ebp - 0x34], 0xbea
mov dword [ebp - 0x38], 0x4e6d
mov dword [ebp - 0x40], 0x5a98
mov eax, 0x4d4873ed
imul ecx
sar edx, 4
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
jne 0x4020f4
cmp dword [ebp + 8], ecx
je 0x40268b
mov edx, dword [ebp + 0xc]
test edx, edx
je 0x40268b
mov eax, dword [ebp + 0x10]
lea ecx, [eax + 0x5c]
mov eax, dword [eax + 0x114]
xor eax, dword [ecx]
cmp edx, eax
jl 0x40268b
call fcn.00403780
mov ecx, dword [ebp + 0x10]
mov dword [ecx + 0x13c], eax
nop
mov eax, 0x22b63cbf
imul edi
sar edx, 4
mov edi, edx
shr edi, 0x1f
add edi, edx
jne 0x402140
mov eax, 0x88888889
imul esi
add edx, esi
sar edx, 4
mov esi, edx
shr esi, 0x1f
add esi, edx
jne 0x402153
mov edi, ecx
mov eax, dword [edi + 0x5c]
xor dword [edi + 0x34], eax
mov ecx, dword [edi + 0x34]
lea edx, [edi + 0x5c]
mov eax, 0x7bfb
jmp 0x402180
dec eax
jne 0x402180
mov eax, dword [ebp + 0xc]
mov dword [edi + 0x20], edx
xor edx, edx
div ecx
xor esi, esi
mov dword [edi + 0x110], eax
imul eax, ecx
mov dword [edi + 0xb4], eax
test eax, eax
je 0x4021e5
mov ebx, dword [ebp + 8]
mov eax, dword [edi + 0x20]
inc esi
mov al, byte [eax]
xor byte [esi + ebx - 1], al
movzx ecx, byte [esi + ebx - 1]
mov eax, dword [edi + 0x20]
mov dl, byte [eax + 1]
xor dl, cl
mov byte [esi + ebx - 1], dl
mov eax, dword [edi + 0x20]
mov cl, byte [eax + 2]
xor cl, dl
mov byte [esi + ebx - 1], cl
mov eax, dword [edi + 0x20]
mov al, byte [eax + 3]
xor al, cl
mov byte [esi + ebx - 1], al
cmp esi, dword [edi + 0xb4]
jb 0x4021a5
mov ebx, 0x67ea
mov eax, dword [edi + 0x34]
xor esi, esi
dec eax
je 0x402283
mov eax, dword [ebp - 0x4c]
inc eax
cmp eax, 0x293a
jl 0x4021f4
mov dword [ebp - 0x4c], eax
mov eax, dword [edi + 0x34]
dec eax
push eax
push 1
push edi
call fcn.00403600
mov cl, al
mov eax, dword [ebp - 8]
add esp, 0xc
test eax, eax
je 0x402228
cdq
and edx, 0x3f
add eax, edx
sar eax, 6
test eax, eax
jne 0x402218
mov dword [ebp - 8], eax
test ebx, ebx
je 0x402245
lea esp, [esp]
mov eax, 0x9c09c09d
imul ebx
add edx, ebx
sar edx, 7
mov ebx, edx
shr ebx, 0x1f
add ebx, edx
jne 0x402230
xor eax, eax
cmp cl, byte [edi + eax + 0x1a0]
je 0x402257
inc eax
cmp eax, esi
jbe 0x402247
jmp 0x402259
xor cl, cl
mov eax, 0x1392
mov edi, edi
dec eax
jne 0x402260
test cl, cl
je 0x40226f
mov byte [edi + esi + 0x1a0], cl
inc esi
mov eax, 0x6270
dec eax
jne 0x402274
mov eax, dword [edi + 0x34]
dec eax
cmp esi, eax
jb 0x4021f1
mov eax, 0x151d07eb
imul dword [ebp - 4]
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [ebp - 4], eax
jne 0x402283
push 0x4b
lea eax, [ebp - 0x9b]
push 0
push eax
mov byte [ebp - 0x9c], 0
call fcn.004034c0
lea eax, [ebp - 0x9c]
push eax
call fcn.00402db0
xorps xmm0, xmm0
lea ebx, [edi + 0x6c]
movq qword [ebp - 0x18], xmm0
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x2c], 0xed5c1d53
mov dword [ebp - 0x28], 0xac32302f
movq xmm0, qword [ebp - 0x2c]
movq qword [ebx], xmm0
mov dword [ebp - 0x24], 0x9c54545e
mov dword [ebp - 0x20], 0x9a2574dc
movq xmm0, qword [ebp - 0x24]
movq qword [ebx + 8], xmm0
mov dword [ebp - 0x1c], 0x2529001c
movq xmm0, qword [ebp - 0x1c]
xor cl, cl
movq qword [ebx + 0x10], xmm0
mov dword [ebx + 0x18], eax
add esp, 0x10
mov dword [ebp - 8], ebx
mov byte [ebx + 0x1c], cl
xor eax, eax
jmp 0x402320
xor byte [ebp + eax - 0x9c], 0xf
inc eax
cmp eax, 0x4a
jb 0x402320
mov eax, 0x128e
mov edx, 0xf7
mov ecx, 0xdd
lea ecx, [ecx]
cmp ecx, edx
cmovl ecx, edx
dec eax
jne 0x402340
mov dword [ebp - 4], eax
cmp dword [edi + 0x34], eax
jbe 0x4024ed
jmp 0x402360
movzx ebx, byte [eax + edi + 0x1a0]
imul ebx, dword [edi + 0x110]
add ebx, dword [ebp + 8]
mov eax, dword [ebp - 0x48]
mov dword [edi + 0x2cc], ebx
jmp 0x402380
inc eax
cmp eax, 0x439e
jl 0x402380
push 0x4b
mov dword [ebp - 0x48], eax
lea eax, [ebp - 0xe7]
push 0
push eax
mov byte [ebp - 0xe8], 0
call fcn.004034c0
push 0x4b
lea eax, [ebp - 0xe8]
push ebx
push eax
call fcn.00403490
mov esi, dword [ebp - 0xc]
add esp, 0x18
cmp esi, 0x5fe9
jge 0x4023ef
nop
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 0x4023e4
inc esi
cmp esi, 0x5fe9
jl 0x4023c0
mov dword [ebp - 0xc], esi
mov eax, dword [ebp - 0x50]
inc eax
cmp eax, 0x66aa
jl 0x4023f2
mov ecx, 0x12
lea esi, [ebp - 0x9c]
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebp - 0x3c]
mov dword [ebp - 0x50], eax
movsw word es:[edi], word [esi]
test ecx, ecx
je 0x40242b
mov eax, 0x2aaaaaab
imul ecx
sar edx, 2
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
jne 0x402415
mov dword [ebp - 0x3c], ecx
mov edi, dword [ebp + 0x10]
mov eax, dword [edi + 0x2cc]
call eax
push 0x4b
lea eax, [ebp - 0xe8]
push eax
push ebx
call fcn.00403490
mov eax, dword [ebp - 0x30]
add esp, 0xc
jmp 0x402450
inc eax
cmp eax, 0x2c4
jl 0x402450
mov ecx, dword [ebp - 0x44]
mov dword [ebp - 0x30], eax
test ecx, ecx
je 0x402478
mov eax, 0x27932b49
imul ecx
sar edx, 5
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
jne 0x402462
mov dword [ebp - 0x44], ecx
xor esi, esi
cmp dword [edi + 0x110], esi
jbe 0x4024bd
mov eax, dword [edi + 0x20]
inc esi
mov al, byte [eax + 3]
xor byte [esi + ebx - 1], al
movzx ecx, byte [esi + ebx - 1]
mov eax, dword [edi + 0x20]
mov dl, byte [eax + 2]
xor dl, cl
mov byte [esi + ebx - 1], dl
mov eax, dword [edi + 0x20]
mov cl, byte [eax + 1]
xor cl, dl
mov byte [esi + ebx - 1], cl
mov eax, dword [edi + 0x20]
mov al, byte [eax]
xor al, cl
mov byte [esi + ebx - 1], al
cmp esi, dword [edi + 0x110]
jb 0x402482
mov ecx, dword [ebp - 0x34]
test ecx, ecx
je 0x4024da
mov eax, 0x3159721f
imul ecx
sar edx, 5
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
jne 0x4024c4
mov dword [ebp - 0x34], ecx
mov eax, dword [ebp - 4]
inc eax
mov dword [ebp - 4], eax
cmp eax, dword [edi + 0x34]
jb 0x402360
lea ebx, [edi + 0x6c]
xor esi, esi
nop
inc esi
mov eax, 0x2aaaaaab
imul esi
mov eax, edx
shr eax, 0x1f
add eax, edx
lea ecx, [eax + eax*2]
add ecx, ecx
mov eax, esi
sub eax, ecx
jne 0x40250c
add esi, esi
cmp esi, 0x3c8f
jl 0x4024f0
call fcn.00403780
mov dword [edi + 0x170], eax
mov ecx, 0x32d9
mov esi, 0xd0
mov edx, 0x2e
mov edi, edi
cmp edx, esi
cmovg edx, esi
dec ecx
jne 0x402530
add eax, 0xfffffffe
push eax
push dword [edi + 0x13c]
call fcn.00401110
push 0xa52785
push ebx
call fcn.00401ed0
add esp, 0x10
mov ebx, 0x6982
lea ebx, [ebx]
mov eax, 0x36406c81
imul ebx
sar edx, 5
mov ebx, edx
shr ebx, 0x1f
add ebx, edx
jne 0x402560
mov eax, dword [ebp + 0xc]
mov ebx, dword [ebp - 8]
cdq
and edx, 0xff
mov ecx, 0x99
lea esi, [edx + eax]
sar esi, 8
mov eax, 0x1d5e
mov edx, 0xe2
cmp ecx, edx
cmovl ecx, edx
dec eax
jne 0x402595
xor edi, edi
nop
inc edi
mov eax, 0x66666667
imul edi
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
mov ecx, edi
lea eax, [eax + eax*4]
sub ecx, eax
jne 0x4025bb
inc edi
cmp edi, 0xb40
jl 0x4025a0
test esi, esi
je 0x4025f0
mov edi, dword [ebp + 8]
lea ebx, [ebx]
push ebx
push 0x100
push edi
call fcn.004034f0
add esp, 0xc
add edi, 0x100
dec esi
jne 0x4025d0
jmp 0x4025f0
mov eax, 0x60606061
imul dword [ebp - 0x38]
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [ebp - 0x38], eax
jne 0x4025f0
xor ebx, ebx
lea esp, [esp]
inc ebx
mov eax, 0x66666667
imul ebx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
mov ecx, ebx
lea eax, [eax + eax*4]
sub ecx, eax
jne 0x40262b
inc ebx
cmp ebx, 0x7f04
jl 0x402610
mov eax, 0x38e38e39
imul dword [ebp - 0x40]
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [ebp - 0x40], eax
jne 0x402633
xor ebx, ebx
lea esp, [esp]
inc ebx
mov eax, 0x55555556
imul ebx
mov eax, edx
shr eax, 0x1f
add eax, edx
mov ecx, ebx
lea eax, [eax + eax*2]
sub ecx, eax
jne 0x402669
inc ebx
cmp ebx, 0x634d
jl 0x402650
mov ecx, 0x3cd5
mov eax, 0xb60b60b7
imul ecx
add edx, ecx
sar edx, 7
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
jne 0x402676
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret