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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x415e68
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, 0x10cc
call fcn.00414fb0
mov eax, dword [0x4251a4]
push ebx
xor eax, ebp
push esi
mov dword [esp + 0x10d0], eax
push edi
mov edi, dword [sym.imp.MSVCR71.dll__wstat]
lea eax, [esp + 0x3c]
push eax
push str.C:TSLOG_CONFIGTSLOG.ini
mov ebx, ecx
call edi
add esp, 8
xor esi, esi
test eax, eax
je 0x406c5f
lea ecx, [esp + 0x3c]
push ecx
push str.C:TSLOG_CONFIGTSLOG.txt
call edi
add esp, 8
test eax, eax
je 0x406c4f
lea edx, [esp + 0x3c]
push edx
push str.C:TSLOG_CONFIGTSLOG.ini
call edi
add esp, 8
test eax, eax
je 0x406c3c
lea eax, [esp + 0x3c]
push eax
push str.C:TSLOG_CONFIGTSLOG.txt
call edi
add esp, 8
test eax, eax
je 0x406c2c
push esi
mov ecx, ebx
call fcn.004033a0
xor eax, eax
jmp 0x40759d
push str.C:TSLOG_CONFIGTSLOG.ini
push str.C:TSLOG_CONFIGTSLOG.txt
call dword [sym.imp.KERNEL32.dll_MoveFileW]
push esi
push str.C:TSLOG_CONFIGTSLOG.ini
push str.C:TSLOG_CONFIGTSLOG.ini
call dword [sym.imp.KERNEL32.dll_CopyFileW]
jmp 0x406c5f
push str.C:TSLOG_CONFIGTSLOG.ini
push str.C:TSLOG_CONFIGTSLOG.txt
call dword [sym.imp.KERNEL32.dll_MoveFileW]
cmp dword [esp + 0x50], esi
mov ecx, dword [ebx + 0x2c]
mov dword [esp + 0x10], esi
mov dword [esp + 0x14], ecx
jne 0x406ccb
push esi
push esi
push 4
push esi
push 1
push 0x40000000
push str.C:TSLOG_CONFIGTSLOG.ini
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x406ccb
mov eax, str.__Output__r_n_DebugView__________________ON______ON
mov dword [esp + 0x10], esi
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x406ca0
push esi
sub eax, edx
lea edx, [esp + 0x14]
push edx
push eax
push str.__Output__r_n_DebugView__________________ON______ON
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esp + 0x10], 1
mov esi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
xor eax, eax
mov word [esp + 0xd0], 0
mov ecx, 0x3ff
lea edi, [esp + 0xd2]
rep stosd dword es:[edi], eax
push str.C:TSLOG_CONFIGTSLOG.ini
push 0x800
stosw word es:[edi], ax
lea eax, [esp + 0xd8]
push eax
push 0x419718
push 0x419704
push str.Output
call esi
mov edi, dword [sym.imp.MSVCR71.dll__wcsicmp]
lea ecx, [esp + 0xd0]
push 0x419718
push ecx
call edi
add esp, 8
test eax, eax
je 0x406d77
lea edx, [esp + 0xd0]
push 0x419700
push edx
call edi
add esp, 8
test eax, eax
je 0x406d77
lea eax, [esp + 0xd0]
push 0x418f6c
push eax
call edi
add esp, 8
test eax, eax
je 0x406d6e
lea ecx, [esp + 0xd0]
push 0x4196fc
push ecx
call edi
add esp, 8
test eax, eax
jne 0x406d7e
mov dword [ebx + 0x28], 0
jmp 0x406d7e
mov dword [ebx + 0x28], 1
mov eax, dword [esp + 0x10]
test eax, eax
je 0x406dad
mov eax, dword [ebx + 0x28]
test eax, eax
mov eax, 0x419718
jne 0x406d97
mov eax, 0x418f6c
push str.C:TSLOG_CONFIGTSLOG.ini
push eax
push 0x419704
push str.Output
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
push str.C:TSLOG_CONFIGTSLOG.ini
push 0x800
lea edx, [esp + 0xd8]
push edx
push 0x419718
push str.FileLog
push str.Output
call esi
lea eax, [esp + 0xd0]
push 0x419718
push eax
call edi
add esp, 8
test eax, eax
je 0x406e31
lea ecx, [esp + 0xd0]
push 0x419700
push ecx
call edi
add esp, 8
test eax, eax
je 0x406e31
lea edx, [esp + 0xd0]
push 0x418f6c
push edx
call edi
add esp, 8
test eax, eax
je 0x406e28
lea eax, [esp + 0xd0]
push 0x4196fc
push eax
call edi
add esp, 8
test eax, eax
jne 0x406e38
mov dword [ebx + 0x2c], 0
jmp 0x406e38
mov dword [ebx + 0x2c], 1
mov eax, dword [esp + 0x10]
test eax, eax
je 0x406e67
mov eax, dword [ebx + 0x2c]
test eax, eax
mov eax, 0x419718
jne 0x406e51
mov eax, 0x418f6c
push str.C:TSLOG_CONFIGTSLOG.ini
push eax
push str.FileLog
push str.Output
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
push str.C:TSLOG_CONFIGTSLOG.ini
push 0x800
lea ecx, [esp + 0xd8]
push ecx
push str.TRACE
push str.Level
push str.Common
call esi
lea edx, [esp + 0xd0]
push str.TRACE
push edx
call edi
add esp, 8
test eax, eax
jne 0x406ea8
mov dword [ebx + 0x30], eax
jmp 0x406f41
lea eax, [esp + 0xd0]
push str.DEBUG
push eax
call edi
add esp, 8
test eax, eax
jne 0x406ec7
mov dword [ebx + 0x30], 1
jmp 0x406f41
lea ecx, [esp + 0xd0]
push str.INFO
push ecx
call edi
add esp, 8
test eax, eax
jne 0x406ee6
mov dword [ebx + 0x30], 2
jmp 0x406f41
lea edx, [esp + 0xd0]
push str.WARN
push edx
call edi
add esp, 8
test eax, eax
jne 0x406f05
mov dword [ebx + 0x30], 3
jmp 0x406f41
lea eax, [esp + 0xd0]
push str.ERROR
push eax
call edi
add esp, 8
test eax, eax
jne 0x406f24
mov dword [ebx + 0x30], 4
jmp 0x406f41
lea ecx, [esp + 0xd0]
push str.FATAL
push ecx
call edi
add esp, 8
test eax, eax
jne 0x406f41
mov dword [ebx + 0x30], 5
mov eax, dword [esp + 0x10]
test eax, eax
je 0x406fa5
mov eax, dword [ebx + 0x30]
test eax, eax
je 0x406f8a
cmp eax, 1
jne 0x406f5c
mov eax, str.DEBUG
jmp 0x406f8f
cmp eax, 2
jne 0x406f68
mov eax, str.INFO
jmp 0x406f8f
cmp eax, 3
jne 0x406f74
mov eax, str.WARN
jmp 0x406f8f
cmp eax, 4
jne 0x406f80
mov eax, str.ERROR
jmp 0x406f8f
cmp eax, 5
mov eax, str.FATAL
je 0x406f8f
mov eax, str.TRACE
push str.C:TSLOG_CONFIGTSLOG.ini
push eax
push str.Level
push str.Common
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
lea ecx, [esp + 0xb4]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::constructor_void_]
mov dword [esp + 0x10e4], 0
lea ecx, [esp + 0x98]
call dword [sym.imp.MSVCP71.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 + 0x10e4], 1
lea edi, [ebx + 0x34]
mov ecx, edi
call fcn.00401b50
push str.C:TSLOG_CONFIGTSLOG.ini
push 0x800
lea edx, [esp + 0xd8]
push edx
push 0x418930
push str.Include
push str.Common
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea eax, [esp + 0xd0]
push eax
lea ecx, [esp + 0xb8]
call dword [sym.imp.MSVCP71.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 ecx, [esp + 0xd0]
push 0x419680
push ecx
call dword [sym.imp.MSVCR71.dll_wcstok]
mov esi, eax
add esp, 8
test esi, esi
je 0x407096
push 0x418930
push esi
call dword [sym.imp.MSVCR71.dll__wcsicmp]
add esp, 8
test eax, eax
mov ecx, edi
je 0x407067
push esi
call fcn.00402ef0
push 0x419680
push 0
call dword [sym.imp.MSVCR71.dll_wcstok]
mov esi, eax
add esp, 8
test esi, esi
jne 0x407034
jmp 0x407096
call fcn.00401b50
push esi
mov ecx, edi
call fcn.00402ef0
mov eax, dword [esp + 0x10]
test eax, eax
je 0x407096
push str.C:TSLOG_CONFIGTSLOG.ini
push 0x418930
push str.Include
push str.Common
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
lea edi, [ebx + 0x88]
mov ecx, edi
call fcn.00401b50
push str.C:TSLOG_CONFIGTSLOG.ini
push 0x800
lea edx, [esp + 0xd8]
push edx
push 0x41967c
push 0x41966c
push str.Common
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea eax, [esp + 0xd0]
push eax
lea ecx, [esp + 0x9c]
call dword [sym.imp.MSVCP71.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 ecx, [esp + 0xd0]
push 0x419668
push ecx
call dword [sym.imp.MSVCR71.dll_wcstok]
mov esi, eax
add esp, 8
test esi, esi
jne 0x407120
mov eax, dword [esp + 0x10]
test eax, eax
je 0x407160
push str.C:TSLOG_CONFIGTSLOG.ini
push 0x41967c
push 0x41966c
push str.Common
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
jmp 0x407160
push 0x418930
push esi
call dword [sym.imp.MSVCR71.dll__wcsicmp]
add esp, 8
test eax, eax
mov ecx, edi
je 0x407153
push esi
call fcn.00402ef0
push 0x419680
push 0
call dword [sym.imp.MSVCR71.dll_wcstok]
mov esi, eax
add esp, 8
test esi, esi
jne 0x407120
jmp 0x407160
call fcn.00401b50
push esi
mov ecx, edi
call fcn.00402ef0
lea ecx, [esp + 0x60]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_void_]
mov byte [esp + 0x10e4], 2
push str.C:TSLOG_CONFIGTSLOG.ini
lea ecx, [esp + 0x24]
call dword [sym.imp.MSVCP71.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 + 0x10e4], 3
lea edx, [esp + 0x60]
push edx
lea eax, [esp + 0x24]
push eax
call fcn.00401ba0
add esp, 8
mov byte [esp + 0x10e4], 2
lea ecx, [esp + 0x20]
call dword [sym.imp.MSVCP71.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 + 0x60]
call dword [sym.imp.MSVCP71.dll_public:_char_const____thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::c_str_void_const]
mov esi, eax
lea ecx, [esp + 0x7c]
mov dword [esp + 0x18], esi
call dword [sym.imp.MSVCP71.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 + 0x10e4], 4
lea edi, [ebx + 0xf8]
push edi
lea ecx, [esp + 0x24]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const__]
mov byte [esp + 0x10e4], 5
lea ecx, [esp + 0x7c]
push ecx
lea edx, [esp + 0x24]
push edx
call fcn.00403e70
add esp, 8
mov byte [esp + 0x10e4], 4
lea ecx, [esp + 0x20]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
lea ecx, [esp + 0x7c]
call dword [sym.imp.MSVCP71.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]
mov dword [esp + 0x1c], eax
mov eax, dword [ebx + 0x2c]
test eax, eax
je 0x407451
mov eax, dword [esp + 0x14]
test eax, eax
je 0x40723b
mov eax, dword [ebx + 0x23c]
test eax, eax
jne 0x4072df
push esi
push 0x104
push edi
push str.C:TSLOG_
push str.LogFilePath
push str.FileLogOption
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
mov eax, edi
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x407260
sub eax, edx
mov dword [esp + 0x14], eax
je 0x407284
mov eax, edi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x407274
sub eax, edx
cmp eax, 0x104
jb 0x407298
push 0x104
push str.C:TSLOG_
push edi
call dword [sym.imp.MSVCR71.dll_strncpy]
add esp, 0xc
mov eax, edi
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4072a0
sub eax, edx
cmp byte [eax + ebx + 0xf7], 0x5c
je 0x4072c7
push 0x104
push 0x419648
push edi
call dword [sym.imp.MSVCR71.dll_strncat]
add esp, 0xc
mov eax, dword [ebp + 8]
test eax, eax
mov dword [0x4251cc], 0xffffffff
jne 0x4072df
mov ecx, ebx
call fcn.00403f80
mov esi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
push str.C:TSLOG_CONFIGTSLOG.ini
push 0x5000
push str.MaxLogFileSize
push 0x41960c
call esi
cmp eax, 1
mov dword [ebx + 0xdc], eax
jb 0x40730d
cmp eax, 0x1f4000
jbe 0x407331
push str.C:TSLOG_CONFIGTSLOG.ini
push str.20480
push str.MaxLogFileSize
push 0x41960c
mov dword [ebx + 0xdc], 0x5000
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
push str.C:TSLOG_CONFIGTSLOG.ini
push 0x14
push str.MaxLogFileCnt
push 0x41960c
call esi
cmp eax, 1
mov dword [ebx + 0xe0], eax
jl 0x407356
cmp eax, 0x3e8
jle 0x40737a
push str.C:TSLOG_CONFIGTSLOG.ini
push 0x4195dc
push str.MaxLogFileCnt
push 0x41960c
mov dword [ebx + 0xe0], 0x14
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
push str.C:TSLOG_CONFIGTSLOG.ini
push 0xa
push str.MaxCountOfHistroyProcess
push 0x41960c
call esi
cmp eax, 0xffffffff
mov dword [ebx + 0xe4], eax
jl 0x40739d
cmp eax, 0x64
jle 0x4073c1
push str.C:TSLOG_CONFIGTSLOG.ini
push 0x4195a0
push str.MaxCountOfHistroyProcess
push 0x41960c
mov dword [ebx + 0xe4], 0xa
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
mov eax, dword [esp + 0x10]
test eax, eax
je 0x407477
mov eax, dword [esp + 0x18]
push eax
push edi
push str.LogFilePath
push str.FileLogOption
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
cmp dword [ebx + 0xdc], 0x5000
jne 0x407409
push str.C:TSLOG_CONFIGTSLOG.ini
push str.20480
push str.MaxLogFileSize
push 0x41960c
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
cmp dword [ebx + 0xe0], 0x14
jne 0x40742c
push str.C:TSLOG_CONFIGTSLOG.ini
push 0x4195dc
push str.MaxLogFileCnt
push 0x41960c
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
cmp dword [ebx + 0xe4], 0xa
jne 0x407477
push str.C:TSLOG_CONFIGTSLOG.ini
push 0x4195a0
push str.MaxCountOfHistroyProcess
push 0x41960c
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
jmp 0x407477
mov eax, dword [ebx + 0xe8]
cmp eax, 0xffffffff
je 0x407477
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebx + 0xe8], 0xffffffff
mov dword [ebx + 0xf4], 0
mov eax, dword [ebp + 8]
test eax, eax
jne 0x407547
mov eax, dword [ebx + 0x30]
test eax, eax
je 0x4074c3
cmp eax, 1
jne 0x407495
mov esi, str.DEBUG
jmp 0x4074c8
cmp eax, 2
jne 0x4074a1
mov esi, str.INFO
jmp 0x4074c8
cmp eax, 3
jne 0x4074ad
mov esi, str.WARN
jmp 0x4074c8
cmp eax, 4
jne 0x4074b9
mov esi, str.ERROR
jmp 0x4074c8
cmp eax, 5
mov esi, str.FATAL
je 0x4074c8
mov esi, str.TRACE
mov eax, dword [ebx + 0x2c]
test eax, eax
mov dword [esp + 0x10], 0x419718
jne 0x4074df
mov dword [esp + 0x10], 0x418f6c
mov eax, dword [ebx + 0x28]
test eax, eax
mov edi, 0x419718
jne 0x4074f0
mov edi, 0x418f6c
mov ecx, dword [ebx + 0xe4]
mov edx, dword [ebx + 0xe0]
mov eax, dword [ebx + 0xdc]
push ecx
mov ecx, dword [esp + 0x20]
push edx
push eax
push ecx
lea ecx, [esp + 0xa8]
call dword [sym.imp.MSVCP71.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 + 0xc8]
call dword [sym.imp.MSVCP71.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]
mov edx, dword [esp + 0x24]
push eax
push esi
push edx
push edi
push str.C:TSLOG_CONFIGTSLOG.ini
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.004023c0
add esp, 0x30
mov ecx, ebx
call fcn.004066c0
mov byte [esp + 0x10e4], 2
lea ecx, [esp + 0x7c]
call dword [sym.imp.MSVCP71.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 + 0x10e4], 1
lea ecx, [esp + 0x60]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
mov byte [esp + 0x10e4], 0
lea ecx, [esp + 0x98]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
mov dword [esp + 0x10e4], 0xffffffff
lea ecx, [esp + 0xb4]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
mov eax, 1
mov ecx, dword [esp + 0x10dc]
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x10d4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00414f09
mov esp, ebp
pop ebp
ret 4