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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x40ef98
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, 0x10cc
call fcn.0040e7a0
mov eax, dword [0x418110]
push ebx
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 0x404c8d
lea ecx, [esp + 0x3c]
push ecx
push str.C:TSLOG_CONFIGTSLOG.txt
call edi
add esp, 8
test eax, eax
je 0x404c7d
lea edx, [esp + 0x3c]
push edx
push str.C:TSLOG_CONFIGTSLOG.ini
call edi
add esp, 8
test eax, eax
je 0x404c6a
lea eax, [esp + 0x3c]
push eax
push str.C:TSLOG_CONFIGTSLOG.txt
call edi
add esp, 8
test eax, eax
je 0x404c5a
push esi
mov ecx, ebx
call fcn.00402560
xor eax, eax
jmp 0x4055cd
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 0x404c8d
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 0x404cf3
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 0x404cf3
mov eax, str.__Output__r_n_DebugView__________________ON______ON
mov dword [esp + 0x10], esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x404cc8
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 0x411688
push 0x411674
push str.Output
call esi
mov edi, dword [sym.imp.MSVCR71.dll__wcsicmp]
lea ecx, [esp + 0xd0]
push 0x411688
push ecx
call edi
add esp, 8
test eax, eax
je 0x404d9f
lea edx, [esp + 0xd0]
push 0x411670
push edx
call edi
add esp, 8
test eax, eax
je 0x404d9f
lea eax, [esp + 0xd0]
push 0x410edc
push eax
call edi
add esp, 8
test eax, eax
je 0x404d96
lea ecx, [esp + 0xd0]
push 0x41166c
push ecx
call edi
add esp, 8
test eax, eax
jne 0x404da6
mov dword [ebx + 0x28], 0
jmp 0x404da6
mov dword [ebx + 0x28], 1
mov eax, dword [esp + 0x10]
test eax, eax
je 0x404dd5
mov eax, dword [ebx + 0x28]
test eax, eax
mov eax, 0x411688
jne 0x404dbf
mov eax, 0x410edc
push str.C:TSLOG_CONFIGTSLOG.ini
push eax
push 0x411674
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 0x411688
push str.FileLog
push str.Output
call esi
lea eax, [esp + 0xd0]
push 0x411688
push eax
call edi
add esp, 8
test eax, eax
je 0x404e59
lea ecx, [esp + 0xd0]
push 0x411670
push ecx
call edi
add esp, 8
test eax, eax
je 0x404e59
lea edx, [esp + 0xd0]
push 0x410edc
push edx
call edi
add esp, 8
test eax, eax
je 0x404e50
lea eax, [esp + 0xd0]
push 0x41166c
push eax
call edi
add esp, 8
test eax, eax
jne 0x404e60
mov dword [ebx + 0x2c], 0
jmp 0x404e60
mov dword [ebx + 0x2c], 1
mov eax, dword [esp + 0x10]
test eax, eax
je 0x404e8f
mov eax, dword [ebx + 0x2c]
test eax, eax
mov eax, 0x411688
jne 0x404e79
mov eax, 0x410edc
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 0x404ed0
mov dword [ebx + 0x30], eax
jmp 0x404f69
lea eax, [esp + 0xd0]
push str.DEBUG
push eax
call edi
add esp, 8
test eax, eax
jne 0x404eef
mov dword [ebx + 0x30], 1
jmp 0x404f69
lea ecx, [esp + 0xd0]
push str.INFO
push ecx
call edi
add esp, 8
test eax, eax
jne 0x404f0e
mov dword [ebx + 0x30], 2
jmp 0x404f69
lea edx, [esp + 0xd0]
push str.WARN
push edx
call edi
add esp, 8
test eax, eax
jne 0x404f2d
mov dword [ebx + 0x30], 3
jmp 0x404f69
lea eax, [esp + 0xd0]
push str.ERROR
push eax
call edi
add esp, 8
test eax, eax
jne 0x404f4c
mov dword [ebx + 0x30], 4
jmp 0x404f69
lea ecx, [esp + 0xd0]
push str.FATAL
push ecx
call edi
add esp, 8
test eax, eax
jne 0x404f69
mov dword [ebx + 0x30], 5
mov eax, dword [esp + 0x10]
test eax, eax
je 0x404fcd
mov eax, dword [ebx + 0x30]
test eax, eax
je 0x404fb2
cmp eax, 1
jne 0x404f84
mov eax, str.DEBUG
jmp 0x404fb7
cmp eax, 2
jne 0x404f90
mov eax, str.INFO
jmp 0x404fb7
cmp eax, 3
jne 0x404f9c
mov eax, str.WARN
jmp 0x404fb7
cmp eax, 4
jne 0x404fa8
mov eax, str.ERROR
jmp 0x404fb7
cmp eax, 5
mov eax, str.FATAL
je 0x404fb7
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_]
lea ecx, [esp + 0x98]
mov dword [esp + 0x10e4], 0
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_]
lea edi, [ebx + 0x34]
mov ecx, edi
mov byte [esp + 0x10e4], 1
call fcn.00401470
push str.C:TSLOG_CONFIGTSLOG.ini
push 0x800
lea edx, [esp + 0xd8]
push edx
push 0x4108b8
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 0x4115f0
push ecx
call dword [sym.imp.MSVCR71.dll_wcstok]
mov esi, eax
add esp, 8
test esi, esi
je 0x4050c2
lea esp, [esp]
push 0x4108b8
push esi
call dword [sym.imp.MSVCR71.dll__wcsicmp]
add esp, 8
test eax, eax
mov ecx, edi
je 0x405093
push esi
call fcn.004020e0
push 0x4115f0
push 0
call dword [sym.imp.MSVCR71.dll_wcstok]
mov esi, eax
add esp, 8
test esi, esi
jne 0x405060
jmp 0x4050c2
call fcn.00401470
push esi
mov ecx, edi
call fcn.004020e0
mov eax, dword [esp + 0x10]
test eax, eax
je 0x4050c2
push str.C:TSLOG_CONFIGTSLOG.ini
push 0x4108b8
push str.Include
push str.Common
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
lea edi, [ebx + 0x88]
mov ecx, edi
call fcn.00401470
push str.C:TSLOG_CONFIGTSLOG.ini
push 0x800
lea edx, [esp + 0xd8]
push edx
push 0x4115ec
push 0x4115dc
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 0x4115d8
push ecx
call dword [sym.imp.MSVCR71.dll_wcstok]
mov esi, eax
add esp, 8
test esi, esi
jne 0x405150
mov eax, dword [esp + 0x10]
test eax, eax
je 0x405190
push str.C:TSLOG_CONFIGTSLOG.ini
push 0x4115ec
push 0x4115dc
push str.Common
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
jmp 0x405190
push 0x4108b8
push esi
call dword [sym.imp.MSVCR71.dll__wcsicmp]
add esp, 8
test eax, eax
mov ecx, edi
je 0x405183
push esi
call fcn.004020e0
push 0x4115f0
push 0
call dword [sym.imp.MSVCR71.dll_wcstok]
mov esi, eax
add esp, 8
test esi, esi
jne 0x405150
jmp 0x405190
call fcn.00401470
push esi
mov ecx, edi
call fcn.004020e0
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_]
push str.C:TSLOG_CONFIGTSLOG.ini
lea ecx, [esp + 0x24]
mov byte [esp + 0x10e8], 2
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__]
lea edx, [esp + 0x60]
push edx
lea eax, [esp + 0x24]
push eax
mov byte [esp + 0x10ec], 3
call fcn.004014c0
add esp, 8
lea ecx, [esp + 0x20]
mov byte [esp + 0x10e4], 2
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_]
lea edi, [ebx + 0xf8]
push edi
lea ecx, [esp + 0x24]
mov byte [esp + 0x10e8], 4
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__]
lea ecx, [esp + 0x7c]
push ecx
lea edx, [esp + 0x24]
push edx
mov byte [esp + 0x10ec], 5
call fcn.00402e70
add esp, 8
lea ecx, [esp + 0x20]
mov byte [esp + 0x10e4], 4
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 0x405481
mov eax, dword [esp + 0x14]
test eax, eax
je 0x40526b
mov eax, dword [ebx + 0x23c]
test eax, eax
jne 0x40530f
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 0x405290
sub eax, edx
mov dword [esp + 0x14], eax
je 0x4052b4
mov eax, edi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4052a4
sub eax, edx
cmp eax, 0x104
jb 0x4052c8
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 0x4052d0
sub eax, edx
cmp byte [eax + ebx + 0xf7], 0x5c
je 0x4052f7
push 0x104
push 0x4115b8
push edi
call dword [sym.imp.MSVCR71.dll_strncat]
add esp, 0xc
mov eax, dword [ebp + 8]
test eax, eax
mov dword [0x418148], 0xffffffff
jne 0x40530f
mov ecx, ebx
call fcn.00402f70
mov esi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
push str.C:TSLOG_CONFIGTSLOG.ini
push 0x5000
push str.MaxLogFileSize
push 0x41157c
call esi
cmp eax, 1
mov dword [ebx + 0xdc], eax
jb 0x40533d
cmp eax, 0x1f4000
jbe 0x405361
push str.C:TSLOG_CONFIGTSLOG.ini
push str.20480
push str.MaxLogFileSize
push 0x41157c
mov dword [ebx + 0xdc], 0x5000
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
push str.C:TSLOG_CONFIGTSLOG.ini
push 0x14
push str.MaxLogFileCnt
push 0x41157c
call esi
cmp eax, 1
mov dword [ebx + 0xe0], eax
jl 0x405386
cmp eax, 0x3e8
jle 0x4053aa
push str.C:TSLOG_CONFIGTSLOG.ini
push 0x41154c
push str.MaxLogFileCnt
push 0x41157c
mov dword [ebx + 0xe0], 0x14
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
push str.C:TSLOG_CONFIGTSLOG.ini
push 0xa
push str.MaxCountOfHistroyProcess
push 0x41157c
call esi
cmp eax, 0xffffffff
mov dword [ebx + 0xe4], eax
jl 0x4053cd
cmp eax, 0x64
jle 0x4053f1
push str.C:TSLOG_CONFIGTSLOG.ini
push 0x411510
push str.MaxCountOfHistroyProcess
push 0x41157c
mov dword [ebx + 0xe4], 0xa
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
mov eax, dword [esp + 0x10]
test eax, eax
je 0x4054a7
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 0x405439
push str.C:TSLOG_CONFIGTSLOG.ini
push str.20480
push str.MaxLogFileSize
push 0x41157c
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
cmp dword [ebx + 0xe0], 0x14
jne 0x40545c
push str.C:TSLOG_CONFIGTSLOG.ini
push 0x41154c
push str.MaxLogFileCnt
push 0x41157c
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
cmp dword [ebx + 0xe4], 0xa
jne 0x4054a7
push str.C:TSLOG_CONFIGTSLOG.ini
push 0x411510
push str.MaxCountOfHistroyProcess
push 0x41157c
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
jmp 0x4054a7
mov eax, dword [ebx + 0xe8]
cmp eax, 0xffffffff
je 0x4054a7
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 0x405577
mov eax, dword [ebx + 0x30]
test eax, eax
je 0x4054f3
cmp eax, 1
jne 0x4054c5
mov esi, str.DEBUG
jmp 0x4054f8
cmp eax, 2
jne 0x4054d1
mov esi, str.INFO
jmp 0x4054f8
cmp eax, 3
jne 0x4054dd
mov esi, str.WARN
jmp 0x4054f8
cmp eax, 4
jne 0x4054e9
mov esi, str.ERROR
jmp 0x4054f8
cmp eax, 5
mov esi, str.FATAL
je 0x4054f8
mov esi, str.TRACE
mov eax, dword [ebx + 0x2c]
test eax, eax
mov dword [esp + 0x10], 0x411688
jne 0x40550f
mov dword [esp + 0x10], 0x410edc
mov eax, dword [ebx + 0x28]
test eax, eax
mov edi, 0x411688
jne 0x405520
mov edi, 0x410edc
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.00401be0
add esp, 0x30
mov ecx, ebx
call fcn.004047f0
lea ecx, [esp + 0x7c]
mov byte [esp + 0x10e4], 2
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]
mov byte [esp + 0x10e4], 1
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 + 0x98]
mov byte [esp + 0x10e4], 0
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 + 0xb4]
mov dword [esp + 0x10e4], 0xffffffff
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]
call fcn.0040e783
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4