Function at 0x405350
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x24
movzx eax, word [0x4ae900]
movzx ecx, word [0x4ae904]
inc dword [0x4ae934]
and ecx, eax
mov eax, dword [0x4ae924]
mov edx, dword [esp + 0x2c]
inc eax
mov dword [0x4ae924], eax
mov dword [esp], eax
mov eax, edx
and eax, 0x1413
mov dword [esp + 4], edx
mov dword [esp + 0x14], eax
push ebx
mov ebx, dword [esp + 0x34]
push ebp
mov ebp, dword [esp + 0x30]
push esi
mov esi, dword [0x4ae928]
dec esi
mov dword [esp + 0x1c], ecx
mov dword [0x4ae928], esi
push edi
mov edi, dword [0x4ae938]
mov eax, dword [ebx + esi*8]
xor edi, 0x735
or eax, ebp
lea esi, [ebx + esi*4]
mov dword [esp + 0x2c], eax
mov eax, edx
xor edx, edx
div dword [0x4ae940]
mov ecx, eax
movzx eax, bp
mov dword [esp + 0x30], eax
movzx eax, byte [0x4ae8f2]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x10]
cdq
idiv dword [esi]
mov edx, 0x187a
mov dword [esi], eax
mov eax, dword [ebx]
mov esi, dword [esp + 0x24]
or dword [ebx + eax*8 + 4], 0x632
inc dword [ebx]
mov eax, dword [ebx]
or dx, word [esi + eax*2 + 8]
movzx eax, word [edi + ecx*4]
dec ecx
movzx edx, dx
imul edx, eax
mov eax, dword [0x4ae93c]
mov edi, dword [esp + 0x14]
mov word [esi + eax*2], dx
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x10]
dec edx
mov dword [esp + 0x28], edx
mov eax, dword [eax + ecx*4 + 0x4c]
imul eax, dword [0x4ae93c]
mov dword [0x4ae93c], eax
movzx eax, byte [0x4ae8f0]
lea eax, [eax + eax*2]
add eax, 6
shl eax, 2
mov dword [esp + 0x18], eax
lea eax, [ecx*4 + 0x20]
mov dword [esp + 0x40], eax
lea eax, [ebp + 0x14]
lea eax, [eax + ecx*8]
mov dword [esp + 0x38], eax
mov eax, dword [ebx + ecx*4]
sub eax, dword [0x4ae928]
movzx edx, byte [0x4ae8f0]
mov dword [0x4ae928], eax
mov eax, dword [0x4ae91c]
sub dword [esp + 0x40], 4
sub dword [esp + 0x38], 8
mov esi, dword [eax + ecx*4]
movzx eax, word [0x4ae92c]
and esi, edx
mov edx, dword [esp + 0x1c]
or esi, dword [edx + eax*4]
movzx eax, word [0x4ae918]
or esi, eax
mov eax, dword [esp + 0x20]
xor dword [eax + ecx*4], esi
sub ecx, 2
inc dword [0x4ae928]
inc dword [ebx]
inc dword [0x4ae938]
mov eax, dword [0x4ae8f4]
xor dword [eax + 0x17690], 0x38e
mov eax, dword [esp + 0x28]
mov dword [0x4ae920], eax
mov eax, ebp
cdq
dec ebp
idiv dword [0x4ae8fc]
mov esi, dword [0x4ae93c]
add esi, esi
imul eax, edi, 0x809
imul edx, dword [ebx + esi*8 + 0xc]
mov dword [ebx + esi*8 + 0xc], edx
cdq
idiv edi
mov eax, dword [esp + 0x40]
mov edi, dword [esp + 0x38]
mov dword [esp + 0x14], edx
xor edx, edx
mov esi, dword [esp + 0x18]
mov eax, dword [eax + ebx]
div dword [edi]
xor edx, edx
sub dword [esp + 0x40], 4
sub eax, 0x1256
sub dword [esp + 0x38], 8
div dword [esi + ebx]
mov edi, dword [esp + 0x14]
mov dword [esi + ebx], eax
mov eax, esi
add eax, 0xc
mov dword [esp + 0x18], eax
cmp eax, 0x17e8
jl 0x405460
movzx eax, word [0x4ae900]
mov edx, dword [esp + 0x24]
mov esi, dword [esp + 0x1c]
mov dword [esp + 0x40], ebx
lea edx, [edx + eax*2]
mov eax, dword [ebx]
lea eax, [eax + eax*2]
mov ax, word [esi + eax*4 + 0xc]
or word [edx + 0xe], ax
movzx edx, word [0x4ae900]
mov eax, dword [0x4ae930]
lea esi, [eax + edx*4]
mov eax, dword [ebx]
add eax, eax
mov eax, dword [ebx + eax*8]
or eax, ecx
cdq
idiv dword [esi]
mov dword [esi], eax
mov eax, dword [0x4ae914]
imul eax, eax
mov dword [0x4ae914], eax
mov eax, dword [esp + 0x2c]
lea esi, [eax + ecx*4]
mov eax, 0x1d9c
cdq
idiv dword [esi]
mov dword [esi], edx
mov eax, dword [ebx - 4]
mov esi, dword [esp + 0x1c]
lea eax, [eax + eax*2]
mov dx, word [esi + ecx*4 + 0x48]
add dx, word [esi + eax*4 + 0x94]
xor word [0x4ae904], dx
mov eax, dword [0x4ae90c]
movzx esi, byte [eax + ecx + 0xd]
mov eax, dword [ebx + 0x56e8]
cdq
idiv esi
mov esi, dword [ebx - 4]
mov edx, dword [0x4ae91c]
and eax, dword [edx + esi*4]
movzx edx, word [0x4ae900]
or eax, 0x105d
mov esi, dword [esp + 0x3c]
mov dword [ebx + edx*4 - 4], eax
mov edx, dword [ebx]
cmp edi, dword [esi + edx*4]
je 0x405688
lea edi, [ebx + 0x30]
lea edi, [edi + ecx*4]
nop dword [eax + eax]
lea esi, [esi + edx*4]
inc ebp
xor edx, edx
lea edi, [edi - 0xc]
mov eax, ebp
xor eax, 0xdb5
add dword [esp + 0x10], eax
lea eax, [ecx - 1]
xor eax, dword [esp + 0x3c]
lea ecx, [ecx - 3]
or eax, 0x105d
div dword [esi + 0x58]
mov dword [esi + 0x58], edx
mov edx, dword [esp + 0x20]
movzx eax, word [0x4ae900]
or eax, dword [edx + 0x66c0]
xor edx, edx
xor dword [ebx + ecx*4 + 4], eax
mov ebx, dword [esp + 0x30]
movzx eax, word [0x4ae92c]
movzx esi, bx
div esi
mov ebx, dword [esp + 0x40]
mov edx, eax
mov esi, dword [esp + 0x3c]
mov eax, 0x4bc3a01d
imul edx
sar edx, 0xb
mov eax, edx
shr eax, 0x1f
add eax, edx
xor eax, dword [esp + 0x10]
cdq
idiv dword [edi]
mov dword [edi], eax
mov eax, dword [esp + 0x14]
mov edx, dword [ebx]
inc eax
mov dword [esp + 0x14], eax
cmp eax, dword [esi + edx*4]
jne 0x405600
movzx eax, word [0x4ae904]
pop edi
pop esi
pop ebp
mov eax, dword [ebx + eax*4]
pop ebx
add esp, 0x24
ret