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

Disassembly:
mov eax, 0x422af7
call fcn.00414798
mov eax, 0x10c4
call fcn.00414900
mov eax, dword [0x431d24]
push ebx
xor eax, ebp
push esi
mov dword [ebp - 0x10], eax
push edi
lea eax, [ebp - 0x10d0]
push eax
mov esi, str.C:TSLOG_CONFIGTSLOG.ini
push esi
mov ebx, ecx
call fcn.00415205
pop ecx
xor edi, edi
test eax, eax
pop ecx
je 0x409e20
lea eax, [ebp - 0x10d0]
push eax
push str.C:TSLOG_CONFIGTSLOG.txt
call fcn.00415205
test eax, eax
pop ecx
pop ecx
je 0x409e14
lea eax, [ebp - 0x10d0]
push eax
push esi
call fcn.00415205
test eax, eax
pop ecx
pop ecx
je 0x409e09
lea eax, [ebp - 0x10d0]
push eax
push str.C:TSLOG_CONFIGTSLOG.txt
call fcn.00415205
test eax, eax
pop ecx
pop ecx
je 0x409dfd
push edi
mov ecx, ebx
call fcn.00408280
xor eax, eax
jmp 0x40a70c
push esi
push str.C:TSLOG_CONFIGTSLOG.txt
call dword [sym.imp.KERNEL32.dll_MoveFileW]
push edi
push esi
push esi
call dword [sym.imp.KERNEL32.dll_CopyFileW]
jmp 0x409e20
push esi
push str.C:TSLOG_CONFIGTSLOG.txt
call dword [sym.imp.KERNEL32.dll_MoveFileW]
cmp dword [ebp - 0x10bc], edi
mov eax, dword [ebx + 0x2c]
mov dword [ebp - 0x1088], edi
mov dword [ebp - 0x1090], eax
jne 0x409e93
push edi
push edi
push 4
push edi
push 1
push 0x40000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [ebp - 0x1084], eax
je 0x409e93
push edi
lea eax, [ebp - 0x108c]
mov dword [ebp - 0x108c], edi
push eax
mov edi, str.__Output__r_n_DebugView__________________ON______ON
push edi
call fcn.00413a00
pop ecx
push eax
push edi
push dword [ebp - 0x1084]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push dword [ebp - 0x1084]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x1088], 1
and word [ebp - 0x1010], 0
xor eax, eax
mov ecx, 0x3ff
lea edi, [ebp - 0x100e]
rep stosd dword es:[edi], eax
push esi
push 0x800
stosw word es:[edi], ax
lea eax, [ebp - 0x1010]
push eax
push 0x426f1c
push 0x426f08
mov edi, 0x426644
push edi
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea eax, [ebp - 0x1010]
push 0x426f1c
push eax
call fcn.0041500a
test eax, eax
pop ecx
pop ecx
je 0x409f31
lea eax, [ebp - 0x1010]
push 0x426f04
push eax
call fcn.0041500a
test eax, eax
pop ecx
pop ecx
je 0x409f31
lea eax, [ebp - 0x1010]
push 0x426664
push eax
call fcn.0041500a
test eax, eax
pop ecx
pop ecx
je 0x409f2b
lea eax, [ebp - 0x1010]
push 0x426f00
push eax
call fcn.0041500a
test eax, eax
pop ecx
pop ecx
jne 0x409f38
and dword [ebx + 0x28], 0
jmp 0x409f38
mov dword [ebx + 0x28], 1
cmp dword [ebp - 0x1088], 0
je 0x409f5f
cmp dword [ebx + 0x28], 0
mov eax, 0x426f1c
jne 0x409f51
mov eax, 0x426664
push esi
push eax
push 0x426f08
push edi
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
push esi
push 0x800
lea eax, [ebp - 0x1010]
push eax
push 0x426f1c
push str.FileLog
push edi
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea eax, [ebp - 0x1010]
push 0x426f1c
push eax
call fcn.0041500a
test eax, eax
pop ecx
pop ecx
je 0x409fdf
lea eax, [ebp - 0x1010]
push 0x426f04
push eax
call fcn.0041500a
test eax, eax
pop ecx
pop ecx
je 0x409fdf
lea eax, [ebp - 0x1010]
push 0x426664
push eax
call fcn.0041500a
test eax, eax
pop ecx
pop ecx
je 0x409fd9
lea eax, [ebp - 0x1010]
push 0x426f00
push eax
call fcn.0041500a
test eax, eax
pop ecx
pop ecx
jne 0x409fe6
and dword [ebx + 0x2c], 0
jmp 0x409fe6
mov dword [ebx + 0x2c], 1
cmp dword [ebp - 0x1088], 0
je 0x40a00d
cmp dword [ebx + 0x2c], 0
mov eax, 0x426f1c
jne 0x409fff
mov eax, 0x426664
push esi
push eax
push str.FileLog
push edi
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
push esi
push 0x800
lea eax, [ebp - 0x1010]
push eax
push str.TRACE
push str.Level
mov edi, str.Common
push edi
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea eax, [ebp - 0x1010]
push str.TRACE
push eax
call fcn.0041500a
test eax, eax
pop ecx
pop ecx
jne 0x40a04f
and dword [ebx + 0x30], eax
jmp 0x40a0ed
lea eax, [ebp - 0x1010]
push str.DEBUG
push eax
call fcn.0041500a
test eax, eax
pop ecx
pop ecx
jne 0x40a06f
mov dword [ebx + 0x30], 1
jmp 0x40a0ed
lea eax, [ebp - 0x1010]
push str.INFO
push eax
call fcn.0041500a
test eax, eax
pop ecx
pop ecx
jne 0x40a08f
mov dword [ebx + 0x30], 2
jmp 0x40a0ed
lea eax, [ebp - 0x1010]
push str.WARN
push eax
call fcn.0041500a
test eax, eax
pop ecx
pop ecx
jne 0x40a0af
mov dword [ebx + 0x30], 3
jmp 0x40a0ed
lea eax, [ebp - 0x1010]
push str.ERROR
push eax
call fcn.0041500a
test eax, eax
pop ecx
pop ecx
jne 0x40a0cf
mov dword [ebx + 0x30], 4
jmp 0x40a0ed
lea eax, [ebp - 0x1010]
push str.FATAL
push eax
call fcn.0041500a
test eax, eax
pop ecx
pop ecx
jne 0x40a0ed
mov dword [ebx + 0x30], 5
cmp dword [ebp - 0x1088], 0
je 0x40a14a
mov eax, dword [ebx + 0x30]
test eax, eax
je 0x40a137
cmp eax, 1
jne 0x40a109
mov eax, str.DEBUG
jmp 0x40a13c
cmp eax, 2
jne 0x40a115
mov eax, str.INFO
jmp 0x40a13c
cmp eax, 3
jne 0x40a121
mov eax, str.WARN
jmp 0x40a13c
cmp eax, 4
jne 0x40a12d
mov eax, str.ERROR
jmp 0x40a13c
cmp eax, 5
mov eax, str.FATAL
je 0x40a13c
mov eax, str.TRACE
push esi
push eax
push str.Level
push edi
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
push 0
lea ecx, [ebp - 0x1080]
mov dword [ebp - 0x1068], 7
call fcn.0040352e
and dword [ebp - 4], 0
push 0
lea ecx, [ebp - 0x1048]
mov dword [ebp - 0x1030], 7
call fcn.0040352e
mov byte [ebp - 4], 1
lea ecx, [ebx + 0x34]
call fcn.004014c6
push esi
push 0x800
lea eax, [ebp - 0x1010]
push eax
push 0x426640
push str.Include
push edi
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea eax, [ebp - 0x1010]
push eax
lea ecx, [ebp - 0x1080]
call fcn.0040587c
push 0x426e84
lea eax, [ebp - 0x1010]
push eax
jmp 0x40a1f1
push 0x426640
push dword [ebp - 0x1084]
call fcn.0041500a
test eax, eax
pop ecx
pop ecx
lea ecx, [ebx + 0x34]
je 0x40a204
push dword [ebp - 0x1084]
call fcn.00408010
push 0x426e84
push 0
call fcn.00414f65
test eax, eax
pop ecx
pop ecx
mov dword [ebp - 0x1084], eax
jne 0x40a1c6
jmp 0x40a232
call fcn.004014c6
push dword [ebp - 0x1084]
lea ecx, [ebx + 0x34]
call fcn.00408010
cmp dword [ebp - 0x1088], 0
je 0x40a232
push esi
push 0x426640
push str.Include
push edi
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
lea ecx, [ebx + 0x88]
call fcn.004014c6
push esi
push 0x800
lea eax, [ebp - 0x1010]
push eax
push 0x4263b4
push 0x426e74
push edi
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea eax, [ebp - 0x1010]
push eax
lea ecx, [ebp - 0x1048]
call fcn.0040587c
lea eax, [ebp - 0x1010]
push 0x426e70
push eax
call fcn.00414f65
test eax, eax
pop ecx
pop ecx
mov dword [ebp - 0x1084], eax
jne 0x40a2a6
cmp dword [ebp - 0x1088], eax
je 0x40a2f0
push esi
push 0x4263b4
push 0x426e74
push edi
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
jmp 0x40a2f0
mov edi, dword [ebp - 0x1084]
push 0x426640
push edi
call fcn.0041500a
test eax, eax
pop ecx
pop ecx
lea ecx, [ebx + 0x88]
je 0x40a2df
push edi
call fcn.00408010
push 0x426e84
push 0
call fcn.00414f65
mov edi, eax
test edi, edi
pop ecx
pop ecx
jne 0x40a2ac
jmp 0x40a2f0
call fcn.004014c6
push edi
lea ecx, [ebx + 0x88]
call fcn.00408010
push 0
lea ecx, [ebp - 0x102c]
mov dword [ebp - 0x1014], 0xf
call fcn.00403cf9
mov byte [ebp - 4], 2
push esi
lea ecx, [ebp - 0x10ac]
call fcn.00405af3
mov byte [ebp - 4], 3
lea eax, [ebp - 0x102c]
push eax
lea eax, [ebp - 0x10ac]
push eax
call fcn.00406711
pop ecx
pop ecx
mov byte [ebp - 4], 2
push 0
push 1
lea ecx, [ebp - 0x10ac]
call fcn.00403c42
cmp dword [ebp - 0x1014], 0x10
mov edi, dword [ebp - 0x1028]
jae 0x40a358
lea edi, [ebp - 0x1028]
push 0
lea ecx, [ebp - 0x1064]
mov dword [ebp - 0x1084], edi
mov dword [ebp - 0x104c], 7
call fcn.0040352e
mov byte [ebp - 4], 4
lea eax, [ebx + 0xf8]
push eax
lea ecx, [ebp - 0x10ac]
call fcn.00405ab0
mov byte [ebp - 4], 5
lea eax, [ebp - 0x1064]
push eax
lea eax, [ebp - 0x10ac]
push eax
call fcn.004067f5
pop ecx
pop ecx
mov byte [ebp - 4], 4
push 0
push 1
lea ecx, [ebp - 0x10ac]
call fcn.004042af
cmp dword [ebp - 0x104c], 8
mov eax, dword [ebp - 0x1060]
jae 0x40a3cc
lea eax, [ebp - 0x1060]
mov dword [ebp - 0x108c], eax
xor eax, eax
cmp dword [ebx + 0x2c], eax
je 0x40a5c8
cmp dword [ebp - 0x1090], eax
je 0x40a3f1
cmp dword [ebx + 0x23c], eax
jne 0x40a48b
push edi
mov edi, 0x104
push edi
lea eax, [ebx + 0xf8]
push eax
push str.C:TSLOG_
push str.LogFilePath
push str.FileLogOption
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
lea eax, [ebx + 0xf8]
push eax
call fcn.00413a00
test eax, eax
pop ecx
je 0x40a436
lea eax, [ebx + 0xf8]
push eax
call fcn.00413a00
cmp eax, edi
pop ecx
jb 0x40a44b
push edi
lea eax, [ebx + 0xf8]
push str.C:TSLOG_
push eax
call fcn.00414bf0
add esp, 0xc
lea eax, [ebx + 0xf8]
push eax
call fcn.00413a00
cmp byte [eax + ebx + 0xf7], 0x5c
pop ecx
je 0x40a477
push edi
lea eax, [ebx + 0xf8]
push 0x426e50
push eax
call fcn.00414e30
add esp, 0xc
or dword [0x432ecc], 0xffffffff
cmp dword [ebp + 8], 0
jne 0x40a48b
mov ecx, ebx
call fcn.004068f6
push esi
push 0x5000
push str.MaxLogFileSize
mov edi, 0x426e14
push edi
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
cmp eax, 1
mov dword [ebx + 0xdc], eax
jb 0x40a4b4
cmp eax, 0x1f4000
jbe 0x40a4d0
push esi
push str.20480
push str.MaxLogFileSize
push edi
mov dword [ebx + 0xdc], 0x5000
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
push esi
push 0x14
push str.MaxLogFileCnt
push edi
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
cmp eax, 1
mov dword [ebx + 0xe0], eax
jl 0x40a4f1
cmp eax, 0x3e8
jle 0x40a50d
push esi
push 0x426de4
push str.MaxLogFileCnt
push edi
mov dword [ebx + 0xe0], 0x14
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
push esi
push 0xa
push str.MaxCountOfHistroyProcess
push edi
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
cmp eax, 0xffffffff
mov dword [ebx + 0xe4], eax
jl 0x40a52c
cmp eax, 0x64
jle 0x40a548
push esi
push 0x426da8
push str.MaxCountOfHistroyProcess
push edi
mov dword [ebx + 0xe4], 0xa
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
cmp dword [ebp - 0x1088], 0
je 0x40a5e6
push dword [ebp - 0x1084]
lea eax, [ebx + 0xf8]
push eax
push str.LogFilePath
push str.FileLogOption
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
cmp dword [ebx + 0xdc], 0x5000
jne 0x40a590
push esi
push str.20480
push str.MaxLogFileSize
push edi
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
cmp dword [ebx + 0xe0], 0x14
jne 0x40a5ab
push esi
push 0x426de4
push str.MaxLogFileCnt
push edi
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
cmp dword [ebx + 0xe4], 0xa
jne 0x40a5e6
push esi
push 0x426da8
push str.MaxCountOfHistroyProcess
push edi
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
jmp 0x40a5e6
lea edi, [ebx + 0xe8]
mov eax, dword [edi]
cmp eax, 0xffffffff
je 0x40a5e6
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or dword [edi], 0xffffffff
and dword [ebx + 0xf4], 0
xor ecx, ecx
cmp dword [ebp + 8], ecx
jne 0x40a6c1
mov eax, dword [ebx + 0x30]
cmp eax, ecx
je 0x40a632
cmp eax, 1
jne 0x40a604
mov edi, str.DEBUG
jmp 0x40a637
cmp eax, 2
jne 0x40a610
mov edi, str.INFO
jmp 0x40a637
cmp eax, 3
jne 0x40a61c
mov edi, str.WARN
jmp 0x40a637
cmp eax, 4
jne 0x40a628
mov edi, str.ERROR
jmp 0x40a637
cmp eax, 5
mov edi, str.FATAL
je 0x40a637
mov edi, str.TRACE
cmp dword [ebx + 0x2c], ecx
mov dword [ebp - 0x1084], 0x426f1c
jne 0x40a650
mov dword [ebp - 0x1084], 0x426664
cmp dword [ebx + 0x28], ecx
mov edx, 0x426f1c
jne 0x40a65f
mov edx, 0x426664
cmp dword [ebp - 0x1030], 8
mov ecx, dword [ebp - 0x1044]
jae 0x40a674
lea ecx, [ebp - 0x1044]
cmp dword [ebp - 0x1068], 8
mov eax, dword [ebp - 0x107c]
jae 0x40a689
lea eax, [ebp - 0x107c]
push dword [ebx + 0xe4]
push dword [ebx + 0xe0]
push dword [ebx + 0xdc]
push dword [ebp - 0x108c]
push ecx
push eax
push edi
push dword [ebp - 0x1084]
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 ebx
call fcn.0040b177
add esp, 0x30
mov ecx, ebx
call fcn.00409967
mov byte [ebp - 4], 2
xor edi, edi
xor esi, esi
push edi
inc esi
push esi
lea ecx, [ebp - 0x1064]
call fcn.00403c42
mov byte [ebp - 4], 1
push edi
push esi
lea ecx, [ebp - 0x102c]
call fcn.004042af
mov byte [ebp - 4], 0
push edi
push esi
lea ecx, [ebp - 0x1048]
call fcn.00403c42
or dword [ebp - 4], 0xffffffff
push edi
push esi
lea ecx, [ebp - 0x1080]
call fcn.00403c42
mov eax, esi
mov ecx, dword [ebp - 0xc]
pop edi
mov dword fs:[0], ecx
mov ecx, dword [ebp - 0x10]
pop esi
xor ecx, ebp
pop ebx
call fcn.00413d8f
leave
ret 4