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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x184
push 0x2a
xor eax, eax
mov dword [ebp - 0x34], ecx
pop ecx
mov dword [ebp - 0x2c], 0x19
mov edx, eax
mov dword [ebp - 0x28], 0xc1
add ecx, dword [ebp + edx*4 - 0x2c]
inc edx
cmp edx, 2
jl 0x40daa5
push ebx
push esi
push edi
mov esi, 0x401628
mov dword [ebp - 0x30], ecx
lea edi, [ebp - 0x44]
mov dword [ebp - 0x1c], 0xf2e970b0
mov dword [ebp - 0x18], 0x1bfc82a7
mov ecx, eax
mov dword [ebp - 0x14], 0xa54b2bc9
movsd dword es:[edi], dword [esi]
mov dword [ebp - 0x10], 0xec70a54f
mov dword [ebp - 0xc], 0x88ca1402
mov dword [ebp - 8], 0xc62ec1cd
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
mov edi, eax
mov byte [ebp + ecx - 0x14c], cl
inc ecx
cmp ecx, 0x100
jb 0x40daf1
mov esi, eax
mov eax, dword [0x44d4f0]
add eax, 0xf8ba921
mov dword [0x44d444], eax
xor edx, edx
mov bl, byte [ebp + esi - 0x14c]
push 0xe
mov eax, esi
pop ecx
div ecx
movzx ecx, bl
movzx eax, byte [ebp + edx - 0x44]
add eax, edi
add ecx, eax
movzx edi, cl
mov al, byte [ebp + edi - 0x14c]
mov byte [ebp + esi - 0x14c], al
inc esi
mov byte [ebp + edi - 0x14c], bl
cmp esi, 0x100
jb 0x40db12
xor ebx, ebx
mov edi, ebx
mov esi, ebx
lea eax, [edi + 1]
movzx edi, al
mov cl, byte [ebp + edi - 0x14c]
movzx edx, cl
lea eax, [ebx + edx]
movzx ebx, al
mov al, byte [ebp + ebx - 0x14c]
mov byte [ebp + edi - 0x14c], al
mov byte [ebp + ebx - 0x14c], cl
movzx eax, byte [ebp + edi - 0x14c]
add eax, edx
movzx eax, al
mov al, byte [ebp + eax - 0x14c]
xor al, byte [ebp + esi - 0x1c]
mov byte [ebp + esi - 0x168], al
inc esi
cmp esi, 0x18
jb 0x40db55
mov eax, dword [0x401638]
xor ebx, ebx
mov dword [ebp - 0x2c], eax
mov edi, ebx
mov ax, word [0x40163c]
mov word [ebp - 0x28], ax
mov eax, ebx
mov byte [ebp - 0x150], bl
mov dword [ebp - 4], 0xf46994
mov byte [ebp + eax - 0x14c], al
inc eax
cmp eax, 0x100
jb 0x40dbca
mov esi, ebx
xor edx, edx
mov bl, byte [ebp + esi - 0x14c]
push 5
mov eax, esi
pop ecx
div ecx
movzx ecx, bl
movzx eax, byte [ebp + edx - 0x2c]
add eax, edi
add ecx, eax
movzx edi, cl
mov al, byte [ebp + edi - 0x14c]
mov byte [ebp + esi - 0x14c], al
inc esi
mov byte [ebp + edi - 0x14c], bl
cmp esi, 0x100
jb 0x40dbdb
xor ebx, ebx
mov edi, ebx
mov esi, ebx
lea eax, [edi + 1]
movzx edi, al
mov cl, byte [ebp + edi - 0x14c]
movzx edx, cl
lea eax, [edx + ebx]
movzx ebx, al
mov al, byte [ebp + ebx - 0x14c]
mov byte [ebp + edi - 0x14c], al
mov byte [ebp + ebx - 0x14c], cl
movzx eax, byte [ebp + edi - 0x14c]
add eax, edx
movzx eax, al
mov al, byte [ebp + eax - 0x14c]
xor al, byte [ebp + esi - 4]
mov byte [ebp + esi - 0x2c], al
inc esi
cmp esi, 4
jb 0x40dc1e
mov eax, dword [ebp - 0x30]
lea ecx, [ebp - 0x2c]
add eax, eax
xor ebx, ebx
mov dword [ebp - 0x30], eax
lea eax, [ebp - 0x30]
push eax
push dword [ebp - 0x34]
mov byte [ebp - 0x28], bl
call fcn.0041e657
mov edx, eax
lea ecx, [ebp - 0x168]
call fcn.0041e636
call eax
test eax, eax
jne 0x40de4f
mov esi, 0x401640
mov dword [ebp - 0x1c], 0x8a2664c7
lea edi, [ebp - 0x40]
mov dword [ebp - 0x18], 0x1ff87ad5
mov dword [ebp - 0x14], 0x434f6cef
mov eax, ebx
mov dword [ebp - 0x10], 0x39aae0f0
movsd dword es:[edi], dword [esi]
mov dword [ebp - 0xc], 0x37ed8fc0
mov dword [ebp - 8], 0x47d64810
movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
mov edi, ebx
mov byte [ebp + eax - 0x14c], al
inc eax
cmp eax, 0x100
jb 0x40dcd7
mov esi, ebx
mov dl, byte [ebp + esi - 0x14c]
mov eax, esi
and eax, 7
movzx ecx, dl
movzx eax, byte [ebp + eax - 0x40]
add eax, edi
add ecx, eax
movzx edi, cl
mov al, byte [ebp + edi - 0x14c]
mov byte [ebp + esi - 0x14c], al
inc esi
mov byte [ebp + edi - 0x14c], dl
cmp esi, 0x100
jb 0x40dce8
mov esi, dword [0x44d444]
mov edx, ebx
mov edi, dword [0x44d4f0]
mov dword [ebp - 4], ebx
mov dword [ebp - 0x24], ebx
lea eax, [edx + 1]
movzx ecx, al
mov dword [ebp - 0x48], ecx
mov al, byte [ebp + ecx - 0x14c]
movzx edx, al
mov byte [ebp - 0x1d], al
mov eax, dword [ebp - 4]
add eax, edx
mov dword [ebp - 0x4c], edx
movzx eax, al
mov dword [ebp - 4], eax
mov al, byte [ebp + eax - 0x14c]
mov byte [ebp + ecx - 0x14c], al
mov eax, ebx
mov ecx, 0x4019d0
inc eax
lea ecx, [ecx + 2]
cmp eax, 0x1647
jg 0x40dd80
cmp word [ecx], bx
jne 0x40dd6e
jmp 0x40dd92
imul edi, esi, 0xf2e854d3
cmp eax, 0x19b6
jle 0x40dd92
call fcn.0040cc17
or edi, 0x9d6c2c4c
mov esi, edi
xor esi, 0xeb236836
call fcn.0040cdc3
mov eax, dword [ebp - 4]
mov edx, dword [ebp - 0x48]
mov cl, byte [ebp - 0x1d]
push 0x18
mov byte [ebp + eax - 0x14c], cl
movzx eax, byte [ebp + edx - 0x14c]
add eax, dword [ebp - 0x4c]
mov ecx, dword [ebp - 0x24]
movzx eax, al
mov al, byte [ebp + eax - 0x14c]
xor al, byte [ebp + ecx - 0x1c]
mov byte [ebp + ecx - 0x184], al
inc ecx
pop eax
mov dword [ebp - 0x24], ecx
cmp ecx, eax
jb 0x40dd35
mov dword [ebp - 0x40], eax
mov eax, ebx
mov dword [0x44d444], esi
mov dword [0x44d4f0], edi
mov byte [ebp - 0x16c], bl
mov dword [ebp - 0x44], 0x5e
mov dword [ebp - 0x3c], 0xffffff8a
sub ebx, dword [ebp + eax*4 - 0x44]
inc eax
cmp eax, 3
jl 0x40de0c
lea ecx, [ebp - 0x184]
call fcn.004361ab
mov esi, eax
mov ecx, esi
call fcn.004369fb
add eax, eax
push eax
push esi
push dword [ebp - 0x34]
call fcn.00436044
mov ecx, esi
call fcn.004369fb
push eax
push ebx
push esi
call fcn.004360de
add esp, 0x18
mov ecx, esi
call fcn.0041e600
pop edi
pop esi
pop ebx
leave
ret