Function at 0x5117dc
Capabilities:
Encode data using xor

Disassembly:
push 0x1c
mov eax, 0x105422d
call fcn.005185c6
xor ebx, ebx
mov dword [ebp - 0x24], ebx
mov ecx, dword [ebp + 8]
xor esi, esi
mov dword [ebp - 0x10], ebx
call fcn.0050baf8
mov ecx, dword [ebp + 8]
xor edi, edi
inc edi
mov dword [ebp - 4], ebx
mov dword [ebp - 0x24], edi
call fcn.0050b4c4
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
push ebx
push ebx
push 3
push ebx
push edi
push 0x80000000
push eax
call dword [0x1001320]
cmp eax, 0xffffffff
mov dword [ebp - 0x20], eax
je 0x511956
push ebx
push eax
call dword [0x1001274]
mov edi, eax
cmp edi, 0xffffffff
je 0x51194d
push ebx
push edi
push ebx
push 2
push ebx
push dword [ebp - 0x20]
call dword [0x1001278]
cmp eax, ebx
mov dword [ebp - 0x28], eax
je 0x51194d
push edi
push ebx
push ebx
push 4
push eax
call dword [0x100127c]
cmp eax, ebx
mov dword [ebp + 0xc], eax
je 0x511944
movzx ecx, word [eax]
mov dword [ebp - 0x1c], ecx
movzx ecx, cx
cmp ecx, 0xbbef
mov dword [ebp - 0x14], eax
je 0x5118a4
cmp ecx, 0xfeff
je 0x51189a
cmp ecx, 0xfffe
jne 0x511961
shr edi, 1
dec edi
mov esi, edi
jmp 0x51199c
cmp edi, 2
jbe 0x511961
cmp byte [eax + 2], 0xbf
jne 0x511961
add eax, 3
mov dword [ebp - 0x10], 0xfde9
mov dword [ebp - 0x14], eax
sub edi, 3
push ebx
push ebx
push edi
push dword [ebp - 0x14]
push ebx
push dword [ebp - 0x10]
mov ebx, dword [0x100133c]
call ebx
mov esi, eax
test esi, esi
je 0x51193b
mov ecx, dword [ebp + 8]
lea eax, [esi + 1]
push eax
call fcn.0050bfd1
push esi
push eax
push edi
push dword [ebp - 0x14]
mov dword [ebp - 0x18], eax
push 0
push dword [ebp - 0x10]
call ebx
test eax, eax
jne 0x51190d
mov ecx, dword [ebp + 8]
push 0xffffffffffffffff
call fcn.0050b6f2
and dword [ebp - 0x18], 0
xor ebx, ebx
mov edx, dword [ebp - 0x18]
cmp edx, ebx
je 0x51193b
cmp esi, ebx
mov eax, edx
jbe 0x51192d
mov ecx, esi
cmp word [eax], bx
jne 0x511928
mov word [eax], 0x20
inc eax
inc eax
dec ecx
jne 0x51191e
mov ecx, dword [ebp + 8]
push 0xffffffffffffffff
mov word [edx + esi*2], bx
call fcn.0050b6f2
push dword [ebp + 0xc]
call dword [0x1001314]
push dword [ebp - 0x28]
call dword [0x10012e8]
push dword [ebp - 0x20]
call dword [0x10012e8]
mov eax, dword [ebp + 8]
call fcn.005186b2
ret 8
or dword [ebp - 0x18], 0xffffffff
lea ecx, [ebp - 0x18]
push ecx
push edi
push eax
call dword [0x1001020]
cmp eax, ebx
mov dword [ebp - 0x18], eax
je 0x51197e
mov esi, edi
shr esi, 1
jmp 0x511993
push edi
push dword [ebp + 0xc]
call fcn.005110bd
neg eax
sbb eax, eax
and eax, 0xfde9
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x18], ebx
je 0x5118c7
mov ecx, dword [ebp + 8]
lea eax, [esi + 1]
push eax
call fcn.0050bfd1
cmp word [ebp - 0x1c], 0xfeff
mov edi, eax
mov dword [ebp - 0x18], edi
jne 0x5119c2
lea eax, [esi + esi]
push eax
mov eax, dword [ebp + 0xc]
add eax, 2
push eax
jmp 0x511a00
cmp word [ebp - 0x1c], 0xfffe
jne 0x5119f9
mov eax, dword [ebp + 0xc]
add eax, 2
cmp esi, ebx
jbe 0x51190f
sub edi, eax
mov dword [ebp - 0x1c], esi
movzx cx, byte [eax + 1]
xor edx, edx
mov dh, byte [eax]
xor cx, dx
mov word [edi + eax], cx
inc eax
inc eax
dec dword [ebp - 0x1c]
jne 0x5119dd
jmp 0x51190f
lea eax, [esi + esi]
push eax
push dword [ebp + 0xc]
push edi
call fcn.00518d34
add esp, 0xc
jmp 0x51190f