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

Disassembly:
push 0xffffffffffffffff
push 0x41b367
mov eax, dword fs:[0]
push eax
mov eax, 0x10d0
call fcn.004128e0
mov eax, dword [0x4313f4]
xor eax, esp
mov dword [esp + 0x10cc], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4313f4]
xor eax, esp
push eax
lea eax, [esp + 0x10e4]
mov dword fs:[0], eax
mov ebx, dword [sym.imp.MSVCR90.dll__wstat64i32]
lea eax, [esp + 0x40]
push eax
mov esi, str.C:TSLOG_CONFIGTSLOG.ini
push esi
mov edi, ecx
call ebx
pop ecx
pop ecx
test eax, eax
je 0x405f38
lea eax, [esp + 0x40]
push eax
mov ebp, str.C:TSLOG_CONFIGTSLOG.txt
push ebp
call ebx
pop ecx
pop ecx
test eax, eax
je 0x405f30
lea eax, [esp + 0x40]
push eax
push esi
call ebx
pop ecx
pop ecx
test eax, eax
je 0x405f23
lea eax, [esp + 0x40]
push eax
push ebp
call ebx
pop ecx
pop ecx
test eax, eax
je 0x405f1b
push 0
mov ecx, edi
call fcn.00402f71
xor eax, eax
jmp 0x406782
push esi
push ebp
call dword [sym.imp.KERNEL32.dll_MoveFileW]
xor ebp, ebp
push ebp
push esi
push esi
call dword [sym.imp.KERNEL32.dll_CopyFileW]
jmp 0x405f3a
push esi
push ebp
call dword [sym.imp.KERNEL32.dll_MoveFileW]
xor ebp, ebp
mov eax, dword [edi + 0x2c]
mov dword [esp + 0x18], ebp
mov dword [esp + 0x1c], eax
cmp dword [esp + 0x54], ebp
jne 0x405f93
push ebp
push ebp
push 4
push ebp
push 1
push 0x40000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x405f93
push ebp
lea eax, [esp + 0x18]
mov dword [esp + 0x18], ebp
push eax
mov ebp, str.__Output__r_n_DebugView__________________ON______ON
push ebp
call sub.MSVCR90.dll_strlen
pop ecx
push eax
push ebp
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esp + 0x18], 1
xor eax, eax
push 0xffe
push eax
mov word [esp + 0xe8], ax
lea eax, [esp + 0xea]
push eax
call sub.MSVCR90.dll_memset
add esp, 0xc
push esi
push 0x800
lea eax, [esp + 0xe8]
push eax
mov ebp, 0x41f570
push ebp
push 0x41f55c
push str.Output
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
mov ebx, dword [sym.imp.MSVCR90.dll__wcsicmp]
lea eax, [esp + 0xe0]
push ebp
push eax
call ebx
pop ecx
pop ecx
test eax, eax
je 0x406033
lea eax, [esp + 0xe0]
push 0x41f558
push eax
call ebx
pop ecx
pop ecx
test eax, eax
je 0x406033
lea eax, [esp + 0xe0]
push 0x41ed54
push eax
call ebx
pop ecx
pop ecx
test eax, eax
je 0x40602d
lea eax, [esp + 0xe0]
push 0x41f554
push eax
call ebx
pop ecx
pop ecx
test eax, eax
jne 0x40603a
and dword [edi + 0x28], 0
jmp 0x40603a
mov dword [edi + 0x28], 1
cmp dword [esp + 0x18], 0
je 0x406060
cmp dword [edi + 0x28], 0
mov eax, ebp
jne 0x40604e
mov eax, 0x41ed54
push esi
push eax
push 0x41f55c
push str.Output
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
push esi
push 0x800
lea eax, [esp + 0xe8]
push eax
push ebp
push str.FileLog
push str.Output
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea eax, [esp + 0xe0]
push ebp
push eax
call ebx
pop ecx
pop ecx
test eax, eax
je 0x4060d5
lea eax, [esp + 0xe0]
push 0x41f558
push eax
call ebx
pop ecx
pop ecx
test eax, eax
je 0x4060d5
lea eax, [esp + 0xe0]
push 0x41ed54
push eax
call ebx
pop ecx
pop ecx
test eax, eax
je 0x4060cf
lea eax, [esp + 0xe0]
push 0x41f554
push eax
call ebx
pop ecx
pop ecx
test eax, eax
jne 0x4060dc
and dword [edi + 0x2c], 0
jmp 0x4060dc
mov dword [edi + 0x2c], 1
cmp dword [esp + 0x18], 0
je 0x406100
cmp dword [edi + 0x2c], 0
jne 0x4060ee
mov ebp, 0x41ed54
push esi
push ebp
push str.FileLog
push str.Output
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
push esi
push 0x800
lea eax, [esp + 0xe8]
push eax
push str.TRACE
push str.Level
mov ebp, str.Common
push ebp
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea eax, [esp + 0xe0]
push str.TRACE
push eax
call ebx
pop ecx
pop ecx
test eax, eax
jne 0x406141
and dword [edi + 0x30], eax
jmp 0x4061d5
lea eax, [esp + 0xe0]
push str.DEBUG
push eax
call ebx
pop ecx
pop ecx
test eax, eax
jne 0x40615f
mov dword [edi + 0x30], 1
jmp 0x4061d5
lea eax, [esp + 0xe0]
push str.INFO
push eax
call ebx
pop ecx
pop ecx
test eax, eax
jne 0x40617d
mov dword [edi + 0x30], 2
jmp 0x4061d5
lea eax, [esp + 0xe0]
push str.WARN
push eax
call ebx
pop ecx
pop ecx
test eax, eax
jne 0x40619b
mov dword [edi + 0x30], 3
jmp 0x4061d5
lea eax, [esp + 0xe0]
push str.ERROR
push eax
call ebx
pop ecx
pop ecx
test eax, eax
jne 0x4061b9
mov dword [edi + 0x30], 4
jmp 0x4061d5
lea eax, [esp + 0xe0]
push str.FATAL
push eax
call ebx
pop ecx
pop ecx
test eax, eax
jne 0x4061d5
mov dword [edi + 0x30], 5
cmp dword [esp + 0x18], 0
je 0x406230
mov eax, dword [edi + 0x30]
test eax, eax
je 0x40621d
cmp eax, 1
jne 0x4061ef
mov eax, str.DEBUG
jmp 0x406222
cmp eax, 2
jne 0x4061fb
mov eax, str.INFO
jmp 0x406222
cmp eax, 3
jne 0x406207
mov eax, str.WARN
jmp 0x406222
cmp eax, 4
jne 0x406213
mov eax, str.ERROR
jmp 0x406222
cmp eax, 5
mov eax, str.FATAL
je 0x406222
mov eax, str.TRACE
push esi
push eax
push str.Level
push ebp
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
lea ecx, [esp + 0xc4]
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::constructor_void_]
and dword [esp + 0x10ec], 0
lea ecx, [esp + 0xa8]
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::constructor_void_]
mov byte [esp + 0x10ec], 1
lea ecx, [edi + 0x34]
call fcn.004017b9
push esi
push 0x800
lea eax, [esp + 0xe8]
push eax
push 0x41ed24
push str.Include
push ebp
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea eax, [esp + 0xe0]
push eax
lea ecx, [esp + 0xc8]
call dword [sym.imp.MSVCP90.dll_public:_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t______thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::operator_wchar_t_const__]
mov ebx, dword [sym.imp.MSVCR90.dll_wcstok]
push 0x41f4d8
lea eax, [esp + 0xe4]
push eax
jmp 0x4062d3
push 0x41ed24
push dword [esp + 0x18]
call dword [sym.imp.MSVCR90.dll__wcsicmp]
pop ecx
pop ecx
lea ecx, [edi + 0x34]
test eax, eax
je 0x4062e1
push dword [esp + 0x14]
call fcn.00402d92
push 0x41f4d8
push 0
call ebx
pop ecx
mov dword [esp + 0x18], eax
pop ecx
test eax, eax
jne 0x4062ab
jmp 0x40630b
call fcn.004017b9
push dword [esp + 0x14]
lea ecx, [edi + 0x34]
call fcn.00402d92
cmp dword [esp + 0x18], 0
je 0x40630b
push esi
push 0x41ed24
push str.Include
push ebp
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
lea ecx, [edi + 0x88]
call fcn.004017b9
push esi
push 0x800
lea eax, [esp + 0xe8]
push eax
push 0x41f4d4
push 0x41f4c4
push ebp
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea eax, [esp + 0xe0]
push eax
lea ecx, [esp + 0xac]
call dword [sym.imp.MSVCP90.dll_public:_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t______thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::operator_wchar_t_const__]
lea eax, [esp + 0xe0]
push 0x41f4c0
push eax
call ebx
pop ecx
pop ecx
mov dword [esp + 0x14], eax
test eax, eax
jne 0x40637d
cmp dword [esp + 0x18], eax
je 0x4063c7
push esi
push 0x41f4d4
push 0x41f4c4
push ebp
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
jmp 0x4063c7
mov ebp, dword [esp + 0x14]
push 0x41ed24
push ebp
call dword [sym.imp.MSVCR90.dll__wcsicmp]
pop ecx
pop ecx
test eax, eax
je 0x4063b2
push ebp
lea ecx, [edi + 0x88]
call fcn.00402d92
push 0x41f4d8
push 0
call ebx
mov ebp, eax
pop ecx
pop ecx
test ebp, ebp
jne 0x406381
jmp 0x4063c7
lea ebx, [edi + 0x88]
mov ecx, ebx
call fcn.004017b9
push ebp
mov ecx, ebx
call fcn.00402d92
lea ecx, [esp + 0x70]
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_void_]
mov byte [esp + 0x10ec], 2
push esi
lea ecx, [esp + 0x28]
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::constructor_wchar_t_const__]
mov byte [esp + 0x10ec], 3
lea eax, [esp + 0x70]
push eax
lea eax, [esp + 0x28]
push eax
call fcn.004017e2
pop ecx
pop ecx
mov byte [esp + 0x10ec], 2
lea ecx, [esp + 0x24]
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
lea ecx, [esp + 0x70]
call dword [sym.imp.MSVCP90.dll_public:_char_const____thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::c_str_void_const]
lea ecx, [esp + 0x8c]
mov dword [esp + 0x14], eax
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::constructor_void_]
mov byte [esp + 0x10ec], 4
lea ebx, [edi + 0xf8]
push ebx
lea ecx, [esp + 0x28]
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const__]
mov byte [esp + 0x10ec], 5
lea eax, [esp + 0x8c]
push eax
lea eax, [esp + 0x28]
push eax
call fcn.004070aa
pop ecx
pop ecx
mov byte [esp + 0x10ec], 4
lea ecx, [esp + 0x24]
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
lea ecx, [esp + 0x8c]
call dword [sym.imp.MSVCP90.dll_public:_wchar_t_const____thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::c_str_void_const]
xor ebp, ebp
mov dword [esp + 0x20], eax
cmp dword [edi + 0x2c], ebp
je 0x40664a
cmp dword [esp + 0x1c], ebp
je 0x40649b
cmp dword [edi + 0x23c], ebp
jne 0x40651a
push dword [esp + 0x14]
mov ebp, 0x104
push ebp
push ebx
push str.C:TSLOG_
push str.LogFilePath
push str.FileLogOption
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
push ebx
call sub.MSVCR90.dll_strlen
pop ecx
test eax, eax
je 0x4064d1
push ebx
call sub.MSVCR90.dll_strlen
pop ecx
cmp eax, ebp
jb 0x4064e1
push ebp
push str.C:TSLOG_
push ebx
call dword [sym.imp.MSVCR90.dll_strncpy]
add esp, 0xc
push ebx
call sub.MSVCR90.dll_strlen
cmp byte [eax + edi + 0xf7], 0x5c
pop ecx
je 0x406502
push ebp
push 0x41f4a0
push ebx
call dword [sym.imp.MSVCR90.dll_strncat]
add esp, 0xc
or dword [0x431804], 0xffffffff
cmp dword [esp + 0x10f4], 0
jne 0x40651a
mov ecx, edi
call fcn.004071a2
mov ebx, dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
push esi
push 0x5000
push str.MaxLogFileSize
mov ebp, 0x41f464
push ebp
call ebx
mov dword [edi + 0xdc], eax
cmp eax, 1
jb 0x406545
cmp eax, 0x1f4000
jbe 0x406561
push esi
push str.20480
push str.MaxLogFileSize
push ebp
mov dword [edi + 0xdc], 0x5000
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
push esi
push 0x14
push str.MaxLogFileCnt
push ebp
call ebx
cmp eax, 1
mov dword [edi + 0xe0], eax
jl 0x40657e
cmp eax, 0x3e8
jle 0x40659a
push esi
push 0x41f434
push str.MaxLogFileCnt
push ebp
mov dword [edi + 0xe0], 0x14
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
push esi
push 0xa
push str.MaxCountOfHistroyProcess
push ebp
call ebx
cmp eax, 0xffffffff
mov dword [edi + 0xe4], eax
mov ebx, 0x41f3f8
jl 0x4065ba
cmp eax, 0x64
jle 0x4065d2
push esi
push ebx
push str.MaxCountOfHistroyProcess
push ebp
mov dword [edi + 0xe4], 0xa
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
cmp dword [esp + 0x18], 0
je 0x406667
push dword [esp + 0x14]
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 0x406616
push esi
push str.20480
push str.MaxLogFileSize
push ebp
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
cmp dword [edi + 0xe0], 0x14
jne 0x406631
push esi
push 0x41f434
push str.MaxLogFileCnt
push ebp
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
cmp dword [edi + 0xe4], 0xa
jne 0x406667
push esi
push ebx
push str.MaxCountOfHistroyProcess
push ebp
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
jmp 0x406667
lea ebx, [edi + 0xe8]
mov eax, dword [ebx]
cmp eax, 0xffffffff
je 0x406667
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or dword [ebx], 0xffffffff
mov dword [edi + 0xf4], ebp
xor ecx, ecx
cmp dword [esp + 0x10f4], ecx
jne 0x40672e
mov eax, dword [edi + 0x30]
cmp eax, ecx
je 0x4066b7
cmp eax, 1
jne 0x406689
mov ebx, str.DEBUG
jmp 0x4066bc
cmp eax, 2
jne 0x406695
mov ebx, str.INFO
jmp 0x4066bc
cmp eax, 3
jne 0x4066a1
mov ebx, str.WARN
jmp 0x4066bc
cmp eax, 4
jne 0x4066ad
mov ebx, str.ERROR
jmp 0x4066bc
mov ebx, str.FATAL
cmp eax, 5
je 0x4066bc
mov ebx, str.TRACE
mov dword [esp + 0x14], 0x41f570
cmp dword [edi + 0x2c], ecx
jne 0x4066d1
mov dword [esp + 0x14], 0x41ed54
mov ebp, 0x41f570
cmp dword [edi + 0x28], ecx
jne 0x4066e0
mov ebp, 0x41ed54
push dword [edi + 0xe4]
lea ecx, [esp + 0xac]
push dword [edi + 0xe0]
push dword [edi + 0xdc]
push dword [esp + 0x2c]
call dword [sym.imp.MSVCP90.dll_public:_wchar_t_const____thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::c_str_void_const]
push eax
lea ecx, [esp + 0xd8]
call dword [sym.imp.MSVCP90.dll_public:_wchar_t_const____thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::c_str_void_const]
push eax
push ebx
push dword [esp + 0x30]
push ebp
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.00406d37
add esp, 0x30
mov ecx, edi
call fcn.00405a65
mov byte [esp + 0x10ec], 2
lea ecx, [esp + 0x8c]
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
mov byte [esp + 0x10ec], 1
lea ecx, [esp + 0x70]
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
mov byte [esp + 0x10ec], 0
lea ecx, [esp + 0xa8]
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
or dword [esp + 0x10ec], 0xffffffff
lea ecx, [esp + 0xc4]
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
xor eax, eax
inc eax
mov ecx, dword [esp + 0x10e4]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x10cc]
xor ecx, esp
call fcn.0041276a
add esp, 0x10dc
ret 4