Function at 0x44f0cd
Capabilities:
Check if file exists
Check mutex on windows
Create directory
Delete file
Get common file path
Get file attributes
Print debug messages
Write file on windows

Disassembly:
push 0x78
push 0x4c2978
call fcn.0049f2f8
or dword [ebp - 0x1c], 0xffffffff
push 0x104
mov edi, 0x4f9c30
push edi
xor ebx, ebx
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push 0x4f9a30
mov esi, 0x4f9830
push esi
push 0x4f9630
push 0x4f9624
push edi
call dword [sym.imp.MSVCR71.dll__wsplitpath]
add esp, 0x14
cmp dword [0x4f9620], ebx
jne 0x44f123
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov dword [0x4f9620], eax
cmp word [0x4f9420], bx
jne 0x44f14a
push esi
push str.TSLOG
push str.mutex_s__s
push 0xff
push 0x4f9420
call dword [sym.imp.MSVCR71.dll__snwprintf]
add esp, 0x14
push 0x4f9420
push 1
push ebx
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov dword [ebp - 0x24], eax
cmp eax, ebx
je 0x44f513
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
sete al
cmp al, bl
je 0x44f180
push 0xffffffffffffffff
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov edi, 0x4f9218
push edi
push ebx
push ebx
push 0x8023
push ebx
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
jl 0x44f27a
push edi
push str._sTSLOG_
push 0x104
push edi
call dword [sym.imp.MSVCR71.dll__snwprintf]
add esp, 0x10
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x44f1c1
test al, 0x10
jne 0x44f1d1
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x44f513
push 0x4c2934
push esi
push str.TSLOG
push edi
push str._s_s__s._s
push 0x103
mov esi, 0x4f9010
push esi
call dword [sym.imp.MSVCR71.dll__snwprintf]
add esp, 0x1c
push ebx
push ebx
push 4
push ebx
push 3
push 0x40000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x1c], eax
push ebx
push ebx
lea ecx, [ebp - 0x3c]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileTime]
test eax, eax
je 0x44f27f
lea eax, [ebp - 0x5c]
push eax
lea eax, [ebp - 0x3c]
push eax
call dword [sym.imp.KERNEL32.dll_FileTimeToSystemTime]
test eax, eax
je 0x44f27f
lea eax, [ebp - 0x6c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemTime]
mov ax, word [ebp - 0x6c]
cmp ax, word [ebp - 0x5c]
ja 0x44f252
movzx eax, word [ebp - 0x5a]
movzx ecx, word [ebp - 0x6a]
sub ecx, eax
cmp ecx, 1
jl 0x44f27f
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push ebx
push ebx
push 4
push ebx
push 3
push 0x40000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x1c], eax
jmp 0x44f27f
mov esi, 0x4f9010
cmp dword [ebp - 0x1c], 0xffffffff
jne 0x44f30d
push edi
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
push edi
push str._sTSLOG_
push 0x104
push edi
call dword [sym.imp.MSVCR71.dll__snwprintf]
add esp, 0x10
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x44f2ba
test al, 0x10
jne 0x44f2ca
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x44f513
push 0x4c2934
push 0x4f9830
push str.TSLOG
push edi
push str._s_s__s._s
push 0x103
push esi
call dword [sym.imp.MSVCR71.dll__snwprintf]
add esp, 0x1c
push ebx
push ebx
push 4
push ebx
push 3
push 0x40000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x1c], eax
cmp eax, 0xffffffff
je 0x44f501
push 2
push ebx
push ebx
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, ebx
jne 0x44f33d
mov esi, str.date_______time_________processname____processid__threadid__logversion____buildtime___________________userdata_r_n
push esi
call sub.MSVCR71.dll_strlen
pop ecx
mov dword [ebp - 0x28], eax
push ebx
lea ecx, [ebp - 0x28]
push ecx
push eax
push esi
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp - 0x88], ebx
push 6
pop ecx
xor eax, eax
lea edi, [ebp - 0x84]
rep stosd dword es:[edi], eax
push 0x1c
lea eax, [ebp - 0x88]
push eax
push 0x4ef2e4
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
mov eax, dword [ebp - 0x84]
mov dword [0x4ef2e4], eax
push 0x104
mov edi, 0x4f9c30
push edi
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push 0x4f9a30
mov esi, 0x4f9830
push esi
push 0x4f9630
push 0x4f9624
push edi
call dword [sym.imp.MSVCR71.dll__wsplitpath]
add esp, 0x14
mov dword [ebp - 0x20], ebx
mov word [ebp - 0x4c], bx
xor eax, eax
lea edi, [ebp - 0x4a]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [ebp - 0x4c]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
push str.Wed_May__5_15:04:32_2010
push 0x21078
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
push dword [0x4f9620]
push esi
movzx eax, word [ebp - 0x3e]
push eax
movzx eax, word [ebp - 0x40]
push eax
movzx eax, word [ebp - 0x42]
push eax
movzx eax, word [ebp - 0x44]
push eax
movzx eax, word [ebp - 0x46]
push eax
movzx eax, word [ebp - 0x4a]
push eax
movzx eax, word [ebp - 0x4c]
push eax
push str._04d__02d__02d__02d:_02d:_02d._03d_t__s__t__lu__t__lu__t_0x_08x__t__s__t
push 0x100
mov edi, 0x4f6e10
push edi
call dword [sym.imp.MSVCR71.dll__snwprintf]
add esp, 0x3c
mov dword [ebp - 0x20], eax
mov dword [ebp - 4], ebx
lea ecx, [ebp + 0xc]
mov dword [ebp - 0x2c], ecx
push ecx
push dword [ebp + 8]
push 0xfff
lea eax, [eax*2 + 0x4f6e10]
push eax
call dword [sym.imp.MSVCR71.dll__vsnwprintf]
add esp, 0x10
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x2c], ebx
or dword [ebp - 4], 0xffffffff
jmp 0x44f481
cmp eax, 0xffffffff
jne 0x44f498
mov eax, dword [ebp - 0x20]
lea eax, [eax*2 + 0x4f6e10]
push eax
call dword [sym.imp.MSVCR71.dll_wcslen]
pop ecx
mov ecx, dword [ebp - 0x20]
add eax, ecx
mov word [eax*2 + 0x4f6e10], 0xd
lea eax, [eax + eax + 2]
mov word [eax + 0x4f6e10], 0xa
mov word [eax + 0x4f6e12], bx
push ebx
push ebx
push ebx
push ebx
push 0xffffffffffffffff
push edi
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push ebx
push ebx
push eax
mov esi, 0x4f5d10
push esi
push 0xffffffffffffffff
push edi
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov edi, eax
dec edi
push esi
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push ebx
lea eax, [ebp - 0x20]
push eax
push edi
push esi
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call fcn.0049f333
ret