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

Disassembly:
mov eax, 0x574654
call fcn.0051f140
sub esp, 0x47c
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
test edi, edi
mov dword [ebp - 0x10], ecx
je 0x4ed348
call fcn.004ec34d
mov ecx, dword [ebp - 0x10]
lea eax, [ebp - 0x78]
push eax
call fcn.004ec317
mov eax, dword [eax]
and dword [ebp - 4], 0
lea ecx, [ebp - 0x108]
push 0xa
push ecx
push eax
call fcn.00483e3c
pop ecx
push 0
push eax
call dword [sym.imp.MSVCRT.dll__i64toa]
add esp, 0x10
lea ecx, [ebp - 0x78]
mov dword [ebp - 4], 1
call fcn.00402751
mov esi, dword [sym.imp.MSVCRT.dll_sprintf]
or dword [ebp - 4], 0xffffffff
lea eax, [ebp - 0x108]
mov ebx, 0x5def58
push eax
push ebx
lea eax, [ebp - 0x188]
push str.LOG__s__s_CHAT
push eax
call esi
add esp, 0x10
lea eax, [ebp - 0x188]
push str.leavewordsystem.log
push eax
lea eax, [ebp - 0x288]
push str._s__s
push eax
call esi
lea eax, [ebp - 0x288]
push 0x5ccf34
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
add esp, 0x18
mov dword [ebp - 0x14], eax
test eax, eax
jne 0x4ed17e
push 0x1fd
lea eax, [ebp - 0x288]
push str.E:CQ2ClientRelease_17.1.93DRoleChatLog.cpp
push eax
push str.ERROR:_file__s_not_found_at__s___d
call fcn.005185c3
add esp, 0x10
jmp 0x4ed348
lea eax, [edi + 4]
mov dword [ebp - 0x18], eax
push eax
lea eax, [ebp - 0x88]
push eax
call sub.MSVCRT.dll_strcpy
push dword [ebp - 0x14]
lea eax, [ebp - 0x88]
push 0x10
push 1
push eax
call dword [sym.imp.MSVCRT.dll_fwrite]
lea esi, [edi + 0x204]
lea eax, [ebp - 0xc8]
push esi
push eax
call sub.MSVCRT.dll_strcpy
push 0x5d8050
push esi
call sub.MSVCRT.dll_strcpy
add esp, 0x28
lea eax, [ebp - 0x488]
mov ecx, edi
push eax
call fcn.004992e0
lea esi, [ebp - 0xc8]
lea edi, [ebp - 0x6c]
movsd dword es:[edi], dword [esi]
lea esi, [ebp - 0xc4]
lea edi, [ebp - 0x67]
mov byte [ebp - 0x68], 0x2d
lea eax, [ebp - 0x6c]
movsw word es:[edi], word [esi]
lea esi, [ebp - 0xc2]
lea edi, [ebp - 0x64]
mov byte [ebp - 0x65], 0x2d
push eax
movsw word es:[edi], word [esi]
lea esi, [ebp - 0xc0]
lea edi, [ebp - 0x61]
mov byte [ebp - 0x62], 0x2d
lea eax, [ebp - 0x488]
movsw word es:[edi], word [esi]
lea esi, [ebp - 0xbe]
lea edi, [ebp - 0x5e]
mov byte [ebp - 0x5f], 0x2d
push eax
movsw word es:[edi], word [esi]
and byte [ebp - 0x5c], 0
call sub.MSVCRT.dll_strcat
push 0x210
call sub.MFC42.DLL_operatornew
xor edi, edi
add esp, 0xc
cmp eax, edi
mov dword [ebp + 8], eax
jne 0x4ed25b
push str.E:CQ2ClientRelease_17.1.93DRoleChatLog.cpp
push 0x222
push 0x5cce64
call fcn.005185c3
add esp, 0xc
push dword [ebp - 0x18]
push dword [ebp + 8]
call sub.MSVCRT.dll_strcpy
lea eax, [ebp - 0x488]
push eax
mov eax, dword [ebp + 8]
add eax, 0x10
push eax
call sub.MSVCRT.dll_strcpy
add esp, 0x10
lea eax, [ebp + 8]
push eax
mov eax, dword [ebp - 0x10]
lea ecx, [eax + 0x120]
call fcn.004a5cc9
push edi
push 0x421
call fcn.004c2498
lea eax, [ebp - 0x2c]
push 0x5dac58
push eax
call sub.MSVCRT.dll_strcpy
lea eax, [ebp - 0x2c]
push eax
call sub.MSVCRT.dll_strlen
mov esi, eax
add esp, 0x14
cmp esi, 1
jg 0x4ed2bd
push 2
pop esi
push ebx
call sub.MSVCRT.dll_strlen
dec eax
dec esi
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x10], 1
lea eax, [ebp - 0x488]
pop ecx
sub dword [ebp - 0x10], eax
mov dword [ebp - 0x18], esi
mov eax, dword [ebp - 0x10]
lea esi, [ebp + edi - 0x488]
lea ecx, [eax + esi]
mov eax, 0x5baacfb
cdq
idiv ecx
mov ecx, 0x100
cdq
idiv ecx
mov eax, edi
mov ecx, edx
cdq
idiv dword [ebp - 0x18]
mov eax, edi
add cl, byte [ebp + edx - 0x2c]
cdq
idiv dword [ebp - 0x1c]
mov eax, 0x200
add cl, byte [edx + 0x5def58]
xor byte [esi], cl
inc edi
cmp edi, eax
jl 0x4ed2dc
push dword [ebp - 0x14]
push eax
lea eax, [ebp - 0x488]
push 1
push eax
call dword [sym.imp.MSVCRT.dll_fwrite]
push dword [ebp - 0x14]
call dword [sym.imp.MSVCRT.dll_fclose]
push 0
push 0x421
call fcn.004c2498
add esp, 0x1c
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 4