Function at 0x100314d0
Capabilities:
Encode data using xor

Disassembly:
mov eax, 0x10
call fcn.10016d60
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x28]
push ebx
push ebp
mov edx, eax
push esi
cmp ecx, 1
push edi
mov dword [esp + 0x2c], edx
jne 0x10031625
mov ebx, dword [esp + 0x34]
mov ebp, dword [esp + 0x28]
cmp eax, 0x10
jb 0x1003158d
mov edx, dword [esp + 0x24]
lea ecx, [esp + 0x10]
shr eax, 4
mov esi, edx
mov dword [esp + 0x34], eax
shl eax, 4
sub ecx, ebx
sub esi, ebx
add edx, eax
mov dword [esp + 0x38], ecx
mov dword [esp + 0x24], edx
jmp 0x1003152e
mov ecx, dword [esp + 0x38]
mov eax, ebx
mov edi, 0x10
mov dl, byte [esi + eax]
xor dl, byte [eax]
inc eax
dec edi
mov byte [ecx + eax - 1], dl
jne 0x10031535
mov eax, dword [esp + 0x30]
lea ecx, [esp + 0x10]
push eax
push ebp
push ecx
call fcn.10032200
mov edx, ebp
mov eax, ebx
mov edi, dword [esp + 0x38]
add esp, 0xc
mov ecx, dword [edx]
sub edi, 0x10
mov dword [eax], ecx
add esi, 0x10
mov ecx, dword [edx + 4]
add ebp, 0x10
mov dword [eax + 4], ecx
mov dword [esp + 0x2c], edi
mov ecx, dword [edx + 8]
mov dword [eax + 8], ecx
mov edx, dword [edx + 0xc]
mov dword [eax + 0xc], edx
mov eax, dword [esp + 0x34]
dec eax
mov dword [esp + 0x34], eax
jne 0x1003152a
mov edx, edi
test edx, edx
je 0x10031738
jbe 0x100315be
mov esi, dword [esp + 0x24]
lea edi, [esp + 0x10]
sub esi, ebx
mov eax, ebx
sub edi, ebx
mov dword [esp + 0x24], edx
mov cl, byte [eax + esi]
xor cl, byte [eax]
inc eax
mov byte [eax + edi - 1], cl
mov ecx, dword [esp + 0x24]
dec ecx
mov dword [esp + 0x24], ecx
jne 0x100315a9
cmp edx, 0x10
jae 0x100315df
mov ecx, 0x10
lea edi, [esp + edx + 0x10]
sub ecx, edx
lea esi, [edx + ebx]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x30]
lea ecx, [esp + 0x10]
push eax
lea edx, [esp + 0x14]
push ecx
push edx
call fcn.10032200
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
mov esi, dword [esp + 0x28]
mov dword [ebp], eax
mov dword [ebp + 4], ecx
mov dword [ebp + 8], edx
mov dword [ebp + 0xc], esi
add esp, 0xc
mov dword [ebx], eax
mov dword [ebx + 4], ecx
mov dword [ebx + 8], edx
mov dword [ebx + 0xc], esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret
mov esi, dword [esp + 0x24]
mov edi, dword [esp + 0x28]
cmp eax, 0x10
jb 0x100316ba
mov ebx, dword [esp + 0x34]
sub ebx, edi
shr eax, 4
mov ebp, eax
mov eax, esi
mov ecx, dword [eax]
mov dword [esp + 0x10], ecx
mov edx, dword [eax + 4]
mov dword [esp + 0x14], edx
mov ecx, dword [eax + 8]
mov dword [esp + 0x18], ecx
mov edx, dword [eax + 0xc]
mov eax, dword [esp + 0x30]
push eax
push edi
push esi
mov dword [esp + 0x28], edx
call fcn.100327d0
mov eax, edi
add esp, 0xc
mov edi, 0x10
mov cl, byte [ebx + eax]
mov dl, byte [eax]
xor dl, cl
mov byte [eax], dl
inc eax
dec edi
jne 0x10031674
mov edx, dword [esp + 0x34]
mov ecx, dword [esp + 0x10]
mov edi, dword [esp + 0x2c]
add esi, 0x10
mov dword [edx], ecx
mov ecx, dword [esp + 0x14]
sub edi, 0x10
sub ebx, 0x10
mov dword [edx + 4], ecx
mov ecx, dword [esp + 0x18]
mov dword [esp + 0x2c], edi
dec ebp
mov dword [edx + 8], ecx
mov ecx, dword [esp + 0x1c]
mov edi, eax
mov dword [edx + 0xc], ecx
jne 0x10031641
mov edx, dword [esp + 0x2c]
test edx, edx
je 0x10031738
mov edx, dword [esi]
mov eax, dword [esi + 4]
mov ecx, dword [esi + 8]
mov dword [esp + 0x10], edx
mov edx, dword [esi + 0xc]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x30]
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], edx
lea ecx, [esp + 0x10]
push eax
lea edx, [esp + 0x14]
push ecx
push edx
call fcn.100327d0
mov ebp, dword [esp + 0x38]
mov edx, dword [esp + 0x40]
add esp, 0xc
xor ecx, ecx
test ebp, ebp
jbe 0x1003171d
mov esi, edx
lea eax, [esp + 0x10]
sub esi, eax
lea eax, [esp + 0x10]
sub edi, eax
lea eax, [esp + ecx + 0x10]
mov bl, byte [esi + eax]
xor bl, byte [eax]
inc ecx
cmp ecx, ebp
mov byte [edi + eax], bl
jb 0x1003170c
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
mov dword [edx], ecx
mov ecx, dword [esp + 0x18]
mov dword [edx + 4], eax
mov eax, dword [esp + 0x1c]
mov dword [edx + 8], ecx
mov dword [edx + 0xc], eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret