Function at 0x40a254
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30c
cmp dword [0x44bd6c], 0
jne 0x40a4db
push ebx
push esi
xor edx, edx
xor ebx, ebx
push edi
inc edx
mov eax, edx
mov byte [ebp + ebx - 0x30c], dl
and al, 0x80
mov byte [ebp + ebx - 0x20d], dl
mov byte [ebp + edx - 0x10c], bl
inc ebx
movzx ecx, al
lea eax, [edx + edx]
neg ecx
sbb ecx, ecx
and ecx, 0x11b
xor ecx, eax
xor edx, ecx
cmp edx, 1
jne 0x40a272
xor eax, eax
inc eax
xor ecx, ecx
mov dword [ecx + 0x447d00], eax
test eax, eax
je 0x40a2c6
movzx eax, byte [ebp + eax - 0x10c]
movzx eax, byte [ebp + eax - 0x2f3]
jmp 0x40a2c8
xor eax, eax
add ecx, 4
cmp ecx, 0x28
jb 0x40a2aa
xor ebx, ebx
test bl, bl
je 0x40a2ed
movzx eax, bl
lea ecx, [ebp - 0x20d]
movzx eax, byte [ebp + eax - 0x10c]
sub ecx, eax
mov al, byte [ecx]
jmp 0x40a2ef
xor al, al
movzx eax, al
lea ecx, [eax + eax]
xor ecx, eax
add ecx, ecx
xor ecx, eax
add ecx, ecx
xor ecx, eax
add ecx, ecx
xor ecx, eax
mov edx, ecx
shr edx, 8
xor dl, cl
xor dl, 0x63
je 0x40a334
movzx ecx, dl
movzx eax, byte [ebp + ecx - 0x10c]
movzx edi, byte [ebp + eax - 0x2f3]
movzx eax, byte [ebp + ecx - 0x10c]
movzx esi, byte [ebp + eax - 0x30b]
jmp 0x40a338
xor edi, edi
xor esi, esi
movzx ecx, dl
shl esi, 8
or esi, ecx
mov dword [ebx*4 + 0x444d00], ecx
shl esi, 8
or esi, ecx
shl esi, 8
or esi, edi
mov eax, esi
mov dword [ebx*4 + 0x445d00], esi
rol eax, 8
mov dword [ebx*4 + 0x446100], eax
mov eax, esi
rol eax, 0x10
mov dword [ebx*4 + 0x446500], eax
mov eax, ecx
rol eax, 8
mov dword [ebx*4 + 0x445100], eax
mov eax, ecx
rol eax, 0x10
ror ecx, 8
mov dword [ebx*4 + 0x445500], eax
mov dword [ebx*4 + 0x445900], ecx
movzx ecx, bl
mov eax, ecx
ror esi, 8
shl eax, 3
xor eax, ecx
mov dword [ebx*4 + 0x446900], esi
shl eax, 2
xor eax, ecx
lea edx, [eax + eax]
mov ecx, edx
shr ecx, 8
mov al, cl
xor al, dl
cmp al, 5
je 0x40a430
movzx eax, dl
xor eax, 5
xor eax, ecx
lea ecx, [ebp - 0x20d]
movzx eax, byte [ebp + eax - 0x10c]
sub ecx, eax
mov cl, byte [ecx]
mov byte [ebp - 1], cl
test cl, cl
je 0x40a434
movzx edi, cl
mov byte [ebp - 1], cl
movzx eax, byte [ebp + edi - 0x10c]
movzx edx, byte [ebp + eax - 0x22d]
movzx eax, byte [ebp + edi - 0x10c]
movzx eax, byte [ebp + eax - 0x245]
mov dword [ebp - 8], eax
movzx eax, byte [ebp + edi - 0x10c]
movzx eax, byte [ebp + eax - 0x21e]
mov dword [ebp - 0xc], eax
movzx eax, byte [ebp + edi - 0x10c]
mov ecx, dword [ebp - 0xc]
movzx esi, byte [ebp + eax - 0x2a4]
mov eax, dword [ebp - 8]
jmp 0x40a43e
mov byte [ebp - 1], 0
xor edx, edx
xor eax, eax
xor ecx, ecx
xor esi, esi
xor edi, edi
shl esi, 8
or esi, ecx
shl esi, 8
or esi, eax
shl esi, 8
or esi, edx
mov ecx, esi
mov dword [ebx*4 + 0x443d00], esi
rol ecx, 0x10
mov eax, esi
ror eax, 8
mov edx, esi
mov dword [ebx*4 + 0x444500], ecx
mov dword [ebx*4 + 0x444900], eax
mov dword [edi*4 + 0x447500], ecx
movzx ecx, byte [ebp - 1]
mov dword [edi*4 + 0x447900], eax
mov eax, ecx
rol eax, 8
mov dword [ebx*4 + 0x443100], eax
mov eax, ecx
rol edx, 8
mov dword [ebx*4 + 0x442d00], ecx
rol eax, 0x10
ror ecx, 8
mov dword [ebx*4 + 0x444100], edx
mov dword [ebx*4 + 0x443500], eax
mov dword [ebx*4 + 0x443900], ecx
inc ebx
mov dword [edi*4 + 0x446d00], esi
mov dword [edi*4 + 0x447100], edx
cmp ebx, 0x100
jb 0x40a2d2
pop edi
pop esi
mov dword [0x44bd6c], 1
pop ebx
xor eax, eax
leave
ret