Function at 0x4e0c26
Capabilities:
Encode data using xor
Write file on windows

Disassembly:
mov eax, 0x540454
call fcn.0050bac0
sub esp, 0x514
mov al, byte [0x58ea40]
push ebx
push esi
push edi
mov edx, ecx
push 0x3f
mov byte [ebp - 0x2a0], al
pop ecx
mov ebx, dword [edx + 0x130]
xor eax, eax
sub ebx, dword [edx + 0x12c]
lea edi, [ebp - 0x29f]
lea esi, [edx + 0x12c]
and dword [ebp - 0x14], 0
rep stosd dword es:[edi], eax
and dword [ebp - 0x1c], 0
mov dword [ebp - 0x28], edx
stosw word es:[edi], ax
sar ebx, 2
test ebx, ebx
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x2c], ebx
stosb byte es:[edi], al
jle 0x4e0e8f
push 1
pop edi
jmp 0x4e0c8c
mov esi, dword [ebp - 0x20]
mov esi, dword [esi]
mov eax, dword [ebp - 0x1c]
mov esi, dword [esi + eax*4]
test esi, esi
je 0x4e0e70
cmp dword [edx + 0x138], 0
je 0x4e0e62
mov ecx, edx
call fcn.004dfc1a
mov ecx, dword [ebp - 0x28]
lea eax, [ebp - 0x50]
push eax
call fcn.004dfbe4
mov eax, dword [eax]
and dword [ebp - 4], 0
lea ecx, [ebp - 0xa0]
push 0xa
push ecx
push eax
call fcn.004dfab4
pop ecx
push 0
push eax
call dword [sym.imp.MSVCRT.dll__i64toa]
add esp, 0x10
lea ecx, [ebp - 0x50]
mov dword [ebp - 4], edi
call fcn.00402735
mov ebx, dword [sym.imp.MSVCRT.dll_sprintf]
or dword [ebp - 4], 0xffffffff
lea eax, [ebp - 0xa0]
push eax
push 0x595820
lea eax, [ebp - 0x320]
push str.LOG__s__s_CHAT
push eax
call ebx
add esp, 0x10
lea eax, [ebp - 0x320]
push dword [esi + 8]
push dword [esi + 4]
push dword [esi]
push eax
lea eax, [ebp - 0x1a0]
push str._s__d__d__d.log
push eax
call ebx
lea eax, [ebp - 0x1a0]
push eax
lea eax, [ebp - 0x2a0]
push eax
call sub.MSVCRT.dll_strcmp
add esp, 0x20
test eax, eax
je 0x4e0d8b
cmp dword [ebp - 0x14], 0
je 0x4e0d57
push dword [ebp - 0x14]
call dword [sym.imp.MSVCRT.dll_fclose]
pop ecx
lea eax, [ebp - 0x1a0]
push 0x585294
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
pop ecx
mov dword [ebp - 0x14], eax
test eax, eax
pop ecx
je 0x4e0eaa
lea eax, [ebp - 0x1a0]
push eax
lea eax, [ebp - 0x2a0]
push eax
call sub.MSVCRT.dll_strcpy
pop ecx
pop ecx
lea eax, [esi + 0xc]
push eax
lea eax, [ebp - 0x60]
push eax
call sub.MSVCRT.dll_strcpy
push dword [ebp - 0x14]
lea eax, [ebp - 0x60]
push 0x10
push edi
push eax
call dword [sym.imp.MSVCRT.dll_fwrite]
lea eax, [esi + 0x1c]
push eax
lea eax, [ebp - 0x520]
push eax
call sub.MSVCRT.dll_strcpy
lea eax, [ebp - 0x44]
push 0x591088
push eax
call sub.MSVCRT.dll_strcpy
lea eax, [ebp - 0x44]
push eax
call sub.MSVCRT.dll_strlen
mov ebx, eax
add esp, 0x2c
cmp ebx, edi
jg 0x4e0ddb
push 2
pop ebx
push 0x595820
call sub.MSVCRT.dll_strlen
and dword [ebp - 0x18], 0
dec eax
mov dword [ebp - 0x34], eax
dec ebx
mov dword [ebp - 0x24], edi
lea eax, [ebp - 0x520]
sub dword [ebp - 0x24], eax
pop ecx
mov dword [ebp - 0x30], ebx
mov eax, dword [ebp - 0x18]
lea edi, [ebp + eax - 0x520]
mov eax, dword [ebp - 0x24]
lea ecx, [eax + edi]
mov eax, 0x5baacfb
cdq
idiv ecx
mov ecx, 0x100
cdq
idiv ecx
mov eax, dword [ebp - 0x18]
mov ecx, edx
cdq
idiv dword [ebp - 0x30]
mov eax, dword [ebp - 0x18]
add cl, byte [ebp + edx - 0x44]
cdq
idiv dword [ebp - 0x34]
mov eax, 0x200
add cl, byte [edx + 0x595820]
xor byte [edi], cl
inc dword [ebp - 0x18]
cmp dword [ebp - 0x18], eax
jl 0x4e0dfe
push dword [ebp - 0x14]
push eax
push 1
pop edi
lea eax, [ebp - 0x520]
push edi
push eax
call dword [sym.imp.MSVCRT.dll_fwrite]
mov ebx, dword [ebp - 0x2c]
add esp, 0x10
push esi
call sub.MFC42.DLL_operatordelete
or dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x28]
pop ecx
inc dword [ebp - 0x1c]
cmp dword [ebp - 0x1c], ebx
jl 0x4e0c89
cmp dword [ebp - 0x14], 0
je 0x4e0e8c
push dword [ebp - 0x14]
call dword [sym.imp.MSVCRT.dll_fclose]
pop ecx
mov esi, dword [ebp - 0x20]
push dword [esi + 4]
mov ecx, esi
push dword [esi]
call fcn.0049994f
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret
push 0x25b
lea eax, [ebp - 0x1a0]
push str.D:CQ2ClientCn_15.3.53DRoleChatLog.cpp
push eax
push str.ERROR:_file__s_not_found_at__s___d
call fcn.005079e3
add esp, 0x10
jmp 0x4e0e9b