Function at 0x1003e3f0
Capabilities:
Encode data using xor

Disassembly:
mov eax, 0x10
call fcn.10004680
mov eax, dword [esp + 0x28]
mov edx, dword [esp + 0x1c]
push ebx
push ebp
push esi
cmp eax, 1
push edi
mov dword [esp + 0x2c], edx
jne 0x1003e541
mov ebx, dword [esp + 0x34]
cmp edx, 0x10
jb 0x1003e538
mov ebp, dword [esp + 0x28]
shr edx, 4
mov dword [esp + 0x34], edx
mov esi, dword [esp + 0x24]
lea edi, [esp + 0x10]
sub esi, ebx
mov eax, ebx
sub edi, ebx
mov ecx, 0x10
mov dl, byte [esi + eax]
xor dl, byte [eax]
inc eax
dec ecx
mov byte [edi + eax - 1], dl
jne 0x1003e43e
mov eax, dword [esp + 0x30]
lea ecx, [esp + 0x10]
push eax
push ebp
push ecx
call fcn.1003ee00
mov edx, ebp
mov eax, ebx
mov esi, dword [esp + 0x38]
add esp, 0xc
mov ecx, dword [edx]
mov dword [eax], ecx
mov ecx, dword [edx + 4]
mov dword [eax + 4], ecx
mov ecx, dword [edx + 8]
mov dword [eax + 8], ecx
mov edx, dword [edx + 0xc]
mov dword [eax + 0xc], edx
mov edx, dword [esp + 0x24]
mov eax, 0x10
sub esi, eax
add edx, eax
add ebp, eax
mov eax, dword [esp + 0x34]
dec eax
mov dword [esp + 0x2c], esi
mov dword [esp + 0x24], edx
mov dword [esp + 0x34], eax
jne 0x1003e42b
mov edx, esi
test edx, edx
je 0x1003e652
jbe 0x1003e4d1
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 0x1003e4bc
cmp edx, 0x10
jae 0x1003e4f2
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.1003ee00
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 ebp, dword [esp + 0x28]
jmp 0x1003e4a0
mov ebx, dword [esp + 0x34]
cmp edx, 0x10
jb 0x1003e65a
mov edi, dword [esp + 0x28]
mov esi, dword [esp + 0x24]
shr edx, 4
mov dword [esp + 0x34], edx
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.1003f3b0
mov ecx, ebx
add esp, 0xc
mov eax, edi
sub ecx, edi
mov ebp, 0x10
mov dl, byte [ecx + eax]
xor byte [eax], dl
inc eax
dec ebp
jne 0x1003e594
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
mov eax, ebx
mov ebp, dword [esp + 0x2c]
sub ebp, 0x10
add esi, 0x10
mov dword [eax], ecx
mov ecx, dword [esp + 0x18]
add edi, 0x10
mov dword [esp + 0x2c], ebp
mov dword [eax + 4], edx
mov edx, dword [esp + 0x1c]
mov dword [eax + 8], ecx
mov dword [eax + 0xc], edx
mov eax, dword [esp + 0x34]
dec eax
mov dword [esp + 0x34], eax
jne 0x1003e55d
mov edx, ebp
test edx, edx
je 0x1003e652
mov eax, dword [esi]
mov ecx, dword [esi + 4]
mov edx, dword [esi + 8]
mov dword [esp + 0x10], eax
mov eax, dword [esi + 0xc]
mov dword [esp + 0x14], ecx
mov ecx, dword [esp + 0x30]
mov dword [esp + 0x18], edx
mov dword [esp + 0x1c], eax
lea edx, [esp + 0x10]
push ecx
lea eax, [esp + 0x14]
push edx
push eax
call fcn.1003f3b0
mov ebp, dword [esp + 0x38]
add esp, 0xc
xor ecx, ecx
test ebp, ebp
jbe 0x1003e637
mov esi, ebx
lea edx, [esp + 0x10]
lea eax, [esp + 0x10]
sub esi, edx
sub edi, eax
lea eax, [esp + ecx + 0x10]
mov dl, byte [esi + eax]
xor dl, byte [eax]
inc ecx
cmp ecx, ebp
mov byte [edi + eax], dl
jb 0x1003e626
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
mov dword [ebx], eax
mov eax, dword [esp + 0x1c]
mov dword [ebx + 4], ecx
mov dword [ebx + 8], edx
mov dword [ebx + 0xc], eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret
mov edi, dword [esp + 0x28]
mov esi, dword [esp + 0x24]
jmp 0x1003e5d8