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

Disassembly:
mov eax, 0x607194
call fcn.0059d590
sub esp, 0x4e8
mov al, byte [0x68f370]
push ebx
push esi
push edi
mov edx, ecx
push 0x3f
mov byte [ebp - 0x2f4], al
pop ecx
xor eax, eax
lea edi, [ebp - 0x2f3]
mov esi, dword [edx + 0x234]
lea ebx, [edx + 0x230]
rep stosd dword es:[edi], eax
sub esi, dword [ebx]
and dword [ebp - 0x10], 0
stosw word es:[edi], ax
stosb byte es:[edi], al
sar esi, 3
xor edi, edi
mov dword [ebp - 0x28], edx
test esi, esi
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x34], esi
mov dword [ebp - 0x2c], edi
jle 0x55b9cc
mov esi, dword [sym.imp.MSVCRT.dll_strncpy]
mov ebx, dword [sym.imp.MSVCRT.dll_fwrite]
jmp 0x55b6ef
mov edx, dword [ebp - 0x28]
mov eax, dword [ebp - 0x20]
mov eax, dword [eax]
mov ecx, dword [eax + edi*8]
lea eax, [eax + edi*8]
mov dword [ebp - 0x1c], ecx
mov eax, dword [eax + 4]
test eax, eax
mov dword [ebp - 0x18], eax
je 0x55b714
push 1
add eax, 4
pop ecx
lock xadd dword [eax], ecx
mov ecx, dword [ebp - 0x1c]
and dword [ebp - 4], 0
test ecx, ecx
je 0x55b994
cmp dword [edx + 0x240], 0
je 0x55b994
cmp byte [ecx], 0
jne 0x55b994
mov ecx, edx
call fcn.0055a14b
mov edi, dword [ebp - 0x28]
lea eax, [ebp - 0x44]
push eax
mov ecx, edi
call fcn.0055a10e
mov eax, dword [eax]
lea ecx, [ebp - 0xf4]
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
mov eax, dword [ebp - 0x3c]
lea ecx, [ebp - 0x3c]
sub eax, dword [ebp - 0x44]
mov byte [ebp - 4], 2
push eax
push dword [ebp - 0x44]
call fcn.00402ba8
and byte [ebp - 4], 0
add edi, 0x120
lea eax, [ebp - 0xf4]
push edi
push eax
push 0x691ed0
mov edi, 0x100
push str.LOG__s__s_CHAT__s
lea eax, [ebp - 0x1f4]
push edi
push eax
call dword [sym.imp.MSVCRT.dll__snprintf]
and byte [ebp - 0xf5], 0
lea eax, [ebp - 0x1f4]
push eax
lea eax, [ebp - 0x2f4]
push eax
call sub.MSVCRT.dll_strcmp
add esp, 0x20
test eax, eax
je 0x55b81d
cmp dword [ebp - 0x10], 0
je 0x55b7e3
push dword [ebp - 0x10]
call dword [sym.imp.MSVCRT.dll_fclose]
pop ecx
lea eax, [ebp - 0x1f4]
push 0x6837a4
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
pop ecx
mov dword [ebp - 0x10], eax
test eax, eax
pop ecx
je 0x55b9e2
lea eax, [ebp - 0x1f4]
push edi
push eax
lea eax, [ebp - 0x2f4]
push eax
call esi
add esp, 0xc
and byte [ebp - 0x1f5], 0
and byte [ebp - 0x54], 0
xor eax, eax
lea edi, [ebp - 0x53]
push 0x10
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [ebp - 0x1c]
pop edi
add eax, edi
push edi
push eax
lea eax, [ebp - 0x54]
push eax
call esi
push dword [ebp - 0x10]
and byte [ebp - 0x45], 0
lea eax, [ebp - 0x54]
push edi
push 1
push eax
call ebx
mov eax, dword [ebp - 0x1c]
push edi
add eax, 0x20
push eax
lea eax, [ebp - 0x74]
push eax
call esi
push dword [ebp - 0x10]
and byte [ebp - 0x65], 0
lea eax, [ebp - 0x74]
push edi
push 1
push eax
call ebx
mov eax, dword [ebp - 0x1c]
add esp, 0x38
push dword [eax + 0xc]
push dword [eax + 8]
push dword [eax + 4]
lea eax, [ebp - 0xb4]
push str._d__d__d
push 0x40
push eax
call dword [sym.imp.MSVCRT.dll__snprintf]
push dword [ebp - 0x10]
and byte [ebp - 0x75], 0
lea eax, [ebp - 0xb4]
push 0x40
push 1
push eax
call ebx
and byte [ebp - 0x4f4], 0
push 0x7f
pop ecx
xor eax, eax
lea edi, [ebp - 0x4f3]
push 0x200
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [ebp - 0x1c]
add eax, 0x30
push eax
lea eax, [ebp - 0x4f4]
push eax
call esi
and byte [ebp - 0x2f5], 0
call fcn.0051bd44
mov eax, dword [eax + 0x10c]
push 0x10
push eax
lea eax, [ebp - 0x64]
push eax
call esi
add esp, 0x40
and byte [ebp - 0x55], 0
lea eax, [ebp - 0x64]
push eax
call sub.MSVCRT.dll_strlen
cmp eax, 1
pop ecx
mov dword [ebp - 0x14], eax
jg 0x55b908
mov dword [ebp - 0x14], 2
push 0x691ed0
call sub.MSVCRT.dll_strlen
xor edi, edi
dec eax
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x14]
dec eax
mov dword [ebp - 0x14], 1
mov dword [ebp - 0x38], eax
lea eax, [ebp - 0x4f4]
sub dword [ebp - 0x14], eax
pop ecx
mov dword [ebp - 0x24], edi
mov ecx, dword [ebp - 0x14]
lea eax, [ebp + edi - 0x4f4]
add ecx, eax
mov eax, 0x5baacfb
cdq
idiv ecx
mov ecx, 0x100
cdq
idiv ecx
mov eax, edi
mov edi, dword [ebp - 0x24]
mov ecx, edx
cdq
idiv dword [ebp - 0x30]
mov eax, dword [ebp - 0x24]
add cl, byte [edx + 0x691ed0]
cdq
idiv dword [ebp - 0x38]
mov eax, 0x200
add cl, byte [ebp + edx - 0x64]
xor byte [ebp + edi - 0x4f4], cl
inc edi
cmp edi, eax
mov dword [ebp - 0x24], edi
jl 0x55b933
push dword [ebp - 0x10]
push eax
lea eax, [ebp - 0x4f4]
push 1
push eax
call ebx
mov edi, dword [ebp - 0x2c]
add esp, 0x10
lea ecx, [ebp - 0x1c]
call fcn.00505213
mov ecx, dword [ebp - 0x18]
or dword [ebp - 4], 0xffffffff
test ecx, ecx
je 0x55b9ac
call fcn.004039fd
inc edi
cmp edi, dword [ebp - 0x34]
mov dword [ebp - 0x2c], edi
jl 0x55b6ec
cmp dword [ebp - 0x10], 0
je 0x55b9c9
push dword [ebp - 0x10]
call dword [sym.imp.MSVCRT.dll_fclose]
pop ecx
mov ebx, dword [ebp - 0x20]
mov ecx, ebx
call fcn.0055c737
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret
push 0x319
lea eax, [ebp - 0x1f4]
push str.E:CQ2ClientRelease_18.26.83DRoleChatLog.cpp
push eax
push str.ERROR:_file__s_not_found_at__s___d
call fcn.005950cb
mov ecx, dword [ebp - 0x18]
or dword [ebp - 4], 0xffffffff
add esp, 0x10
test ecx, ecx
je 0x55b9d3
call fcn.004039fd
jmp 0x55b9d3