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

Disassembly:
mov eax, 0x607172
call fcn.0059d590
sub esp, 0x488
push esi
push edi
mov dword [ebp - 0x10], ecx
mov esi, dword [ebp + 8]
and dword [ebp - 4], 0
test esi, esi
je 0x55b663
call fcn.0055a14b
mov ecx, dword [ebp - 0x10]
lea eax, [ebp - 0x94]
push eax
call fcn.0055a10e
mov eax, dword [eax]
lea ecx, [ebp - 0x114]
push 0xa
push ecx
push eax
mov byte [ebp - 4], 1
call fcn.00559faf
pop ecx
push 0
push eax
call dword [sym.imp.MSVCRT.dll__i64toa]
add esp, 0x10
lea ecx, [ebp - 0x94]
mov byte [ebp - 4], 2
call fcn.00402b84
mov edi, dword [sym.imp.MSVCRT.dll__snprintf]
and byte [ebp - 4], 0
lea eax, [ebp - 0x114]
push eax
push 0x691ed0
push str.LOG__s__s_CHAT
lea eax, [ebp - 0x194]
push 0x80
push eax
call edi
add esp, 0x14
and byte [ebp - 0x115], 0
lea eax, [ebp - 0x194]
push str.leavewordsystem.log
push eax
push str._s__s
lea eax, [ebp - 0x494]
push 0x100
push eax
call edi
and byte [ebp - 0x395], 0
lea eax, [ebp - 0x494]
push 0x6837a4
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
add esp, 0x1c
mov dword [ebp - 0x1c], eax
test eax, eax
jne 0x55b3d5
push 0x2b2
lea eax, [ebp - 0x494]
push str.E:CQ2ClientRelease_18.26.83DRoleChatLog.cpp
push eax
push str.ERROR:_file__s_not_found_at__s___d
call fcn.005950cb
add esp, 0x10
jmp 0x55b663
mov eax, dword [esi + 4]
push ebx
mov ebx, dword [sym.imp.MSVCRT.dll_strncpy]
push 0x10
push eax
lea eax, [ebp - 0x48]
push eax
call ebx
push dword [ebp - 0x1c]
and byte [ebp - 0x39], 0
lea eax, [ebp - 0x48]
push 0x10
push 1
push eax
call dword [sym.imp.MSVCRT.dll_fwrite]
and byte [ebp - 0x394], 0
push 0x7f
pop ecx
xor eax, eax
lea edi, [ebp - 0x393]
and byte [ebp - 0xd4], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
push 0xf
xor eax, eax
pop ecx
lea edi, [ebp - 0xd3]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
add esi, 0x1c
push 0x40
stosb byte es:[edi], al
mov eax, dword [esi]
push eax
lea eax, [ebp - 0xd4]
push eax
call ebx
and byte [ebp - 0x95], 0
mov edi, 0x68f370
push edi
call sub.MSVCRT.dll_strlen
add esp, 0x2c
add eax, edi
mov ecx, esi
push eax
push edi
call fcn.004029af
mov ecx, dword [ebp + 8]
push 1
push 1
lea eax, [ebp - 0x394]
push 0x200
push eax
call fcn.004d632b
lea esi, [ebp - 0xd4]
lea edi, [ebp - 0x88]
movsd dword es:[edi], dword [esi]
lea esi, [ebp - 0xd0]
lea edi, [ebp - 0x83]
mov byte [ebp - 0x84], 0x2d
and byte [ebp - 0x195], 0
movsw word es:[edi], word [esi]
lea esi, [ebp - 0xce]
lea edi, [ebp - 0x80]
mov byte [ebp - 0x81], 0x2d
lea eax, [ebp - 0x88]
movsw word es:[edi], word [esi]
lea esi, [ebp - 0xcc]
lea edi, [ebp - 0x7d]
mov byte [ebp - 0x7e], 0x2d
push eax
movsw word es:[edi], word [esi]
lea esi, [ebp - 0xca]
lea edi, [ebp - 0x7a]
lea eax, [ebp - 0x394]
mov byte [ebp - 0x7b], 0x2d
movsw word es:[edi], word [esi]
and byte [ebp - 0x78], 0
push eax
call sub.MSVCRT.dll_strcat
push 0x260
call sub.MFC42.DLL_operatornew
add esp, 0xc
mov esi, eax
lea ecx, [ebp - 0x14]
mov dword [ebp - 0x18], esi
push esi
call fcn.0055cc71
push esi
lea eax, [ebp - 0x14]
push esi
push eax
mov byte [ebp - 4], 3
call fcn.00564a31
add esp, 0xc
cmp dword [ebp - 0x18], 0
mov byte [ebp - 4], 4
jne 0x55b53c
push 0x2dd
push str.E:CQ2ClientRelease_18.26.83DRoleChatLog.cpp
push str.pLine
push str.ASSERT
push 0x6765b8
call fcn.005950cb
add esp, 0x14
mov eax, dword [ebp + 8]
push 0x10
mov eax, dword [eax + 4]
push eax
push dword [ebp - 0x18]
call ebx
mov eax, dword [ebp - 0x18]
mov edi, 0x200
push edi
and byte [eax + 0xf], 0
lea eax, [ebp - 0x394]
push eax
mov eax, dword [ebp - 0x18]
add eax, 0x60
push eax
call ebx
mov eax, dword [ebp - 0x18]
add esp, 0x18
and byte [eax + 0x25f], 0
lea eax, [ebp - 0x18]
push eax
mov eax, dword [ebp - 0x10]
lea ecx, [eax + 0x224]
call fcn.0055c683
push 0
push 0x421
call fcn.0050ef78
call fcn.0051bd44
mov eax, dword [eax + 0x10c]
push 0x10
push eax
lea eax, [ebp - 0x38]
push eax
call ebx
and byte [ebp - 0x29], 0
lea eax, [ebp - 0x38]
push eax
call sub.MSVCRT.dll_strlen
add esp, 0x18
mov esi, eax
push 1
pop ebx
cmp esi, ebx
jg 0x55b5c2
push 2
pop esi
push 0x691ed0
call sub.MSVCRT.dll_strlen
and dword [ebp - 0x10], 0
dec eax
mov dword [ebp - 0x24], eax
dec esi
mov dword [ebp - 0x20], ebx
lea eax, [ebp - 0x394]
sub dword [ebp - 0x20], eax
pop ecx
mov dword [ebp - 0x28], esi
mov ebx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x20]
lea esi, [ebp + ebx - 0x394]
lea ecx, [eax + esi]
mov eax, 0x5baacfb
cdq
idiv ecx
mov ecx, 0x100
cdq
idiv ecx
mov eax, ebx
mov ecx, edx
cdq
idiv dword [ebp - 0x28]
mov eax, ebx
add cl, byte [ebp + edx - 0x38]
cdq
idiv dword [ebp - 0x24]
add cl, byte [edx + 0x691ed0]
xor byte [esi], cl
inc dword [ebp - 0x10]
cmp dword [ebp - 0x10], edi
jl 0x55b5e5
push dword [ebp - 0x1c]
lea eax, [ebp - 0x394]
push edi
push 1
push eax
call dword [sym.imp.MSVCRT.dll_fwrite]
push dword [ebp - 0x1c]
call dword [sym.imp.MSVCRT.dll_fclose]
push 0
push 0x421
call fcn.0050ef78
mov ecx, dword [ebp - 0x14]
and byte [ebp - 4], 0
add esp, 0x1c
test ecx, ecx
pop ebx
je 0x55b663
call fcn.004039fd
mov ecx, dword [ebp + 0xc]
or dword [ebp - 4], 0xffffffff
test ecx, ecx
je 0x55b673
call fcn.004039fd
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
leave
ret 8