Function at 0x10004aaf
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x24
push ebx
push ebp
push esi
push edi
mov eax, dword [0x101a4438]
xor edx, edx
mov bl, byte [esp + 0x3c]
movzx ecx, bl
div ecx
mov eax, dword [0x101a4480]
mov ecx, dword [esp + 0x38]
mov bh, byte [0x101a442a]
mov byte [esp + 0x3c], dl
mov si, word [0x101a4454]
movzx edx, si
sub edx, dword [ecx + eax*4]
inc eax
mov dword [0x101a4480], eax
mov eax, 0xffff
add si, ax
mov ebp, dword [esp + 0x48]
movzx eax, bh
xor ax, word [0x101a445c]
dec bl
movzx eax, ax
mov dword [esp + 0x2c], eax
mov eax, dword [0x101a4458]
dec eax
mov word [0x101a4454], si
mov dword [0x101a4458], eax
and eax, 0x139a
mov dword [esp + 0x28], eax
mov edi, dword [esp + 0x44]
movzx eax, bl
inc bl
mov dword [esp + 0x18], edx
movzx eax, byte [edi + eax*2]
mov dword [esp + 0x1c], eax
movzx eax, bl
mov ecx, eax
mov dword [esp + 0x14], eax
movzx eax, byte [0x101a4428]
cdq
idiv dword [ebp + ecx*4]
mov eax, dword [0x101a4440]
mov dword [esp + 0x30], edx
mov dl, byte [0x101a4429]
movzx ebp, byte [eax + edi]
mov edi, dword [esp + 0x38]
imul ebp, ecx
dec eax
mov dword [0x101a4440], eax
mov ecx, dword [edi + ecx*4]
mov edi, dword [esp + 0x48]
or ecx, eax
mov dword [esp + 0x20], ecx
movzx ecx, si
movzx eax, dl
mov ecx, dword [edi + ecx*4]
and ecx, eax
mov edi, dword [0x101a4468]
mov eax, dword [0x101a4478]
inc si
inc dl
mov word [0x101a4454], si
mov dword [esp + 0x10], ecx
mov esi, 0x18aa
sub esi, dword [0x101a4464]
dec bh
movzx ecx, bh
and ecx, eax
mov byte [0x101a4429], dl
mov dword [esp + 0x24], ecx
movzx ecx, dl
cdq
idiv dword [esp + 0x40]
mov edx, dword [esp + 0x44]
mov byte [0x101a442a], bh
xor byte [edx + ecx*2], al
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x18]
mov al, byte [ecx + eax*2]
mov ecx, 0xee2
and byte [0x101a4429], al
mov eax, dword [0x101a4430]
movzx edx, byte [esp + 0x3c]
mov ebx, dword [esp + 0x48]
mov dword [esp + 0x3c], edx
xor cx, word [eax + edx*2]
mov word [0x101a4450], cx
movzx eax, byte [esi + 0x6eb]
movzx ecx, word [0x101a4454]
sub eax, dword [ebx + ecx*4 + 0xc]
mov ecx, 0xdc4
cdq
idiv ecx
mov ecx, 0x1336
mov eax, edx
cdq
idiv ecx
mov ecx, dword [esp + 0x3c]
sub eax, dword [ebx + ecx*4]
mov dword [ebx + ecx*4], eax
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x38]
mov ebx, dword [esp + 0x1c]
mov eax, dword [eax + ecx*8]
add eax, ebx
mov ecx, dword [esp + 0x10]
cdq
idiv ebp
xor edx, edx
mov ebp, dword [esp + 0x48]
and dword [edi + ecx*4], eax
mov edi, 0xffff
mov si, word [0x101a4454]
movzx ecx, byte [0x101a4428]
add si, di
movzx eax, si
add si, di
div ecx
mov word [0x101a4454], si
mov byte [0x101a4428], al
mov esi, dword [ebp + ebx*4 + 4]
cmp esi, dword [0x8db8]
jl 0x10004d01
mov eax, dword [esp + 0x40]
mov ecx, 0x6e5
or eax, 0xf64
mov ebp, dword [esp + 0x10]
cdq
idiv ecx
imul edi, esi, 6
mov ebx, eax
add edi, dword [esp + 0x20]
mov eax, dword [esp + 0x24]
xor edx, edx
movzx ecx, word [eax + esi*2]
movzx eax, word [edi]
lea edi, [edi + 6]
div ecx
mov ecx, dword [esp + 0x38]
or eax, dword [0x101a4474]
mov edx, dword [esp + 0x2c]
mov dword [ecx + esi*4], eax
mov eax, ebx
imul eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x18]
sub ax, word [ecx + ebp*2 + 0x24]
mov word [ecx + ebp*2 + 0x24], ax
mov ecx, dword [esp + 0x44]
movzx eax, dx
mov al, byte [eax + ecx]
xor al, 0xcd
sub al, byte [esi + ecx]
mov byte [esi + ecx], al
mov eax, 0x8db8
inc esi
cmp esi, dword [eax]
jge 0x10004ca9
mov ebp, dword [esp + 0x48]
mov eax, dword [0x101a4478]
xor edx, edx
inc eax
mov ecx, dword [esp + 0x30]
mov dword [0x101a4478], eax
or eax, dword [0x101a4438]
div dword [0x101a4440]
pop edi
mov word [0x101a4454], ax
movzx eax, byte [0x101a442a]
add eax, eax
pop esi
mov eax, dword [ecx + eax*8 + 0x34]
mov ecx, dword [esp + 0x34]
and eax, dword [esp + 0xc]
and dword [ebp + ecx*4], eax
mov eax, dword [0x101a4440]
mov ecx, dword [esp + 0x30]
pop ebp
pop ebx
mov eax, dword [ecx + eax*4 + 0x14]
and eax, 0x14ec
add esp, 0x24
ret