Function at 0x413020
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push ebx
push esi
mov esi, ecx
mov ebx, edx
push edi
mov dword [ebp - 8], ebx
mov dword [ebp - 4], esi
mov eax, dword [esi]
dec eax
cmp eax, 3
ja case.default.0x41303f
jmp dword [eax*4 + 0x413218]
mov eax, dword [esi + 4]
mov ecx, dword [esi + 0x38]
sub eax, 1
je 0x4130ba
sub eax, 1
jne case.default.0x41303f
mov eax, 0x10
sub eax, ecx
push eax
mov dword [ebp - 4], eax
movsx eax, al
push eax
lea eax, [esi + 0x28]
add eax, ecx
push eax
call sub.VCRUNTIME140.dll_memset
mov eax, dword [ebp - 4]
add esp, 0xc
cmp eax, 0x10
ja 0x41320e
test eax, eax
je 0x4130ca
mov eax, dword [esi + 0x28]
lea ecx, [esi + 0x3c]
mov dword [ebx], eax
mov edx, ebx
mov eax, dword [esi + 0x2c]
mov dword [ebx + 4], eax
mov eax, dword [esi + 0x30]
mov dword [ebx + 8], eax
mov eax, dword [esi + 0x34]
mov dword [ebx + 0xc], eax
call fcn.00411d90
mov eax, dword [ebp + 8]
pop edi
pop esi
pop ebx
mov dword [eax], 0x10
xor eax, eax
mov esp, ebp
pop ebp
ret
test ecx, ecx
je 0x4130ca
pop edi
pop esi
mov eax, 0x1004
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 8]
pop edi
pop esi
pop ebx
mov dword [eax], 0
xor eax, eax
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 4]
mov ecx, dword [esi + 0x38]
sub eax, 1
je 0x4130ba
sub eax, 1
jne case.default.0x41303f
mov eax, 0x10
sub eax, ecx
push eax
mov dword [ebp - 4], eax
movsx eax, al
push eax
lea eax, [esi + 0x28]
add eax, ecx
push eax
call sub.VCRUNTIME140.dll_memset
mov eax, dword [ebp - 4]
add esp, 0xc
cmp eax, 0x10
ja 0x41320e
test eax, eax
je 0x4130ca
mov eax, dword [esi + 0x28]
lea ecx, [esi + 0x3c]
xor eax, dword [esi + 0x18]
mov edx, ebx
mov dword [ebx], eax
mov eax, dword [esi + 0x2c]
xor eax, dword [esi + 0x1c]
mov dword [ebx + 4], eax
mov eax, dword [esi + 0x30]
xor eax, dword [esi + 0x20]
mov dword [ebx + 8], eax
mov eax, dword [esi + 0x34]
xor eax, dword [esi + 0x24]
mov dword [ebx + 0xc], eax
call fcn.00411d90
mov eax, dword [ebx]
mov dword [esi + 0x18], eax
mov eax, dword [ebx + 4]
mov dword [esi + 0x1c], eax
mov eax, dword [ebx + 8]
mov dword [esi + 0x20], eax
mov eax, dword [ebx + 0xc]
mov dword [esi + 0x24], eax
mov eax, dword [ebp + 8]
pop edi
pop esi
pop ebx
mov dword [eax], 0x10
xor eax, eax
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 0x38]
lea edi, [esi + 0x18]
mov dword [ebp - 4], eax
lea ecx, [esi + 0x3c]
mov eax, dword [ebp + 8]
mov edx, edi
mov dword [eax], 0x10
call fcn.00411d90
mov edx, dword [ebp - 4]
test edx, edx
je 0x4131b4
mov ecx, edx
nop dword [eax + eax]
mov al, byte [edi + 0x10]
lea edi, [edi + 1]
xor al, byte [edi - 1]
lea ebx, [ebx + 1]
mov byte [ebx - 1], al
sub ecx, 1
jne 0x4131a0
mov eax, dword [ebp + 8]
pop edi
pop esi
pop ebx
mov dword [eax], edx
xor eax, eax
mov esp, ebp
pop ebp
ret
mov ebx, dword [esi + 0x38]
add ecx, 0x3c
mov edi, dword [ebp + 8]
add esi, 0x18
mov edx, esi
mov dword [edi], ebx
call fcn.00411d90
mov ecx, dword [ebp - 4]
push ebx
push esi
push dword [ebp - 8]
mov eax, dword [ecx + 0x28]
xor dword [esi], eax
mov eax, dword [ecx + 0x2c]
xor dword [ecx + 0x1c], eax
mov eax, dword [ecx + 0x30]
xor dword [ecx + 0x20], eax
mov eax, dword [ecx + 0x34]
xor dword [ecx + 0x24], eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov dword [edi], ebx
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, 0x1001
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret