Function at 0x474a14
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ecx
mov ecx, 9
push 0
push 0
dec ecx
jne 0x474a1d
xchg dword [ebp - 4], ecx
push ebx
push esi
push edi
mov esi, ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov edi, dword [ebp + 0x1c]
xor eax, eax
push ebp
push 0x474d9c
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 0x474d52
shr ebx, 3
xor eax, eax
mov dword [ebp - 0x38], eax
xor eax, eax
mov dword [ebp - 0x3c], eax
xor eax, eax
mov dword [ebp - 0x40], eax
lea eax, [ebp - 0x38]
push eax
push 0
lea eax, [ebp - 0x3c]
push eax
push 0
lea eax, [ebp - 0x40]
push eax
xor ecx, ecx
mov edx, edi
mov eax, esi
call fcn.004724a0
cmp dword [ebp - 0x38], 0
jle 0x474d52
cmp dword [ebp - 0x3c], 0
jle 0x474d52
cmp dword [ebp - 0x40], 0
jle 0x474d52
mov eax, ebx
add eax, eax
push eax
mov eax, dword [ebp - 0x38]
pop edx
sub eax, edx
sub eax, 2
mov edx, dword [ebp + 8]
cmp eax, dword [edx]
jle 0x474ac4
mov edx, dword [ebp + 8]
mov dword [edx], eax
jmp 0x474d52
mov eax, dword [ebp - 0x38]
push eax
lea eax, [ebp - 0x44]
mov ecx, 1
mov edx, dword [0x4565dc]
call fcn.004055e8
add esp, 4
mov eax, dword [ebp - 0x3c]
push eax
lea eax, [ebp - 0x48]
mov ecx, 1
mov edx, dword [0x4565dc]
call fcn.004055e8
add esp, 4
mov eax, dword [ebp - 0x40]
push eax
lea eax, [ebp - 0x4c]
mov ecx, 1
mov edx, dword [0x4565dc]
call fcn.004055e8
add esp, 4
lea eax, [ebp - 0x38]
push eax
mov eax, dword [ebp - 0x48]
push eax
lea eax, [ebp - 0x3c]
push eax
mov eax, dword [ebp - 0x4c]
push eax
lea eax, [ebp - 0x40]
push eax
mov ecx, dword [ebp - 0x44]
mov edx, edi
mov eax, esi
call fcn.004724a0
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x10], eax
jmp 0x474b40
inc dword [ebp - 0x10]
dec dword [ebp - 0x38]
cmp dword [ebp - 0x38], 0
jle 0x474b4e
mov eax, dword [ebp - 0x10]
cmp byte [eax], 0
je 0x474b3a
mov eax, ebx
add eax, eax
add eax, 2
cmp eax, dword [ebp - 0x38]
jg 0x474d52
mov eax, dword [ebp - 0x38]
dec eax
shr eax, 2
inc eax
shl eax, 2
inc eax
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x18]
push eax
lea eax, [ebp - 0x14]
mov ecx, 1
mov edx, dword [0x4565dc]
call fcn.004055e8
add esp, 4
mov eax, dword [ebp - 8]
push eax
mov eax, dword [ebp - 0x14]
push eax
lea eax, [ebp - 0x18]
push eax
mov ecx, dword [ebp - 4]
mov edx, edi
mov eax, esi
call fcn.0047422c
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x10], eax
jmp 0x474bad
inc dword [ebp - 0x10]
dec dword [ebp - 0x18]
cmp dword [ebp - 0x18], 0
jle 0x474bbb
mov eax, dword [ebp - 0x10]
cmp byte [eax], 0
je 0x474ba7
mov eax, dword [ebp - 0x18]
cmp eax, dword [ebp - 0x38]
jg 0x474d52
push 0
mov ecx, dword [ebp + 0x10]
mov dl, 1
mov eax, dword [0x4c406c]
call fcn.004c4198
mov dword [ebp - 0x34], eax
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp + 0x18]
mov eax, dword [ebp - 0x34]
call fcn.004c43f4
lea edx, [ebp - 0x1c]
mov eax, dword [ebp - 0x34]
call fcn.004c43fc
lea eax, [ebp - 0x34]
call fcn.0040d948
push ebx
lea eax, [ebp - 0x20]
mov ecx, 1
mov edx, dword [0x4565dc]
call fcn.004055e8
add esp, 4
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x10]
mov ecx, ebx
call fcn.00402c74
add dword [ebp - 0x10], ebx
mov eax, dword [ebp - 0x38]
sub eax, ebx
dec eax
push eax
lea eax, [ebp - 0x24]
mov ecx, 1
mov edx, dword [0x4565dc]
call fcn.004055e8
add esp, 4
mov eax, dword [ebp - 0x24]
call fcn.0040540c
mov ecx, eax
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x10]
call fcn.00402c74
mov eax, dword [ebp + 0x10]
push eax
lea eax, [ebp - 0x2c]
push eax
mov eax, dword [ebp - 0x24]
call fcn.0040540c
mov edx, eax
mov eax, dword [ebp - 0x24]
mov ecx, ebx
call fcn.00473f74
mov edx, ebx
dec edx
test edx, edx
jl 0x474c8b
inc edx
xor eax, eax
mov ecx, dword [ebp - 0x2c]
mov cl, byte [ecx + eax]
mov esi, dword [ebp - 0x20]
xor byte [esi + eax], cl
inc eax
dec edx
jne 0x474c7b
mov eax, dword [ebp + 0x10]
push eax
lea eax, [ebp - 0x28]
push eax
mov eax, dword [ebp - 0x24]
call fcn.0040540c
mov ecx, eax
mov eax, dword [ebp - 0x20]
mov edx, ebx
call fcn.00473f74
mov eax, dword [ebp - 0x24]
call fcn.0040540c
mov edx, eax
dec edx
test edx, edx
jl 0x474cc9
inc edx
xor eax, eax
mov ecx, dword [ebp - 0x28]
mov cl, byte [ecx + eax]
mov esi, dword [ebp - 0x24]
xor byte [esi + eax], cl
inc eax
dec edx
jne 0x474cb9
push ebx
lea eax, [ebp - 0x30]
mov ecx, 1
mov edx, dword [0x4565dc]
call fcn.004055e8
add esp, 4
mov edx, dword [ebp - 0x30]
mov eax, dword [ebp - 0x24]
mov ecx, ebx
call fcn.00402c74
lea eax, [ebp - 0x1c]
call fcn.0040481c
mov edx, eax
mov eax, dword [ebp - 0x30]
mov ecx, ebx
call fcn.004083fc
test al, al
je 0x474d52
mov eax, dword [ebp - 0x24]
add eax, ebx
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x24]
call fcn.0040540c
sub eax, ebx
jmp 0x474d1d
inc dword [ebp - 0x10]
dec eax
test eax, eax
jle 0x474d29
mov edx, dword [ebp - 0x10]
cmp byte [edx], 0
je 0x474d19
test eax, eax
je 0x474d52
mov edx, dword [ebp - 0x10]
cmp byte [edx], 1
jne 0x474d52
inc dword [ebp - 0x10]
dec eax
mov edx, dword [ebp + 8]
mov dword [edx], eax
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx]
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp - 0x10]
call fcn.00402c74
mov byte [ebp - 9], 1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x474da3
lea eax, [ebp - 0x4c]
mov edx, dword [0x4565dc]
mov ecx, 3
call fcn.00404d84
lea eax, [ebp - 0x30]
mov edx, dword [0x4565dc]
mov ecx, 5
call fcn.00404d84
lea eax, [ebp - 0x1c]
call fcn.00404304
lea eax, [ebp - 0x14]
mov edx, dword [0x4565dc]
call fcn.004056f4
ret