Function at 0x40ba97
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [0x49f2a0]
xor eax, ebp
mov dword [ebp - 4], eax
mov edx, dword [ebp + 0x10]
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
push edi
mov edi, dword [edx + 0x100]
mov dword [ebp - 0x30], ecx
mov ecx, edi
shl ecx, 4
add ecx, edx
test byte [edx + 0x104], 2
jne 0x40bad1
xor eax, eax
jmp 0x40bd2d
mov edx, dword [ecx]
xor edx, dword [eax]
push ebx
mov dword [ebp - 0x28], edx
mov edx, dword [eax + 4]
xor edx, dword [ecx + 4]
push esi
mov dword [ebp - 0x24], edx
mov edx, dword [eax + 8]
xor edx, dword [ecx + 8]
mov eax, dword [eax + 0xc]
xor eax, dword [ecx + 0xc]
mov dword [ebp - 0x20], edx
lea edx, [edi - 1]
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x28]
lea esi, [ebp - 0x18]
mov dword [ebp - 0x2c], edx
test edx, edx
je 0x40bc0d
mov edx, dword [eax + 8]
mov edi, dword [eax + 4]
shr edx, 0x10
shr edi, 0x18
mov edi, dword [edi*4 + 0x4a2bf8]
movzx edx, dl
xor edi, dword [edx*4 + 0x4a27f8]
mov edx, dword [eax + 0xc]
shr edx, 8
movzx edx, dl
xor edi, dword [edx*4 + 0x4a23f8]
movzx edx, byte [eax]
xor edi, dword [edx*4 + 0x4a1ff8]
sub ecx, 0x10
xor edi, dword [ecx]
mov dword [esi], edi
mov ebx, dword [eax]
mov edx, dword [eax + 0xc]
mov edi, dword [eax + 8]
shr ebx, 8
shr edi, 0x18
shr edx, 0x10
movzx edx, dl
movzx ebx, bl
mov ebx, dword [ebx*4 + 0x4a23f8]
xor ebx, dword [edi*4 + 0x4a2bf8]
xor ebx, dword [edx*4 + 0x4a27f8]
movzx edx, byte [eax + 4]
xor ebx, dword [edx*4 + 0x4a1ff8]
xor ebx, dword [ecx + 4]
mov dword [esi + 4], ebx
mov ebx, dword [eax + 4]
mov edi, dword [eax + 0xc]
mov edx, dword [eax]
shr edi, 0x18
mov edi, dword [edi*4 + 0x4a2bf8]
shr edx, 0x10
movzx edx, dl
shr ebx, 8
movzx ebx, bl
xor edi, dword [ebx*4 + 0x4a23f8]
xor edi, dword [edx*4 + 0x4a27f8]
movzx edx, byte [eax + 8]
xor edi, dword [edx*4 + 0x4a1ff8]
xor edi, dword [ecx + 8]
mov dword [esi + 8], edi
mov edx, dword [eax + 4]
mov edi, dword [eax]
shr edx, 0x10
shr edi, 0x18
mov edi, dword [edi*4 + 0x4a2bf8]
movzx edx, dl
xor edi, dword [edx*4 + 0x4a27f8]
mov edx, dword [eax + 8]
shr edx, 8
movzx edx, dl
xor edi, dword [edx*4 + 0x4a23f8]
movzx edx, byte [eax + 0xc]
xor edi, dword [edx*4 + 0x4a1ff8]
mov edx, eax
xor edi, dword [ecx + 0xc]
dec dword [ebp - 0x2c]
mov dword [esi + 0xc], edi
mov eax, esi
mov esi, edx
jne 0x40bb09
mov eax, dword [ebp - 0x14]
mov edx, dword [ebp - 0x10]
shr edx, 0x10
movzx edx, dl
shr eax, 0x18
mov eax, dword [eax*4 + 0x4a0680]
mov ebx, dword [ebp - 0xc]
shl eax, 8
xor eax, dword [edx*4 + 0x4a0680]
mov edx, dword [ebp - 0xc]
shr edx, 8
movzx edx, dl
shr ebx, 0x10
shl eax, 8
xor eax, dword [edx*4 + 0x4a0680]
mov edx, dword [ebp - 0x18]
movzx esi, dl
movzx edi, bl
shl eax, 8
xor eax, dword [esi*4 + 0x4a0680]
mov esi, dword [ebp - 0x10]
shr esi, 0x18
mov esi, dword [esi*4 + 0x4a0680]
mov ebx, edx
shr ebx, 8
shl esi, 8
xor esi, dword [edi*4 + 0x4a0680]
movzx edi, bl
shl esi, 8
xor esi, dword [edi*4 + 0x4a0680]
movzx edi, byte [ebp - 0x14]
mov ebx, edx
shr ebx, 0x10
movzx ebx, bl
shl esi, 8
xor esi, dword [edi*4 + 0x4a0680]
mov edi, dword [ebp - 0xc]
shr edi, 0x18
mov edi, dword [edi*4 + 0x4a0680]
shl edi, 8
xor edi, dword [ebx*4 + 0x4a0680]
mov ebx, dword [ebp - 0x14]
shr ebx, 8
movzx ebx, bl
xor eax, dword [ecx - 0x10]
xor esi, dword [ecx - 0xc]
shl edi, 8
xor edi, dword [ebx*4 + 0x4a0680]
movzx ebx, byte [ebp - 0x10]
shr edx, 0x18
mov edx, dword [edx*4 + 0x4a0680]
shl edi, 8
xor edi, dword [ebx*4 + 0x4a0680]
mov ebx, dword [ebp - 0x14]
xor edi, dword [ecx - 8]
shr ebx, 0x10
movzx ebx, bl
shl edx, 8
xor edx, dword [ebx*4 + 0x4a0680]
mov ebx, dword [ebp - 0x10]
shr ebx, 8
shl edx, 8
movzx ebx, bl
xor edx, dword [ebx*4 + 0x4a0680]
movzx ebx, byte [ebp - 0xc]
shl edx, 8
xor edx, dword [ebx*4 + 0x4a0680]
xor edx, dword [ecx - 4]
mov ecx, dword [ebp - 0x30]
mov dword [ecx], eax
mov dword [ecx + 4], esi
xor eax, eax
pop esi
mov dword [ecx + 8], edi
mov dword [ecx + 0xc], edx
inc eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop edi
call fcn.00450b32
leave
ret 0xc