Function at 0x404b70
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x10
mov ecx, dword [0x4ae928]
mov eax, dword [0x4ae8fc]
push ebx
push ebp
cdq
push esi
push edi
mov edi, dword [esp + 0x24]
movzx esi, word [0x4ae904]
mov ebx, dword [esp + 0x34]
idiv dword [edi + ecx*4]
xor edx, edx
mov ecx, 0xd6e
mov ebp, dword [ebx + 0x574]
mov dword [esp + 0x10], eax
sub ebp, 0xec0
mov eax, esi
div ecx
movzx eax, byte [esp + 0x30]
mov ecx, 0x112c
add cx, word [ebx + esi*4]
movzx esi, cx
mov ecx, dword [0x4ae914]
mov edi, dword [edi + eax*4]
dec ecx
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x28]
mov dword [0x4ae914], ecx
mov dword [esp + 0x1c], edx
xor edx, edx
mov dword [esp + 0x18], esi
mov al, byte [eax + ecx*4 + 0x7c]
mov byte [esp + 0x34], al
mov ax, word [0x4ae92c]
inc ax
mov word [0x4ae92c], ax
movzx ecx, ax
movzx eax, word [0x4ae918]
div ecx
mov ecx, dword [esp + 0x24]
mov eax, dword [0x4ae938]
mov dword [esp + 0x28], edx
cmp eax, dword [ecx + 0x394]
ja 0x404c2f
mov al, byte [esp + 0x30]
dec al
movzx eax, al
mov dword [esp + 0x14], eax
cmp edi, eax
jge 0x404ccb
movzx eax, word [0x4ae900]
movzx ecx, si
mov dword [esp + 0x30], ecx
cmp dword [ebx + eax*4 + 0x48], ecx
jae 0x404ccb
mov ecx, dword [esp + 0x10]
lea eax, [ebp*2]
add eax, ebp
movzx eax, word [ecx + eax*2]
mov ecx, 0x1934
cdq
idiv edi
mov edi, eax
mov eax, dword [esp + 0x30]
imul eax, edi
cdq
idiv ecx
mov ecx, dword [0x4ae93c]
mov eax, dword [esp + 0x30]
mov dword [0x4ae938], edx
mov edx, dword [0x4ae928]
mov ecx, dword [edx + ecx*4 + 0x48]
or ecx, 0xbd1
imul ecx, dword [edx + eax*4 + 0x28]
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x28]
mov dword [0x4ae920], ecx
mov eax, dword [ebx + eax*4]
movzx ecx, word [0x4ae904]
xor eax, ecx
mov ecx, dword [esp + 0x24]
mov dword [ebx + ebp*4], eax
dec ebp
mov eax, dword [0x4ae93c]
mov cl, byte [ecx + eax*4 + 0x58]
mov eax, dword [0x4ae928]
or cl, 0x70
xor cl, byte [edx + eax*4]
mov byte [esp + 0x34], cl
mov ecx, dword [esp + 0x1c]
movzx eax, si
lea eax, [eax + eax*2]
lea esi, [ecx + eax*2]
mov eax, dword [esp + 0x10]
mov ecx, dword [0x4ae91c]
movzx eax, word [eax + 0x23f0]
cdq
idiv dword [ecx + ebp*4 + 4]
xor eax, 0xe95
sub ax, word [esi]
mov word [esi], ax
mov eax, dword [esp + 0x18]
add eax, 0xffff
movzx esi, word [0x4ae904]
movzx ecx, ax
mov dword [esp + 0x18], eax
lea eax, [ebp + 1]
cdq
idiv ecx
mov dword [esp + 0x24], ecx
movzx ecx, word [0x4ae908]
xor eax, esi
mov dword [0x4ae8f8], eax
mov eax, dword [0x4ae91c]
or ecx, dword [eax + esi*4 + 0x84]
mov eax, 0x614e7dd1
imul ecx
movzx ecx, byte [0x4ae8f1]
sar edx, 0xa
mov eax, edx
movzx esi, byte [esp + 0x34]
shr eax, 0x1f
add eax, edx
mov dword [esp + 0x30], esi
cdq
idiv ecx
mov ecx, dword [esp + 0x10]
sub ax, word [ecx + ebp*2 + 2]
mov word [ecx + ebp*2 + 2], ax
mov eax, esi
movzx ecx, word [0x4ae900]
sub eax, ecx
inc word [0x4ae904]
movzx ecx, word [esp + 0x2c]
cdq
idiv ecx
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x28]
mov dword [ecx + eax*4], edx
mov eax, edi
mov ecx, dword [0x4ae920]
cdq
idiv ecx
add ecx, eax
mov dword [0x4ae920], ecx
movzx ecx, word [0x4ae92c]
cmp ecx, dword [0x4ae928]
jb 0x404e33
movzx edx, word [esp + 0x2c]
add edx, esi
add ebp, 0x15
mov dword [esp + 0x2c], edx
lea ebp, [ebx + ebp*4]
xor esi, ecx
lea ebp, [ebp - 4]
imul esi, dword [ebx + ecx*4]
mov eax, ecx
and eax, dword [esp + 0x18]
mov dword [ebx + ecx*4], esi
imul eax, dword [0x4ae92c]
mov word [0x4ae92c], ax
mov eax, edx
cdq
idiv dword [0x4ae8fc]
mov eax, 0x4ea
mov dword [0x4ae8fc], edx
xor edx, edx
div dword [ebp + 4]
xor edx, edx
add dword [ebx + edi*4], eax
neg edi
mov esi, dword [0x4ae928]
mov eax, dword [esp + 0x30]
inc esi
and eax, ecx
mov dword [0x4ae928], esi
div esi
mov eax, dword [esp + 0x10]
mov esi, dword [esp + 0x30]
sub dx, word [eax + ecx*2]
mov word [eax + ecx*2], dx
inc ecx
mov edx, dword [esp + 0x2c]
cmp ecx, dword [0x4ae928]
jae 0x404dc2
mov eax, dword [esp + 0x24]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret