Function at 0x5ded47
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x20
push ebx
push ebp
push esi
push edi
mov dword [esp + 0x20], ecx
xor edi, edi
push ecx
lea ecx, [esp + 0x14]
mov dword [esp + 0x14], edi
mov esi, edx
call fcn.005df084
mov ecx, dword [esp + 0x20]
mov ebp, ecx
mov edx, dword [esp + 0x34]
mov dword [esp + 0x24], edx
lea eax, [ecx + esi]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x38]
add eax, edx
mov dword [esp + 0x38], edi
movzx edx, byte [ecx]
mov dword [esp + 0x1c], eax
movzx eax, byte [ecx + 1]
mov ecx, edi
shl edx, 8
add edx, eax
mov eax, dword [esp + 0x10]
lea esi, [eax + 0xc]
test eax, eax
je 0x5deda5
mov ebx, dword [eax + 4]
jmp 0x5deda7
mov ebx, edi
cmp ecx, ebx
jge 0x5dedb3
mov dword [esi], edi
inc ecx
add esi, 4
jmp 0x5ded9c
mov ebx, dword [esp + 0x24]
lea esi, [ebp + 2]
shl edx, 8
movzx eax, byte [esi]
add edx, eax
mov ecx, edx
imul eax, edx, 3
shr ecx, 4
xor ecx, edx
mov dword [esp + 0x18], edx
shr ecx, 5
add ecx, eax
and ecx, 0x7fff
push ecx
lea ecx, [esp + 0x14]
call fcn.005df05b
mov ecx, dword [eax]
mov dword [eax], ebp
mov eax, ebp
sub eax, ecx
dec eax
mov dword [esp + 0x24], eax
cmp eax, 0x2000
jae 0x5def0f
lea eax, [ebp + 4]
cmp eax, dword [esp + 0x14]
jae 0x5def0f
cmp ecx, dword [esp + 0x20]
jbe 0x5def0f
mov al, byte [ecx]
cmp al, byte [ebp]
jne 0x5def0f
mov al, byte [ecx + 1]
lea edx, [ebp + 1]
mov dword [esp + 0x28], edx
cmp al, byte [edx]
jne 0x5def0f
mov al, byte [ecx + 2]
cmp al, byte [esi]
jne 0x5def0f
mov edi, dword [esp + 0x14]
mov eax, 0x108
sub edi, ebp
push 2
pop edx
sub edi, edx
cmp edi, eax
cmova edi, eax
sub ecx, ebp
inc edx
inc esi
cmp edx, edi
jae 0x5dee60
mov al, byte [ecx + esi]
cmp al, byte [esi]
je 0x5dee53
mov ecx, dword [esp + 0x38]
push 0
pop edi
lea eax, [ecx + 4]
add eax, ebx
cmp eax, dword [esp + 0x1c]
jae 0x5def76
test ecx, ecx
je 0x5dee91
lea eax, [ecx - 1]
mov byte [ebx], al
inc ebx
neg ecx
mov al, byte [ecx + ebp]
mov byte [ebx], al
inc ebx
add ecx, 1
jne 0x5dee82
mov dword [esp + 0x38], ecx
mov ecx, dword [esp + 0x24]
sub edx, 2
mov ebp, dword [esp + 0x28]
shr ecx, 8
mov dword [esp + 0x2c], edx
cmp edx, 7
jae 0x5deeb4
mov al, dl
shl al, 5
add al, cl
mov byte [ebx], al
inc ebx
jmp 0x5deec2
sub cl, 0x20
lea eax, [edx - 7]
mov byte [ebx], cl
mov byte [ebx + 1], al
add ebx, 2
mov eax, dword [esp + 0x24]
mov esi, dword [esp + 0x2c]
mov edi, dword [esp + 0x18]
mov byte [ebx], al
inc ebx
movzx eax, byte [ebp + 2]
shl edi, 8
add edi, eax
mov ecx, edi
imul eax, edi, 3
shr ecx, 4
xor ecx, edi
shr ecx, 5
add ecx, eax
and ecx, 0x7fff
push ecx
lea ecx, [esp + 0x14]
call fcn.005df05b
mov dword [eax], ebp
inc ebp
mov eax, esi
dec esi
test eax, eax
jne 0x5deed1
mov ecx, dword [esp + 0x38]
mov dword [esp + 0x18], edi
xor edi, edi
jmp 0x5def40
mov ecx, dword [esp + 0x38]
inc ecx
inc ebp
mov dword [esp + 0x38], ecx
cmp ecx, 0x20
jne 0x5def40
lea eax, [ebx + 0x21]
cmp eax, dword [esp + 0x1c]
jae 0x5def76
push 8
lea edi, [ebx + 1]
mov byte [ebx], 0x1f
lea esi, [ebp - 0x20]
add ebx, 0x21
pop ecx
rep movsd dword es:[edi], dword [esi]
xor edi, edi
mov ecx, edi
mov dword [esp + 0x38], ecx
mov edx, dword [esp + 0x18]
cmp ebp, dword [esp + 0x14]
jb 0x5dedb7
test ecx, ecx
je 0x5def70
lea eax, [ebx + 1]
add eax, ecx
cmp eax, dword [esp + 0x1c]
jae 0x5def76
lea eax, [ecx - 1]
mov byte [ebx], al
inc ebx
neg ecx
mov al, byte [ecx + ebp]
mov byte [ebx], al
inc ebx
add ecx, 1
jne 0x5def65
mov edi, ebx
sub edi, dword [esp + 0x34]
lea ecx, [esp + 0x10]
call fcn.00421e54
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret