Function at 0x5105a0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5bfce9
mov eax, dword fs:[0]
push eax
sub esp, 0xa8
mov eax, dword [0x6521c8]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, ecx
mov dword [ebp - 0x88], eax
mov edi, dword [eax + 8]
lea ebx, [eax + 4]
mov esi, dword [ebx]
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x90], ecx
cmp esi, edi
je 0x510607
nop dword [eax + eax]
mov eax, dword [esi]
mov ecx, esi
push 0
call dword [eax]
add esi, 0x28
cmp esi, edi
jne 0x5105f0
mov esi, dword [ebx]
mov eax, dword [ebp - 0x88]
lea edi, [eax + 0x10]
mov dword [ebx + 4], esi
mov eax, dword [edi + 4]
mov esi, dword [edi]
mov dword [ebp - 0x94], edi
mov dword [ebp - 0x88], eax
cmp esi, eax
je 0x51063b
mov edi, eax
mov eax, dword [esi]
mov ecx, esi
push 0
call dword [eax]
add esi, 0x28
cmp esi, edi
jne 0x510624
mov edi, dword [ebp - 0x94]
mov esi, dword [edi]
mov dword [edi + 4], esi
mov dword [ebp - 0x84], vtable.CFileCtl.0
mov dword [ebp - 0x80], 0
mov dword [ebp - 0x7c], 0
mov dword [ebp - 0x68], 0
mov dword [ebp - 0x64], 0xf
mov byte [ebp - 0x78], 0
push dword [ebp - 0x90]
lea ecx, [ebp - 0x84]
mov dword [ebp - 4], 0
call fcn.004b6c10
test eax, eax
je 0x51068b
xor ebx, ebx
jmp 0x510941
mov ecx, dword [ebp - 0x80]
mov eax, dword [ecx]
call dword [eax + 0x1c]
mov dword [ebp - 0x88], eax
inc eax
push eax
call fcn.005689f6
add esp, 4
mov dword [ebp - 0xb4], 0
lea ecx, [ebp - 0xb4]
mov dword [ebp - 0xb0], 0
push dword [ebp - 0x90]
push eax
call fcn.004d8480
mov ecx, dword [ebp - 0x80]
mov esi, dword [ebp - 0xb4]
push esi
mov byte [ebp - 4], 1
mov eax, dword [ecx]
call dword [eax + 0xc]
test eax, eax
je 0x5106e7
xor ebx, ebx
jmp 0x510916
mov dword [ebp - 0xac], vtable.CSerialize.0
mov dword [ebp - 0xa8], 0
mov dword [ebp - 0xa4], 0
mov dword [ebp - 0xa0], 0
lea ecx, [ebp - 0xac]
mov byte [ebp - 4], 3
call fcn.004e0d00
lea eax, [ebp - 0xa8]
mov byte [ebp - 4], 4
push eax
mov eax, dword [ebp - 0x88]
lea ecx, [ebp - 0xa8]
dec eax
push eax
call fcn.004dfb90
mov ch, byte [esi]
xor edx, edx
mov esi, dword [ebp - 0x88]
dec esi
test esi, esi
jle 0x51076b
mov edi, dword [ebp - 0xb4]
mov cl, byte [edi + edx + 1]
mov eax, dword [ebp - 0xa8]
xor cl, ch
mov byte [eax + edx], cl
inc edx
cmp edx, esi
jl 0x510751
mov edi, dword [ebp - 0x94]
lea eax, [ebp - 0x8c]
mov byte [ebp - 0x9c], 0
push eax
mov eax, dword [ebp - 0xac]
lea ecx, [ebp - 0xac]
mov dword [ebp - 0x98], 0
call dword [eax + 0x60]
mov dword [ebp - 0x60], vtable.CEventFg::CharFmt.0
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x48], 0xf
mov byte [ebp - 0x5c], 0
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x3c], 0
cmp dword [ebp - 0x8c], 0
mov byte [ebp - 4], 5
jle 0x51083c
xor edi, edi
nop
lea eax, [ebp - 0x60]
push eax
mov eax, dword [ebp - 0xac]
lea ecx, [ebp - 0xac]
call dword [eax + 0x64]
mov esi, dword [ebx + 4]
cmp dword [ebx + 8], esi
je 0x510821
mov dword [ebp - 0x90], esi
lea eax, [ebp - 0x5c]
mov byte [ebp - 4], 6
push eax
lea ecx, [esi + 4]
mov dword [esi], vtable.CEventFg::CharFmt.0
call fcn.004b4f20
lea eax, [ebp - 0x44]
mov byte [ebp - 4], 7
push eax
lea ecx, [esi + 0x1c]
call fcn.0050a870
add dword [ebx + 4], 0x28
mov byte [ebp - 4], 5
jmp 0x51082d
lea eax, [ebp - 0x60]
mov ecx, ebx
push eax
push esi
call fcn.00508370
inc edi
cmp edi, dword [ebp - 0x8c]
jl 0x5107d0
mov edi, dword [ebp - 0x94]
lea eax, [ebp - 0x8c]
push eax
mov eax, dword [ebp - 0xac]
lea ecx, [ebp - 0xac]
call dword [eax + 0x60]
mov dword [ebp - 0x38], vtable.CEventFg::KaisouFmt.0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], 0xf
mov byte [ebp - 0x34], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
xor ebx, ebx
mov byte [ebp - 4], 8
cmp dword [ebp - 0x8c], ebx
jle 0x5108f6
nop
lea eax, [ebp - 0x38]
push eax
mov eax, dword [ebp - 0xac]
lea ecx, [ebp - 0xac]
call dword [eax + 0x64]
mov esi, dword [edi + 4]
cmp dword [edi + 8], esi
je 0x5108e1
mov dword [ebp - 0x90], esi
lea eax, [ebp - 0x34]
mov byte [ebp - 4], 9
push eax
lea ecx, [esi + 4]
mov dword [esi], vtable.CEventFg::KaisouFmt.0
call fcn.004b4f20
lea eax, [ebp - 0x1c]
mov byte [ebp - 4], 0xa
push eax
lea ecx, [esi + 0x1c]
call fcn.0050a5c0
add dword [edi + 4], 0x28
mov byte [ebp - 4], 8
jmp 0x5108ed
lea eax, [ebp - 0x38]
mov ecx, edi
push eax
push esi
call fcn.00508e10
inc ebx
cmp ebx, dword [ebp - 0x8c]
jl 0x510890
lea ecx, [ebp - 0x38]
mov ebx, 1
call fcn.0050bac0
lea ecx, [ebp - 0x60]
call fcn.0050b820
lea ecx, [ebp - 0xac]
call fcn.004e56d0
mov esi, dword [ebp - 0xb0]
test esi, esi
je 0x510941
or edi, 0xffffffff
mov eax, edi
lock xadd dword [esi + 4], eax
jne 0x510941
mov eax, dword [esi]
mov ecx, esi
call dword [eax]
lock xadd dword [esi + 8], edi
dec edi
jne 0x510941
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 4]
lea ecx, [ebp - 0x84]
call fcn.004b5480
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0056857d
mov esp, ebp
pop ebp
ret 4