Function at 0x41bfd8
Capabilities:
Encode data using xor

Disassembly:
push ecx
push ecx
mov eax, dword [0x5afd08]
xor edx, edx
push ebx
mov bl, byte [esp + 0x20]
mov ecx, 0x14ea
push ebp
push esi
push edi
movzx edi, bl
mov esi, dword [esp + 0x1c]
mov eax, dword [eax + edi*4]
div ecx
mov ecx, dword [0x5afd00]
mov edx, dword [0x5afd54]
mov byte [esp + 0x13], al
mov eax, dword [0x5afd50]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x44]
mov ebp, dword [eax + ecx*4]
mov ecx, dword [esp + 0x3c]
sub ebp, dword [esp + 0x28]
mov eax, dword [ecx + edx*4]
inc edx
mov dword [0x5afd54], edx
cmp eax, dword [0x5afd34]
ja 0x41c066
xor edx, edx
mov eax, ebp
div dword [esp + 0x24]
mov ecx, 0x14a1
mov eax, edx
xor edx, edx
div ecx
mov eax, dword [0x5afd14]
add dx, word [eax + edi*4]
movzx eax, word [esi + edi*2 + 0x20]
movzx ecx, dx
imul ecx, eax
dec bl
mov byte [esp + 0x2c], bl
mov word [esi + edi*2 + 0x20], cx
mov eax, dword [esp + 0x20]
movzx edi, bl
movzx ecx, word [eax + edi*2]
mov eax, dword [0x5afd04]
mov dword [esp + 0x28], ecx
cmp ecx, dword [eax + ebp*4]
mov eax, dword [esp + 0x40]
jle 0x41c109
mov ecx, dword [0x5afd3c]
inc eax
mov dword [esp + 0x40], eax
movzx eax, word [esi + eax*2]
sub eax, dword [ecx + edi*4]
mov ecx, 0x1c9a
cdq
idiv ecx
xor edx, edx
mov cx, word [0x5afd6c]
div dword [0x5afd1c]
mov edx, dword [esp + 0x14]
inc bl
mov dword [0x5afd1c], eax
movzx eax, cx
movzx edi, bl
mov dl, byte [eax + edx]
mov eax, dword [0x5afd00]
xor dl, 0x5f
or dl, byte [esi + eax*2]
sub dl, byte [esi + edi*2 + 0x12]
inc cx
mov eax, dword [0x5afd34]
mov byte [esp + 0x13], dl
mov edx, dword [esp + 0x14]
mov word [0x5afd6c], cx
mov ecx, dword [esp + 0x28]
or byte [eax + edx], cl
inc ecx
mov eax, dword [0x5afd04]
mov dword [esp + 0x28], ecx
cmp ecx, dword [eax + ebp*4]
mov eax, dword [esp + 0x40]
jg 0x41c087
mov byte [esp + 0x2c], bl
jmp 0x41c10d
mov dword [esp + 0x40], eax
mov eax, dword [0x5afd44]
xor edx, edx
movzx ecx, word [0x5afd6c]
mov esi, dword [esp + 0x14]
mov ecx, dword [eax + ecx*4 + 0x80]
mov eax, ecx
xor eax, dword [0x5afd10]
div dword [0x5afd30]
movzx eax, byte [esi + 0x14e5]
sub edx, eax
mov eax, edx
xor edx, edx
div ecx
mov eax, dword [esp + 0x30]
movzx ecx, byte [esp + 0x2c]
mov dword [eax + ebp*4 + 4], edx
xor edx, edx
mov al, byte [0x5afd58]
dec dword [0x5afd30]
mov byte [esp + 0x3c], al
mov eax, dword [0x5afd54]
dec eax
mov dword [0x5afd54], eax
movzx edi, byte [esi + eax*2 + 2]
mov eax, dword [esp + 0x38]
movzx esi, byte [ecx + eax]
lea eax, [ebp + 1]
mov ecx, dword [0x5afd08]
div dword [ecx + ebp*4 + 4]
mov ecx, dword [esp + 0x34]
mov cl, byte [ecx + 0x79f4]
mov byte [esp + 0x28], cl
push dword [esp + 0x28]
push eax
movzx eax, byte [esp + 0x1b]
push esi
push edi
push dword [esp + 0x4c]
push eax
call fcn.0040186f
mov esi, dword [esp + 0x58]
add esp, 0x18
mov ecx, dword [0x5afd0c]
mov edi, dword [esp + 0x14]
mov dword [ecx + esi*4 + 0xc], eax
mov ecx, dword [0x5afd64]
movzx eax, byte [edi + esi + 1]
add eax, dword [ecx + ebp*4 + 4]
mov ecx, 0xc0a
cdq
idiv ecx
movzx ecx, word [0x5afd20]
mov eax, edx
cdq
idiv ecx
mov al, byte [esp + 0x2c]
mov ecx, dword [esp + 0x44]
dec al
movzx eax, al
mov word [0x5afd20], dx
mov al, byte [ecx + eax*4 + 0x84]
sub al, byte [edi + ebp + 5]
add al, 0x7f
mov byte [edi + ebp + 5], al
mov ecx, dword [0x5afd08]
movzx eax, byte [edi + 0x5cb]
pop edi
or eax, dword [ecx + esi*4 + 0x38]
pop esi
pop ebp
pop ebx
pop ecx
pop ecx
ret