Function at 0x403178
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
mov ebx, ecx
push esi
push edi
mov dword [ebp - 0x18], ebx
inc dword [ebx + 0x80c]
lea ecx, [ebx + 4]
mov esi, dword [ebx + 0x804]
lea eax, [ebx + 0x404]
mov dword [ebp - 8], ecx
lea edx, [ebx + 0x604]
mov ecx, dword [ebx + 0x808]
mov edi, eax
add ecx, dword [ebx + 0x80c]
mov dword [ebp - 4], edi
mov dword [ebp - 0xc], edx
mov dword [ebp - 0x10], edx
cmp eax, edx
jae 0x403428
mov ebx, eax
mov edx, dword [edi]
mov edi, esi
mov eax, dword [ebp - 0xc]
shl edi, 0xd
xor edi, esi
mov esi, dword [ebp - 4]
add edi, dword [eax]
add eax, 4
mov dword [ebp - 0xc], eax
mov eax, edx
and eax, 0x3fc
mov eax, dword [eax + ebx]
add eax, ecx
add eax, edi
mov dword [esi], eax
add esi, 4
shr eax, 8
and eax, 0x3fc
mov dword [ebp - 4], esi
mov ecx, dword [eax + ebx]
mov eax, dword [ebp - 8]
add ecx, edx
mov dword [eax], ecx
add eax, 4
mov edx, dword [esi]
mov esi, edi
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0xc]
shr esi, 6
xor esi, edi
mov edi, dword [ebp - 4]
add esi, dword [eax]
add eax, 4
mov dword [ebp - 0xc], eax
mov eax, edx
and eax, 0x3fc
mov eax, dword [eax + ebx]
add eax, ecx
add eax, esi
mov dword [edi], eax
add edi, 4
shr eax, 8
and eax, 0x3fc
mov dword [ebp - 4], edi
mov ecx, dword [eax + ebx]
mov eax, dword [ebp - 8]
add ecx, edx
mov dword [eax], ecx
add eax, 4
mov edx, dword [edi]
mov edi, esi
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0xc]
shl edi, 2
xor edi, esi
mov esi, dword [ebp - 4]
add edi, dword [eax]
add eax, 4
mov dword [ebp - 0xc], eax
mov eax, edx
and eax, 0x3fc
mov eax, dword [eax + ebx]
add eax, ecx
add eax, edi
mov dword [esi], eax
add esi, 4
shr eax, 8
and eax, 0x3fc
mov dword [ebp - 4], esi
mov ecx, dword [eax + ebx]
mov eax, dword [ebp - 8]
add ecx, edx
mov dword [eax], ecx
add eax, 4
mov edx, dword [esi]
mov esi, edi
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0xc]
shr esi, 0x10
xor esi, edi
add esi, dword [eax]
mov edi, dword [ebp - 4]
add eax, 4
mov dword [ebp - 0xc], eax
mov eax, edx
and eax, 0x3fc
mov eax, dword [eax + ebx]
add eax, ecx
add eax, esi
mov dword [edi], eax
add edi, 4
shr eax, 8
and eax, 0x3fc
mov dword [ebp - 4], edi
mov ecx, dword [eax + ebx]
mov eax, dword [ebp - 8]
add ecx, edx
mov dword [eax], ecx
add eax, 4
mov dword [ebp - 8], eax
cmp edi, dword [ebp - 0x10]
jb 0x4031c5
mov eax, ebx
mov ebx, dword [ebp - 0x18]
mov edx, dword [edi]
mov edi, esi
shl edi, 0xd
xor edi, esi
lea esi, [ebx + 0x404]
add edi, dword [eax]
add eax, 4
mov dword [ebp - 0xc], eax
mov eax, edx
and eax, 0x3fc
mov eax, dword [eax + esi]
add eax, ecx
mov ecx, dword [ebp - 4]
add eax, edi
mov dword [ecx], eax
add ecx, 4
shr eax, 8
and eax, 0x3fc
mov dword [ebp - 4], ecx
mov ecx, dword [eax + esi]
mov esi, edi
mov eax, dword [ebp - 8]
add ecx, edx
mov edx, dword [ebp - 4]
shr esi, 6
xor esi, edi
lea edi, [ebx + 0x404]
mov dword [eax], ecx
add eax, 4
mov edx, dword [edx]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0xc]
add esi, dword [eax]
add eax, 4
mov dword [ebp - 0xc], eax
mov eax, edx
and eax, 0x3fc
mov eax, dword [eax + edi]
add eax, ecx
mov ecx, dword [ebp - 4]
add eax, esi
mov dword [ecx], eax
add ecx, 4
shr eax, 8
and eax, 0x3fc
mov dword [ebp - 4], ecx
mov ecx, dword [eax + edi]
mov edi, esi
mov eax, dword [ebp - 8]
add ecx, edx
mov edx, dword [ebp - 4]
shl edi, 2
xor edi, esi
lea esi, [ebx + 0x404]
mov dword [eax], ecx
add eax, 4
mov edx, dword [edx]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0xc]
add edi, dword [eax]
add eax, 4
mov dword [ebp - 0xc], eax
mov eax, edx
and eax, 0x3fc
mov eax, dword [eax + esi]
add eax, ecx
mov ecx, dword [ebp - 4]
add eax, edi
mov dword [ecx], eax
add ecx, 4
shr eax, 8
and eax, 0x3fc
mov dword [ebp - 4], ecx
mov ecx, dword [eax + esi]
mov eax, dword [ebp - 8]
add ecx, edx
mov edx, dword [ebp - 4]
mov dword [eax], ecx
add eax, 4
mov edx, dword [edx]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0xc]
mov esi, edi
shr esi, 0x10
xor esi, edi
lea edi, [ebx + 0x404]
add esi, dword [eax]
add eax, 4
mov dword [ebp - 0xc], eax
mov eax, edx
and eax, 0x3fc
mov eax, dword [eax + edi]
add eax, ecx
mov ecx, dword [ebp - 4]
add eax, esi
mov dword [ecx], eax
add ecx, 4
shr eax, 8
and eax, 0x3fc
mov dword [ebp - 4], ecx
mov ecx, dword [eax + edi]
mov eax, dword [ebp - 8]
add ecx, edx
mov edi, dword [ebp - 4]
mov dword [eax], ecx
add eax, 4
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp - 0x10]
jb 0x4032e7
pop edi
mov dword [ebx + 0x804], esi
pop esi
mov dword [ebx + 0x808], ecx
pop ebx
leave
ret