Function at 0x5a24f0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x6446f8
mov eax, dword fs:[0]
push eax
sub esp, 0x5c
push ebx
push esi
push edi
mov eax, dword [0x6db1a4]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov ebx, dword [edi + 4]
mov esi, dword [edi]
cmp esi, ebx
je 0x5a2534
mov eax, dword [esi]
mov ecx, esi
push 0
call dword [eax]
add esi, 0x14
cmp esi, ebx
jne 0x5a2523
mov esi, dword [edi]
lea ebx, [edi + 0xc]
mov dword [edi + 4], esi
mov eax, dword [ebx + 4]
mov esi, dword [ebx]
cmp esi, eax
je 0x5a255a
mov ebx, eax
mov eax, dword [esi]
mov ecx, esi
push 0
call dword [eax]
add esi, 0x14
cmp esi, ebx
jne 0x5a2545
mov esi, dword [edi + 0xc]
lea ebx, [edi + 0xc]
mov dword [ebx + 4], esi
mov eax, dword [0x6ce014]
mov dword [ebp - 0x28], vtable.CFileCtl.0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], eax
push dword [ebp + 8]
lea ecx, [ebp - 0x28]
mov dword [ebp - 4], 0
call fcn.004ff2f0
test eax, eax
je 0x5a2597
xor edi, edi
jmp 0x5a27dd
mov ecx, dword [ebp - 0x24]
mov eax, dword [ecx]
call dword [eax + 0x1c]
mov dword [ebp + 8], eax
inc eax
push eax
call fcn.005b9a81
add esp, 4
mov dword [ebp - 0x18], eax
lea ecx, [ebp - 0x14]
push dword [ebp + 8]
push eax
call fcn.0051ada0
mov ecx, dword [ebp - 0x24]
mov esi, dword [ebp - 0x18]
push esi
mov byte [ebp - 4], 1
mov eax, dword [ecx]
call dword [eax + 0xc]
test eax, eax
je 0x5a25d6
xor edi, edi
jmp 0x5a27a7
mov dword [ebp - 0x68], vtable.CSerialize.0
mov dword [ebp - 0x64], 0
mov dword [ebp - 0x60], 0
mov dword [ebp - 0x5c], 0
lea ecx, [ebp - 0x68]
mov byte [ebp - 4], 3
call fcn.00524150
lea eax, [ebp - 0x64]
mov byte [ebp - 4], 4
push eax
mov eax, dword [ebp + 8]
lea ecx, [ebp - 0x64]
dec eax
push eax
call fcn.00522ae0
mov ch, byte [esi]
xor edx, edx
mov esi, dword [ebp + 8]
dec esi
test esi, esi
jle 0x5a2636
mov ebx, dword [ebp - 0x18]
mov cl, byte [ebx + edx + 1]
mov eax, dword [ebp - 0x64]
xor cl, ch
mov byte [eax + edx], cl
inc edx
cmp edx, esi
jl 0x5a2622
lea ebx, [edi + 0xc]
lea eax, [ebp - 0x10]
mov byte [ebp - 0x58], 0
push eax
mov eax, dword [ebp - 0x68]
lea ecx, [ebp - 0x68]
mov dword [ebp - 0x54], 0
call dword [eax + 0x60]
mov eax, dword [0x6ce014]
mov dword [ebp - 0x50], vtable.CEventFg::CharFmt.0
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x40], 0
xor esi, esi
mov byte [ebp - 4], 5
cmp dword [ebp - 0x10], esi
jle 0x5a26b4
nop dword [eax]
lea eax, [ebp - 0x50]
push eax
mov eax, dword [ebp - 0x68]
lea ecx, [ebp - 0x68]
call dword [eax + 0x64]
mov eax, dword [edi + 4]
lea ecx, [ebp - 0x50]
push ecx
cmp dword [edi + 8], eax
je 0x5a26a6
mov ecx, eax
call fcn.0059cae0
add dword [edi + 4], 0x14
jmp 0x5a26ae
push eax
mov ecx, edi
call fcn.00599d00
inc esi
cmp esi, dword [ebp - 0x10]
jl 0x5a2680
lea eax, [ebp - 0x10]
push eax
mov eax, dword [ebp - 0x68]
lea ecx, [ebp - 0x68]
call dword [eax + 0x60]
mov eax, dword [0x6ce014]
mov dword [ebp - 0x3c], vtable.CEventFg::KaisouFmt.0
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0
xor esi, esi
mov byte [ebp - 4], 6
cmp dword [ebp - 0x10], esi
jle 0x5a2724
lea eax, [ebp - 0x3c]
push eax
mov eax, dword [ebp - 0x68]
lea ecx, [ebp - 0x68]
call dword [eax + 0x64]
mov eax, dword [ebx + 4]
lea ecx, [ebp - 0x3c]
push ecx
cmp dword [ebx + 8], eax
je 0x5a2716
mov ecx, eax
call fcn.0059ce30
add dword [ebx + 4], 0x14
jmp 0x5a271e
push eax
mov ecx, ebx
call fcn.0059a550
inc esi
cmp esi, dword [ebp - 0x10]
jl 0x5a26f0
lea ecx, [ebp - 0x34]
mov edi, 1
call fcn.005aab10
mov ecx, dword [ebp - 0x38]
lea eax, [ecx - 0xc]
cmp eax, dword [0x6ce010]
je 0x5a275d
add ecx, 0xfffffff4
or eax, 0xffffffff
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x5a275d
mov eax, dword [ebp - 0x38]
add eax, 0xfffffff4
push eax
call fcn.005b9a8a
add esp, 4
lea ecx, [ebp - 0x48]
mov dword [ebp - 0x3c], vtable.IArchive.0
call fcn.005aab80
mov ecx, dword [ebp - 0x4c]
lea eax, [ecx - 0xc]
cmp eax, dword [0x6ce010]
je 0x5a2798
add ecx, 0xfffffff4
or eax, 0xffffffff
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x5a2798
mov eax, dword [ebp - 0x4c]
add eax, 0xfffffff4
push eax
call fcn.005b9a8a
add esp, 4
lea ecx, [ebp - 0x68]
mov dword [ebp - 0x50], vtable.IArchive.0
call fcn.005288b0
mov esi, dword [ebp - 0x14]
mov byte [ebp - 4], 7
test esi, esi
je 0x5a27dd
or ebx, 0xffffffff
lea eax, [esi + 4]
mov ecx, ebx
lock xadd dword [eax], ecx
cmp ecx, 1
jne 0x5a27dd
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
lea eax, [esi + 8]
lock xadd dword [eax], ebx
cmp ebx, 1
jne 0x5a27dd
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 8]
lea ecx, [ebp - 0x28]
call fcn.004fade0
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4