Function at 0x40ed1e
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push eax
mov eax, 2
add esp, 0xfffff004
push eax
dec eax
jne 0x40ed27
mov eax, dword [ebp - 4]
add esp, 0xffffffcc
push ebx
push esi
push edi
mov edi, dword [ebp + 0x10]
mov byte [ebp - 1], 0
push 8
mov eax, dword [ebp + 0xc]
push eax
lea edx, [ebp - 0x2e]
push edx
call fcn.0040f505
add esp, 0xc
xor esi, esi
jmp 0x40eda3
xor ebx, ebx
mov eax, esi
mov byte [ebp - 0x30], al
mov byte [ebp - 0x2f], bl
push 8
push 0
lea edx, [ebp - 0xc]
push edx
call fcn.0040f47b
add esp, 0xc
lea ecx, [ebp - 0x30]
push ecx
push 0
lea eax, [ebp - 0xc]
push eax
call fcn.0040f359
add esp, 0xc
lea edx, [ebp - 0xc]
push 8
push edi
push edx
call fcn.0040f529
add esp, 0xc
test eax, eax
jne 0x40ed9c
mov byte [ebp - 1], 1
jmp 0x40eda2
inc ebx
cmp ebx, 0x40
jl 0x40ed59
inc esi
cmp esi, 0x100
jge 0x40edb1
cmp byte [ebp - 1], 0
je 0x40ed57
cmp byte [ebp - 1], 0
jne 0x40edbe
xor eax, eax
jmp 0x40f130
xor edx, edx
mov dl, byte [ebp - 0x30]
sar edx, 2
and dx, 1
mov word [ebp - 0x12], dx
xor ecx, ecx
mov cl, byte [ebp - 0x30]
sar ecx, 5
and cx, 1
mov word [ebp - 0x10], cx
mov ax, word [ebp - 0x12]
xor ax, word [ebp - 0x10]
mov word [ebp - 0xe], ax
xor esi, esi
mov ebx, 0x4323c0
lea eax, [ebp - 0x30]
push eax
call fcn.0040f137
pop ecx
mov edx, esi
mov ecx, 0x1f
sar edx, 2
sub ecx, esi
and edx, 0xfe
and ecx, 7
mov eax, esi
movzx edx, byte [edx + ebp - 0x2e]
sar edx, cl
sar eax, 1
and ax, 3
movsx ecx, ax
and dx, 1
xor dx, word [ebp + ecx*2 - 0x14]
test ax, ax
setne al
and eax, 1
xor ecx, ecx
and dx, ax
xor eax, eax
mov al, byte [ebp - 0x30]
mov cl, byte [ebp - 0x30]
sar ecx, 4
sar eax, 7
xor ax, cx
and ax, 1
xor dx, ax
mov word [ebp - 0x16], dx
lea edx, [ebp - 0x30]
push edx
push esi
call fcn.0040f26b
add esp, 8
xor eax, eax
mov al, byte [ebp - 0x26]
xor ax, word [ebp - 0x20]
and ax, 1
xor ax, word [ebp - 0x16]
mov word [ebx], ax
inc esi
add ebx, 2
cmp esi, 0x20
jl 0x40edf1
xor eax, eax
mov ebx, 0x432400
mov word [ebx], 1
inc eax
add ebx, 2
cmp eax, 0x2a
jl 0x40ee8a
xor eax, eax
mov ebx, 0x432400
xor edx, edx
mov ecx, 7
sub ecx, eax
mov dl, byte [ebp - 0x30]
sar edx, cl
and dx, 1
mov word [ebx], dx
inc eax
add ebx, 2
cmp eax, 8
jl 0x40ee9f
mov eax, 0xb
mov ebx, 0x432400
mov dx, word [ebx]
xor dx, word [ebx + 6]
mov word [ebx + 0x16], dx
inc eax
add ebx, 2
cmp eax, 0x2a
jl 0x40eec7
xor eax, eax
mov ebx, 0x432400
mov dx, word [ebx]
xor dx, 1
mov word [ebx + 0x56], dx
inc eax
add ebx, 2
cmp eax, 0x2a
jl 0x40eee2
xor edx, edx
lea eax, [ebp - 0x2038]
lea ebx, [ebp - 0x1034]
xor ecx, ecx
mov word [ebx], cx
mov word [eax], cx
inc edx
add eax, 2
add ebx, 2
cmp edx, 0x7e0
jl 0x40ef04
xor edx, edx
mov eax, dword [str.000000000001000000010010000100000101001001]
mov ecx, eax
lea ebx, [ebp - 0xf68]
mov eax, dword [0x431e2e]
movzx esi, byte [eax]
add si, 0xffd0
mov word [ebx], si
movzx esi, byte [ecx]
add si, 0xffd0
mov word [ebx + 0xe54], si
inc edx
inc ecx
add ebx, 2
inc eax
cmp edx, 0x2a
jl 0x40ef2f
xor ebx, ebx
mov ecx, 0x431e36
xor eax, eax
mov edx, ecx
mov si, word [edx]
mov edi, ebx
shl edi, 3
sub edi, ebx
shl edi, 3
add edi, eax
mov word [ebp + edi*2 - 0xf12], si
inc eax
add edx, 2
cmp eax, 5
jl 0x40ef5d
inc ebx
add ecx, 0xa
cmp ebx, 0x20
jl 0x40ef59
xor eax, eax
lea ebx, [ebp - 0xf14]
mov ecx, 0x4323c0
mov dx, word [ecx]
mov word [ebx], dx
inc eax
add ebx, 0x70
add ecx, 2
cmp eax, 0x20
jl 0x40ef93
xor edx, edx
xor eax, eax
mov dl, byte [ebp - 0x2e]
mov al, byte [ebp - 0x30]
sar edx, 7
xor ecx, ecx
and dx, 1
mov cl, byte [ebp - 0x26]
sar eax, 7
xor ax, dx
xor ax, cx
mov word [ebp - 0x18], ax
xor ebx, ebx
mov eax, ebx
mov ecx, 0x1f
sar eax, 2
sub ecx, ebx
and eax, 0xfe
xor edx, edx
and ecx, 7
mov dl, byte [eax + ebp - 0x2e]
sar edx, cl
mov eax, 0x432400
and dx, 1
mov cx, word [eax]
xor cx, word [ebp - 0x18]
xor dx, cx
and dx, 1
mov word [ebp - 0x1a], dx
movsx edx, word [ebp - 0x1a]
xor eax, eax
lea ecx, [edx + edx*4]
lea ecx, [edx + ecx*4]
lea ecx, [edx + ecx*2]
lea edx, [ecx*2 + 0x432400]
mov cx, word [edx]
mov esi, ebx
shl esi, 3
sub esi, ebx
shl esi, 3
add esi, eax
mov word [ebp + esi*2 - 0xf08], cx
inc eax
add edx, 2
cmp eax, 0x2a
jl 0x40f017
inc ebx
cmp ebx, 0x20
jl 0x40efca
mov eax, 0x101
mov dword [0x4324cc], eax
mov dword [0x4324c8], eax
xor esi, esi
lea ebx, [ebp - 0x1034]
push esi
call fcn.0040f300
pop ecx
push eax
call fcn.0040f300
pop ecx
push eax
call fcn.0040f300
mov dx, word [ebx]
pop ecx
mov word [ebp + eax*2 - 0x2038], dx
inc esi
add ebx, 2
cmp esi, 0x7e0
jl 0x40f054
xor esi, esi
mov ebx, esi
shl ebx, 3
movsx eax, bx
movsx edx, word [ebp + eax*2 - 0x2038]
shl edx, 3
movsx ecx, word [ebp + eax*2 - 0x2036]
shl ecx, 2
add edx, ecx
movsx ecx, word [ebp + eax*2 - 0x2034]
add ecx, ecx
add edx, ecx
movsx eax, word [ebp + eax*2 - 0x2032]
add edx, eax
mov eax, dword [ebp + 8]
add eax, esi
mov ecx, edx
shl ecx, 4
mov dword [eax], ecx
add bx, 4
movsx eax, bx
movsx edx, word [ebp + eax*2 - 0x2038]
movsx ecx, word [ebp + eax*2 - 0x2036]
shl ecx, 2
shl edx, 3
add edx, ecx
movsx ecx, word [ebp + eax*2 - 0x2034]
movsx eax, word [ebp + eax*2 - 0x2032]
add ecx, ecx
add edx, ecx
add edx, eax
mov eax, dword [ebp + 8]
add eax, esi
mov ecx, edx
add dword [eax], ecx
mov eax, esi
and eax, 0x8000000f
jns 0x40f110
dec eax
or eax, 0xfffffff0
inc eax
cmp eax, 0xf
jne 0x40f115
inc esi
cmp esi, 0xfc
jl 0x40f082
mov eax, dword [ebp + 8]
add eax, esi
mov ecx, 0x431e2a
mov ecx, dword [ecx]
mov dword [eax], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret