Function at 0x418640
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x2c
mov edx, dword [esp + 0x4c]
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x50]
mov ebp, dword [esp + 0x48]
mov cl, byte [edi]
movzx eax, cl
dec cl
mov al, byte [edi + eax*4]
sub al, byte [edx + 0xd88]
mov byte [edi], cl
mov esi, dword [0x4ae928]
mov byte [esp + 0x12], al
mov eax, 0x1ef
mov dword [esp + 0x18], eax
movzx ecx, cl
mov bl, byte [0x4ae8f0]
mov eax, dword [edx + ecx*4]
mov dword [esp + 0x30], eax
mov eax, esi
or eax, 0x1c1d
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x58]
mov edx, dword [eax + ecx*8]
mov eax, dword [0x4ae930]
mov dword [esp + 0x34], edx
xor edx, edx
mov eax, dword [eax + ecx*4]
lea ecx, [ecx + ecx*2]
mov dword [esp + 0x2c], eax
mov eax, dword [0x4ae8f4]
mov ecx, dword [eax + ecx*4 + 0x18]
mov eax, dword [0x4ae924]
or ecx, eax
dec eax
mov dword [esp + 0x24], ecx
mov dword [0x4ae924], eax
movzx eax, byte [edi]
movzx ecx, bl
inc bl
movzx eax, byte [eax + ebp]
div ecx
mov byte [0x4ae8f0], bl
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x64]
movzx eax, word [eax + esi*2]
inc esi
mov dword [esp + 0x1c], eax
mov dword [0x4ae928], esi
inc byte [edi]
movzx ecx, byte [edi]
mov eax, dword [0x4ae90c]
movzx ebx, word [0x4ae918]
movzx edi, word [0x4ae910]
movzx edx, byte [eax + ecx*4]
movzx eax, byte [ecx + ebp]
mov ecx, dword [0x4ae914]
sub dx, ax
movzx eax, dx
xor edx, edx
mov dword [esp + 0x20], eax
mov eax, 0x1795
div ecx
inc ecx
mov dword [0x4ae914], ecx
mov cl, byte [0x4ae8f1]
inc cl
mov dword [esp + 0x28], eax
mov byte [0x4ae8f1], cl
mov eax, 0x1e81
movzx ecx, cl
xor cx, ax
mov eax, dword [esp + 0x50]
movzx ebp, cx
inc byte [eax]
movzx esi, byte [eax]
lea eax, [esi + 0xa]
add eax, eax
add esi, esi
mov ecx, dword [esp + 0x58]
xor edx, edx
mov eax, dword [ecx + eax*8]
mov ecx, dword [0x4ae8f4]
div dword [ecx + esi*8]
mov eax, dword [esp + 0x14]
mov esi, edx
mov edx, dword [esp + 0x24]
movzx ecx, word [eax + 0x2c50]
mov eax, dword [0x4ae930]
imul ecx, dword [eax + 0x62e8]
mov eax, dword [0x4ae924]
dec eax
mov dword [0x4ae924], eax
xor eax, 0x1a20
push dword [edx + 0x2c64]
movzx eax, ax
xor edx, edx
push eax
movzx eax, byte [esp + 0x1a]
push ecx
mov ecx, 0x145a
div ecx
push edx
push esi
push 0x1a20
push edi
push 0x1ade
push ebx
mov ebx, dword [esp + 0x50]
push ebp
push dword [esp + 0x50]
lea eax, [ebx + 0x1a20]
push eax
call fcn.004157a0
movzx ecx, word [0x4ae900]
mov edx, dword [esp + 0x4c]
mov ebp, dword [esp + 0x44]
mov edi, dword [esp + 0x80]
mov byte [edx + ecx*2], al
mov ecx, 0xffffe8f1
movzx eax, word [ebp + 0x656]
sub ecx, eax
mov eax, dword [0x4ae934]
sub ecx, eax
dec eax
or dword [0x4ae940], ecx
mov dword [0x4ae934], eax
mov eax, dword [esp + 0x94]
movzx ecx, byte [edi + 0x1b40]
mov dl, byte [eax + 0x2d08]
sub dl, byte [0x4ae8f0]
mov eax, dword [esp + 0x88]
movzx edx, dl
imul edx, ecx
mov byte [edi + 0x1b40], dl
dec byte [0x4ae8f0]
movzx ecx, word [ebp]
lea edx, [eax + ecx*4]
mov eax, dword [esp + 0x60]
imul ecx, dword [edx], 0x1ef
mov dword [edx], ecx
xor edx, edx
mov ecx, dword [0x4ae940]
div ecx
mov eax, dword [0x4ae93c]
inc ecx
mov dword [0x4ae940], ecx
mov esi, edx
xor edx, edx
lea ecx, [eax + eax*2]
mov eax, dword [esp + 0x7c]
mov eax, dword [eax + ecx*4 + 0x88]
mov ecx, 0x6d0
div ecx
push edx
push esi
push 0x1ce2
call fcn.00405350
add esp, 0x3c
mov byte [esp + 0x4c], al
mov ecx, dword [0x4ae928]
mov esi, dword [0x4ae91c]
add ecx, ecx
mov ebp, dword [esi + ecx*8]
cmp ebp, 0x1ef
jne 0x418a42
mov edi, dword [esp + 0x5c]
mov edx, dword [esp + 0x44]
nop word [eax + eax]
movzx eax, word [0x4ae900]
mov dword [esi + eax*4], 0xf25
movzx eax, word [0x4ae900]
lea ecx, [edx + eax*4]
mov eax, dword [esp + 0x50]
movzx eax, byte [eax]
lea eax, [eax + eax*2]
mov eax, dword [edi + eax*4]
imul eax, dword [ecx + 0x20]
mov dword [ecx + 0x20], eax
mov eax, dword [esp + 0x48]
mov ecx, dword [0x4ae928]
mov esi, dword [0x4ae914]
xor ecx, 0xefa
or ecx, ebx
dec ebx
movzx eax, byte [eax + ebp]
imul ecx, eax
mov eax, dword [0x4ae8f4]
add dword [esp + 0x18], ecx
mov esi, dword [eax + esi*4]
cmp esi, ebx
je 0x418a2c
mov al, byte [esp + 0x4c]
movzx eax, al
mov word [esp + 0x12], ax
nop dword [eax]
movzx ecx, word [0x4ae900]
mov eax, dword [0x4ae91c]
add ecx, ecx
mov edx, dword [eax + ecx*8 + 0x78]
mov ax, word [edi + 0xb60]
xor edx, ebp
add ax, word [esp + 0x12]
mov edi, dword [esp + 0x34]
movzx ecx, ax
movzx eax, word [0x4ae904]
push dword [edi + eax*4]
push 0x3f
push ecx
push edx
push ebp
call fcn.00404b70
mov ecx, dword [esp + 0x64]
add esp, 0x14
mov edi, dword [esp + 0x5c]
mov edx, dword [esp + 0x1c]
movzx ecx, byte [ecx]
mov dword [edi + ecx*4], eax
movzx ecx, byte [0x4ae8f1]
mov edi, dword [esp + 0x20]
xor ecx, ebx
sub ecx, dword [0x4ae940]
dec ebx
movzx eax, di
add ecx, eax
mov dword [0x4ae940], ecx
mov ecx, dword [esp + 0x38]
mov ecx, dword [ecx]
movzx ecx, byte [edx + ecx*4 + 0xc]
xor edx, edx
div ecx
xor edi, eax
mov eax, 0x41b77b07
mov dword [esp + 0x20], edi
mov edi, dword [0x4ae8f8]
imul edi
sar edx, 0xb
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
imul ecx, ecx, 0x1f2a
sub edi, ecx
mov ecx, dword [esp + 0x64]
mov eax, edi
mov edi, dword [esp + 0x5c]
cdq
idiv esi
cdq
idiv esi
xor byte [0x4ae8f0], al
mov eax, dword [esp + 0x14]
movzx edx, word [eax]
mov eax, dword [esp + 0x58]
movzx ecx, byte [ecx + edx*2]
add edx, edx
movzx eax, byte [eax + esi*4]
inc esi
imul ecx, eax
mov eax, dword [esp + 0x44]
sub cl, byte [eax + edx*8]
mov eax, dword [esp + 0x48]
or byte [eax + ebp], cl
cmp esi, ebx
jne 0x418940
mov edx, dword [esp + 0x44]
inc ebp
cmp ebp, dword [esp + 0x18]
jne 0x418a3e
mov esi, dword [0x4ae91c]
jmp 0x4188d0
mov edi, dword [esp + 0x50]
movzx eax, byte [edi]
movzx eax, byte [edi + eax*4]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2c
ret