Function at 0x4c5121
Capabilities:
Encode data using xor
Read file on windows

Disassembly:
mov eax, 0x5205a4
call fcn.004edf30
sub esp, 0x484
push ebx
push esi
push edi
mov edi, ecx
call fcn.004c5a4c
mov ecx, edi
call fcn.004c4e72
xor esi, esi
cmp dword [ebp + 8], esi
je 0x4c53af
push dword [ebp + 8]
lea eax, [edi + 0x1c]
push eax
call sub.MSVCRT.dll_strcpy
pop ecx
lea eax, [ebp - 0x3c]
pop ecx
push eax
mov ecx, edi
call fcn.004c4a14
mov eax, dword [eax]
lea ecx, [ebp - 0x7c]
push 0xa
push ecx
push eax
mov dword [ebp - 4], esi
call fcn.004c48e4
pop ecx
push esi
push eax
call dword [sym.imp.MSVCRT.dll__i64toa]
add esp, 0x10
push 1
lea ecx, [ebp - 0x3c]
pop ebx
mov dword [ebp - 4], ebx
call fcn.00407dc8
push dword [ebp + 8]
or dword [ebp - 4], 0xffffffff
lea eax, [ebp - 0x7c]
mov esi, 0x56f64c
push eax
push esi
lea eax, [ebp - 0x490]
push str.LOG_s_sCHAT_s
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
lea eax, [ebp - 0x490]
push 0x55c5b8
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
add esp, 0x1c
mov dword [ebp - 0x1c], eax
test eax, eax
je 0x4c53af
lea eax, [ebp - 0x30]
push 0x56b0dc
push eax
call sub.MSVCRT.dll_strcpy
lea eax, [ebp - 0x30]
push eax
call sub.MSVCRT.dll_strlen
add esp, 0xc
cmp eax, ebx
mov dword [ebp - 0x14], eax
jg 0x4c51fc
mov dword [ebp - 0x14], 2
push esi
call sub.MSVCRT.dll_strlen
pop ecx
mov dword [ebp - 0x20], eax
push dword [ebp - 0x1c]
lea eax, [ebp - 0x28c]
push 1
push 0x210
push eax
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
cmp eax, 1
jne 0x4c52e0
xor ecx, ecx
mov ebx, dword [ebp - 0x14]
lea eax, [ecx + 1]
mov dword [ebp - 0x18], eax
mov eax, ecx
cdq
dec ebx
lea esi, [ebp + ecx - 0x27c]
idiv ebx
mov eax, ecx
mov ecx, dword [ebp - 0x20]
dec ecx
mov ebx, edx
cdq
idiv ecx
mov cl, byte [ebp + ebx - 0x30]
mov eax, 0x5baacfb
mov ebx, 0x100
add cl, byte [edx + 0x56f64c]
cdq
idiv dword [ebp - 0x18]
cdq
idiv ebx
add cl, dl
xor byte [esi], cl
mov ecx, dword [ebp - 0x18]
cmp ecx, 0x200
jl 0x4c522b
push 0x210
call sub.MFC42.DLL_operatornew
test eax, eax
pop ecx
mov dword [ebp - 0x10], eax
jne 0x4c529f
push str.D:CQ2ClientRelease_11.17.103DRoleChatLog.cpp
push 0x164
push 0x55f1ec
call fcn.004e9e6f
add esp, 0xc
and byte [ebp - 0x27d], 0
and byte [ebp - 0x7d], 0
lea eax, [ebp - 0x28c]
push eax
push dword [ebp - 0x10]
call sub.MSVCRT.dll_strcpy
lea eax, [ebp - 0x27c]
push eax
mov eax, dword [ebp - 0x10]
add eax, 0x10
push eax
call sub.MSVCRT.dll_strcpy
add esp, 0x10
lea eax, [ebp - 0x10]
lea ecx, [edi + 0x10]
push eax
call fcn.004c5d97
jmp 0x4c5206
push dword [ebp - 0x1c]
call dword [sym.imp.MSVCRT.dll_fclose]
mov ebx, dword [edi + 0x130]
and dword [ebp - 0x10], 0
sub ebx, dword [edi + 0x12c]
pop ecx
sar ebx, 2
test ebx, ebx
jle 0x4c53a1
mov eax, dword [edi + 0x12c]
mov ecx, dword [ebp - 0x10]
mov esi, dword [eax + ecx*4]
lea eax, [ebp - 0x38c]
push dword [esi + 8]
push dword [esi + 4]
push dword [esi]
push str._d__d__d.log
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
push dword [ebp + 8]
lea eax, [ebp - 0x38c]
push eax
call sub.MSVCRT.dll_strcmp
add esp, 0x1c
test eax, eax
jne 0x4c5395
push 0x210
call sub.MFC42.DLL_operatornew
test eax, eax
pop ecx
mov dword [ebp - 0x14], eax
jne 0x4c536a
push str.D:CQ2ClientRelease_11.17.103DRoleChatLog.cpp
push 0x175
push 0x55f1ec
call fcn.004e9e6f
add esp, 0xc
lea eax, [esi + 0xc]
push eax
push dword [ebp - 0x14]
call sub.MSVCRT.dll_strcpy
mov eax, dword [ebp - 0x14]
add esi, 0x1c
add eax, 0x10
push esi
push eax
call sub.MSVCRT.dll_strcpy
add esp, 0x10
lea eax, [ebp - 0x14]
lea ecx, [edi + 0x10]
push eax
call fcn.004c5d97
inc dword [ebp - 0x10]
cmp dword [ebp - 0x10], ebx
jl 0x4c5305
push 0
push 0x405
call fcn.004a2911
pop ecx
pop ecx
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 4