Function at 0x4010c0
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x24
imul eax, dword [0x5afd30], 3
mov ecx, dword [esp + 0x48]
push ebx
push ebp
push esi
mov esi, dword [esp + 0x40]
push edi
mov edi, dword [esp + 0x4c]
movzx eax, byte [eax + ecx]
or eax, 0x121b
mov bl, byte [esp + 0x38]
mov dword [esp + 0x10], eax
mov cl, byte [edi]
movzx eax, cl
add eax, eax
mov dword [esp + 0x4c], edi
mov eax, dword [esi + eax*8]
cdq
idiv dword [0x5afd00]
dec cl
mov byte [edi], cl
mov ecx, dword [0x5afd10]
inc ecx
movzx eax, dx
mov dword [0x5afd10], ecx
xor edx, edx
mov dword [esp + 0x18], eax
add ecx, ecx
mov eax, dword [esp + 0x50]
mov ebp, dword [eax + ecx*8]
mov eax, dword [0x5afd08]
movzx ecx, bl
mov dword [esp + 0x24], ebp
mov eax, dword [eax + 0x4028]
mov dword [esp + 0x28], eax
movzx eax, byte [edi]
imul eax, eax, 0xc
mov eax, dword [eax + esi + 0x1c]
mov dword [esp + 0x1c], eax
mov eax, 0x73d
div ecx
dec byte [edi + 1]
movzx edx, byte [edi + 1]
mov esi, dword [0x5afd08]
mov ecx, dword [0x5afd64]
mov dword [esp + 0x30], eax
mov eax, dword [esi + edx*4]
mov bh, byte [ecx + edx*4]
mov ecx, dword [esp + 0x48]
add bh, bl
mov dword [esp + 0x44], eax
mov eax, dword [0x5afd30]
movzx edx, word [ecx + eax*2]
mov eax, dword [0x5afd10]
mov ecx, dword [0x5afd2c]
sub edx, dword [esi + eax*4 + 0x30]
inc eax
mov esi, dword [esp + 0x28]
mov dword [0x5afd10], eax
movzx eax, word [0x5afd6c]
mov eax, dword [esi + eax*4]
mov dword [esp + 0x38], eax
cmp ecx, eax
jb 0x4011c4
mov eax, dword [esp + 0x18]
movzx eax, ax
imul eax, dword [0x5afd30]
or ebp, eax
inc ecx
cmp ecx, dword [esp + 0x38]
jae 0x4011b7
mov dword [esp + 0x24], ebp
mov ecx, dword [esp + 0x44]
movzx eax, bh
mov dword [esp + 0x38], eax
movzx ebp, word [edx + eax*8 + 0x34]
movzx eax, byte [edi]
imul eax, eax, 0xc
cmp ebp, dword [eax + ecx]
je 0x40135a
mov ecx, dword [esp + 0x10]
imul eax, ebp, 0x1ab3
push 0x38
mov dword [esp + 0x18], eax
mov eax, ebp
shl eax, 4
mov dword [esp + 0x54], eax
lea eax, [esi + ecx*4]
mov dword [esp + 0x24], eax
pop eax
sub eax, esi
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x5c]
mov dword [esp + 0x5c], eax
movzx eax, word [0x5afd58]
shl dword [esp + 0x38], 4
mov ecx, dword [0x5afd4c]
imul esi, eax, 3
movzx eax, byte [edi + 0x14ec]
mov edi, dword [esp + 0x38]
xor eax, 0x1092
cdq
push dword [esp + 0x14]
idiv dword [edi + ecx]
mov ecx, dword [esp + 0x5c]
xor edx, edx
mov edi, dword [esp + 0x24]
sub al, 4
sub edi, 4
mov dword [esp + 0x24], edi
add byte [esi + ecx], al
inc bh
mov eax, dword [0x5afd48]
mov esi, dword [esp + 0x54]
mov ecx, dword [esp + 0x60]
inc ecx
mov dword [esp + 0x60], ecx
mov esi, dword [esi + eax]
mov eax, dword [0x5afd04]
or esi, ecx
mov ecx, dword [esp + 0x30]
add ecx, edi
dec dword [esp + 0x14]
mov eax, dword [ecx + eax]
div dword [edi]
mov edx, dword [0x5afd10]
mov ecx, dword [0x5afd60]
inc edx
mov dword [0x5afd10], edx
movzx edi, bh
mov dword [esp + 0x3c], edi
mov edx, dword [ecx + edx*4 + 0x58]
mov ecx, dword [esp + 0x4c]
movzx ecx, word [ecx + ebp*8]
push ecx
push ebp
push edx
push eax
push esi
push edi
call fcn.00409180
mov bl, al
mov ecx, dword [esp + 0x38]
mov eax, dword [0x5afd28]
add esp, 0x1c
dec eax
mov edi, dword [esp + 0x3c]
mov dword [0x5afd28], eax
xor eax, 0xbe5
cdq
idiv dword [esp + 0x10]
mov esi, dword [ecx]
cdq
movzx ecx, word [edi + esi*2 + 0x46]
idiv ecx
mov word [edi + esi*2 + 0x46], dx
mov edx, dword [esp + 0x40]
movzx eax, word [0x5afd20]
mov esi, dword [esp + 0x38]
mov edi, dword [esp + 0x44]
lea ecx, [edx + ebp*4]
imul eax, dword [edx + eax*4], 0xcd8
xor edx, edx
div dword [ecx]
mov eax, 0x20f
mov dword [ecx], edx
cdq
idiv dword [edi + esi*4]
mov eax, dword [esp + 0x3c]
movzx ecx, word [0x5afd6c]
add word [eax + ecx*2 + 4], dx
movzx eax, bl
xor ax, word [esp + 0x24]
movzx eax, ax
mov dword [esp + 0x18], eax
mov edi, dword [esp + 0x4c]
inc ebp
mov ecx, dword [esp + 0x44]
add dword [esp + 0x50], 0x10
add dword [esp + 0x14], 0x1ab3
movzx eax, byte [edi]
imul eax, eax, 0xc
cmp ebp, dword [eax + ecx]
jne 0x401212
mov esi, dword [esp + 0x28]
jmp 0x401362
mov eax, dword [esp + 0x5c]
mov dword [esp + 0x5c], eax
mov edx, dword [0x5afd28]
inc byte [edi]
mov eax, dword [0x5afd44]
movzx ecx, byte [edi]
mov ebp, dword [esp + 0x10]
mov ecx, dword [eax + ecx*4 + 0x70]
mov eax, dword [esp + 0x1c]
mov eax, dword [eax + ebp*4]
or eax, 0x1cc3
push eax
mov eax, dword [esp + 0x60]
push ecx
push 0x148
push eax
mov eax, dword [esp + 0x28]
inc eax
push edx
movzx eax, ax
push eax
push 0x34ad
call fcn.00408cc9
movzx ecx, byte [edi]
add esp, 0x1c
mov edx, dword [esp + 0x3c]
mov word [edx + ecx*2 + 0x34], ax
imul ecx, dword [0x5afd54], 0xc
mov eax, dword [0x5afd30]
mov edx, dword [esp + 0x44]
or dword [ecx + esi], eax
dec byte [edi]
movzx eax, byte [edi]
mov edx, dword [edx + eax*4 + 0x14]
movzx ecx, byte [eax + edi]
movzx eax, word [0x5afd20]
sub edx, ecx
mov ecx, dword [esp + 0x40]
add edx, dword [ecx + eax*4]
xor edx, dword [0x5afd50]
add dword [0x5afd34], edx
inc bh
mov eax, dword [esp + 0x1c]
movzx edx, bh
mov ebx, dword [esp + 0x58]
mov ecx, dword [eax]
mov al, byte [edx + ebx]
sub al, 0x38
xor byte [ecx + ebx + 6], al
mov ecx, dword [0x5afd70]
mov eax, dword [ecx + ebp*4]
sub eax, dword [0x5afd5c]
imul eax, edx
or dword [ecx + ebp*4], eax
movzx eax, byte [edi]
mov ecx, dword [0x5afd3c]
imul esi, eax, 3
mov eax, 0x827
cdq
pop edi
idiv dword [ecx + 0x14]
mov ecx, dword [esp + 0x2c]
xor byte [esi + ebx], dl
mov eax, dword [0x5afd10]
pop esi
pop ebp
pop ebx
movzx eax, word [ecx + eax*8]
add esp, 0x24
ret