Function at 0x40bd10
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
push ebx
mov eax, ecx
push esi
mov ebx, dword [eax + 4]
sub ebx, dword [eax]
push edi
mov edi, dword [ebp + 0xc]
sar ebx, 2
mov dword [ebp - 0x1c], eax
cmp edi, 0x26f
jb 0x40bd38
mov eax, 0xb
jmp 0x40bd61
cmp edi, 0x44
jb 0x40bd44
mov eax, 7
jmp 0x40bd61
cmp edi, 0x27
jb 0x40bd50
mov eax, 5
jmp 0x40bd61
cmp edi, 7
jb 0x40bd5c
mov eax, 3
jmp 0x40bd61
lea eax, [edi - 1]
shr eax, 1
mov edx, edi
sub edx, eax
shr edx, 1
add eax, edx
mov dword [ebp - 0x18], edx
mov dword [ebp - 4], eax
cmp edi, ebx
ja 0x40bd7b
lea eax, [ebx + 1]
mov dword [ebp - 8], eax
jmp 0x40bd7e
mov dword [ebp - 8], edi
mov esi, dword [ebp + 8]
test edi, edi
je 0x40bd93
mov ecx, edi
mov eax, 0x8b8b8b8b
mov edi, esi
rep stosd dword es:[edi], eax
mov edi, dword [ebp + 0xc]
mov eax, dword [ebp - 8]
xor ecx, ecx
test eax, eax
je 0x40be47
jmp 0x40bda5
mov esi, dword [ebp + 8]
lea eax, [ecx + edx]
xor edx, edx
div edi
mov eax, dword [esi + edx*4]
mov dword [ebp - 0x10], eax
mov eax, ecx
lea edx, [esi + edx*4]
mov dword [ebp - 0x24], edx
xor edx, edx
div edi
mov eax, edx
mov dword [ebp - 0xc], eax
lea eax, [esi + eax*4]
mov dword [ebp - 0x14], eax
xor edx, edx
lea eax, [ecx - 1]
div edi
mov eax, dword [esi + edx*4]
xor eax, dword [ebp - 0x10]
mov edx, dword [ebp - 0x14]
xor eax, dword [edx]
mov edx, eax
shr edx, 0x1b
xor edx, eax
imul edx, edx, 0x19660d
mov dword [ebp - 0x20], edx
test ecx, ecx
jne 0x40bdf3
mov eax, ebx
jmp 0x40be11
cmp ecx, ebx
ja 0x40be0e
xor edx, edx
lea eax, [ecx - 1]
div ebx
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax]
mov eax, dword [eax + edx*4]
add eax, dword [ebp - 0xc]
mov edx, dword [ebp - 0x20]
jmp 0x40be11
mov eax, dword [ebp - 0xc]
lea esi, [eax + edx]
mov eax, dword [ebp - 0x10]
add eax, edx
mov edx, dword [ebp - 0x24]
mov dword [edx], eax
mov eax, dword [ebp - 4]
add eax, ecx
xor edx, edx
div edi
mov edi, dword [ebp + 8]
inc ecx
add dword [edi + edx*4], esi
lea eax, [edi + edx*4]
mov eax, dword [ebp - 0x14]
mov edi, dword [ebp + 0xc]
mov edx, dword [ebp - 0x18]
mov dword [eax], esi
mov eax, dword [ebp - 8]
cmp ecx, eax
jb 0x40bda2
add eax, edi
mov dword [ebp - 0x1c], eax
cmp ecx, eax
jae 0x40becf
or ebx, 0xffffffff
sub ebx, edx
sub dword [ebp - 4], edx
lea eax, [ecx + edx]
mov dword [ebp - 8], eax
mov dword [ebp - 0x24], ebx
xor edx, edx
div edi
mov esi, dword [ebp + 8]
mov ebx, dword [esi + edx*4]
lea eax, [esi + edx*4]
mov dword [ebp - 0x20], eax
xor edx, edx
mov eax, ecx
div edi
mov eax, dword [ebp - 8]
add eax, dword [ebp - 0x24]
inc ecx
mov edi, edx
xor edx, edx
div dword [ebp + 0xc]
mov eax, dword [esi + edx*4]
add eax, ebx
add eax, dword [esi + edi*4]
mov edx, eax
shr edx, 0x1b
xor edx, eax
mov eax, dword [ebp - 0x20]
imul edx, edx, 0x5d588b65
xor ebx, edx
mov dword [eax], ebx
mov eax, dword [ebp - 4]
add eax, dword [ebp - 8]
mov esi, edx
xor edx, edx
div dword [ebp + 0xc]
mov ebx, dword [ebp + 8]
sub esi, edi
xor dword [ebx + edx*4], esi
mov dword [ebx + edi*4], esi
mov edi, dword [ebp + 0xc]
lea eax, [ebx + edx*4]
mov eax, dword [ebp - 8]
inc eax
mov dword [ebp - 8], eax
cmp ecx, dword [ebp - 0x1c]
jb 0x40be65
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8