Function at 0x47cc12
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov dword [ebp - 0xc], ecx
and dword [ebp - 8], 0
mov eax, dword [ebp - 0xc]
cmp dword [eax + 0x6c], 0x106
jae 0x47cc5a
mov ecx, dword [ebp - 0xc]
call fcn.0047a5a2
mov eax, dword [ebp - 0xc]
cmp dword [eax + 0x6c], 0x106
jae 0x47cc4c
cmp dword [ebp + 8], 0
jne 0x47cc4c
xor eax, eax
jmp 0x47cfb5
mov eax, dword [ebp - 0xc]
cmp dword [eax + 0x6c], 0
jne 0x47cc5a
jmp 0x47cf2a
mov eax, dword [ebp - 0xc]
cmp dword [eax + 0x6c], 3
jb 0x47ccd4
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0xc]
mov eax, dword [eax + 0x40]
mov ecx, dword [ecx + 0x50]
shl eax, cl
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx + 0x64]
mov edx, dword [ebp - 0xc]
mov edx, dword [edx + 0x28]
movzx ecx, byte [edx + ecx + 2]
xor eax, ecx
mov ecx, dword [ebp - 0xc]
and eax, dword [ecx + 0x4c]
mov ecx, dword [ebp - 0xc]
mov dword [ecx + 0x40], eax
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x40]
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx + 0x38]
movzx eax, word [ecx + eax*2]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0xc]
mov eax, dword [eax + 0x64]
and eax, dword [ecx + 0x24]
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx + 0x30]
mov dx, word [ebp - 8]
mov word [ecx + eax*2], dx
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x40]
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx + 0x38]
mov edx, dword [ebp - 0xc]
mov dx, word [edx + 0x64]
mov word [ecx + eax*2], dx
cmp dword [ebp - 8], 0
je 0x47cd10
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x64]
sub eax, dword [ebp - 8]
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx + 0x1c]
sub ecx, 0x106
cmp eax, ecx
ja 0x47cd10
mov eax, dword [ebp - 0xc]
cmp dword [eax + 0x80], 2
je 0x47cd10
push dword [ebp - 8]
mov ecx, dword [ebp - 0xc]
call fcn.0047cfb9
mov ecx, dword [ebp - 0xc]
mov dword [ecx + 0x58], eax
mov eax, dword [ebp - 0xc]
cmp dword [eax + 0x58], 3
jb 0x47ce82
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x58]
sub eax, 3
push eax
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0xc]
mov eax, dword [eax + 0x64]
sub eax, dword [ecx + 0x68]
push eax
mov ecx, dword [ebp - 0xc]
call fcn.0047d29e
mov dword [ebp - 4], eax
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0xc]
mov eax, dword [eax + 0x6c]
sub eax, dword [ecx + 0x58]
mov ecx, dword [ebp - 0xc]
mov dword [ecx + 0x6c], eax
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0xc]
mov eax, dword [eax + 0x58]
cmp eax, dword [ecx + 0x78]
ja 0x47ce24
mov eax, dword [ebp - 0xc]
cmp dword [eax + 0x6c], 3
jb 0x47ce24
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x58]
dec eax
mov ecx, dword [ebp - 0xc]
mov dword [ecx + 0x58], eax
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x64]
inc eax
mov ecx, dword [ebp - 0xc]
mov dword [ecx + 0x64], eax
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0xc]
mov eax, dword [eax + 0x40]
mov ecx, dword [ecx + 0x50]
shl eax, cl
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx + 0x64]
mov edx, dword [ebp - 0xc]
mov edx, dword [edx + 0x28]
movzx ecx, byte [edx + ecx + 2]
xor eax, ecx
mov ecx, dword [ebp - 0xc]
and eax, dword [ecx + 0x4c]
mov ecx, dword [ebp - 0xc]
mov dword [ecx + 0x40], eax
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x40]
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx + 0x38]
movzx eax, word [ecx + eax*2]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0xc]
mov eax, dword [eax + 0x64]
and eax, dword [ecx + 0x24]
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx + 0x30]
mov dx, word [ebp - 8]
mov word [ecx + eax*2], dx
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x40]
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx + 0x38]
mov edx, dword [ebp - 0xc]
mov dx, word [edx + 0x64]
mov word [ecx + eax*2], dx
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x58]
dec eax
mov ecx, dword [ebp - 0xc]
mov dword [ecx + 0x58], eax
mov eax, dword [ebp - 0xc]
cmp dword [eax + 0x58], 0
jne 0x47cd7d
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x64]
inc eax
mov ecx, dword [ebp - 0xc]
mov dword [ecx + 0x64], eax
jmp 0x47ce80
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x64]
mov ecx, dword [ebp - 0xc]
add eax, dword [ecx + 0x58]
mov ecx, dword [ebp - 0xc]
mov dword [ecx + 0x64], eax
mov eax, dword [ebp - 0xc]
and dword [eax + 0x58], 0
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x28]
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx + 0x64]
movzx eax, byte [eax + ecx]
mov ecx, dword [ebp - 0xc]
mov dword [ecx + 0x40], eax
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0xc]
mov eax, dword [eax + 0x40]
mov ecx, dword [ecx + 0x50]
shl eax, cl
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx + 0x64]
mov edx, dword [ebp - 0xc]
mov edx, dword [edx + 0x28]
movzx ecx, byte [edx + ecx + 1]
xor eax, ecx
mov ecx, dword [ebp - 0xc]
and eax, dword [ecx + 0x4c]
mov ecx, dword [ebp - 0xc]
mov dword [ecx + 0x40], eax
jmp 0x47ceba
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x28]
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx + 0x64]
movzx eax, byte [eax + ecx]
push eax
push 0
mov ecx, dword [ebp - 0xc]
call fcn.0047d29e
mov dword [ebp - 4], eax
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x6c]
dec eax
mov ecx, dword [ebp - 0xc]
mov dword [ecx + 0x6c], eax
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x64]
inc eax
mov ecx, dword [ebp - 0xc]
mov dword [ecx + 0x64], eax
cmp dword [ebp - 4], 0
je 0x47cf25
mov eax, dword [ebp - 0xc]
cmp dword [eax + 0x54], 0
jl 0x47ceda
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x28]
mov ecx, dword [ebp - 0xc]
add eax, dword [ecx + 0x54]
mov dword [ebp - 0x10], eax
jmp 0x47cede
and dword [ebp - 0x10], 0
push 0
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0xc]
mov eax, dword [eax + 0x64]
sub eax, dword [ecx + 0x54]
push eax
push dword [ebp - 0x10]
mov ecx, dword [ebp - 0xc]
call fcn.0047a7bc
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx + 0x64]
mov dword [eax + 0x54], ecx
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 4]
call fcn.0046f9b4
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 4]
call fcn.0046f864
test eax, eax
jne 0x47cf25
xor eax, eax
jmp 0x47cfb5
jmp 0x47cc1f
mov eax, dword [ebp - 0xc]
cmp dword [eax + 0x54], 0
jl 0x47cf44
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x28]
mov ecx, dword [ebp - 0xc]
add eax, dword [ecx + 0x54]
mov dword [ebp - 0x14], eax
jmp 0x47cf48
and dword [ebp - 0x14], 0
xor eax, eax
cmp dword [ebp + 8], 4
sete al
push eax
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0xc]
mov eax, dword [eax + 0x64]
sub eax, dword [ecx + 0x54]
push eax
push dword [ebp - 0x14]
mov ecx, dword [ebp - 0xc]
call fcn.0047a7bc
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx + 0x64]
mov dword [eax + 0x54], ecx
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 4]
call fcn.0046f9b4
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 4]
call fcn.0046f864
test eax, eax
jne 0x47cfa8
cmp dword [ebp + 8], 4
jne 0x47cf9f
mov dword [ebp - 0x18], 2
jmp 0x47cfa3
and dword [ebp - 0x18], 0
mov eax, dword [ebp - 0x18]
jmp 0x47cfb5
xor eax, eax
cmp dword [ebp + 8], 4
sete al
lea eax, [eax + eax + 1]
leave
ret 4