Function at 0x414f50
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x128
push ebx
push esi
push edi
push 0x1000
mov esi, ecx
push 0
mov dword [ebp - 0xc], esi
mov dword [ebp - 0x1c], 0
call dword [0x547224]
cmp dword [esi + 0x2918], 0
mov edi, dword [0x547218]
mov ebx, eax
mov dword [ebp - 0x28], ebx
jne 0x414fe3
lea eax, [esi + 0x1510]
push eax
push ebx
mov dword [ebp - 0x14], eax
call edi
push str.system.dat
push ebx
call dword [0x5471f8]
push ebx
call fcn.00407080
test eax, eax
je 0x414fe3
push 0x1000
push 0
call dword [0x547224]
mov esi, eax
mov eax, dword [ebp - 0x14]
push eax
push esi
call edi
push str.system.bak
push esi
call dword [0x5471f8]
push 0
push esi
push ebx
call dword [0x5470dc]
test esi, esi
je 0x414fe3
push esi
call dword [0x547228]
push 0x100000
push 0
call dword [0x547224]
push 0x7f00
mov esi, eax
push 0x100
mov dword [ebp - 0x24], esi
call fcn.00473ca0
push eax
push esi
call fcn.0052c3c0
add esp, 0xc
push 0x2000
push 0x800
call fcn.00473c80
push eax
lea ecx, [esi + 0x7f00]
push ecx
call fcn.0052c3c0
add esp, 0xc
push 0x1000
push 0x400
call fcn.00473cd0
push eax
lea edx, [esi + 0x9f00]
push edx
call fcn.0052c3c0
add esp, 0xc
push 0x40
mov dword [ebp - 4], 0xaf00
call fcn.00473cb0
mov ebx, eax
mov dword [ebp - 8], 0x40
mov eax, dword [ebp - 4]
push ebx
add eax, esi
push eax
call edi
push ebx
call dword [0x54721c]
mov ecx, dword [ebp - 4]
lea edx, [ecx + eax + 1]
add ebx, 0x400
dec dword [ebp - 8]
mov dword [ebp - 4], edx
jne 0x415063
mov eax, dword [ebp - 0xc]
cmp dword [eax + 0x2900], 0
mov dword [ebp - 8], 0
je 0x4150d2
mov ebx, dword [eax + 0x28f8]
test ebx, ebx
je 0x4150d2
lea eax, [ebx + 8]
push eax
mov eax, dword [ebp - 4]
add eax, esi
push eax
call edi
lea eax, [ebx + 8]
push eax
call dword [0x54721c]
mov ecx, dword [ebp - 4]
mov ebx, dword [ebx + 4]
inc dword [ebp - 8]
lea edx, [ecx + eax + 1]
mov dword [ebp - 4], edx
test ebx, ebx
jne 0x4150a5
mov eax, dword [ebp - 0xc]
cmp dword [eax + 0x2904], 0
mov dword [ebp - 0x10], 0
je 0x41511a
mov ebx, dword [eax + 0x28fc]
test ebx, ebx
je 0x41511a
lea esp, [esp]
lea eax, [ebx + 8]
push eax
mov eax, dword [ebp - 4]
add eax, esi
push eax
call edi
lea eax, [ebx + 8]
push eax
call dword [0x54721c]
mov ecx, dword [ebp - 4]
mov ebx, dword [ebx + 4]
inc dword [ebp - 0x10]
lea edx, [ecx + eax + 1]
mov dword [ebp - 4], edx
test ebx, ebx
jne 0x4150f0
mov eax, dword [ebp - 4]
lea ecx, [eax + eax + 0x168]
push ecx
push 0
call dword [0x547224]
push 0x168
mov ebx, eax
push 0
push ebx
call fcn.0052b220
mov edx, dword [ebp - 4]
push edx
lea eax, [ebx + 0x168]
push esi
push eax
call fcn.0047a9b0
mov esi, eax
mov eax, dword [ebp - 0xc]
add esp, 0x18
cmp dword [eax + 0x2838], 0
mov dword [ebp - 0x18], esi
je 0x415190
push 0x100
lea ecx, [ebp - 0x128]
push 0
push ecx
call fcn.0052b220
lea edi, [ebx + 0x68]
mov ecx, 0x40
lea esi, [ebp - 0x128]
rep movsd dword es:[edi], dword [esi]
mov edi, dword [0x547218]
mov esi, dword [ebp - 0x18]
add esp, 0xc
push 0x549048
lea edx, [ebx + 8]
push edx
call edi
push str.CSS1
push ebx
call edi
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 0x2838]
mov edx, 1
mov dword [ebx + 0x48], ecx
mov dword [ebx + 4], 0x68
mov word [ebx + 0x4c], dx
call fcn.0052bbef
movzx eax, al
mov word [ebx + 0x4e], ax
call fcn.0052bbef
and al, 0x7f
movzx ecx, al
mov edx, 0x80
add cx, dx
mov word [ebx + 0x50], cx
call fcn.0052bbef
mov edi, eax
call fcn.0052bbef
imul edi, eax
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp - 8]
mov dword [ebx + 0x60], esi
mov dword [ebx + 0x5c], eax
mov eax, dword [ebp - 0xc]
sub edi, 0x68ad
add esi, 0x168
mov word [ebx + 0x52], di
mov dword [ebx + 0x64], esi
mov dword [ebx + 0x54], ecx
mov dword [ebx + 0x58], edx
mov ecx, dword [eax + 0x638]
push str.YUKO_KAWAI_PURPLE_SYSTEM_SAVE_CHECK
mov dword [ebx + 0x44], ecx
call dword [0x54721c]
movzx ecx, word [ebx + 0x4e]
movzx edi, word [ebx + 0x52]
shr ecx, 1
and ecx, 7
shr edi, cl
xor edx, edx
mov dword [ebp - 4], eax
lea esi, [ebx + 0x168]
and edi, 3
add edi, 2
cmp edi, 6
jbe 0x415257
lea edi, [edx + 6]
mov eax, dword [ebp - 0x18]
xor ecx, ecx
mov dword [ebp - 0x10], ecx
mov dword [ebp - 8], ecx
cmp eax, 2
jl 0x4152e2
add eax, 0xfffffffe
shr eax, 1
inc eax
mov dword [ebp - 0x14], eax
add eax, eax
mov dword [ebp - 0x20], eax
jmp 0x415280
mov al, byte [edx + str.YUKO_KAWAI_PURPLE_SYSTEM_SAVE_CHECK]
add al, byte [ebx + 0x50]
movzx ecx, byte [esi]
add cl, 0x40
xor al, cl
add al, byte [ebx + 0x4e]
mov ecx, edi
rol al, cl
movzx ecx, byte [esi + 1]
mov byte [esi], al
movzx eax, al
add word [ebp - 0x10], ax
lea eax, [edx + 1]
xor edx, edx
div dword [ebp - 4]
add cl, 0x40
add esi, 2
mov al, byte [edx + str.YUKO_KAWAI_PURPLE_SYSTEM_SAVE_CHECK]
add al, byte [ebx + 0x50]
xor al, cl
add al, byte [ebx + 0x4e]
mov ecx, edi
rol al, cl
mov byte [esi - 1], al
movzx eax, al
add word [ebp - 8], ax
lea eax, [edx + 1]
xor edx, edx
div dword [ebp - 4]
dec dword [ebp - 0x14]
jne 0x415280
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x20]
cmp ecx, eax
jae 0x415305
mov dl, byte [edx + str.YUKO_KAWAI_PURPLE_SYSTEM_SAVE_CHECK]
add dl, byte [ebx + 0x50]
mov cl, byte [esi]
add cl, 0x40
xor dl, cl
add dl, byte [ebx + 0x4e]
mov ecx, edi
rol dl, cl
movzx ecx, dl
mov byte [esi], dl
mov dword [ebp - 0x1c], ecx
mov edx, dword [ebp - 8]
add edx, dword [ebp - 0x10]
mov esi, dword [ebp - 0x28]
add edx, dword [ebp - 0x1c]
mov word [eax + ebx + 0x168], dx
mov edx, dword [ebp - 0xc]
add edx, 0x1510
push edx
push esi
call dword [0x547218]
push str.system.dat
push esi
call dword [0x5471f8]
mov eax, dword [ebp - 0x18]
push 1
add eax, 0x16a
push eax
push 0
push 0
push ebx
push esi
call fcn.004071d0
mov eax, dword [ebp - 0x24]
mov edi, dword [0x547228]
test eax, eax
je 0x41535c
push eax
call edi
push ebx
call edi
test esi, esi
je 0x415366
push esi
call edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret