Function at 0x497ad0
Capabilities:
Get common file path
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x57e42a
mov eax, dword fs:[0]
push eax
sub esp, 0x3e0
mov eax, dword [0x62d414]
xor eax, esp
mov dword [esp + 0x3dc], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x62d414]
xor eax, esp
push eax
lea eax, [esp + 0x3f4]
mov dword fs:[0], eax
cmp dword [0x63dd80], 0
mov esi, ecx
jne 0x498187
push 0x10
call sub.MSVCR90.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
mov dword [esp + 0x18], eax
mov dword [esp + 0x3fc], 0
test eax, eax
je 0x497b40
mov ecx, eax
call fcn.00495f80
jmp 0x497b42
xor eax, eax
mov dword [esp + 0x3fc], 0xffffffff
lea ecx, [esp + 0x20]
mov dword [0x63dd80], 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 ebp, 1
mov dword [esp + 0x3fc], ebp
push 0x80
lea eax, [esp + 0xe8]
push eax
lea ecx, [esi + 0x80]
push ecx
call dword [sym.imp.ole32.dll_StringFromGUID2]
push str.CLSID_
lea ecx, [esp + 0x40]
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 + 0x3fc], 2
lea edx, [esp + 0xe4]
push edx
lea ecx, [esp + 0x40]
call dword [0x598250]
push 0x598d40
lea ecx, [esp + 0x40]
call dword [0x598250]
lea ecx, [esp + 0xc8]
mov byte [esp + 0x17], 0
mov byte [esp + 0x15], 0
mov byte [esp + 0x16], 1
mov ebx, 0xa00000
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 + 0x3fc], 3
lea ecx, [esp + 0xac]
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 + 0x3fc], 4
lea eax, [esp + 0x20]
push eax
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0x38], esp
push str.LogLevel
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 + 0x41c], 5
sub esp, 0x1c
lea edx, [esp + 0x78]
mov ecx, esp
mov dword [esp + 0x58], esp
push edx
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_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___const__]
mov byte [esp + 0x438], 6
mov byte [esp + 0x438], 4
mov ecx, esi
call fcn.004975b0
mov edi, dword [sym.imp.MSVCR90.dll__wtoi]
test al, al
je 0x497c65
cmp dword [esp + 0x38], 8
mov eax, dword [esp + 0x24]
jae 0x497c5d
lea eax, [esp + 0x24]
push eax
call edi
add esp, 4
mov ebp, eax
lea eax, [esp + 0x20]
push eax
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0x3c], esp
push str.LogToScreen
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 + 0x41c], 7
sub esp, 0x1c
lea edx, [esp + 0x78]
mov ecx, esp
mov dword [esp + 0x54], esp
push edx
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_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___const__]
mov byte [esp + 0x438], 8
mov byte [esp + 0x438], 4
mov ecx, esi
call fcn.004975b0
test al, al
je 0x497cd1
cmp dword [esp + 0x38], 8
mov eax, dword [esp + 0x24]
jae 0x497cc4
lea eax, [esp + 0x24]
push eax
call edi
add esp, 4
test eax, eax
setne byte [esp + 0x17]
lea eax, [esp + 0x20]
push eax
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0x3c], esp
push str.CommitWrites
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 + 0x41c], 9
sub esp, 0x1c
lea edx, [esp + 0x78]
mov ecx, esp
mov dword [esp + 0x54], esp
push edx
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_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___const__]
mov byte [esp + 0x438], 0xa
mov byte [esp + 0x438], 4
mov ecx, esi
call fcn.004975b0
test al, al
je 0x497d3d
cmp dword [esp + 0x38], 8
mov eax, dword [esp + 0x24]
jae 0x497d30
lea eax, [esp + 0x24]
push eax
call edi
add esp, 4
test eax, eax
setne byte [esp + 0x15]
lea eax, [esp + 0x20]
push eax
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0x3c], esp
push str.Overwrite
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 + 0x41c], 0xb
sub esp, 0x1c
lea edx, [esp + 0x78]
mov ecx, esp
mov dword [esp + 0x54], esp
push edx
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_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___const__]
mov byte [esp + 0x438], 0xc
mov byte [esp + 0x438], 4
mov ecx, esi
call fcn.004975b0
test al, al
je 0x497da9
cmp dword [esp + 0x38], 8
mov eax, dword [esp + 0x24]
jae 0x497d9c
lea eax, [esp + 0x24]
push eax
call edi
add esp, 4
test eax, eax
setne byte [esp + 0x16]
lea eax, [esp + 0x20]
push eax
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0x3c], esp
push str.LogSize
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 + 0x41c], 0xd
sub esp, 0x1c
lea edx, [esp + 0x78]
mov ecx, esp
mov dword [esp + 0x54], esp
push edx
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_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___const__]
mov byte [esp + 0x438], 0xe
mov byte [esp + 0x438], 4
mov ecx, esi
call fcn.004975b0
test al, al
je 0x497e10
cmp dword [esp + 0x38], 8
mov eax, dword [esp + 0x24]
jae 0x497e08
lea eax, [esp + 0x24]
push eax
call edi
add esp, 4
mov ebx, eax
lea eax, [esp + 0x20]
push eax
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0x3c], esp
push str.LogFilter
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 + 0x41c], 0xf
sub esp, 0x1c
lea edx, [esp + 0x78]
mov ecx, esp
mov dword [esp + 0x54], esp
push edx
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_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___const__]
mov byte [esp + 0x438], 0x10
mov byte [esp + 0x438], 4
mov ecx, esi
call fcn.004975b0
test al, al
je 0x497e72
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0xcc]
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_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___const__]
lea ecx, [esp + 0x20]
push ecx
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0x3c], esp
push str.LogFilterFilename
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 + 0x41c], 0x11
sub esp, 0x1c
lea edx, [esp + 0x78]
mov ecx, esp
mov dword [esp + 0x54], esp
push edx
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_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___const__]
mov byte [esp + 0x438], 0x12
mov byte [esp + 0x438], 4
mov ecx, esi
call fcn.004975b0
test al, al
je 0x497ed4
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0xb0]
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_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___const__]
lea ecx, [esp + 0x20]
push ecx
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0x3c], esp
push 0x598c94
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 + 0x41c], 0x13
sub esp, 0x1c
lea edx, [esp + 0x78]
mov ecx, esp
mov dword [esp + 0x54], esp
push edx
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_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___const__]
mov byte [esp + 0x438], 0x14
mov byte [esp + 0x438], 4
mov ecx, esi
call fcn.004975b0
test al, al
je 0x497f8d
cmp dword [esp + 0x38], 8
mov eax, dword [esp + 0x24]
jae 0x497f33
lea eax, [esp + 0x24]
push eax
call edi
add esp, 4
test eax, eax
je 0x497f8d
lea eax, [esp + 0x20]
push eax
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0x3c], esp
push str.LogFilename
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 + 0x41c], 0x15
sub esp, 0x1c
lea edx, [esp + 0x78]
mov ecx, esp
mov dword [esp + 0x54], esp
push edx
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_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___const__]
mov byte [esp + 0x438], 0x16
mov byte [esp + 0x438], 4
mov ecx, esi
call fcn.004975b0
test al, al
jne 0x497f9c
push 0x5d1aa8
lea ecx, [esp + 0x24]
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 ecx, [esp + 0x58]
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 + 0x3fc], 0x17
cmp dword [esp + 0x34], 0
jbe 0x497fc4
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x5c]
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_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___const__]
cmp dword [esp + 0x6c], 1
jae 0x498016
lea ecx, [esp + 0x1e8]
push ecx
push 0
push 0
push 0x2b
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
jl 0x498016
lea edx, [esp + 0x1e8]
push edx
lea ecx, [esp + 0x5c]
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__]
push str.MatrikonOPCCommon_
lea ecx, [esp + 0x5c]
call dword [0x598250]
mov eax, dword [str.PSTCFGMatrikon.OPC.TunnellerHDA.1.LOG]
push eax
lea ecx, [esp + 0x5c]
call dword [0x598250]
cmp dword [esp + 0x6c], 0
jbe 0x49804c
cmp dword [esp + 0x70], 8
mov eax, dword [esp + 0x5c]
jae 0x49802c
lea eax, [esp + 0x5c]
movzx ecx, byte [esp + 0x17]
movzx edx, byte [esp + 0x16]
push ecx
movzx ecx, byte [esp + 0x19]
push edx
push ebx
push ecx
mov ecx, dword [0x63dd80]
push ebp
push eax
call fcn.00419810
cmp dword [esp + 0xdc], 0
jbe 0x498124
cmp dword [esp + 0xc0], 0
jbe 0x498124
lea ecx, [esp + 0x90]
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 bl, 0x18
mov byte [esp + 0x3fc], bl
lea ecx, [esp + 0x74]
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 + 0x3fc], 0x19
lea edx, [esp + 0x90]
push edx
lea eax, [esp + 0xcc]
push eax
call fcn.0051ddf0
lea ecx, [esp + 0x7c]
push ecx
lea edx, [esp + 0xb8]
push edx
call fcn.0051ddf0
mov ecx, dword [esp + 0x88]
mov eax, 0x10
add esp, 0x10
cmp dword [esp + 0x8c], eax
jae 0x4980d3
lea ecx, [esp + 0x78]
cmp dword [esp + 0xa8], eax
mov eax, dword [esp + 0x94]
jae 0x4980ea
lea eax, [esp + 0x94]
push ecx
mov ecx, dword [0x63dd80]
push eax
push ebp
call fcn.00495fc0
mov dword [esi + 0x348], eax
mov byte [esp + 0x3fc], bl
lea ecx, [esp + 0x74]
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 + 0x3fc], 0x17
lea ecx, [esp + 0x90]
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 + 0x3fc], 4
lea ecx, [esp + 0x58]
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 + 0x3fc], 3
lea ecx, [esp + 0xac]
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 + 0x3fc], 2
lea ecx, [esp + 0xc8]
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 + 0x3fc], 1
lea ecx, [esp + 0x3c]
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 dword [esp + 0x3fc], 0xffffffff
lea ecx, [esp + 0x20]
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 ecx, dword [esp + 0x3f4]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x3dc]
xor ecx, esp
call fcn.0051ed00
add esp, 0x3ec
ret