Function at 0x4df798
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ecx
mov ecx, 5
push 0
push 0
dec ecx
jne 0x4df7a1
xchg dword [ebp - 4], ecx
push ebx
push esi
push edi
mov dword [ebp - 0x24], ecx
mov edi, edx
mov dword [ebp - 0x20], eax
xor eax, eax
push ebp
push 0x4dfa17
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 0x25], 0
mov eax, dword [ebp + 0x10]
call fcn.004c8aa4
mov ebx, eax
cmp ebx, 0xffffffff
je 0x4df9ee
shr ebx, 3
mov eax, dword [ebp - 0x24]
jmp 0x4df7e7
inc eax
dec dword [ebp + 0x24]
cmp dword [ebp + 0x24], 0
jle 0x4df7f2
cmp byte [eax], 0
je 0x4df7e3
mov dword [ebp - 0x24], eax
mov esi, ebx
add esi, esi
mov eax, dword [ebp + 0x24]
sub eax, esi
sub eax, 2
cmp edi, eax
jg 0x4df9ee
mov eax, dword [ebp + 8]
mov eax, dword [eax]
cmp eax, dword [ebp + 0x24]
jge 0x4df820
mov eax, dword [ebp + 8]
mov edx, dword [ebp + 0x24]
mov dword [eax], edx
jmp 0x4df9ee
push 0
mov ecx, dword [ebp + 0x10]
mov dl, 1
mov eax, dword [0x4fa774]
call fcn.004fa8a0
mov dword [ebp - 0x2c], eax
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp + 0x18]
mov eax, dword [ebp - 0x2c]
call fcn.004faaf0
lea edx, [ebp - 4]
mov eax, dword [ebp - 0x2c]
call fcn.004faaf8
lea eax, [ebp - 0x2c]
call fcn.0040f6c4
mov eax, dword [ebp + 0x24]
sub eax, edi
sub eax, esi
sub eax, 2
mov esi, eax
push esi
lea eax, [ebp - 8]
mov ecx, 1
mov edx, dword [0x4c5894]
call fcn.004060ec
add esp, 4
mov eax, dword [ebp - 8]
xor ecx, ecx
mov edx, esi
call fcn.004035fc
lea eax, [esi + ebx]
add eax, edi
inc eax
push eax
lea eax, [ebp - 0xc]
mov ecx, 1
mov edx, dword [0x4c5894]
call fcn.004060ec
add esp, 4
lea eax, [ebp - 4]
call fcn.00405140
mov edx, dword [ebp - 0xc]
mov ecx, ebx
call fcn.004030c8
mov eax, dword [ebp - 0xc]
lea edx, [eax + ebx]
mov eax, dword [ebp - 8]
mov ecx, esi
call fcn.004030c8
lea eax, [esi + ebx]
mov edx, dword [ebp - 0xc]
mov byte [edx + eax], 1
add esi, ebx
mov eax, dword [ebp - 0xc]
lea edx, [eax + esi + 1]
mov eax, dword [ebp - 0x20]
mov ecx, edi
call fcn.004030c8
push ebx
lea eax, [ebp - 0x10]
mov ecx, 1
mov edx, dword [0x4c5894]
call fcn.004060ec
add esp, 4
mov eax, dword [ebp - 0x10]
mov edx, ebx
call fcn.004c8ec0
mov eax, dword [ebp + 0x10]
push eax
lea eax, [ebp - 0x14]
push eax
mov ecx, dword [ebp + 0x24]
sub ecx, ebx
dec ecx
mov eax, dword [ebp - 0x10]
mov edx, ebx
call fcn.004deff8
mov eax, dword [ebp - 0xc]
call fcn.00405f30
mov edx, eax
dec edx
test edx, edx
jl 0x4df93c
inc edx
xor eax, eax
mov ecx, dword [ebp - 0x14]
movzx ecx, byte [ecx + eax]
mov esi, dword [ebp - 0xc]
xor byte [esi + eax], cl
inc eax
dec edx
jne 0x4df92b
mov eax, dword [ebp + 0x10]
push eax
lea eax, [ebp - 0x18]
push eax
mov eax, dword [ebp - 0xc]
call fcn.00405f30
mov edx, eax
mov eax, dword [ebp - 0xc]
mov ecx, ebx
call fcn.004deff8
mov eax, dword [ebp - 0x10]
call fcn.00405f30
mov edx, eax
dec edx
test edx, edx
jl 0x4df97b
inc edx
xor eax, eax
mov ecx, dword [ebp - 0x18]
movzx ecx, byte [ecx + eax]
mov esi, dword [ebp - 0x10]
xor byte [esi + eax], cl
inc eax
dec edx
jne 0x4df96a
mov eax, dword [ebp + 0x24]
push eax
lea eax, [ebp - 0x1c]
mov ecx, 1
mov edx, dword [0x4c5894]
call fcn.004060ec
add esp, 4
mov eax, dword [ebp - 0x1c]
mov byte [eax], 0
mov eax, dword [ebp - 0x1c]
lea edx, [eax + 1]
mov eax, dword [ebp - 0x10]
mov ecx, ebx
call fcn.004030c8
mov eax, dword [ebp - 0xc]
call fcn.00405f30
mov ecx, eax
inc ebx
mov eax, dword [ebp - 0x1c]
lea edx, [eax + ebx]
mov eax, dword [ebp - 0xc]
call fcn.004030c8
mov eax, dword [ebp + 0x1c]
push eax
mov eax, dword [ebp - 0x1c]
push eax
mov eax, dword [ebp - 0x1c]
call fcn.00405f30
push eax
mov eax, dword [ebp + 0xc]
push eax
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp + 0x20]
mov edx, dword [ebp + 0x24]
mov eax, dword [ebp - 0x24]
call fcn.004df1b0
mov byte [ebp - 0x25], al
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4dfa1e
lea eax, [ebp - 0x1c]
mov edx, dword [0x4c5894]
mov ecx, 6
call fcn.00405824
lea eax, [ebp - 4]
call fcn.00404c40
ret