Function at 0x412010
Capabilities:
Encode data using xor

Disassembly:
push edi
mov edi, ecx
mov eax, 0x5a59
cmp word [edi + 0xb2], ax
jne 0x411e37
push ebx
push esi
lea esi, [edi + 0xac]
or eax, 0xffffffff
mov ebx, 6
movzx ecx, byte [esi]
lea esi, [esi + 1]
movzx edx, al
xor edx, ecx
shr eax, 8
xor eax, dword [edx*4 + 0x431420]
dec ebx
jne 0x411d95
movzx edx, byte [edi + 0xab]
not eax
movzx ecx, byte [edi + 0xaa]
shl edx, 8
or edx, ecx
movzx ecx, byte [edi + 0xa9]
shl edx, 8
or edx, ecx
movzx ecx, byte [edi + 0xa8]
shl edx, 8
or edx, ecx
pop esi
pop ebx
cmp eax, edx
jne 0x411e37
movzx ecx, byte [edi + 0xaf]
movzx eax, byte [edi + 0xae]
mov edx, dword [edi + 0x7c]
shl ecx, 8
or ecx, eax
movzx eax, byte [edi + 0xad]
shl ecx, 8
or ecx, eax
movzx eax, byte [edi + 0xac]
shl ecx, 8
or ecx, eax
mov eax, dword [edi + 0x78]
shrd eax, edx, 2
shr edx, 2
cmp eax, ecx
jne 0x411e37
test edx, edx
jne 0x411e37
cmp byte [edi + 0xb0], dl
jne 0x411e37
movzx eax, byte [edi + 0xb1]
cmp eax, dword [edi + 0x1c]
lea eax, [edx + 1]
je 0x411e3c
mov eax, 7
pop edi
ret
push ebx
push esi
push edi
mov edi, edx
mov esi, ecx
mov eax, dword [edi + 4]
mov dword [esi + 0x10], eax
lea ecx, [ecx]
mov eax, dword [esi]
cmp eax, 9
ja case.default.0x412027
jmp dword [eax*4 + 0x412214]
mov edx, edi
mov ecx, esi
call fcn.00411860
test al, al
je 0x41220d
mov ecx, esi
mov dword [esi], 1
call fcn.00411cb0
test eax, eax
jne 0x41213c
mov ecx, dword [edi + 4]
cmp ecx, dword [edi + 8]
je 0x41220d
mov eax, dword [edi]
mov al, byte [ecx + eax]
test al, al
jne 0x412077
mov dword [esi + 0x10], ecx
inc dword [edi + 4]
mov dword [esi], 6
jmp case.default.0x412027
movzx eax, al
mov dword [esi + 0xa0], 0
mov dword [esi], 2
lea eax, [eax*4 + 4]
mov dword [esi + 0x38], eax
mov dword [esi + 0xa4], eax
mov edx, edi
mov ecx, esi
call fcn.00411860
test al, al
je 0x41220d
mov ecx, esi
call fcn.00411e40
test eax, eax
jne 0x41213c
mov dword [esi], 3
mov edx, edi
mov ecx, esi
call fcn.00411980
cmp eax, 1
jne 0x41213c
mov dword [esi], 4
mov eax, dword [esi + 0x40]
and eax, 3
or eax, 0
je 0x41210e
nop
mov edx, dword [edi + 4]
cmp edx, dword [edi + 8]
je 0x41220d
mov eax, dword [edi]
mov cl, byte [edx + eax]
lea eax, [edx + 1]
mov dword [edi + 4], eax
test cl, cl
jne 0x412137
add dword [esi + 0x40], 1
mov eax, dword [esi + 0x40]
adc dword [esi + 0x44], 0
and eax, 3
or eax, 0
jne 0x4120e0
mov dword [esi], 5
cmp dword [esi + 0x1c], 1
jne 0x41212c
push ecx
mov edx, edi
mov ecx, esi
call fcn.00411c50
add esp, 4
cmp eax, 1
jne 0x41213c
mov dword [esi], 1
jmp case.default.0x412027
mov eax, 7
pop edi
pop esi
pop ebx
ret
mov edx, edi
mov ecx, esi
call fcn.00411b20
cmp eax, 1
jne 0x41213c
mov dword [esi], 7
mov eax, dword [edi + 4]
sub eax, dword [esi + 0x10]
add eax, dword [esi + 0x78]
and eax, 3
or eax, 0
je 0x412196
mov edx, dword [edi + 8]
jmp 0x412170
mov ecx, dword [edi + 4]
cmp ecx, edx
je 0x412204
mov eax, dword [edi]
mov al, byte [ecx + eax]
inc ecx
mov dword [edi + 4], ecx
test al, al
jne 0x412137
sub ecx, dword [esi + 0x10]
add ecx, dword [esi + 0x78]
and ecx, 3
or ecx, 0
jne 0x412170
mov edx, edi
mov ecx, esi
call fcn.00411ad0
lea edx, [esi + 0x88]
mov ebx, 0x14
lea ecx, [esi + 0x58]
lea ecx, [ecx]
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x412137
add ecx, 4
add edx, 4
sub ebx, 4
jae 0x4121b0
mov dword [esi], 8
push ecx
mov edx, edi
mov ecx, esi
call fcn.00411c50
add esp, 4
cmp eax, 1
jne 0x41213c
mov dword [esi + 0xa4], 0xc
mov dword [esi], 9
mov edx, edi
mov ecx, esi
call fcn.00411860
test al, al
je 0x41220d
pop edi
mov ecx, esi
pop esi
pop ebx
jmp 0x411d70
mov edx, edi
mov ecx, esi
call fcn.00411ad0
pop edi
pop esi
xor eax, eax
pop ebx
ret