Function at 0x4af568
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ecx
mov ecx, 5
push 0
push 0
dec ecx
jne 0x4af571
push ecx
xchg dword [ebp - 4], ecx
push ebx
push esi
push edi
mov dword [ebp - 4], ecx
mov esi, edx
mov ebx, eax
mov edi, dword [ebp + 8]
mov eax, dword [ebp - 4]
call fcn.00404dc8
xor eax, eax
push ebp
push 0x4af7f2
push dword fs:[eax]
mov dword fs:[eax], esp
cmp edi, 3
je 0x4af5ad
cmp edi, 5
jne 0x4af7c2
xor eax, eax
mov dword [0x4b5cec], eax
xor eax, eax
mov dword [0x4b5cf0], eax
xor eax, eax
mov dword [0x4b5cf4], eax
mov byte [0x4b5cf8], 0
mov byte [0x4b5cf9], 0
mov eax, dword [ebx + 0x2fc]
mov edx, dword [eax]
call dword [edx + 0xd8]
mov eax, dword [esi]
mov edx, dword [eax]
call dword [edx + 0x21c]
mov dword [ebp - 0x18], eax
mov eax, dword [esi]
call fcn.004902f8
mov byte [0x4b4558], 1
mov eax, dword [esi]
mov edx, 0x4af80c
call fcn.0048ee98
lea edx, [ebp - 8]
mov ecx, dword [eax]
call dword [ecx + 0x60]
mov eax, dword [esi]
mov edx, 0x4af820
call fcn.0048ee98
lea edx, [ebp - 0xc]
mov ecx, dword [eax]
call dword [ecx + 0x60]
inc dword [0x4b5cec]
lea edx, [ebp - 0x1c]
mov eax, dword [0x4b5cec]
call fcn.00409394
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebx + 0x300]
call fcn.0044c2b4
mov eax, dword [ebx + 0x300]
call fcn.0044c7f0
cmp edi, 3
jne 0x4af671
push dword [ebp - 4]
push 0x4af830
push dword [ebp - 8]
push 0x4af83c
lea eax, [ebp - 0x14]
mov edx, 4
call fcn.00404c98
jmp 0x4af6c4
lea eax, [ebp - 0x20]
mov edx, dword [ebp - 8]
mov dl, byte [edx]
mov byte [eax + 1], dl
mov byte [eax], 1
lea edx, [ebp - 0x20]
lea eax, [ebp - 0x24]
call fcn.00402fd4
mov edx, 0x4af844
lea eax, [ebp - 0x24]
mov cl, 2
call fcn.00402fa4
lea edx, [ebp - 0x24]
lea eax, [ebp - 0x10]
call fcn.00404b7c
push dword [ebp - 4]
push 0x4af830
push dword [ebp - 0x10]
push dword [ebp - 8]
push 0x4af83c
lea eax, [ebp - 0x14]
mov edx, 5
call fcn.00404c98
mov eax, dword [ebp - 0x14]
call fcn.004098a8
test al, al
je 0x4af6fe
inc dword [0x4b5cf0]
lea edx, [ebp - 0x28]
mov eax, dword [0x4b5cf0]
call fcn.00409394
mov edx, dword [ebp - 0x28]
mov eax, dword [ebx + 0x304]
call fcn.0044c2b4
mov eax, dword [ebx + 0x304]
call fcn.0044c7f0
jmp 0x4af75e
inc dword [0x4b5cf4]
lea edx, [ebp - 0x2c]
mov eax, dword [0x4b5cf4]
call fcn.00409394
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebx + 0x314]
call fcn.0044c2b4
mov eax, dword [ebx + 0x314]
call fcn.0044c7f0
push dword [ebp - 8]
push 0x4af850
push dword [ebp - 0x14]
push 0x4af85c
push dword [ebp - 0xc]
lea eax, [ebp - 0x30]
mov edx, 5
call fcn.00404c98
mov edx, dword [ebp - 0x30]
mov eax, dword [ebx + 0x2fc]
mov eax, dword [eax + 0x218]
mov ecx, dword [eax]
call dword [ecx + 0x38]
mov eax, dword [esi]
call fcn.00490614
cmp byte [0x4b5cf8], 0
je 0x4af78b
push 0x64
call sub.kernel32.dll_Sleep_1
call fcn.004af400
mov al, byte [0x4b5cf8]
xor al, 1
or al, byte [0x4b5cf9]
je 0x4af76e
jmp 0x4af790
call fcn.004af400
mov eax, dword [esi]
mov al, byte [eax + 0xa1]
or al, byte [0x4b5cf9]
je 0x4af5f9
mov eax, dword [esi]
mov edx, dword [ebp - 0x18]
call fcn.00490e2c
mov eax, dword [esi]
mov edx, dword [ebp - 0x18]
mov ecx, dword [eax]
call dword [ecx + 0x218]
mov byte [0x4b4558], 0
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4af7f9
lea eax, [ebp - 0x30]
mov edx, 3
call fcn.0040493c
lea eax, [ebp - 0x1c]
call fcn.00404918
lea eax, [ebp - 0x14]
mov edx, 5
call fcn.0040493c
ret