Function at 0x18004dd40
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rsi
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0x30
mov rsi, rcx
mov qword [rsp + 0x48], rcx
xor edi, edi
mov dword [rcx], edi
mov qword [rcx + 8], rdi
mov qword [rcx + 0x10], rdi
lea ecx, [rdi + 0x30]
call fcn.180090190
mov qword [rax], rax
mov qword [rax + 8], rax
mov qword [rsi + 8], rax
lea rcx, [rsi + 0x18]
mov qword [rcx], rdi
mov qword [rcx + 8], rdi
mov qword [rcx + 0x10], rdi
mov qword [rsi + 0x30], 7
mov qword [rsi + 0x38], 8
mov dword [rsi], 0x3f800000
mov r8, qword [rsi + 8]
lea edx, [rdi + 0x10]
call fcn.180005fa0
nop
lea rbx, [rsi + 0x40]
mov qword [rsp + 0x48], rbx
mov dword [rbx], edi
mov qword [rbx + 8], rdi
mov qword [rbx + 0x10], rdi
lea ecx, [rdi + 0x20]
call fcn.180090190
mov qword [rax], rax
mov qword [rax + 8], rax
mov qword [rbx + 8], rax
lea rcx, [rbx + 0x18]
mov qword [rcx], rdi
mov qword [rcx + 8], rdi
mov qword [rcx + 0x10], rdi
mov qword [rbx + 0x30], 7
mov qword [rbx + 0x38], 8
mov dword [rbx], 0x3f800000
mov r8, qword [rbx + 8]
lea edx, [rdi + 0x10]
call fcn.180005fa0
nop
lea rax, [0x18004da20]
mov qword [rsp + 0x20], rax
movabs r9, 0x1ca59e306ecb80a5
mov r8d, dword [0x1801189c0]
lea rdx, str.All_scripts
mov rcx, rsi
call fcn.18004e1d0
lea rax, [0x18004dac0]
mov qword [rsp + 0x20], rax
movabs r9, 0x812595a0644ce1de
mov r8d, dword [0x1801189c0]
lea rdx, str.All_scripts
mov rcx, rsi
call fcn.18004e1d0
lea r10, str.maintransition
mov r9d, edi
mov r8b, 0x6d
nop word [rax + rax]
movzx edx, r8b
lea r10, [r10 + 1]
sub r8b, 0x41
lea eax, [rdx + 0x20]
movzx ecx, al
cmp r8b, 0x19
cmova ecx, edx
movsx eax, cl
add eax, r9d
imul r9d, eax, 0x401
mov eax, r9d
shr eax, 6
xor r9d, eax
movzx r8d, byte [r10]
test r8b, r8b
jne 0x18004de70
lea eax, [r9 + r9*8]
mov ecx, eax
shr ecx, 0xb
xor ecx, eax
imul r8d, ecx, 0x8001
lea rax, [0x18004d700]
mov qword [rsp + 0x20], rax
movabs r9, 0x6f3d4ed9bee4e61d
lea rdx, str.Maintransition
mov rcx, rsi
call fcn.18004e1d0
lea rbx, str.freemode
mov r10, rbx
mov r9d, edi
mov r8b, 0x66
nop
movzx edx, r8b
lea r10, [r10 + 1]
sub r8b, 0x41
lea eax, [rdx + 0x20]
movzx ecx, al
cmp r8b, 0x19
cmova ecx, edx
movsx eax, cl
add eax, r9d
imul r9d, eax, 0x401
mov eax, r9d
shr eax, 6
xor r9d, eax
movzx r8d, byte [r10]
test r8b, r8b
jne 0x18004def0
lea eax, [r9 + r9*8]
mov ecx, eax
shr ecx, 0xb
xor ecx, eax
imul r8d, ecx, 0x8001
lea rax, [0x18004d810]
mov qword [rsp + 0x20], rax
movabs r9, 0x5e9564d8246b909a
lea rdx, str.Freemode
mov rcx, rsi
call fcn.18004e1d0
mov r9d, edi
mov r8b, 0x66
nop word [rax + rax]
movzx edx, r8b
lea rbx, [rbx + 1]
sub r8b, 0x41
lea eax, [rdx + 0x20]
movzx ecx, al
cmp r8b, 0x19
cmova ecx, edx
movsx eax, cl
add eax, r9d
imul r9d, eax, 0x401
mov eax, r9d
shr eax, 6
xor r9d, eax
movzx r8d, byte [rbx]
test r8b, r8b
jne 0x18004df70
lea eax, [r9 + r9*8]
mov ecx, eax
shr ecx, 0xb
xor ecx, eax
imul r8d, ecx, 0x8001
lea rax, [0x18004d900]
mov qword [rsp + 0x20], rax
movabs rbx, 0x767fbc2ac802ef3d
mov r9, rbx
lea rdx, str.Freemode
mov rcx, rsi
call fcn.18004e1d0
lea r10, str.carmod_shop
mov r8b, 0x63
nop dword [rax]
movzx edx, r8b
lea r10, [r10 + 1]
sub r8b, 0x41
lea eax, [rdx + 0x20]
movzx ecx, al
cmp r8b, 0x19
cmova ecx, edx
movsx eax, cl
add eax, edi
imul edi, eax, 0x401
mov eax, edi
shr eax, 6
xor edi, eax
movzx r8d, byte [r10]
test r8b, r8b
jne 0x18004dff0
lea eax, [rdi + rdi*8]
mov ecx, eax
shr ecx, 0xb
xor ecx, eax
imul r8d, ecx, 0x8001
lea rax, [0x18004db40]
mov qword [rsp + 0x20], rax
mov r9, rbx
lea rdx, str.Carmod_Shop
mov rcx, rsi
call fcn.18004e1d0
mov rax, qword [0x18011bac0]
mov rcx, qword [rax + 0xd0]
mov rbx, qword [rcx]
mov edi, dword [rcx + 0x18]
shl rdi, 4
add rdi, rbx
cmp rbx, rdi
je 0x18004e08c
mov rdx, qword [rbx]
test rdx, rdx
je 0x18004e083
mov rcx, rsi
call fcn.18004e3a0
add rbx, 0x10
cmp rbx, rdi
jne 0x18004e073
mov qword [0x180135fc8], rsi
mov rax, rsi
mov rbx, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x58]
add rsp, 0x30
pop rdi
ret