Function at 0x474778
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ecx
mov ecx, 5
push 0
push 0
dec ecx
jne 0x474781
push ecx
xchg dword [ebp - 4], ecx
push ebx
push esi
push edi
mov dword [ebp - 8], ecx
mov edi, edx
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x474a01
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 9], 0
mov eax, dword [ebp + 0x10]
call fcn.0045ad0c
mov ebx, eax
cmp ebx, 0xffffffff
je 0x4749d8
shr ebx, 3
mov eax, dword [ebp - 8]
mov dword [ebp - 0x2c], eax
jmp 0x4747cd
inc dword [ebp - 0x2c]
dec dword [ebp + 0x24]
cmp dword [ebp + 0x24], 0
jle 0x4747db
mov eax, dword [ebp - 0x2c]
cmp byte [eax], 0
je 0x4747c7
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 8], eax
mov esi, ebx
add esi, esi
mov eax, dword [ebp + 0x24]
sub eax, esi
sub eax, 2
cmp edi, eax
jg 0x4749d8
mov eax, dword [ebp + 8]
mov eax, dword [eax]
cmp eax, dword [ebp + 0x24]
jge 0x47480c
mov eax, dword [ebp + 8]
mov edx, dword [ebp + 0x24]
mov dword [eax], edx
jmp 0x4749d8
push 0
mov ecx, dword [ebp + 0x10]
mov dl, 1
mov eax, dword [0x4c406c]
call fcn.004c4198
mov dword [ebp - 0x30], eax
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp + 0x18]
mov eax, dword [ebp - 0x30]
call fcn.004c43f4
lea edx, [ebp - 0x10]
mov eax, dword [ebp - 0x30]
call fcn.004c43fc
lea eax, [ebp - 0x30]
call fcn.0040d948
mov eax, dword [ebp + 0x24]
sub eax, edi
sub eax, esi
sub eax, 2
mov esi, eax
push esi
lea eax, [ebp - 0x14]
mov ecx, 1
mov edx, dword [0x4565dc]
call fcn.004055e8
add esp, 4
mov eax, dword [ebp - 0x14]
xor ecx, ecx
mov edx, esi
call fcn.0045a0cc
lea eax, [esi + ebx]
add eax, edi
inc eax
push eax
lea eax, [ebp - 0x18]
mov ecx, 1
mov edx, dword [0x4565dc]
call fcn.004055e8
add esp, 4
lea eax, [ebp - 0x10]
call fcn.0040481c
mov edx, dword [ebp - 0x18]
mov ecx, ebx
call fcn.00402c74
mov eax, dword [ebp - 0x18]
lea edx, [eax + ebx]
mov eax, dword [ebp - 0x14]
mov ecx, esi
call fcn.00402c74
lea eax, [esi + ebx]
mov edx, dword [ebp - 0x18]
mov byte [edx + eax], 1
add esi, ebx
mov eax, dword [ebp - 0x18]
lea edx, [eax + esi + 1]
mov eax, dword [ebp - 4]
mov ecx, edi
call fcn.00402c74
push ebx
lea eax, [ebp - 0x1c]
mov ecx, 1
mov edx, dword [0x4565dc]
call fcn.004055e8
add esp, 4
mov eax, dword [ebp - 0x1c]
mov edx, ebx
call fcn.0045b1e4
mov eax, dword [ebp + 0x10]
push eax
lea eax, [ebp - 0x20]
push eax
mov ecx, dword [ebp + 0x24]
sub ecx, ebx
dec ecx
mov eax, dword [ebp - 0x1c]
mov edx, ebx
call fcn.00473f74
mov eax, dword [ebp - 0x18]
call fcn.0040540c
mov edx, eax
dec edx
test edx, edx
jl 0x474927
inc edx
xor eax, eax
mov ecx, dword [ebp - 0x20]
mov cl, byte [ecx + eax]
mov esi, dword [ebp - 0x18]
xor byte [esi + eax], cl
inc eax
dec edx
jne 0x474917
mov eax, dword [ebp + 0x10]
push eax
lea eax, [ebp - 0x24]
push eax
mov eax, dword [ebp - 0x18]
call fcn.0040540c
mov edx, eax
mov eax, dword [ebp - 0x18]
mov ecx, ebx
call fcn.00473f74
mov eax, dword [ebp - 0x1c]
call fcn.0040540c
mov edx, eax
dec edx
test edx, edx
jl 0x474965
inc edx
xor eax, eax
mov ecx, dword [ebp - 0x24]
mov cl, byte [ecx + eax]
mov esi, dword [ebp - 0x1c]
xor byte [esi + eax], cl
inc eax
dec edx
jne 0x474955
mov eax, dword [ebp + 0x24]
push eax
lea eax, [ebp - 0x28]
mov ecx, 1
mov edx, dword [0x4565dc]
call fcn.004055e8
add esp, 4
mov eax, dword [ebp - 0x28]
mov byte [eax], 0
mov eax, dword [ebp - 0x28]
lea edx, [eax + 1]
mov eax, dword [ebp - 0x1c]
mov ecx, ebx
call fcn.00402c74
mov eax, dword [ebp - 0x18]
call fcn.0040540c
mov ecx, eax
inc ebx
mov eax, dword [ebp - 0x28]
lea edx, [eax + ebx]
mov eax, dword [ebp - 0x18]
call fcn.00402c74
mov eax, dword [ebp + 0x1c]
push eax
mov eax, dword [ebp - 0x28]
push eax
mov eax, dword [ebp - 0x28]
call fcn.0040540c
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 - 8]
call fcn.0047412c
mov byte [ebp - 9], al
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x474a08
lea eax, [ebp - 0x28]
mov edx, dword [0x4565dc]
mov ecx, 6
call fcn.00404d84
lea eax, [ebp - 0x10]
call fcn.00404304
ret