Function at 0x40a719
Capabilities:
Copy file
Move file
Read .ini file
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x1074]
mov eax, 0x1074
call fcn.00416800
push 0xffffffffffffffff
push 0x42b7b4
mov eax, dword fs:[0]
push eax
sub esp, 0x5c
mov eax, dword [0x43b690]
xor eax, ebp
mov dword [ebp + 0x1070], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
lea eax, [ebp - 0x68]
push eax
mov esi, str.C:TSLOG_CONFIGTSLOG.ini
push esi
mov edi, ecx
call fcn.00417285
pop ecx
pop ecx
test eax, eax
je 0x40a7cf
lea eax, [ebp - 0x68]
push eax
mov ebx, str.C:TSLOG_CONFIGTSLOG.txt
push ebx
call fcn.00417285
pop ecx
pop ecx
test eax, eax
je 0x40a7c7
lea eax, [ebp - 0x68]
push eax
push esi
call fcn.00417285
pop ecx
pop ecx
test eax, eax
je 0x40a7ba
lea eax, [ebp - 0x68]
push eax
push ebx
call fcn.00417285
pop ecx
pop ecx
test eax, eax
je 0x40a7b2
push 0
mov ecx, edi
call fcn.004084fa
xor eax, eax
jmp 0x40afba
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_MoveFileW]
xor ebx, ebx
push ebx
push esi
push esi
call dword [sym.imp.KERNEL32.dll_CopyFileW]
jmp 0x40a7d1
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_MoveFileW]
xor ebx, ebx
mov eax, dword [edi + 0x2c]
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x54], ebx
jne 0x40a829
push ebx
push ebx
push 4
push ebx
push 1
push 0x40000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x10], eax
cmp eax, 0xffffffff
je 0x40a829
push ebx
lea eax, [ebp - 0x18]
mov dword [ebp - 0x18], ebx
push eax
mov ebx, str.__Output__r_n_DebugView__________________ON______ON
push ebx
call fcn.004156a0
pop ecx
push eax
push ebx
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x14], 1
xor eax, eax
push 0xffe
push eax
mov word [ebp + 0x70], ax
lea eax, [ebp + 0x72]
push eax
call fcn.00415aa0
add esp, 0xc
push esi
push 0x800
lea eax, [ebp + 0x70]
push eax
mov ebx, 0x42fe8c
push ebx
push 0x42fe78
push str.Output
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea eax, [ebp + 0x70]
push ebx
push eax
call fcn.004170f1
pop ecx
pop ecx
test eax, eax
je 0x40a8b3
lea eax, [ebp + 0x70]
push 0x42fe74
push eax
call fcn.004170f1
pop ecx
pop ecx
test eax, eax
je 0x40a8b3
lea eax, [ebp + 0x70]
push 0x42f5dc
push eax
call fcn.004170f1
pop ecx
pop ecx
test eax, eax
je 0x40a8ad
lea eax, [ebp + 0x70]
push 0x42fe70
push eax
call fcn.004170f1
pop ecx
pop ecx
test eax, eax
jne 0x40a8ba
and dword [edi + 0x28], 0
jmp 0x40a8ba
mov dword [edi + 0x28], 1
cmp dword [ebp - 0x14], 0
je 0x40a8df
cmp dword [edi + 0x28], 0
mov eax, ebx
jne 0x40a8cd
mov eax, 0x42f5dc
push esi
push eax
push 0x42fe78
push str.Output
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
push esi
push 0x800
lea eax, [ebp + 0x70]
push eax
push ebx
push str.FileLog
push str.Output
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea eax, [ebp + 0x70]
push ebx
push eax
call fcn.004170f1
pop ecx
pop ecx
test eax, eax
je 0x40a94c
lea eax, [ebp + 0x70]
push 0x42fe74
push eax
call fcn.004170f1
pop ecx
pop ecx
test eax, eax
je 0x40a94c
lea eax, [ebp + 0x70]
push 0x42f5dc
push eax
call fcn.004170f1
pop ecx
pop ecx
test eax, eax
je 0x40a946
lea eax, [ebp + 0x70]
push 0x42fe70
push eax
call fcn.004170f1
pop ecx
pop ecx
test eax, eax
jne 0x40a953
and dword [edi + 0x2c], 0
jmp 0x40a953
mov dword [edi + 0x2c], 1
cmp dword [ebp - 0x14], 0
je 0x40a976
cmp dword [edi + 0x2c], 0
jne 0x40a964
mov ebx, 0x42f5dc
push esi
push ebx
push str.FileLog
push str.Output
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
push esi
push 0x800
lea eax, [ebp + 0x70]
push eax
push str.TRACE
push str.Level
mov ebx, str.Common
push ebx
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea eax, [ebp + 0x70]
push str.TRACE
push eax
call fcn.004170f1
pop ecx
pop ecx
test eax, eax
jne 0x40a9b2
and dword [edi + 0x30], eax
jmp 0x40aa41
lea eax, [ebp + 0x70]
push str.DEBUG
push eax
call fcn.004170f1
pop ecx
pop ecx
test eax, eax
jne 0x40a9cf
mov dword [edi + 0x30], 1
jmp 0x40aa41
lea eax, [ebp + 0x70]
push str.INFO
push eax
call fcn.004170f1
pop ecx
pop ecx
test eax, eax
jne 0x40a9ec
mov dword [edi + 0x30], 2
jmp 0x40aa41
lea eax, [ebp + 0x70]
push str.WARN
push eax
call fcn.004170f1
pop ecx
pop ecx
test eax, eax
jne 0x40aa09
mov dword [edi + 0x30], 3
jmp 0x40aa41
lea eax, [ebp + 0x70]
push str.ERROR
push eax
call fcn.004170f1
pop ecx
pop ecx
test eax, eax
jne 0x40aa26
mov dword [edi + 0x30], 4
jmp 0x40aa41
lea eax, [ebp + 0x70]
push str.FATAL
push eax
call fcn.004170f1
pop ecx
pop ecx
test eax, eax
jne 0x40aa41
mov dword [edi + 0x30], 5
cmp dword [ebp - 0x14], 0
je 0x40aa9b
mov eax, dword [edi + 0x30]
test eax, eax
je 0x40aa88
cmp eax, 1
jne 0x40aa5a
mov eax, str.DEBUG
jmp 0x40aa8d
cmp eax, 2
jne 0x40aa66
mov eax, str.INFO
jmp 0x40aa8d
cmp eax, 3
jne 0x40aa72
mov eax, str.WARN
jmp 0x40aa8d
cmp eax, 4
jne 0x40aa7e
mov eax, str.ERROR
jmp 0x40aa8d
cmp eax, 5
mov eax, str.FATAL
je 0x40aa8d
mov eax, str.TRACE
push esi
push eax
push str.Level
push ebx
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
push 0
lea ecx, [ebp]
mov dword [ebp + 0x18], 7
call fcn.004034fd
and dword [ebp - 4], 0
push 0
lea ecx, [ebp + 0x38]
mov dword [ebp + 0x50], 7
call fcn.004034fd
mov byte [ebp - 4], 1
lea ecx, [edi + 0x34]
call fcn.00401654
push esi
push 0x800
lea eax, [ebp + 0x70]
push eax
push 0x42f5ac
push str.Include
push ebx
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea eax, [ebp + 0x70]
push eax
lea ecx, [ebp]
call fcn.00405cb6
push 0x42fdf4
lea eax, [ebp + 0x70]
push eax
jmp 0x40ab24
push 0x42f5ac
push dword [ebp - 0x10]
call fcn.004170f1
pop ecx
pop ecx
lea ecx, [edi + 0x34]
test eax, eax
je 0x40ab34
push dword [ebp - 0x10]
call fcn.004082e9
push 0x42fdf4
push 0
call fcn.00416f35
pop ecx
mov dword [ebp - 0x10], eax
pop ecx
test eax, eax
jne 0x40aaff
jmp 0x40ab5c
call fcn.00401654
push dword [ebp - 0x10]
lea ecx, [edi + 0x34]
call fcn.004082e9
cmp dword [ebp - 0x14], 0
je 0x40ab5c
push esi
push 0x42f5ac
push str.Include
push ebx
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
lea ecx, [edi + 0x88]
call fcn.00401654
push esi
push 0x800
lea eax, [ebp + 0x70]
push eax
push 0x42f3cc
push 0x42fde4
push ebx
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea eax, [ebp + 0x70]
push eax
lea ecx, [ebp + 0x38]
call fcn.00405cb6
lea eax, [ebp + 0x70]
push 0x42fde0
push eax
call fcn.00416f35
pop ecx
pop ecx
mov dword [ebp - 0x10], eax
test eax, eax
jne 0x40abbe
cmp dword [ebp - 0x14], eax
je 0x40ac05
push esi
push 0x42f3cc
push 0x42fde4
push ebx
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
jmp 0x40ac05
mov ebx, dword [ebp - 0x10]
push 0x42f5ac
push ebx
call fcn.004170f1
pop ecx
pop ecx
lea ecx, [edi + 0x88]
test eax, eax
je 0x40abf4
push ebx
call fcn.004082e9
push 0x42fdf4
push 0
call fcn.00416f35
mov ebx, eax
pop ecx
pop ecx
test ebx, ebx
jne 0x40abc1
jmp 0x40ac05
call fcn.00401654
push ebx
lea ecx, [edi + 0x88]
call fcn.004082e9
push 0
lea ecx, [ebp + 0x54]
mov dword [ebp + 0x6c], 0xf
call fcn.004041ad
mov byte [ebp - 4], 2
push esi
lea ecx, [ebp - 0x38]
call fcn.00406082
mov byte [ebp - 4], 3
lea eax, [ebp + 0x54]
push eax
lea eax, [ebp - 0x38]
push eax
call fcn.00406b8f
pop ecx
pop ecx
mov byte [ebp - 4], 2
push 0
push 1
lea ecx, [ebp - 0x38]
call fcn.00404665
cmp dword [ebp + 0x6c], 0x10
mov ebx, dword [ebp + 0x58]
jae 0x40ac52
lea ebx, [ebp + 0x58]
push 0
lea ecx, [ebp + 0x1c]
mov dword [ebp - 0x10], ebx
mov dword [ebp + 0x34], 7
call fcn.004034fd
mov byte [ebp - 4], 4
lea eax, [edi + 0xf8]
push eax
lea ecx, [ebp - 0x38]
call fcn.0040603f
mov byte [ebp - 4], 5
lea eax, [ebp + 0x1c]
push eax
lea eax, [ebp - 0x38]
push eax
call fcn.00406c74
pop ecx
pop ecx
mov byte [ebp - 4], 4
push 0
push 1
lea ecx, [ebp - 0x38]
call fcn.0040461a
cmp dword [ebp + 0x34], 8
mov eax, dword [ebp + 0x20]
jae 0x40aca8
lea eax, [ebp + 0x20]
mov dword [ebp - 0x18], eax
xor eax, eax
cmp dword [edi + 0x2c], eax
je 0x40ae9b
cmp dword [ebp - 0x1c], eax
je 0x40acc7
cmp dword [edi + 0x23c], eax
jne 0x40ad64
push ebx
mov ebx, 0x104
push ebx
lea eax, [edi + 0xf8]
push eax
push str.C:TSLOG_
push str.LogFilePath
push str.FileLogOption
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
lea eax, [edi + 0xf8]
push eax
call fcn.004156a0
pop ecx
test eax, eax
je 0x40ad0c
lea eax, [edi + 0xf8]
push eax
call fcn.004156a0
pop ecx
cmp eax, ebx
jb 0x40ad21
push ebx
lea eax, [edi + 0xf8]
push str.C:TSLOG_
push eax
call fcn.00416b60
add esp, 0xc
lea eax, [edi + 0xf8]
push eax
call fcn.004156a0
cmp byte [eax + edi + 0xf7], 0x5c
pop ecx
je 0x40ad4d
push ebx
lea eax, [edi + 0xf8]
push 0x42fdc0
push eax
call fcn.00416e00
add esp, 0xc
or dword [0x43cc10], 0xffffffff
cmp dword [ebp + 0x107c], 0
jne 0x40ad64
mov ecx, edi
call fcn.00406d79
push esi
push 0x5000
push str.MaxLogFileSize
mov ebx, 0x42fd84
push ebx
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
mov dword [edi + 0xdc], eax
cmp eax, 1
jb 0x40ad8d
cmp eax, 0x1f4000
jbe 0x40ada9
push esi
push str.20480
push str.MaxLogFileSize
push ebx
mov dword [edi + 0xdc], 0x5000
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
push esi
push 0x14
push str.MaxLogFileCnt
push ebx
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
cmp eax, 1
mov dword [edi + 0xe0], eax
jl 0x40adca
cmp eax, 0x3e8
jle 0x40ade6
push esi
push 0x42fd54
push str.MaxLogFileCnt
push ebx
mov dword [edi + 0xe0], 0x14
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
push esi
push 0xa
push str.MaxCountOfHistroyProcess
push ebx
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
cmp eax, 0xffffffff
mov dword [edi + 0xe4], eax
jl 0x40ae05
cmp eax, 0x64
jle 0x40ae21
push esi
push 0x42fd18
push str.MaxCountOfHistroyProcess
push ebx
mov dword [edi + 0xe4], 0xa
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
cmp dword [ebp - 0x14], 0
je 0x40aeb9
push dword [ebp - 0x10]
lea eax, [edi + 0xf8]
push eax
push str.LogFilePath
push str.FileLogOption
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
cmp dword [edi + 0xdc], 0x5000
jne 0x40ae63
push esi
push str.20480
push str.MaxLogFileSize
push ebx
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
cmp dword [edi + 0xe0], 0x14
jne 0x40ae7e
push esi
push 0x42fd54
push str.MaxLogFileCnt
push ebx
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
cmp dword [edi + 0xe4], 0xa
jne 0x40aeb9
push esi
push 0x42fd18
push str.MaxCountOfHistroyProcess
push ebx
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
jmp 0x40aeb9
lea ebx, [edi + 0xe8]
mov eax, dword [ebx]
cmp eax, 0xffffffff
je 0x40aeb9
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or dword [ebx], 0xffffffff
and dword [edi + 0xf4], 0
xor ebx, ebx
cmp dword [ebp + 0x107c], ebx
jne 0x40af7d
mov eax, dword [edi + 0x30]
cmp eax, ebx
je 0x40af08
cmp eax, 1
jne 0x40aeda
mov ebx, str.DEBUG
jmp 0x40af0d
cmp eax, 2
jne 0x40aee6
mov ebx, str.INFO
jmp 0x40af0d
cmp eax, 3
jne 0x40aef2
mov ebx, str.WARN
jmp 0x40af0d
cmp eax, 4
jne 0x40aefe
mov ebx, str.ERROR
jmp 0x40af0d
mov ebx, str.FATAL
cmp eax, 5
je 0x40af0d
mov ebx, str.TRACE
cmp dword [edi + 0x2c], 0
mov dword [ebp - 0x10], 0x42fe8c
jne 0x40af21
mov dword [ebp - 0x10], 0x42f5dc
cmp dword [edi + 0x28], 0
mov edx, 0x42fe8c
jne 0x40af31
mov edx, 0x42f5dc
cmp dword [ebp + 0x50], 8
mov ecx, dword [ebp + 0x3c]
jae 0x40af3d
lea ecx, [ebp + 0x3c]
cmp dword [ebp + 0x18], 8
mov eax, dword [ebp + 4]
jae 0x40af49
lea eax, [ebp + 4]
push dword [edi + 0xe4]
push dword [edi + 0xe0]
push dword [edi + 0xdc]
push dword [ebp - 0x18]
push ecx
push eax
push ebx
push dword [ebp - 0x10]
push edx
push esi
push str.TSLog_Config_File_:__s_:__r_n00000000_t00:00:00.000_t_0000___Output__r_n00000000_t00:00:00.000_t_0000__DebugView_s_r_n00000000_t00:00:00.000_t_0000__FileLog_s_r_n00000000_t00:00:00.000_t_0000___Common__r_n00000000_t00:00:00.000_t_0000__Level_s_r_n00000000_t00:00:00.000_t_0000__Include_s_r_n00000000_t00:00:00.000_t_0000__Exclude_s_r_n00000000_t00:00:00.000_t_0000___FileLogOption__r_n00000000_t00:00:00.000_t_0000__LogFilePath_s_r_n00000000_t00:00:00.000_t_0000__MaxLogFileSize_d_r_n00000000_t00:00:00.000_t_0000__MaxLogFileCnt_d_r_n00000000_t00:00:00.000_t_0000__MaxCountOfHistroyProcess_d_r_n
push edi
call fcn.0040b9cd
add esp, 0x30
mov ecx, edi
call fcn.0040a2c5
xor ebx, ebx
mov byte [ebp - 4], 2
xor esi, esi
push ebx
inc esi
push esi
lea ecx, [ebp + 0x1c]
call fcn.00404665
mov byte [ebp - 4], 1
push ebx
push esi
lea ecx, [ebp + 0x54]
call fcn.0040461a
mov byte [ebp - 4], 0
push ebx
push esi
lea ecx, [ebp + 0x38]
call fcn.00404665
or dword [ebp - 4], 0xffffffff
push ebx
push esi
lea ecx, [ebp]
call fcn.00404665
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x1070]
xor ecx, ebp
call fcn.00413e96
add ebp, 0x1074
leave
ret 4