Function at 0x4797c0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 8]
sub ebx, esi
sar ebx, 2
mov dword [ebp - 0x14], ecx
mov dword [ebp - 8], esi
mov dword [ebp - 0x2c], ebx
test ebx, ebx
je 0x47997e
mov eax, dword [ecx + 4]
sub eax, dword [ecx]
sar eax, 2
mov dword [ebp - 0xc], eax
cmp ebx, 0x26f
jb 0x4797fe
mov ecx, 0xb
jmp 0x479827
cmp ebx, 0x44
jb 0x47980a
mov ecx, 7
jmp 0x479827
cmp ebx, 0x27
jb 0x479816
mov ecx, 5
jmp 0x479827
cmp ebx, 7
jb 0x479822
mov ecx, 3
jmp 0x479827
lea ecx, [ebx - 1]
shr ecx, 1
mov edx, ebx
sub edx, ecx
shr edx, 1
add ecx, edx
mov dword [ebp - 0x10], edx
mov dword [ebp - 0x28], ecx
cmp ebx, eax
ja 0x47983f
inc eax
mov dword [ebp - 4], eax
jmp 0x479842
mov dword [ebp - 4], ebx
push edi
mov eax, 0x8b8b8b8b
mov ecx, ebx
mov edi, esi
rep stosd dword es:[edi], eax
mov eax, dword [ebp - 4]
xor ecx, ecx
test eax, eax
je 0x4798f8
mov edi, dword [ebp - 0xc]
nop
lea eax, [ecx + edx]
xor edx, edx
div ebx
lea eax, [esi + edx*4]
xor edx, edx
mov dword [ebp - 0x18], eax
mov eax, dword [eax]
mov dword [ebp - 0x20], eax
mov eax, ecx
div ebx
mov eax, edx
xor edx, edx
mov dword [ebp - 0x1c], eax
lea eax, [esi + eax*4]
mov dword [ebp - 0x24], eax
lea eax, [ecx - 1]
div ebx
mov eax, dword [ebp - 0x24]
mov esi, dword [esi + edx*4]
xor esi, dword [ebp - 0x20]
xor esi, dword [eax]
mov eax, esi
shr eax, 0x1b
xor eax, esi
imul edx, eax, 0x19660d
test ecx, ecx
jne 0x4798aa
mov eax, edi
jmp 0x4798bf
cmp ecx, edi
ja 0x4798bc
mov eax, dword [ebp - 0x14]
mov eax, dword [eax]
mov eax, dword [eax + ecx*4 - 4]
add eax, dword [ebp - 0x1c]
jmp 0x4798bf
mov eax, dword [ebp - 0x1c]
lea esi, [eax + edx]
mov edi, dword [ebp - 8]
mov eax, dword [ebp - 0x20]
add eax, edx
mov edx, dword [ebp - 0x18]
mov dword [edx], eax
xor edx, edx
mov eax, dword [ebp - 0x28]
add eax, ecx
inc ecx
div ebx
add dword [edi + edx*4], esi
lea eax, [edi + edx*4]
mov eax, dword [ebp - 0x24]
mov edi, dword [ebp - 0xc]
mov edx, dword [ebp - 0x10]
mov dword [eax], esi
mov eax, dword [ebp - 4]
mov esi, dword [ebp - 8]
cmp ecx, eax
jb 0x479860
add eax, ebx
mov dword [ebp - 0x10], eax
cmp ecx, eax
jae 0x47997d
mov eax, dword [ebp - 0x28]
dec ecx
inc edx
mov dword [ebp - 4], ecx
inc eax
mov dword [ebp - 0xc], edx
mov dword [ebp - 0x18], eax
lea eax, [edx + ecx]
xor edx, edx
div ebx
lea ebx, [esi + edx*4]
xor edx, edx
lea eax, [ecx + 1]
mov edi, dword [ebx]
mov dword [ebp - 0x14], eax
div dword [ebp - 0x2c]
mov eax, dword [ebp - 4]
mov esi, edx
xor edx, edx
div dword [ebp - 0x2c]
mov eax, dword [ebp - 8]
mov ecx, dword [eax + edx*4]
xor edx, edx
add ecx, dword [eax + esi*4]
add ecx, edi
mov eax, ecx
shr eax, 0x1b
xor eax, ecx
imul eax, eax, 0x5d588b65
xor edi, eax
mov ecx, eax
mov eax, dword [ebp - 4]
sub ecx, esi
add eax, dword [ebp - 0x18]
mov dword [ebx], edi
mov ebx, dword [ebp - 0x2c]
div ebx
mov edi, dword [ebp - 8]
xor dword [edi + edx*4], ecx
lea eax, [edi + edx*4]
mov edx, dword [ebp - 0xc]
mov dword [edi + esi*4], ecx
mov esi, edi
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 4], ecx
lea eax, [ecx + 1]
cmp eax, dword [ebp - 0x10]
jb 0x479910
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8