Function at 0x1004aa30
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0x10]
sub esp, 0x10
mov edx, eax
push ebx
push esi
mov esi, eax
mov ebx, eax
shr esi, 5
inc esi
push edi
cmp eax, esi
jb 0x1004aa6e
nop word [eax + eax]
mov eax, dword [ebp + 0xc]
movzx ecx, byte [eax + edx - 1]
mov eax, ebx
shl eax, 5
sub edx, esi
add ecx, eax
mov eax, ebx
shr eax, 2
add ecx, eax
xor ebx, ecx
cmp edx, esi
jae 0x1004aa50
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x10]
mov dword [ebp - 8], eax
mov ecx, dword [eax + 8]
mov eax, dword [eax]
dec ecx
and ecx, ebx
mov edi, dword [eax + ecx*4]
test edi, edi
je 0x1004ab05
mov eax, dword [ebp + 0x10]
nop dword [eax]
cmp dword [edi + 0xc], eax
jne 0x1004aafc
mov ecx, dword [ebp + 0xc]
lea edx, [edi + 0x10]
mov esi, eax
sub esi, 4
jb 0x1004aab3
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x1004aabc
add ecx, 4
add edx, 4
sub esi, 4
jae 0x1004aaa2
cmp esi, 0xfffffffc
je 0x1004abd5
mov al, byte [ecx]
cmp al, byte [edx]
jne 0x1004aaf9
cmp esi, 0xfffffffd
je 0x1004abd5
mov al, byte [ecx + 1]
cmp al, byte [edx + 1]
jne 0x1004aaf9
cmp esi, 0xfffffffe
je 0x1004abd5
mov al, byte [ecx + 2]
cmp al, byte [edx + 2]
jne 0x1004aaf9
cmp esi, 0xffffffff
je 0x1004abd5
mov al, byte [ecx + 3]
cmp al, byte [edx + 3]
je 0x1004abd5
mov eax, dword [ebp + 0x10]
mov edi, dword [edi]
test edi, edi
jne 0x1004aa90
mov edx, dword [ebp + 8]
mov esi, dword [ebp + 0x10]
lea eax, [esi + 1]
cmp eax, 0xffffffed
jbe 0x1004ab19
push edx
call fcn.10045d90
add esp, 4
lea eax, [esi + 0x11]
push eax
push 0
push 0
push dword [ebp + 8]
call fcn.10045d40
mov edi, eax
mov eax, dword [ebp + 8]
push esi
push dword [ebp + 0xc]
mov dword [ebp - 0x10], edi
mov dword [edi + 0xc], esi
mov dword [edi + 8], ebx
mov ecx, dword [eax + 0x10]
lea eax, [edi + 0x10]
push eax
mov cl, byte [ecx + 0x14]
and cl, 3
mov byte [edi + 4], 4
mov byte [edi + 5], cl
mov byte [edi + 6], 0
call fcn.100757d0
mov eax, dword [ebp + 8]
add esp, 0x1c
mov byte [edi + esi + 0x10], 0
mov edx, dword [eax + 0x10]
mov eax, dword [edx + 8]
dec eax
and eax, ebx
lea ecx, [eax*4]
mov eax, dword [edx]
mov eax, dword [ecx + eax]
mov dword [edi], eax
mov eax, dword [edx]
mov dword [ecx + eax], edi
inc dword [edx + 4]
mov ecx, dword [edx + 8]
cmp dword [edx + 4], ecx
jbe 0x1004ac8c
cmp ecx, 0x3ffffffe
jg 0x1004ac8c
mov ebx, dword [ebp + 8]
add ecx, ecx
mov dword [ebp + 0x10], ecx
mov eax, dword [ebx + 0x10]
cmp byte [eax + 0x15], 2
je 0x1004ac8c
lea eax, [ecx + 1]
lea edi, [ecx*4]
cmp eax, 0x3fffffff
ja 0x1004abfd
push edi
push 0
push 0
push ebx
call fcn.10045d40
mov esi, eax
add esp, 0x10
mov dword [ebp - 4], esi
jmp 0x1004ac0b
mov ecx, dword [ebp - 8]
mov al, byte [edi + 5]
movzx edx, byte [ecx + 0x14]
not edx
movzx ecx, al
and edx, ecx
test dl, 3
je 0x1004ac8c
xor al, 3
mov byte [edi + 5], al
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push ebx
call fcn.10045d90
add esp, 4
mov dword [ebp - 4], eax
mov esi, eax
mov ecx, dword [ebp + 0x10]
mov ebx, dword [ebx + 0x10]
mov dword [ebp - 0xc], ebx
test ecx, ecx
jle 0x1004ac26
shr edi, 2
xor eax, eax
mov ecx, edi
mov edi, esi
rep stosd dword es:[edi], eax
mov ecx, dword [ebp + 0x10]
mov eax, dword [ebx + 8]
xor edi, edi
mov dword [ebp - 8], edi
test eax, eax
jle 0x1004ac6e
mov eax, dword [ebx]
mov eax, dword [eax + edi*4]
test eax, eax
je 0x1004ac5d
mov edi, dword [ebp - 4]
lea ebx, [ecx - 1]
mov ecx, dword [eax + 8]
mov esi, dword [eax]
and ecx, ebx
lea edx, [edi + ecx*4]
mov ecx, dword [edx]
mov dword [eax], ecx
mov dword [edx], eax
mov eax, esi
test esi, esi
jne 0x1004ac41
mov edi, dword [ebp - 8]
mov ebx, dword [ebp - 0xc]
mov eax, dword [ebx + 8]
inc edi
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 8], edi
cmp edi, eax
jl 0x1004ac32
mov esi, dword [ebp - 4]
push 0
shl eax, 2
push eax
push dword [ebx]
push dword [ebp + 8]
call fcn.10045d40
mov ecx, dword [ebp + 0x10]
add esp, 0x10
mov edi, dword [ebp - 0x10]
mov dword [ebx + 8], ecx
mov dword [ebx], esi
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret