Function at 0x47a340
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x14
cmp dword [esp + 0x24], 0
push ebx
push ebp
mov ebp, dword [esp + 0x20]
push esi
push edi
mov edi, eax
mov eax, dword [esp + 0x30]
mov esi, ecx
je 0x47a575
movzx edx, byte [eax]
movzx ecx, byte [eax + 1]
inc eax
shl ecx, 8
or edx, ecx
movzx ecx, byte [eax + 1]
mov dword [esp + 0x14], eax
inc eax
shl ecx, 0x10
or edx, ecx
movzx ecx, byte [eax + 1]
inc eax
movzx ebx, byte [eax + 1]
shl ecx, 0x18
inc eax
or edx, ecx
movzx ecx, byte [eax + 1]
inc eax
shl ecx, 8
or ebx, ecx
movzx ecx, byte [eax + 2]
inc eax
movzx eax, byte [eax]
shl ecx, 8
or ecx, eax
shl ecx, 0x10
or ebx, ecx
add ebp, 0xfffffff8
js 0x47a472
lea eax, [ebp + 8]
shr eax, 3
mov dword [esp + 0x28], eax
neg eax
lea ecx, [ebp + eax*8]
mov dword [esp + 0x34], ecx
movzx eax, byte [esi]
movzx ecx, byte [esi + 1]
inc esi
shl ecx, 8
or eax, ecx
movzx ecx, byte [esi + 1]
inc esi
shl ecx, 0x10
or eax, ecx
movzx ecx, byte [esi + 1]
inc esi
shl ecx, 0x18
or eax, ecx
movzx ecx, byte [esi + 1]
inc esi
movzx ebp, byte [esi + 1]
inc esi
shl ebp, 8
or ecx, ebp
movzx ebp, byte [esi + 1]
inc esi
shl ebp, 0x10
or ecx, ebp
movzx ebp, byte [esi + 1]
inc esi
xor eax, edx
shl ebp, 0x18
or ecx, ebp
lea edx, [esp + 0x1c]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x2c]
xor ecx, ebx
push 1
push edx
inc esi
mov dword [esp + 0x28], ecx
call fcn.00479790
mov eax, dword [esp + 0x24]
mov byte [edi], al
inc edi
mov ecx, eax
shr ecx, 8
mov byte [edi], cl
inc edi
mov ecx, eax
shr ecx, 0x10
mov byte [edi], cl
inc edi
mov edx, eax
shr eax, 0x18
mov byte [edi], al
mov eax, dword [esp + 0x28]
inc edi
mov byte [edi], al
inc edi
mov ecx, eax
shr ecx, 8
mov byte [edi], cl
inc edi
mov ecx, eax
shr ecx, 0x10
mov byte [edi], cl
inc edi
mov ebx, eax
shr eax, 0x18
mov byte [edi], al
add esp, 8
inc edi
sub dword [esp + 0x28], 1
jne 0x47a3c1
mov ebp, dword [esp + 0x34]
cmp ebp, 0xfffffff8
je 0x47a533
lea esi, [esi + ebp + 8]
add ebp, 7
xor ecx, ecx
xor eax, eax
cmp ebp, 7
ja case.default.0x47a48b
jmp dword [ebp*4 + 0x47a7b0]
movzx ecx, byte [esi - 1]
dec esi
shl ecx, 0x18
movzx eax, byte [esi - 1]
dec esi
shl eax, 0x10
or ecx, eax
movzx eax, byte [esi - 1]
dec esi
shl eax, 8
or ecx, eax
movzx eax, byte [esi - 1]
dec esi
or ecx, eax
movzx eax, byte [esi - 1]
dec esi
shl eax, 0x18
movzx ebp, byte [esi - 1]
dec esi
shl ebp, 0x10
or eax, ebp
movzx ebp, byte [esi - 1]
dec esi
shl ebp, 8
or eax, ebp
movzx esi, byte [esi - 1]
or eax, esi
xor ecx, ebx
xor eax, edx
mov dword [esp + 0x20], ecx
lea ecx, [esp + 0x1c]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x2c]
push 1
push ecx
call fcn.00479790
mov eax, dword [esp + 0x24]
mov byte [edi], al
inc edi
mov ecx, eax
shr ecx, 8
mov byte [edi], cl
inc edi
mov ecx, eax
shr ecx, 0x10
mov byte [edi], cl
inc edi
mov edx, eax
shr eax, 0x18
mov byte [edi], al
mov eax, dword [esp + 0x28]
inc edi
mov byte [edi], al
mov ecx, eax
shr ecx, 8
inc edi
mov byte [edi], cl
mov ecx, eax
inc edi
shr ecx, 0x10
add esp, 8
mov ebx, eax
shr eax, 0x18
mov byte [edi], cl
mov byte [edi + 1], al
mov eax, dword [esp + 0x30]
mov esi, dword [esp + 0x14]
mov byte [eax], dl
mov ecx, edx
shr ecx, 8
mov byte [esi], cl
inc esi
mov eax, edx
inc esi
shr eax, 0x10
mov byte [esi - 1], al
shr edx, 0x18
mov byte [esi], dl
mov byte [esi + 1], bl
inc esi
mov ecx, ebx
inc esi
shr ecx, 8
mov byte [esi], cl
mov edx, ebx
inc esi
shr edx, 0x10
shr ebx, 0x18
pop edi
mov byte [esi], dl
mov byte [esi + 1], bl
pop esi
pop ebp
pop ebx
add esp, 0x14
ret
movzx ebx, byte [eax]
movzx ecx, byte [eax + 1]
inc eax
movzx edx, byte [eax + 1]
mov dword [esp + 0x14], eax
inc eax
shl ecx, 8
or ebx, ecx
movzx ecx, byte [eax + 1]
inc eax
shl edx, 0x10
or ebx, edx
shl ecx, 0x18
inc eax
movzx edx, byte [eax + 1]
or ebx, ecx
movzx ecx, byte [eax]
inc eax
shl edx, 8
or ecx, edx
movzx edx, byte [eax + 2]
inc eax
movzx eax, byte [eax]
shl edx, 8
or edx, eax
shl edx, 0x10
lea eax, [ebp - 8]
or ecx, edx
mov dword [esp + 0x28], ecx
mov dword [esp + 0x34], eax
test eax, eax
jl 0x47a6a0
lea ecx, [eax + 8]
shr ecx, 3
mov dword [esp + 0x18], ecx
neg ecx
lea ecx, [eax + ecx*8]
mov dword [esp + 0x34], ecx
movzx ebp, byte [esi]
movzx edx, byte [esi + 1]
inc esi
movzx eax, byte [esi + 1]
inc esi
movzx ecx, byte [esi + 1]
shl edx, 8
shl eax, 0x10
inc esi
or ebp, edx
or ebp, eax
movzx eax, byte [esi + 1]
inc esi
movzx edx, byte [esi + 1]
inc esi
shl ecx, 0x18
or ebp, ecx
movzx ecx, byte [esi + 1]
inc esi
shl edx, 8
or eax, edx
movzx edx, byte [esi + 1]
inc esi
shl ecx, 0x10
or eax, ecx
shl edx, 0x18
or eax, edx
mov dword [esp + 0x10], eax
mov dword [esp + 0x20], eax
lea eax, [esp + 0x1c]
push 0
push eax
mov eax, dword [esp + 0x34]
mov dword [esp + 0x24], ebp
inc esi
call fcn.00479790
mov ecx, dword [esp + 0x30]
xor ecx, dword [esp + 0x28]
mov eax, ebx
xor eax, dword [esp + 0x24]
inc edi
mov byte [edi - 1], al
mov edx, eax
shr edx, 8
mov byte [edi], dl
inc edi
mov edx, eax
shr edx, 0x10
mov byte [edi], dl
inc edi
shr eax, 0x18
mov byte [edi], al
inc edi
mov byte [edi], cl
inc edi
mov eax, ecx
shr eax, 8
mov byte [edi], al
mov eax, dword [esp + 0x18]
inc edi
mov edx, ecx
shr edx, 0x10
mov byte [edi], dl
inc edi
shr ecx, 0x18
mov byte [edi], cl
add esp, 8
inc edi
sub dword [esp + 0x18], 1
mov ebx, ebp
mov dword [esp + 0x28], eax
jne 0x47a5e0
mov ecx, eax
mov eax, dword [esp + 0x34]
cmp eax, 0xfffffff8
je 0x47a76f
movzx ebp, byte [esi]
movzx ecx, byte [esi + 1]
inc esi
movzx edx, byte [esi + 1]
inc esi
movzx eax, byte [esi + 1]
inc esi
shl ecx, 8
shl edx, 0x10
or ebp, ecx
or ebp, edx
shl eax, 0x18
or ebp, eax
movzx eax, byte [esi + 1]
inc esi
movzx ecx, byte [esi + 1]
inc esi
movzx edx, byte [esi + 2]
shl ecx, 8
inc esi
or eax, ecx
movzx ecx, byte [esi]
shl edx, 8
or edx, ecx
shl edx, 0x10
or eax, edx
lea edx, [esp + 0x1c]
mov dword [esp + 0x10], eax
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x2c]
push 0
push edx
mov dword [esp + 0x24], ebp
call fcn.00479790
mov ecx, dword [esp + 0x3c]
mov eax, dword [esp + 0x30]
xor ebx, dword [esp + 0x24]
xor eax, dword [esp + 0x28]
lea edi, [edi + ecx + 8]
add ecx, 7
add esp, 8
cmp ecx, 7
ja case.default.0x47a726
jmp dword [ecx*4 + 0x47a7d0]
dec edi
mov ecx, eax
shr ecx, 0x18
mov byte [edi], cl
dec edi
mov edx, eax
shr edx, 0x10
mov byte [edi], dl
dec edi
mov ecx, eax
shr ecx, 8
mov byte [edi], cl
dec edi
mov byte [edi], al
dec edi
mov edx, ebx
shr edx, 0x18
mov byte [edi], dl
dec edi
mov eax, ebx
shr eax, 0x10
mov byte [edi], al
dec edi
mov ecx, ebx
shr ecx, 8
mov byte [edi], cl
mov byte [edi - 1], bl
mov edx, dword [esp + 0x10]
mov ebx, ebp
mov dword [esp + 0x28], edx
mov ecx, edx
mov eax, dword [esp + 0x30]
mov byte [eax], bl
mov eax, dword [esp + 0x14]
mov edx, ebx
shr edx, 8
mov byte [eax], dl
inc eax
mov edx, ebx
shr edx, 0x10
mov byte [eax], dl
inc eax
shr ebx, 0x18
mov byte [eax], bl
inc eax
mov byte [eax], cl
mov edx, ecx
shr edx, 8
inc eax
mov byte [eax], dl
pop edi
mov edx, ecx
inc eax
pop esi
shr edx, 0x10
shr ecx, 0x18
pop ebp
mov byte [eax], dl
mov byte [eax + 1], cl
pop ebx
add esp, 0x14
ret