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

Disassembly:
mov eax, 0x4d80ac
call fcn.004ca3a0
sub esp, 0x514
mov al, byte [0x508900]
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 0x4a4034
push 1
pop edi
jmp 0x4a3e31
mov esi, dword [ebp - 0x20]
mov esi, dword [esi]
mov eax, dword [ebp - 0x1c]
mov esi, dword [esi + eax*4]
test esi, esi
je 0x4a4015
cmp dword [edx + 0x138], 0
je 0x4a4007
mov ecx, edx
call fcn.004a2de0
mov ecx, dword [ebp - 0x28]
lea eax, [ebp - 0x50]
push eax
call fcn.004a2daa
mov eax, dword [eax]
and dword [ebp - 4], 0
lea ecx, [ebp - 0xa0]
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 - 0x50]
mov dword [ebp - 4], edi
call fcn.00406376
mov ebx, dword [sym.imp.MSVCRT.dll_sprintf]
or dword [ebp - 4], 0xffffffff
lea eax, [ebp - 0xa0]
push eax
push 0x50f2f4
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 0x4a3f30
cmp dword [ebp - 0x14], 0
je 0x4a3efc
push dword [ebp - 0x14]
call dword [sym.imp.MSVCRT.dll_fclose]
pop ecx
lea eax, [ebp - 0x1a0]
push 0x5075c0
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
pop ecx
mov dword [ebp - 0x14], eax
test eax, eax
pop ecx
je 0x4a404f
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 0x50ae54
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 0x4a3f80
push 2
pop ebx
push 0x50f2f4
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 + 0x50f2f4]
xor byte [edi], cl
inc dword [ebp - 0x18]
cmp dword [ebp - 0x18], eax
jl 0x4a3fa3
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 0x4a3e2e
cmp dword [ebp - 0x14], 0
je 0x4a4031
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.00490fe3
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret
push 0x25a
lea eax, [ebp - 0x1a0]
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 0x4a4040