Function at 0x1000583b
Capabilities:
Check if file exists
Delete file
Get common file path
Get file attributes
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1314
call fcn.10018f80
mov eax, dword [0x1002b1f0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
push esi
push edi
mov edi, dword [ebp + 0x14]
xor ebx, ebx
mov esi, ecx
mov dword [ebp - 0x1314], eax
cmp edi, ebx
je 0x10005894
cmp dword [0x1002b010], 0xffffffff
jne 0x10005894
push edi
call fcn.10001f68
test eax, eax
je 0x10005894
push ebx
push ebx
push 4
push ebx
push 3
push 0x40000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [0x1002b010], eax
cmp dword [esi + 0xe8], 0xffffffff
jne 0x10005a23
lea eax, [esi + 0xf8]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov edi, 0x104
cmp eax, 0xffffffff
je 0x100058bc
test al, 0x10
jne 0x10005916
lea eax, [esi + 0xf8]
push eax
mov ecx, esi
call fcn.10001eb5
test eax, eax
jne 0x10005916
lea eax, [esi + 0xf8]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
je 0x10005c61
push str.TSLOG
lea eax, [esi + 0xf8]
push eax
push str._s_S_
push edi
push eax
call dword [sym.imp.MSVCR90.dll__snprintf]
add esp, 0x14
lea eax, [esi + 0xf8]
push eax
mov ecx, esi
call fcn.10001eb5
test eax, eax
je 0x10005c61
xor eax, eax
push 0x206
mov word [ebp - 0x20c], ax
lea eax, [ebp - 0x20a]
push ebx
push eax
call sub.MSVCR90.dll_memset
add esp, 0xc
inc dword [esi + 0xec]
mov eax, dword [esi + 0xec]
push ebx
lea ecx, [ebp - 0x20c]
push ecx
push eax
mov ecx, esi
call fcn.10002037
inc dword [esi + 0x23c]
push ebx
push ebx
push 2
push ebx
push 3
push 0x40000000
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esi + 0xe8], eax
cmp eax, 0xffffffff
jne 0x10005a23
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x70
jne 0x100059ab
push str.C:TSLOG_CONFIGTSLOG.ini
push 0x1001d640
push str.FileLog
push str.Output
mov dword [esi + 0x2c], ebx
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
jmp 0x10005c61
cmp eax, 5
jne 0x10005c61
lea eax, [esi + 0xf8]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
je 0x10005c61
push str.TSLOG
lea eax, [esi + 0xf8]
push eax
push str._sTSLOG_S_
push edi
push eax
call dword [sym.imp.MSVCR90.dll__snprintf]
add esp, 0x14
push ebx
lea eax, [ebp - 0x20c]
push eax
push dword [esi + 0xec]
mov ecx, esi
call fcn.10002037
push ebx
push ebx
push 2
push ebx
push 3
push 0x40000000
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esi + 0xe8], eax
cmp eax, 0xffffffff
je 0x10005c61
push 0x10ff
lea eax, [ebp - 0x130b]
push ebx
push eax
mov dword [ebp - 0x1310], ebx
mov byte [ebp - 0x130c], bl
call sub.MSVCR90.dll_memset
mov edi, dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
add esp, 0xc
push ebx
push ebx
push ebx
push ebx
push 0xffffffffffffffff
push dword [ebp - 0x1314]
push ebx
push 0x3a8
call edi
lea ecx, [eax - 1]
cmp ecx, 0x10fe
ja 0x10005c61
push ebx
push ebx
push eax
lea eax, [ebp - 0x130c]
push eax
push 0xffffffffffffffff
push dword [ebp - 0x1314]
push ebx
push 0x3a8
call edi
mov ecx, eax
cmp ecx, ebx
jbe 0x10005c61
dec ecx
mov eax, 0x1000
mov dword [ebp + 0x10], ecx
cmp ecx, eax
jbe 0x10005aa1
mov dword [ebp + 0x10], eax
mov eax, dword [0x1002b010]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp eax, 0xffffffff
je 0x10005ae9
push 2
push ebx
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ebx
lea eax, [ebp - 0x1310]
push eax
push dword [ebp + 0x10]
lea eax, [ebp - 0x130c]
push eax
push dword [0x1002b010]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push dword [0x1002b010]
call edi
or dword [0x1002b010], 0xffffffff
push ebx
lea eax, [ebp - 0x1310]
push eax
push dword [ebp + 0x10]
lea eax, [ebp - 0x130c]
push eax
push dword [esi + 0xe8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x10005b1f
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x70
jne 0x10005c61
jmp 0x10005989
mov eax, dword [esi + 0x23c]
mov ecx, dword [0x1002b66c]
cmp ecx, eax
jae 0x10005b3d
mov ecx, esi
mov dword [0x1002b66c], eax
call fcn.10001baa
jmp 0x10005b44
jbe 0x10005b44
mov dword [0x1002b66c], eax
cmp dword [ebp + 8], 6
je 0x10005b56
mov eax, dword [ebp - 0x1310]
add dword [esi + 0xf4], eax
mov ecx, dword [esi + 0xdc]
lea eax, [esi + 0xf4]
shl ecx, 0xa
cmp dword [eax], ecx
jb 0x10005c61
push dword [esi + 0xe8]
mov dword [eax], ebx
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
push dword [esi + 0xe8]
call edi
xor eax, eax
push 0x206
mov word [ebp - 0x20c], ax
lea eax, [ebp - 0x20a]
push ebx
push eax
call sub.MSVCR90.dll_memset
mov edi, 0x208
push edi
lea eax, [ebp - 0x20c]
push ebx
push eax
call sub.MSVCR90.dll_memset
mov eax, dword [esi + 0xec]
mov ecx, dword [esi + 0xe0]
add esp, 0x18
cmp eax, ecx
jl 0x10005be4
push ebx
sub eax, ecx
lea edx, [ebp - 0x20c]
push edx
inc eax
push eax
mov ecx, esi
call fcn.10002037
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push edi
lea eax, [ebp - 0x20c]
push ebx
push eax
call sub.MSVCR90.dll_memset
add esp, 0xc
lea eax, [ebp - 0x20c]
push eax
push ebx
push dword [esi + 0xec]
mov ecx, esi
call fcn.10002037
inc dword [esi + 0xec]
cmp dword [esi + 0xec], 0x3e7
jl 0x10005c22
mov dword [esi + 0xec], ebx
inc dword [esi + 0x23c]
push ebx
push ebx
push 2
push ebx
push 3
push 0x40000000
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esi + 0xe8], eax
mov eax, dword [esi + 0x23c]
mov dword [0x1002b66c], eax
cmp dword [esi + 0xe8], ebx
je 0x10005c61
mov ecx, esi
call fcn.10001baa
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.10018dd2
leave
ret 0x10