Function at 0x599d54
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, dword [ebp + 8]
mov ecx, ebx
push esi
lea esi, [eax + 0xe]
sub ecx, eax
push edi
mov dl, byte [ebx + 0xf]
mov dword [ebp - 0xc], esi
mov dword [ebp - 0x10], ecx
movzx ecx, byte [esi + 1]
movzx eax, dl
xor ecx, eax
and dword [ebp - 4], 0
mov eax, dword [ebp + 0xc]
mov edi, ecx
and ecx, 0xf
mov dword [ebp - 0x14], 0xe
add ecx, ecx
and edi, 0xfffffff0
mov ebx, dword [eax + ecx*8]
mov edx, dword [eax + ecx*8 + 4]
mov esi, dword [eax + ecx*8 + 8]
mov ecx, dword [eax + ecx*8 + 0xc]
mov eax, esi
and eax, 0xf
mov dword [ebp - 0x1c], ecx
shrd esi, ecx, 4
shr ecx, 4
mov eax, dword [eax*4 + 0x838788]
mov dword [ebp + 0x10], eax
mov eax, ebx
shrd eax, edx, 4
shl ebx, 0x1c
xor dword [ebp - 4], eax
or ebx, ecx
mov eax, dword [ebp - 4]
shr edx, 4
xor dword [ebp + 0x10], edx
mov edx, dword [ebp + 0xc]
xor eax, dword [edi + edx]
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
xor eax, dword [edi + edx + 4]
xor edx, edx
mov dword [ebp + 0x10], eax
or edx, esi
mov eax, dword [ebp + 0xc]
mov esi, dword [ebp - 0xc]
mov dword [ebp - 0x18], esi
xor edx, dword [edi + eax + 8]
xor ebx, dword [edi + eax + 0xc]
mov dword [ebp - 8], edx
mov eax, dword [ebp - 0x10]
and edx, 0xf
shrd dword [ebp - 8], ebx, 4
movzx ecx, byte [eax + esi]
movzx eax, byte [esi]
xor esi, esi
xor ecx, eax
mov edx, dword [edx*4 + 0x838788]
mov eax, dword [ebp - 4]
mov edi, ecx
shl dword [ebp - 4], 0x1c
and ecx, 0xf
shl ecx, 4
and edi, 0xfffffff0
mov dword [ebp - 0x1c], ecx
mov ecx, dword [ebp + 0x10]
shrd eax, ecx, 4
shr ebx, 4
or dword [ebp - 4], ebx
xor esi, eax
mov eax, dword [ebp + 0xc]
mov ebx, dword [ebp + 0xc]
shr ecx, 4
xor edx, ecx
mov dword [ebp + 0x10], ecx
mov ecx, dword [ebp - 0x1c]
xor edx, dword [ecx + eax + 4]
xor esi, dword [ecx + eax]
xor eax, eax
or eax, dword [ebp - 8]
xor eax, dword [ecx + ebx + 8]
mov ebx, dword [ebp - 4]
mov dword [ebp + 0x10], eax
mov eax, dword [ebp + 0xc]
xor ebx, dword [ecx + eax + 0xc]
xor ecx, ecx
mov eax, dword [ebp + 0x10]
mov dword [ebp - 8], eax
and eax, 0xf
mov dword [ebp - 0x1c], ebx
mov eax, dword [eax*4 + 0x838788]
mov dword [ebp + 0x10], eax
mov eax, esi
shrd eax, edx, 4
shl esi, 0x1c
shr edx, 4
xor ecx, eax
mov eax, dword [ebp + 0x10]
xor eax, edx
mov edx, dword [ebp + 0xc]
xor ecx, dword [edi + edx]
xor eax, dword [edi + edx + 4]
mov edx, dword [ebp - 8]
shrd edx, ebx, 4
mov dword [ebp - 0x20], ecx
shr ebx, 4
or ebx, esi
mov dword [ebp - 4], ecx
mov esi, dword [ebp + 0xc]
mov dword [ebp + 0x10], eax
xor edx, dword [edi + esi + 8]
xor ebx, dword [edi + esi + 0xc]
mov edi, dword [ebp - 0x14]
mov esi, dword [ebp - 0x18]
dec edi
dec esi
mov dword [ebp - 8], edx
mov dword [ebp - 0x20], edx
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x18], esi
test edi, edi
jns 0x599dfe
shr eax, 0x18
mov dword [ebp - 0x1c], ebx
mov ebx, dword [ebp + 8]
mov esi, dword [ebp - 0xc]
sub dword [ebp - 0x10], 0x10
add esi, 0x10
mov dword [ebp - 0xc], esi
mov byte [ebx], al
mov eax, dword [ebp + 0x10]
shr eax, 0x10
mov byte [ebx + 1], al
mov eax, dword [ebp + 0x10]
shr eax, 8
mov byte [ebx + 2], al
mov eax, dword [ebp + 0x10]
mov byte [ebx + 3], al
mov eax, ecx
shr eax, 0x18
mov byte [ebx + 4], al
mov eax, ecx
shr eax, 0x10
mov byte [ebx + 5], al
mov eax, ecx
shr eax, 8
mov byte [ebx + 6], al
mov byte [ebx + 7], cl
mov ecx, dword [ebp - 0x1c]
mov eax, ecx
shr eax, 0x18
mov byte [ebx + 8], al
mov eax, ecx
shr eax, 0x10
mov byte [ebx + 9], al
mov eax, ecx
shr eax, 8
mov byte [ebx + 0xa], al
mov eax, edx
shr eax, 0x18
mov byte [ebx + 0xc], al
mov eax, edx
shr eax, 0x10
mov byte [ebx + 0xd], al
mov eax, edx
shr eax, 8
sub dword [ebp + 0x14], 0x10
mov byte [ebx + 0xb], cl
mov byte [ebx + 0xe], al
mov byte [ebx + 0xf], dl
jne 0x599d73
pop edi
pop esi
pop ebx
leave
ret