Function at 0x479ba5
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x24
push ebp
mov ebp, dword [esp + 0x2c]
test ebp, ebp
je 0x479b8e
mov ecx, dword [esp + 0x30]
test ecx, ecx
je 0x479b8e
cmp byte [ecx], 0
je 0x479b8e
push esi
mov esi, dword [esp + 0x38]
test esi, esi
je 0x479b86
mov eax, dword [esp + 0x3c]
test eax, eax
jle 0x479b86
mov edx, eax
and edx, 0x8000000f
jns 0x479982
dec edx
or edx, 0xfffffff0
inc edx
je 0x47998f
pop esi
mov eax, 0xfffffff8
pop ebp
add esp, 0x24
ret
cdq
and edx, 0xf
add eax, edx
movzx edx, byte [ebp + 0x14]
sar eax, 4
dec edx
push ebx
push edi
mov dword [esp + 0x10], eax
je 0x479b01
dec edx
je 0x4799b9
pop edi
pop ebx
pop esi
mov eax, 0xfffffffb
pop ebp
add esp, 0x24
ret
mov edx, dword [esp + 0x38]
mov edx, dword [edx + 0xc]
mov ebx, dword [ebp]
mov edi, dword [ebp + 4]
mov ebp, dword [ebp + 8]
dec eax
test eax, eax
mov dword [esp + 0x30], edx
jle 0x479a63
mov dword [esp + 0x38], eax
mov eax, dword [ecx + 0x4c]
push eax
add ecx, 0x54
push ecx
lea ecx, [esp + 0x1c]
push ecx
push esi
call fcn.0049c935
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x40]
xor ecx, edi
mov edi, dword [esp + 0x30]
xor eax, ebx
mov ebx, dword [esp + 0x2c]
xor edi, edx
xor ebx, ebp
mov edx, esi
mov dword [esp + 0x2c], ebx
mov ebx, dword [edx]
mov dword [esp + 0x30], edi
mov edi, dword [edx + 4]
mov ebp, dword [edx + 8]
mov edx, dword [edx + 0xc]
mov dword [esp + 0x40], edx
mov edx, dword [esp + 0x58]
mov dword [edx], eax
mov dword [edx + 4], ecx
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x28], ecx
mov ecx, dword [esp + 0x30]
mov dword [edx + 8], eax
mov eax, dword [esp + 0x48]
mov dword [edx + 0xc], ecx
mov ecx, edx
add ecx, 0x10
add esp, 0x10
add esi, 0x10
dec eax
mov dword [esp + 0x48], ecx
mov ecx, dword [esp + 0x3c]
mov dword [esp + 0x38], eax
jne 0x4799da
mov edx, dword [ecx + 0x4c]
push edx
add ecx, 0x54
push ecx
lea eax, [esp + 0x1c]
push eax
push esi
call fcn.0049c935
mov edx, dword [esp + 0x30]
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x40]
mov esi, dword [esp + 0x2c]
xor eax, ebx
mov ebx, dword [esp + 0x28]
xor edx, ecx
mov dword [esp + 0x30], edx
xor ebx, edi
xor esi, ebp
shr edx, 0x18
add esp, 0x10
test edx, edx
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], ebx
mov dword [esp + 0x1c], esi
jle 0x479b79
cmp edx, 0x10
jg 0x479b79
mov ecx, 0x10
sub ecx, edx
mov eax, ecx
cmp eax, 0x10
jge 0x479ada
movzx esi, byte [esp + eax + 0x14]
cmp esi, edx
jne 0x479b79
inc eax
cmp eax, 0x10
jl 0x479ac7
mov edi, dword [esp + 0x48]
mov eax, ecx
shr ecx, 2
lea esi, [esp + 0x14]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [esp + 0x10]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop ebx
shl eax, 4
pop esi
sub eax, edx
pop ebp
add esp, 0x24
ret
mov edi, dword [esp + 0x48]
lea ebx, [eax - 1]
test ebx, ebx
jle 0x479b31
lea ebp, [ecx + 0x54]
lea ebx, [ebx]
mov ecx, dword [ecx + 0x4c]
push ecx
push ebp
push edi
push esi
call fcn.0049c935
mov ecx, dword [esp + 0x4c]
add esp, 0x10
add esi, 0x10
add edi, 0x10
dec ebx
jne 0x479b15
mov edx, dword [ecx + 0x4c]
push edx
add ecx, 0x54
push ecx
lea eax, [esp + 0x1c]
push eax
push esi
call fcn.0049c935
movzx edx, byte [esp + 0x33]
add esp, 0x10
cmp edx, 0x10
jge 0x479b79
mov ecx, 0x10
sub ecx, edx
mov eax, ecx
cmp eax, 0x10
jge 0x479ade
mov edi, edi
movzx esi, byte [esp + eax + 0x14]
cmp esi, edx
jne 0x479b79
inc eax
cmp eax, 0x10
jl 0x479b65
jmp 0x479ade
pop edi
pop ebx
pop esi
mov eax, 0xfffffff8
pop ebp
add esp, 0x24
ret
pop esi
xor eax, eax
pop ebp
add esp, 0x24
ret
mov eax, 0xfffffffb
pop ebp
add esp, 0x24
ret
jmp 0x479935