Function at 0x519ea0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x18
call fcn.0065cc50
cmp dword [ebp + 0x18], 0
mov eax, dword [ebp + 0x14]
push ebx
push esi
mov ebx, edx
mov edx, ecx
mov esi, dword [eax]
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 8], ebx
mov dword [ebp - 4], edx
je 0x519fc9
test esi, esi
je 0x519eef
mov ecx, dword [ebp + 0x10]
test edi, edi
je 0x519eef
movzx eax, byte [edx]
dec edi
xor byte [esi + ecx], al
inc edx
movzx eax, byte [esi + ecx]
inc esi
mov byte [ebx], al
inc ebx
mov dword [ebp - 4], edx
and esi, 0xf
jne 0x519ed3
cmp edi, 0x10
jb 0x519f7a
mov ecx, dword [ebp + 0x10]
mov eax, ebx
sub eax, ecx
mov dword [ebp - 0x10], eax
mov eax, edx
sub eax, ecx
mov dword [ebp + 0x18], eax
mov eax, edi
shr eax, 4
mov dword [ebp - 0xc], eax
shl eax, 4
add ebx, eax
add edx, eax
mov dword [ebp - 8], ebx
mov ebx, dword [ebp - 0x10]
mov dword [ebp - 4], edx
jmp 0x519f26
mov ecx, dword [ebp + 0x10]
push dword [ebp + 0xc]
push ecx
push ecx
call dword [ebp + 0x1c]
add esp, 0xc
cmp esi, 0x10
jae 0x519f65
mov ecx, dword [ebp + 0x10]
mov edx, 0xf
sub edx, esi
add ecx, esi
mov esi, dword [ebp + 0x18]
shr edx, 2
inc edx
nop dword [eax]
mov eax, dword [esi + ecx]
lea ecx, [ecx + 4]
xor dword [ecx - 4], eax
mov eax, dword [ecx - 4]
mov dword [ebx + ecx - 4], eax
sub edx, 1
jne 0x519f50
add dword [ebp + 0x18], 0x10
sub edi, 0x10
add ebx, 0x10
xor esi, esi
sub dword [ebp - 0xc], 1
jne 0x519f23
mov ebx, dword [ebp - 8]
test edi, edi
je 0x51a0d5
push dword [ebp + 0xc]
mov eax, dword [ebp + 0x10]
push eax
push eax
call dword [ebp + 0x1c]
mov edx, dword [ebp + 0x10]
add esp, 0xc
sub dword [ebp - 4], edx
sub ebx, edx
lea ecx, [esi + edx]
add esi, edi
mov dword [ebp - 0xc], esi
mov esi, dword [ebp - 4]
movzx eax, byte [ecx + esi]
lea ecx, [ecx + 1]
xor byte [ecx - 1], al
movzx eax, byte [ecx - 1]
mov byte [ecx + ebx - 1], al
sub edi, 1
jne 0x519fa3
mov eax, dword [ebp + 0x14]
mov esi, dword [ebp - 0xc]
pop edi
mov dword [eax], esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [ebp + 0x18], edi
test esi, esi
je 0x519ff8
mov eax, dword [ebp + 0x10]
test edi, edi
je 0x519ff8
mov al, byte [esi + eax]
dec edi
mov cl, byte [edx]
inc edx
xor al, cl
mov dword [ebp - 4], edx
mov byte [ebx], al
inc ebx
mov eax, dword [ebp + 0x10]
mov dword [ebp - 8], ebx
mov dword [ebp + 0x18], edi
mov byte [esi + eax], cl
inc esi
and esi, 0xf
jne 0x519fd3
mov edx, dword [ebp + 0x1c]
cmp edi, 0x10
jb 0x51a08f
mov ecx, dword [ebp + 0x10]
mov eax, ebx
sub eax, ecx
mov dword [ebp - 0xc], eax
mov eax, edi
shr eax, 4
mov dword [ebp - 0x10], eax
jmp 0x51a01b
mov ecx, dword [ebp + 0x10]
push dword [ebp + 0xc]
push ecx
push ecx
call edx
add esp, 0xc
cmp esi, 0x10
jae 0x51a070
mov edi, dword [ebp + 0x10]
mov eax, 0xf
mov edx, dword [ebp - 4]
sub eax, esi
add edi, esi
mov dword [ebp - 0x14], eax
sub edx, ebx
mov esi, eax
mov ebx, dword [ebp - 0xc]
shr esi, 2
mov dword [ebp - 0x18], edx
inc esi
nop word [eax + eax]
mov eax, dword [edi]
lea ecx, [ebx + edi]
mov edx, dword [ecx + edx]
lea edi, [edi + 4]
xor eax, edx
mov dword [ecx], eax
mov dword [edi - 4], edx
mov edx, dword [ebp - 0x18]
sub esi, 1
jne 0x51a050
mov ebx, dword [ebp - 8]
mov edi, dword [ebp + 0x18]
add dword [ebp - 0xc], 0x10
sub edi, 0x10
add dword [ebp - 4], 0x10
add ebx, 0x10
mov edx, dword [ebp + 0x1c]
xor esi, esi
sub dword [ebp - 0x10], 1
mov dword [ebp + 0x18], edi
mov dword [ebp - 8], ebx
jne 0x51a018
test edi, edi
je 0x51a0d5
push dword [ebp + 0xc]
mov eax, dword [ebp + 0x10]
push eax
push eax
call edx
mov edx, dword [ebp + 0x10]
add esp, 0xc
sub dword [ebp - 4], ebx
sub ebx, edx
lea ecx, [esi + edx]
add esi, edi
mov dword [ebp - 0xc], esi
mov esi, dword [ebp - 4]
mov dword [ebp + 0x18], ecx
mov eax, dword [ebp + 0x18]
add ecx, ebx
mov dl, byte [ecx + esi]
mov al, byte [eax]
xor al, dl
mov byte [ecx], al
mov ecx, dword [ebp + 0x18]
mov byte [ecx], dl
inc ecx
mov dword [ebp + 0x18], ecx
sub edi, 1
jne 0x51a0b6
mov esi, dword [ebp - 0xc]
mov eax, dword [ebp + 0x14]
pop edi
mov dword [eax], esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret