Function at 0x418beb
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x1c
mov edx, dword [esp + 0x28]
mov eax, dword [0x848460]
push ebx
mov ebx, dword [0x848434]
mov ecx, dword [edx]
add edx, 4
push ebp
push esi
push edi
mov eax, dword [eax + ecx*4]
add eax, 0x1800
mov edi, dword [esp + 0x30]
mov dword [esp + 0x14], eax
movzx eax, byte [0x84843e]
mov dword [esp + 0x38], edx
xor edx, edx
mov esi, dword [0x848438]
movzx ecx, word [edi + eax*4]
mov eax, dword [0x848404]
add eax, eax
mov eax, dword [ebx + eax*8 + 0xc]
div ecx
movzx edx, word [edi + esi*2 + 8]
mov edi, dword [esp + 0x34]
mov ebp, eax
mov eax, dword [esp + 0x3c]
movzx ecx, byte [edi]
add edx, dword [eax + esi*4]
movzx eax, byte [ecx + edi]
mov ecx, dword [esp + 0x40]
and eax, dword [ecx + 0x3b9c]
mov dword [esp + 0x18], eax
movzx eax, word [0x848408]
mov dword [esp + 0x10], eax
mov dword [esp + 0x1c], eax
mov eax, dword [0x848458]
or dword [esp + 0x10], eax
dec eax
mov dword [0x848458], eax
mov eax, esi
add eax, eax
mov eax, dword [ecx + eax*8]
xor eax, dword [0x848420]
movzx ecx, byte [0x84840b]
mov dword [esp + 0x24], eax
mov eax, dword [0x848440]
mov eax, dword [eax + ecx*4]
mov ecx, dword [0x848470]
or eax, 0x4db
inc dword [0x848450]
mov dword [esp + 0x28], eax
mov eax, dword [0x84845c]
movzx eax, byte [eax + edi]
mov dword [esp + 0x20], eax
mov eax, dword [0x848400]
movzx edi, word [eax + ecx*4 + 4]
inc ecx
mov eax, dword [esp + 0x38]
mov dword [0x848470], ecx
movzx edx, byte [esi + edx]
mov ecx, dword [eax]
mov eax, dword [0x848430]
xor edx, dword [eax + ecx*4 + 0x1c]
xor dword [ebx + 0x6b08], edx
mov edx, 0x1ac2
mov eax, dword [0x848404]
mov ecx, dword [esp + 0x38]
add eax, eax
mov esi, dword [ecx + eax*8]
xor esi, dword [0x848450]
mov ecx, dword [0x848444]
movzx eax, word [0x848464]
imul esi, ecx
add esi, eax
mov eax, dword [0x84845c]
dec ecx
mov dword [0x848444], ecx
mov ecx, dword [esp + 0x30]
or word [ecx + eax*2 + 0x46], dx
mov eax, dword [esp + 0x10]
dec eax
lea ecx, [eax*4]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x14]
mov ebx, dword [esp + 0x34]
movzx eax, byte [eax + 0x1ac2]
cdq
idiv dword [ecx + ebp]
mov dword [ecx + ebp], eax
mov ebp, dword [esp + 0x3c]
mov ecx, dword [0x848460]
movzx eax, byte [esi + ebx]
mov edx, dword [ebp]
sub eax, dword [ecx + edx*4]
mov dword [ecx + edx*4], eax
mov eax, dword [0x84840c]
mov edx, dword [esp + 0x40]
movzx ecx, byte [ebx + eax*2]
lea eax, [edi - 1]
movzx eax, ax
or ecx, 0x4c
mov dword [edx + eax*4 + 0x58], ecx
mov eax, dword [esp + 0x38]
mov ecx, dword [eax]
mov eax, dword [esp + 0x18]
movzx eax, byte [eax + 0x1c1]
or dword [edx + ecx*4], eax
mov eax, dword [0x848470]
mov ecx, dword [esp + 0x1c]
movzx esi, byte [eax + ecx]
cmp esi, dword [0x58af]
jb 0x418e61
mov edi, dword [esp + 0x20]
add edi, 0x38
lea edi, [edi + esi*4]
mov cx, word [edi]
mov eax, 0x1b65
and dword [0x848438], 0
lea edi, [edi + 4]
or cx, si
sub cx, ax
movzx eax, word [0x848454]
movzx ecx, cx
imul ecx, eax
mov eax, dword [0x848444]
dec eax
mov dword [0x848444], eax
movzx edx, cx
mov cl, byte [eax + ebx]
mov eax, dword [ebp]
add cl, byte [esp + 0x10]
mov ebp, dword [esp + 0x24]
mov byte [eax + ebp], cl
movzx eax, byte [0x84840b]
add eax, dword [0x848420]
and dword [0x848448], eax
mov eax, dword [0x84840c]
mov ebp, dword [esp + 0x3c]
dec eax
mov dword [0x84840c], eax
movzx ecx, byte [eax + ebx]
movzx eax, word [0x848408]
or ecx, eax
mov eax, dword [0x848424]
and ecx, dword [eax + 0xd50]
mov eax, edx
mov edx, dword [esp + 0x28]
mov dword [edx + eax*4 + 8], ecx
mov eax, dword [ebp + esi*4]
xor eax, dword [0x84840c]
imul eax, esi
inc esi
mov dword [0x848414], eax
mov eax, 0x58af
cmp esi, dword [eax]
jae 0x418db9
movzx eax, byte [ebx]
mov ecx, dword [esp + 0x38]
pop edi
pop esi
pop ebp
mov eax, dword [ecx + eax*8]
or eax, 0x354
pop ebx
add esp, 0x1c
ret