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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14c
mov eax, dword [0x4016c0]
xor ecx, ecx
push ebx
push esi
mov esi, dword [0x44d4f8]
xor ebx, ebx
mov dword [ebp - 0x10], eax
add esi, 0x39dc00d
mov ax, word [0x4016c4]
push edi
mov dword [ebp - 0x28], 0x31ed731d
mov dword [ebp - 0x24], 0xea5f8c89
mov dword [ebp - 0x20], 0x19e7635
mov dword [ebp - 0x1c], 0xe07b0e8a
mov dword [ebp - 0x18], 0x8f9f1928
mov dword [ebp - 0x14], 0x766121dc
mov word [ebp - 0xc], ax
or esi, 0xd473fc87
mov byte [ebp + ecx - 0x14c], cl
inc ecx
cmp ecx, 0x100
jb 0x410028
xor edi, edi
xor edx, edx
mov dword [ebp - 4], 5
mov eax, edi
mov cl, byte [ebp + edi - 0x14c]
div dword [ebp - 4]
mov byte [ebp - 5], cl
movzx ecx, cl
movzx eax, byte [ebp + edx - 0x10]
add eax, ebx
add ecx, eax
movzx ebx, cl
mov al, byte [ebp + ebx - 0x14c]
mov byte [ebp + edi - 0x14c], al
xor eax, eax
inc eax
cmp eax, 0x1197
je 0x41008a
cmp byte [eax + 0x401848], 0
jne 0x410077
jmp 0x410095
call fcn.0040cdc3
sub esi, 0x7e84887c
mov al, byte [ebp - 5]
xor esi, 0xa5928c
and esi, 0x83e79f8c
mov byte [ebp + ebx - 0x14c], al
inc edi
cmp edi, 0x100
jb 0x410040
and dword [ebp - 0x10], 0
lea ebx, [esi - 0xf3054ad]
and dword [ebp - 4], 0
xor edi, edi
mov esi, dword [ebp - 0x10]
lea eax, [esi + 1]
imul ebx, ebx, 0xebd6a32b
movzx esi, al
mov eax, dword [ebp - 4]
mov cl, byte [ebp + esi - 0x14c]
movzx edx, cl
add eax, edx
movzx eax, al
mov dword [ebp - 4], eax
mov al, byte [ebp + eax - 0x14c]
mov byte [ebp + esi - 0x14c], al
mov eax, dword [ebp - 4]
mov byte [ebp + eax - 0x14c], cl
movzx eax, byte [ebp + esi - 0x14c]
add eax, edx
movzx eax, al
mov al, byte [ebp + eax - 0x14c]
xor al, byte [ebp + edi - 0x28]
mov byte [ebp + edi - 0x4c], al
inc edi
cmp edi, 0x18
jb 0x4100c7
push 6
pop ecx
mov esi, 0x401748
mov byte [ebp - 0x34], 0
lea edi, [ebp - 0x28]
mov dword [ebp - 0x10], 0x4e46d064
rep movsd dword es:[edi], dword [esi]
push 0x73
mov word [ebp - 0xc], 0xeea
mov ecx, 0x401830
pop edx
lea eax, [edx - 0x30]
cmp ax, 9
ja 0x410160
add ecx, 2
movzx eax, word [ecx]
mov edx, eax
test ax, ax
jne 0x410148
jmp 0x410166
add ebx, 0x61862fc4
sub ebx, 0x21e99977
mov dword [ebp - 4], ebx
call fcn.0040cc17
xor edi, edi
xor eax, eax
mov byte [ebp + eax - 0x14c], al
inc eax
cmp eax, 0x100
jb 0x410178
xor esi, esi
xor edx, edx
mov bl, byte [ebp + esi - 0x14c]
push 0x17
mov eax, esi
pop ecx
div ecx
movzx ecx, bl
movzx eax, byte [ebp + edx - 0x28]
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 0x410189
xor ebx, ebx
xor edi, edi
xor esi, esi
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 - 0x10]
mov byte [ebp + esi - 0x30], al
inc esi
cmp esi, 6
jb 0x4101cc
pop edi
pop esi
pop ebx
push 0x6e
mov byte [ebp - 0x2a], 0
mov eax, 0x1556
mov ecx, 0x401848
pop edx
add eax, edx
inc ecx
cmp eax, 0x19ce
ja 0x410243
movsx edx, byte [ecx]
test edx, edx
jne 0x41022d
mov eax, dword [ebp - 4]
jmp 0x410250
call fcn.0040cc17
mov eax, dword [ebp - 4]
add eax, 0x24c7b4db
imul eax, eax, 0x2b28994c
mov ecx, 0x1c3b4a62
sub ecx, eax
mov dword [0x44d4f8], ecx
lea ecx, [ebp - 0x30]
call fcn.0041e657
mov edx, eax
lea ecx, [ebp - 0x4c]
call fcn.0041e636
call eax
leave
ret