Function at 0x4da840
Capabilities:
Delete file
Move file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5772e3
mov eax, dword fs:[0]
push eax
sub esp, 0x28
mov eax, dword [0x640040]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov ebx, ecx
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x28], 0
lea ecx, [ebx + 0x18]
call dword [sym.imp.mfc140u.dll_Ordinal_296]
mov dword [ebp - 4], 0
lea esi, [ebx + 0x38]
mov dword [ebp - 0x2c], esi
push 0xa
mov ecx, esi
call dword [0x586ad0]
mov byte [ebp - 4], 1
mov dword [esi], 0x58aff4
mov byte [ebp - 4], 2
mov dword [esi], 0x593180
mov byte [ebp - 4], 3
push 0xa
lea ecx, [ebx + 0x8c]
call dword [0x586bdc]
mov byte [ebp - 4], 4
lea ecx, [ebx + 0xd0]
call dword [sym.imp.mfc140u.dll_Ordinal_296]
mov byte [ebp - 4], 5
lea eax, [ebx + 0xd8]
mov dword [ebp - 0x30], eax
mov ecx, eax
call dword [sym.imp.mfc140u.dll_Ordinal_296]
mov byte [ebp - 4], 6
lea ecx, [ebx + 0xdc]
call dword [sym.imp.mfc140u.dll_Ordinal_296]
mov byte [ebp - 4], 7
lea ecx, [ebx + 0xe0]
call dword [sym.imp.mfc140u.dll_Ordinal_296]
mov byte [ebp - 4], 8
push ebx
mov esi, dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
call esi
lea eax, [ebx + 0xb8]
push eax
call esi
lea eax, [ebx + 0x74]
push eax
call esi
lea eax, [ebx + 0x1c]
push eax
call esi
mov dword [ebx + 0xac], 0
mov dword [ebx + 0xb0], 0
push 0x587818
lea ecx, [ebx + 0x18]
call dword [sym.imp.mfc140u.dll_ATL::CSimpleStringT_wchar_t_1_::operator]
mov byte [ebx + 0x34], 0
lea eax, [ebx + 0xb4]
mov dword [ebp - 0x2c], eax
mov dword [eax], 0
mov dword [ebx + 0xd4], 0
mov byte [ebx + 0xa8], 0
mov dword [ebx + 0x54], 0x200
mov dword [ebx + 0x58], 0x400
mov dword [ebx + 0x5c], 0x100
mov dword [ebx + 0x6c], 0x10101
mov dword [ebx + 0x70], 0x10101
mov byte [ebx + 0x60], 0
mov dword [ebx + 0x64], 0
mov dword [ebx + 0x68], 0
mov byte [ebx + 0xec], 0
xorps xmm0, xmm0
movlpd qword [ebp - 0x24], xmm0
push 1
push ebx
lea ecx, [ebp - 0x24]
call fcn.004f6560
mov byte [ebp - 4], 9
cmp dword [ebx + 0x44], 0
je 0x4da9e8
mov esi, dword [sym.imp.mfc140u.dll_Ordinal_12743]
nop
lea ecx, [ebx + 0x38]
call esi
mov ecx, eax
test ecx, ecx
je 0x4da9e2
mov eax, dword [ecx]
push 1
call dword [eax + 4]
cmp dword [ebx + 0x44], 0
jne 0x4da9d0
mov byte [ebp - 4], 8
lea ecx, [ebp - 0x24]
call fcn.004f6620
mov byte [ebp - 4], 0xa
push 0x641cf4
lea ecx, [ebp - 0x18]
call dword [sym.imp.mfc140u.dll_ATL::CStringT_wchar_t_StrTraitMFC_DLL_wchar_t_ATL::ChTraitsCRT_wchar_t__30]
mov dword [ebp - 0x28], 1
lea eax, [ebp - 0x18]
push eax
lea edi, [ebx + 0xd0]
mov ecx, edi
call dword [sym.imp.mfc140u.dll_ATL::CStringT_wchar_t_StrTraitMFC_DLL_wchar_t_ATL::ChTraitsCRT_wchar_t__27]
mov esi, 1
mov dword [ebp - 0x28], esi
and esi, 0xfffffffe
mov dword [ebp - 0x28], esi
mov byte [ebp - 4], 8
lea ecx, [ebp - 0x18]
call dword [sym.imp.mfc140u.dll_Ordinal_1045]
mov eax, dword [edi]
mov eax, dword [eax - 0xc]
dec eax
push eax
mov ecx, edi
call dword [sym.imp.mfc140u.dll_Ordinal_1653]
cmp ax, 0x5c
je 0x4daaa4
mov byte [ebp - 4], 0xb
mov ecx, edi
call dword [sym.imp.mfc140u.dll_Ordinal_5921]
push eax
lea ecx, [ebp - 0x18]
call dword [sym.imp.mfc140u.dll_Ordinal_285]
or esi, 0x20
mov dword [ebp - 0x28], esi
mov eax, dword [edi]
push 1
push 0x5dd26c
push dword [eax - 0xc]
push eax
lea eax, [ebp - 0x18]
push eax
call dword [sym.imp.mfc140u.dll_ATL::CSimpleStringT_wchar_t_1_::Concatenate]
add esp, 0x14
lea eax, [ebp - 0x18]
push eax
mov ecx, edi
call dword [sym.imp.mfc140u.dll_ATL::CStringT_wchar_t_StrTraitMFC_DLL_wchar_t_ATL::ChTraitsCRT_wchar_t__27]
and esi, 0xffffffdf
mov dword [ebp - 0x28], esi
mov byte [ebp - 4], 8
lea ecx, [ebp - 0x18]
call dword [sym.imp.mfc140u.dll_Ordinal_1045]
mov byte [ebp - 4], 0xc
push 0x641d00
lea ecx, [ebp - 0x20]
call dword [sym.imp.mfc140u.dll_ATL::CStringT_wchar_t_StrTraitMFC_DLL_wchar_t_ATL::ChTraitsCRT_wchar_t__30]
or esi, 2
mov dword [ebp - 0x28], esi
lea eax, [ebp - 0x20]
push eax
mov ecx, edi
call dword [sym.imp.mfc140u.dll_ATL::CSimpleStringT_wchar_t_1_::operator_3]
and esi, 0xfffffffd
mov dword [ebp - 0x28], esi
mov byte [ebp - 4], 8
lea ecx, [ebp - 0x20]
call dword [sym.imp.mfc140u.dll_Ordinal_1045]
mov byte [ebp - 4], 0xd
lea ecx, [ebp - 0x1c]
call dword [sym.imp.mfc140u.dll_Ordinal_296]
mov byte [ebp - 4], 0xe
push dword [edi]
push str._s.log
lea eax, [ebp - 0x1c]
push eax
mov edi, dword [sym.imp.mfc140u.dll_ATL::CStringT_wchar_t_StrTraitMFC_DLL_wchar_t_ATL::ChTraitsCRT_wchar_t__31]
call edi
add esp, 8
mov ecx, esp
mov dword [ebp - 0x18], esp
lea eax, [ebp - 0x1c]
push eax
call dword [sym.imp.mfc140u.dll_ATL::CStringT_wchar_t_StrTraitMFC_DLL_wchar_t_ATL::ChTraitsCRT_wchar_t__30]
mov byte [ebp - 4], 0xf
mov byte [ebp - 4], 0xe
call fcn.005046c0
test al, al
je 0x4dab62
lea ecx, [ebp - 0x18]
call dword [sym.imp.mfc140u.dll_Ordinal_296]
mov byte [ebp - 4], 0x10
push dword [ebp - 0x1c]
push str._s.bak
lea eax, [ebp - 0x18]
push eax
call edi
push dword [ebp - 0x18]
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__wremove]
push dword [ebp - 0x18]
push dword [ebp - 0x1c]
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__wrename]
add esp, 0x18
mov byte [ebp - 4], 0xe
lea ecx, [ebp - 0x18]
call dword [sym.imp.mfc140u.dll_Ordinal_1045]
mov byte [ebp - 4], 0xd
lea ecx, [ebp - 0x1c]
call dword [sym.imp.mfc140u.dll_Ordinal_1045]
mov dword [ebp - 4], 8
jmp 0x4dabad
mov ecx, ebx
call fcn.004dbf00
mov eax, dword [ebp - 0x2c]
cmp dword [eax], 0
jne 0x4dac05
mov byte [ebp - 4], 0x12
push dword [ebp - 0x30]
lea ecx, [ebp - 0x20]
call dword [sym.imp.mfc140u.dll_ATL::CStringT_wchar_t_StrTraitMFC_DLL_wchar_t_ATL::ChTraitsCRT_wchar_t__30]
or esi, 0x40
mov dword [ebp - 0x28], esi
push dword [ebp - 0x20]
push str.Failed_to_open__s_as_iTools_OPC_Server_event_logger
push 0x3e9
mov eax, dword [0x641a88]
add eax, 0x32c
push eax
call fcn.004ec2c0
add esp, 0x10
and esi, 0xffffffbf
mov dword [ebp - 0x28], esi
mov byte [ebp - 4], 8
lea ecx, [ebp - 0x20]
call dword [sym.imp.mfc140u.dll_Ordinal_1045]
mov ecx, ebx
call fcn.004daef0
mov ecx, ebx
call fcn.004db5f0
mov dword [ebp - 4], 0xffffffff
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0055c86d
mov esp, ebp
pop ebp
ret