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

Disassembly:
mov eax, 0x4d8090
call fcn.004ca3a0
sub esp, 0x47c
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
test edi, edi
mov dword [ebp - 0x10], ecx
je 0x4a3dba
call fcn.004a2de0
mov ecx, dword [ebp - 0x10]
lea eax, [ebp - 0x78]
push eax
call fcn.004a2daa
mov eax, dword [eax]
and dword [ebp - 4], 0
lea ecx, [ebp - 0x108]
push 0xa
push ecx
push eax
call fcn.00451305
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.00406376
mov esi, dword [sym.imp.MSVCRT.dll_sprintf]
or dword [ebp - 4], 0xffffffff
lea eax, [ebp - 0x108]
mov ebx, 0x50f2f4
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 0x5075c0
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
add esp, 0x18
mov dword [ebp - 0x14], eax
test eax, eax
jne 0x4a3bf0
push 0x1fc
lea eax, [ebp - 0x288]
push str.D:CQ2ClientRelease_6.2.83DRoleChatLog.cpp
push eax
push str.ERROR:_file__s_not_found_at__s___d
call fcn.004c655d
add esp, 0x10
jmp 0x4a3dba
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 0x508900
push esi
call sub.MSVCRT.dll_strcpy
add esp, 0x28
lea eax, [ebp - 0x488]
mov ecx, edi
push eax
call fcn.00460f0b
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 0x4a3ccd
push str.D:CQ2ClientRelease_6.2.83DRoleChatLog.cpp
push 0x221
push 0x5074ec
call fcn.004c655d
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.00468646
push edi
push 0x421
call fcn.0048869b
lea eax, [ebp - 0x2c]
push 0x50ae54
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 0x4a3d2f
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 + 0x50f2f4]
xor byte [esi], cl
inc edi
cmp edi, eax
jl 0x4a3d4e
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.0048869b
add esp, 0x1c
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 4