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

Disassembly:
mov eax, 0x6071b8
call fcn.0059d590
sub esp, 0x3d8
push ebx
push esi
push edi
mov edi, ecx
cmp byte [edi + 0x23c], 0
je 0x55bd04
mov ebx, dword [edi + 0x14]
sub ebx, dword [edi + 0x10]
sar ebx, 3
call fcn.0055a14b
lea eax, [ebp - 0x2c]
mov ecx, edi
push eax
call fcn.0055a10e
mov eax, dword [eax]
lea ecx, [ebp - 0xe4]
push 0xa
xor esi, esi
push ecx
push eax
mov dword [ebp - 4], esi
call fcn.00559faf
pop ecx
push esi
push eax
call dword [sym.imp.MSVCRT.dll__i64toa]
add esp, 0x10
mov eax, dword [ebp - 0x24]
lea ecx, [ebp - 0x24]
sub eax, dword [ebp - 0x2c]
mov dword [ebp - 4], 1
push eax
push dword [ebp - 0x2c]
call fcn.00402ba8
lea eax, [edi + 0x120]
or dword [ebp - 4], 0xffffffff
push eax
lea eax, [ebp - 0xe4]
push eax
push 0x691ed0
push str.LOG__s__s_CHAT__s
lea eax, [ebp - 0x1e4]
push 0x100
push eax
call dword [sym.imp.MSVCRT.dll__snprintf]
and byte [ebp - 0xe5], 0
lea eax, [ebp - 0x1e4]
push 0x6837bc
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
add esp, 0x20
cmp eax, esi
mov dword [ebp - 0x14], eax
je 0x55bd04
push eax
call dword [sym.imp.MSVCRT.dll_fclose]
mov eax, dword [edi + 0x234]
pop ecx
sub eax, dword [edi + 0x230]
mov ecx, ebx
mov dword [ebp - 0x20], esi
sar eax, 3
sub ecx, eax
test ecx, ecx
jle 0x55bcf3
mov esi, dword [sym.imp.MSVCRT.dll_strncpy]
mov eax, dword [edi + 0x10]
mov ecx, dword [ebp - 0x20]
lea eax, [eax + ecx*8]
mov ecx, dword [eax]
mov eax, dword [eax + 4]
test eax, eax
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x24], eax
je 0x55bb2b
push 1
lea ecx, [eax + 4]
pop edx
lock xadd dword [ecx], edx
cmp dword [ebp - 0x28], 0
mov dword [ebp - 4], 2
je 0x55bcc5
push dword [ebp - 0x14]
call dword [sym.imp.MSVCRT.dll_fclose]
lea eax, [ebp - 0x1e4]
mov dword [esp], 0x6837a4
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
pop ecx
mov dword [ebp - 0x14], eax
test eax, eax
pop ecx
je 0x55bd13
push 0x10
lea eax, [ebp - 0x64]
push dword [ebp - 0x28]
push eax
call esi
push dword [ebp - 0x14]
and byte [ebp - 0x55], 0
lea eax, [ebp - 0x64]
push 0x10
push 1
push eax
call dword [sym.imp.MSVCRT.dll_fwrite]
mov eax, dword [ebp - 0x28]
push 0x10
add eax, 0x10
push eax
lea eax, [ebp - 0x54]
push eax
call esi
push dword [ebp - 0x14]
and byte [ebp - 0x45], 0
lea eax, [ebp - 0x54]
push 0x10
push 1
push eax
call dword [sym.imp.MSVCRT.dll_fwrite]
mov eax, dword [ebp - 0x28]
push 0x40
add eax, 0x20
push eax
lea eax, [ebp - 0xa4]
push eax
call esi
add esp, 0x44
and byte [ebp - 0x65], 0
lea eax, [ebp - 0xa4]
push dword [ebp - 0x14]
push 0x40
push 1
push eax
call dword [sym.imp.MSVCRT.dll_fwrite]
mov eax, dword [ebp - 0x28]
push 0x200
add eax, 0x60
push eax
lea eax, [ebp - 0x3e4]
push eax
call esi
and byte [ebp - 0x1e5], 0
call fcn.0051bd44
mov eax, dword [eax + 0x10c]
push 0x10
push eax
lea eax, [ebp - 0x44]
push eax
call esi
and byte [ebp - 0x35], 0
lea eax, [ebp - 0x44]
push eax
call sub.MSVCRT.dll_strlen
add esp, 0x2c
cmp eax, 1
mov dword [ebp - 0x1c], eax
jg 0x55bc26
mov dword [ebp - 0x1c], 2
push 0x691ed0
call sub.MSVCRT.dll_strlen
and dword [ebp - 0x18], 0
dec eax
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x1c]
dec eax
mov dword [ebp - 0x1c], 1
mov dword [ebp - 0x30], eax
lea eax, [ebp - 0x3e4]
sub dword [ebp - 0x1c], eax
pop ecx
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x1c]
lea eax, [ebp + eax - 0x3e4]
add ecx, eax
mov eax, 0x5baacfb
cdq
idiv ecx
mov ecx, 0x100
cdq
idiv ecx
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x18]
lea ecx, [ebp + ecx - 0x3e4]
mov byte [ebp - 0xd], dl
cdq
idiv dword [ebp - 0x30]
mov al, byte [ebp + edx - 0x44]
add byte [ebp - 0xd], al
mov eax, dword [ebp - 0x18]
cdq
idiv dword [ebp - 0x34]
mov al, byte [ebp - 0xd]
add al, byte [edx + 0x691ed0]
xor byte [ecx], al
inc dword [ebp - 0x18]
cmp dword [ebp - 0x18], 0x200
jl 0x55bc50
push dword [ebp - 0x14]
lea eax, [ebp - 0x3e4]
push 0x200
push 1
push eax
call dword [sym.imp.MSVCRT.dll_fwrite]
mov eax, dword [ebp - 0x24]
add esp, 0x10
or dword [ebp - 4], 0xffffffff
test eax, eax
je 0x55bcd4
mov ecx, eax
call fcn.004039fd
mov eax, dword [edi + 0x234]
inc dword [ebp - 0x20]
sub eax, dword [edi + 0x230]
mov ecx, ebx
sar eax, 3
sub ecx, eax
cmp dword [ebp - 0x20], ecx
jl 0x55bb09
push dword [ebp - 0x14]
call dword [sym.imp.MSVCRT.dll_fclose]
and byte [edi + 0x23c], 0
pop ecx
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret
mov ecx, dword [ebp - 0x24]
or dword [ebp - 4], 0xffffffff
test ecx, ecx
je 0x55bd04
call fcn.004039fd
jmp 0x55bd04