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

Disassembly:
push ebp
lea ebp, [esp - 0x1074]
mov eax, 0x1074
call fcn.00421b90
push 0xffffffffffffffff
push 0x439355
mov eax, dword fs:[0]
push eax
sub esp, 0x5c
mov eax, dword [0x44d948]
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.00422615
pop ecx
pop ecx
test eax, eax
je 0x40a6fa
lea eax, [ebp - 0x68]
push eax
mov ebx, str.C:TSLOG_CONFIGTSLOG.txt
push ebx
call fcn.00422615
pop ecx
pop ecx
test eax, eax
je 0x40a6f2
lea eax, [ebp - 0x68]
push eax
push esi
call fcn.00422615
pop ecx
pop ecx
test eax, eax
je 0x40a6e5
lea eax, [ebp - 0x68]
push eax
push ebx
call fcn.00422615
pop ecx
pop ecx
test eax, eax
je 0x40a6dd
push 0
mov ecx, edi
call fcn.004082b1
xor eax, eax
jmp 0x40aee5
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 0x40a6fc
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 0x40a754
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 0x40a754
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.00420810
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.00420d30
add esp, 0xc
push esi
push 0x800
lea eax, [ebp + 0x70]
push eax
mov ebx, 0x43edfc
push ebx
push 0x43ede8
push str.Output
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea eax, [ebp + 0x70]
push ebx
push eax
call fcn.00422481
pop ecx
pop ecx
test eax, eax
je 0x40a7de
lea eax, [ebp + 0x70]
push 0x43ede4
push eax
call fcn.00422481
pop ecx
pop ecx
test eax, eax
je 0x40a7de
lea eax, [ebp + 0x70]
push 0x43e54c
push eax
call fcn.00422481
pop ecx
pop ecx
test eax, eax
je 0x40a7d8
lea eax, [ebp + 0x70]
push 0x43ede0
push eax
call fcn.00422481
pop ecx
pop ecx
test eax, eax
jne 0x40a7e5
and dword [edi + 0x28], 0
jmp 0x40a7e5
mov dword [edi + 0x28], 1
cmp dword [ebp - 0x14], 0
je 0x40a80a
cmp dword [edi + 0x28], 0
mov eax, ebx
jne 0x40a7f8
mov eax, 0x43e54c
push esi
push eax
push 0x43ede8
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.00422481
pop ecx
pop ecx
test eax, eax
je 0x40a877
lea eax, [ebp + 0x70]
push 0x43ede4
push eax
call fcn.00422481
pop ecx
pop ecx
test eax, eax
je 0x40a877
lea eax, [ebp + 0x70]
push 0x43e54c
push eax
call fcn.00422481
pop ecx
pop ecx
test eax, eax
je 0x40a871
lea eax, [ebp + 0x70]
push 0x43ede0
push eax
call fcn.00422481
pop ecx
pop ecx
test eax, eax
jne 0x40a87e
and dword [edi + 0x2c], 0
jmp 0x40a87e
mov dword [edi + 0x2c], 1
cmp dword [ebp - 0x14], 0
je 0x40a8a1
cmp dword [edi + 0x2c], 0
jne 0x40a88f
mov ebx, 0x43e54c
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.00422481
pop ecx
pop ecx
test eax, eax
jne 0x40a8dd
and dword [edi + 0x30], eax
jmp 0x40a96c
lea eax, [ebp + 0x70]
push str.DEBUG
push eax
call fcn.00422481
pop ecx
pop ecx
test eax, eax
jne 0x40a8fa
mov dword [edi + 0x30], 1
jmp 0x40a96c
lea eax, [ebp + 0x70]
push str.INFO
push eax
call fcn.00422481
pop ecx
pop ecx
test eax, eax
jne 0x40a917
mov dword [edi + 0x30], 2
jmp 0x40a96c
lea eax, [ebp + 0x70]
push str.WARN
push eax
call fcn.00422481
pop ecx
pop ecx
test eax, eax
jne 0x40a934
mov dword [edi + 0x30], 3
jmp 0x40a96c
lea eax, [ebp + 0x70]
push str.ERROR
push eax
call fcn.00422481
pop ecx
pop ecx
test eax, eax
jne 0x40a951
mov dword [edi + 0x30], 4
jmp 0x40a96c
lea eax, [ebp + 0x70]
push str.FATAL
push eax
call fcn.00422481
pop ecx
pop ecx
test eax, eax
jne 0x40a96c
mov dword [edi + 0x30], 5
cmp dword [ebp - 0x14], 0
je 0x40a9c6
mov eax, dword [edi + 0x30]
test eax, eax
je 0x40a9b3
cmp eax, 1
jne 0x40a985
mov eax, str.DEBUG
jmp 0x40a9b8
cmp eax, 2
jne 0x40a991
mov eax, str.INFO
jmp 0x40a9b8
cmp eax, 3
jne 0x40a99d
mov eax, str.WARN
jmp 0x40a9b8
cmp eax, 4
jne 0x40a9a9
mov eax, str.ERROR
jmp 0x40a9b8
cmp eax, 5
mov eax, str.FATAL
je 0x40a9b8
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.0040422c
and dword [ebp - 4], 0
push 0
lea ecx, [ebp + 0x38]
mov dword [ebp + 0x50], 7
call fcn.0040422c
mov byte [ebp - 4], 1
lea ecx, [edi + 0x34]
call fcn.0040164b
push esi
push 0x800
lea eax, [ebp + 0x70]
push eax
push 0x43e51c
push str.Include
push ebx
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea eax, [ebp + 0x70]
push eax
lea ecx, [ebp]
call fcn.00405f18
push 0x43ed64
lea eax, [ebp + 0x70]
push eax
jmp 0x40aa4f
push 0x43e51c
push dword [ebp - 0x10]
call fcn.00422481
pop ecx
pop ecx
lea ecx, [edi + 0x34]
test eax, eax
je 0x40aa5f
push dword [ebp - 0x10]
call fcn.004080a0
push 0x43ed64
push 0
call fcn.004222c5
pop ecx
mov dword [ebp - 0x10], eax
pop ecx
test eax, eax
jne 0x40aa2a
jmp 0x40aa87
call fcn.0040164b
push dword [ebp - 0x10]
lea ecx, [edi + 0x34]
call fcn.004080a0
cmp dword [ebp - 0x14], 0
je 0x40aa87
push esi
push 0x43e51c
push str.Include
push ebx
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
lea ecx, [edi + 0x88]
call fcn.0040164b
push esi
push 0x800
lea eax, [ebp + 0x70]
push eax
push 0x43e49c
push 0x43ed54
push ebx
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea eax, [ebp + 0x70]
push eax
lea ecx, [ebp + 0x38]
call fcn.00405f18
lea eax, [ebp + 0x70]
push 0x43ed50
push eax
call fcn.004222c5
pop ecx
pop ecx
mov dword [ebp - 0x10], eax
test eax, eax
jne 0x40aae9
cmp dword [ebp - 0x14], eax
je 0x40ab30
push esi
push 0x43e49c
push 0x43ed54
push ebx
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
jmp 0x40ab30
mov ebx, dword [ebp - 0x10]
push 0x43e51c
push ebx
call fcn.00422481
pop ecx
pop ecx
lea ecx, [edi + 0x88]
test eax, eax
je 0x40ab1f
push ebx
call fcn.004080a0
push 0x43ed64
push 0
call fcn.004222c5
mov ebx, eax
pop ecx
pop ecx
test ebx, ebx
jne 0x40aaec
jmp 0x40ab30
call fcn.0040164b
push ebx
lea ecx, [edi + 0x88]
call fcn.004080a0
push 0
lea ecx, [ebp + 0x54]
mov dword [ebp + 0x6c], 0xf
call fcn.00404432
mov byte [ebp - 4], 2
push esi
lea ecx, [ebp - 0x38]
call fcn.004062e4
mov byte [ebp - 4], 3
lea eax, [ebp + 0x54]
push eax
lea eax, [ebp - 0x38]
push eax
call fcn.00406df1
pop ecx
pop ecx
mov byte [ebp - 4], 2
push 0
push 1
lea ecx, [ebp - 0x38]
call fcn.004048ea
cmp dword [ebp + 0x6c], 0x10
mov ebx, dword [ebp + 0x58]
jae 0x40ab7d
lea ebx, [ebp + 0x58]
push 0
lea ecx, [ebp + 0x1c]
mov dword [ebp - 0x10], ebx
mov dword [ebp + 0x34], 7
call fcn.0040422c
mov byte [ebp - 4], 4
lea eax, [edi + 0xf8]
push eax
lea ecx, [ebp - 0x38]
call fcn.004062a1
mov byte [ebp - 4], 5
lea eax, [ebp + 0x1c]
push eax
lea eax, [ebp - 0x38]
push eax
call fcn.00406ed6
pop ecx
pop ecx
mov byte [ebp - 4], 4
push 0
push 1
lea ecx, [ebp - 0x38]
call fcn.0040489f
cmp dword [ebp + 0x34], 8
mov eax, dword [ebp + 0x20]
jae 0x40abd3
lea eax, [ebp + 0x20]
mov dword [ebp - 0x18], eax
xor eax, eax
cmp dword [edi + 0x2c], eax
je 0x40adc6
cmp dword [ebp - 0x1c], eax
je 0x40abf2
cmp dword [edi + 0x23c], eax
jne 0x40ac8f
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.00420810
pop ecx
test eax, eax
je 0x40ac37
lea eax, [edi + 0xf8]
push eax
call fcn.00420810
pop ecx
cmp eax, ebx
jb 0x40ac4c
push ebx
lea eax, [edi + 0xf8]
push str.C:TSLOG_
push eax
call fcn.00421ef0
add esp, 0xc
lea eax, [edi + 0xf8]
push eax
call fcn.00420810
cmp byte [eax + edi + 0xf7], 0x5c
pop ecx
je 0x40ac78
push ebx
lea eax, [edi + 0xf8]
push 0x43ed30
push eax
call fcn.00422190
add esp, 0xc
or dword [0x44efd0], 0xffffffff
cmp dword [ebp + 0x107c], 0
jne 0x40ac8f
mov ecx, edi
call fcn.00406fdb
push esi
push 0x5000
push str.MaxLogFileSize
mov ebx, 0x43ecf4
push ebx
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
mov dword [edi + 0xdc], eax
cmp eax, 1
jb 0x40acb8
cmp eax, 0x1f4000
jbe 0x40acd4
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 0x40acf5
cmp eax, 0x3e8
jle 0x40ad11
push esi
push 0x43ecc4
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 0x40ad30
cmp eax, 0x64
jle 0x40ad4c
push esi
push 0x43ec88
push str.MaxCountOfHistroyProcess
push ebx
mov dword [edi + 0xe4], 0xa
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
cmp dword [ebp - 0x14], 0
je 0x40ade4
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 0x40ad8e
push esi
push str.20480
push str.MaxLogFileSize
push ebx
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
cmp dword [edi + 0xe0], 0x14
jne 0x40ada9
push esi
push 0x43ecc4
push str.MaxLogFileCnt
push ebx
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
cmp dword [edi + 0xe4], 0xa
jne 0x40ade4
push esi
push 0x43ec88
push str.MaxCountOfHistroyProcess
push ebx
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
jmp 0x40ade4
lea ebx, [edi + 0xe8]
mov eax, dword [ebx]
cmp eax, 0xffffffff
je 0x40ade4
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 0x40aea8
mov eax, dword [edi + 0x30]
cmp eax, ebx
je 0x40ae33
cmp eax, 1
jne 0x40ae05
mov ebx, str.DEBUG
jmp 0x40ae38
cmp eax, 2
jne 0x40ae11
mov ebx, str.INFO
jmp 0x40ae38
cmp eax, 3
jne 0x40ae1d
mov ebx, str.WARN
jmp 0x40ae38
cmp eax, 4
jne 0x40ae29
mov ebx, str.ERROR
jmp 0x40ae38
mov ebx, str.FATAL
cmp eax, 5
je 0x40ae38
mov ebx, str.TRACE
cmp dword [edi + 0x2c], 0
mov dword [ebp - 0x10], 0x43edfc
jne 0x40ae4c
mov dword [ebp - 0x10], 0x43e54c
cmp dword [edi + 0x28], 0
mov edx, 0x43edfc
jne 0x40ae5c
mov edx, 0x43e54c
cmp dword [ebp + 0x50], 8
mov ecx, dword [ebp + 0x3c]
jae 0x40ae68
lea ecx, [ebp + 0x3c]
cmp dword [ebp + 0x18], 8
mov eax, dword [ebp + 4]
jae 0x40ae74
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.0040b8ff
add esp, 0x30
mov ecx, edi
call fcn.0040a1f0
xor ebx, ebx
mov byte [ebp - 4], 2
xor esi, esi
push ebx
inc esi
push esi
lea ecx, [ebp + 0x1c]
call fcn.004048ea
mov byte [ebp - 4], 1
push ebx
push esi
lea ecx, [ebp + 0x54]
call fcn.0040489f
mov byte [ebp - 4], 0
push ebx
push esi
lea ecx, [ebp + 0x38]
call fcn.004048ea
or dword [ebp - 4], 0xffffffff
push ebx
push esi
lea ecx, [ebp]
call fcn.004048ea
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.0041effe
add ebp, 0x1074
leave
ret 4