Function at 0x4045c0
Capabilities:
Copy file
Create directory
Create process on windows
Delete file
Get common file path
Move file
Read .ini file
Self delete

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x179c
call fcn.0041bda0
mov eax, dword [0x455670]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
xor eax, eax
push edi
xor ebx, ebx
push str.GlobaliNodeDamaInstallMtx
push ebx
push ebx
mov dword [ebp - 0x1790], ebx
mov byte [ebp - 0x48], bl
mov dword [ebp - 0x47], eax
mov dword [ebp - 0x43], eax
mov dword [ebp - 0x3f], eax
mov dword [ebp - 0x3b], eax
mov dword [ebp - 0x37], eax
mov dword [ebp - 0x33], eax
mov dword [ebp - 0x2f], eax
mov dword [ebp - 0x2b], eax
mov dword [ebp - 0x1794], ebx
mov dword [ebp - 0x1754], 0xf
mov dword [ebp - 0x1758], ebx
mov byte [ebp - 0x1768], al
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov esi, eax
mov dword [ebp - 0x178c], esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x1790], eax
cmp esi, ebx
je 0x40467c
cmp eax, 0xb7
jne 0x40467c
push str.Last_session_is_still_in.
call fcn.004013e3
add esp, 4
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x1754], 0x10
jb 0x4055b2
mov eax, dword [ebp - 0x1768]
push eax
call fcn.0041a986
add esp, 4
jmp 0x4055b2
push 0x21
lea ecx, [ebp - 0x48]
push ecx
push str.ClientId
push str.SOFTWAREiNodeDAM_Agent
push 0x80000002
call fcn.00401703
add esp, 0x14
test eax, eax
je 0x4046ae
lea eax, [ebp - 0x48]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4046a3
sub eax, edx
jne 0x40470b
lea edx, [ebp - 0x1790]
push edx
lea eax, [ebp - 0x1788]
push eax
lea ecx, [ebp - 0x48]
push ecx
mov dword [ebp - 0x1788], 0x21
call fcn.00401500
add esp, 0xc
test eax, eax
jne 0x40470b
push str.Fail_1.
call fcn.004013e3
add esp, 4
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x1754], 0x10
jb 0x4055b2
mov edx, dword [ebp - 0x1768]
push edx
call fcn.0041a986
add esp, 4
jmp 0x4055b2
lea eax, [ebp - 0x48]
push eax
push str.ClientId
push str.SOFTWAREiNodeDAM_Agent
push 0x80000002
call fcn.004016db
add esp, 0x10
test eax, eax
jne 0x40475f
push str.Fail_2
call fcn.004013e3
add esp, 4
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x1754], 0x10
jb 0x4055b2
mov ecx, dword [ebp - 0x1768]
push ecx
call fcn.0041a986
add esp, 4
jmp 0x4055b2
lea edx, [ebp - 0x48]
push edx
push str.ClientId
push str.SOFTWAREiNodeDAM_Agent
push 0x80000002
call fcn.004013f7
add esp, 0x10
test eax, eax
jne 0x404788
push str.Fail_21
jmp 0x40464c
lea ecx, [ebp - 0x48]
push ecx
push str.C:iNode_DAM_Agent_
lea edx, [ebp - 0x170]
push 0x44b780
push edx
call fcn.0041b420
push str.DamAgent.exe
lea eax, [ebp - 0x170]
push eax
lea ecx, [ebp - 0x134c]
push str._s_s
push ecx
call fcn.0041b420
add esp, 0x20
push str.GlobaliNodeDamaSrvMutex
push ebx
push 0x1f0001
call dword [sym.imp.KERNEL32.dll_OpenMutexA]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp eax, ebx
je 0x4047f9
push eax
call edi
lea edx, [ebp - 0x134c]
push edx
mov dword [ebp - 0x1794], 1
call fcn.00401631
add esp, 4
push str.C:iNode_DAM_Agent
call fcn.00401924
mov esi, dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
add esp, 4
test eax, eax
jne 0x404818
push ebx
push str.C:iNode_DAM_Agent
call esi
lea eax, [ebp - 0x170]
push eax
call fcn.00401924
add esp, 4
test eax, eax
jne 0x404835
push ebx
lea ecx, [ebp - 0x170]
push ecx
call esi
mov dword [ebp - 0x1788], ebx
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
cmp dword [ebp - 0x1794], 0
je 0x404883
push str.Global_evnt_Rem_mon_switch_
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov esi, eax
test esi, esi
je 0x404a75
push esi
call dword [sym.imp.KERNEL32.dll_SetEvent]
push 0x7d0
call ebx
push esi
call edi
push str.running.
call fcn.004013e3
add esp, 4
push 1
push str.H3C_DAM_Agent
call fcn.004015d7
push 1
push str.iNode_DAM_Agent
call fcn.004015d7
add esp, 0x10
xor esi, esi
push str.GlobaliNodeDamaSrvMutex
push 0
push 0x1f0001
inc esi
call dword [sym.imp.KERNEL32.dll_OpenMutexA]
test eax, eax
je 0x4048df
push eax
call edi
push 0x32
call ebx
cmp esi, 0x12c
jb 0x4048a0
push str.Fail_3.1.
call fcn.004013e3
mov edx, dword [ebp - 0x178c]
add esp, 4
push edx
jmp 0x4055a5
push str.DamAgent.exe
lea edx, [ebp - 0x170]
push edx
lea eax, [ebp - 0xba0]
push str._s_s
push eax
xor esi, esi
call fcn.0041b420
push str.DamAgentTray.exe
lea ecx, [ebp - 0x170]
push ecx
lea edx, [ebp - 0xdb0]
push str._s_s
push edx
call fcn.0041b420
push 0x3ff
lea eax, [ebp - 0x174b]
push esi
push eax
mov byte [ebp - 0x174c], 0
call fcn.0041bb50
add esp, 0x2c
jmp 0x404940
lea ecx, [ebp - 0xba0]
push ecx
call fcn.00401631
add esp, 4
test eax, eax
jne 0x40496a
lea edx, [ebp - 0xdb0]
push edx
call fcn.00401631
add esp, 4
test eax, eax
je 0x404a08
cmp esi, 0x12c
jae 0x404a08
lea eax, [ebp - 0x170]
push 0x44bc4c
push eax
call fcn.0040111d
push str.taskkill__F__IM_DamAgent.exe
call fcn.0041bcb5
add esp, 0xc
push 0x64
call ebx
lea ecx, [ebp - 0xba0]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x4049cb
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea edx, [ebp - 0xba0]
push edx
lea eax, [ebp - 0x174c]
push str.failed_to_deletefile:__s__errorcode_u
push eax
call fcn.0041b420
add esp, 0x10
lea ecx, [ebp - 0xdb0]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x4049fe
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea edx, [ebp - 0xdb0]
push edx
lea eax, [ebp - 0x174c]
push str.failed_to_deletefile:__s__errorcode_u
push eax
call fcn.0041b420
add esp, 0x10
push 0x32
inc esi
call ebx
jmp 0x404940
push esi
lea ecx, [ebp - 0x174c]
push str.delete_file__uCount_d
push ecx
call fcn.0041b420
lea edx, [ebp - 0x174c]
push edx
call fcn.004013e3
lea eax, [ebp - 0xba0]
push eax
call fcn.00401631
add esp, 0x14
test eax, eax
jne 0x404a4c
lea ecx, [ebp - 0xdb0]
push ecx
call fcn.00401631
add esp, 4
test eax, eax
je 0x404aa1
cmp dword [ebp - 0x1788], 0
jne 0x405591
push str.Fail_3.2___Try_Again.
call fcn.004013e3
add esp, 4
mov dword [ebp - 0x1788], 1
jmp 0x404841
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea edx, [ebp - 0xf34]
push str.Fail_3_with_Err__u.
push edx
call fcn.0041b420
lea eax, [ebp - 0xf34]
push eax
call fcn.004013e3
add esp, 0x10
jmp 0x40559e
call fcn.004018e8
push 0x103
lea eax, [ebp - 0x113f]
push 0
push eax
mov byte [ebp - 0x1140], 0
call fcn.0041bb50
push 0x103
lea ecx, [ebp - 0xeb3]
push 0
push ecx
mov byte [ebp - 0xeb4], 0
call fcn.0041bb50
push 0x104
lea edx, [ebp - 0x990]
push 0
push edx
call fcn.0041bb50
add esp, 0x24
push 0x104
lea eax, [ebp - 0x990]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
mov ecx, 0x41
lea esi, [ebp - 0x990]
lea edi, [ebp - 0xeb4]
rep movsd dword es:[edi], dword [esi]
lea ecx, [ebp - 0x990]
push 0x5c
push ecx
call fcn.0041a9a0
inc eax
lea edx, [ebp - 0x1140]
add esp, 8
sub edx, eax
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x404b31
lea edx, [ebp - 0x179c]
push edx
lea eax, [ebp - 0x1798]
push eax
lea ecx, [ebp - 0xeb4]
xor esi, esi
push ecx
mov dword [ebp - 0x1798], esi
mov dword [ebp - 0x179c], esi
call fcn.00401717
add esp, 0xc
test eax, eax
je 0x40556b
cmp dword [ebp - 0x1798], esi
jne 0x40556b
cmp dword [ebp - 0x179c], 0x64000
jbe 0x40556b
push 1
lea edx, [ebp - 0x990]
push 0x104
push edx
call fcn.004015aa
add esp, 0xc
test eax, eax
jne 0x404bc3
push str.Fail_5.
call fcn.004013e3
mov eax, dword [ebp - 0x178c]
add esp, 4
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4055a7
push 0x64000
lea ecx, [ebp - 0x1790]
push ecx
lea edx, [ebp - 0x170]
push edx
lea eax, [ebp - 0x1140]
push eax
lea ecx, [ebp - 0x990]
push ecx
call fcn.004010a0
add esp, 0x14
test eax, eax
jne 0x404c23
mov edx, dword [ebp - 0x1790]
push edx
lea eax, [ebp - 0x68]
push str.Fail_6_err_is__d
push eax
call fcn.0041b420
lea ecx, [ebp - 0x68]
push ecx
call fcn.004013e3
mov edx, dword [ebp - 0x178c]
add esp, 0x10
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4055a7
lea eax, [ebp - 0x170]
push eax
lea ecx, [ebp - 0x378]
push str._slog
push ecx
call fcn.0041b420
mov esi, dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
add esp, 0xc
push 0
lea edx, [ebp - 0x378]
push edx
call esi
lea eax, [ebp - 0x170]
push eax
lea ecx, [ebp - 0x378]
push str._sSoftDlvrMng
push ecx
call fcn.0041b420
add esp, 0xc
push 0
lea edx, [ebp - 0x378]
push edx
call esi
lea eax, [ebp - 0x170]
push eax
lea ecx, [ebp - 0x378]
push str._sdata
push ecx
call fcn.0041b420
add esp, 0xc
push 0
lea edx, [ebp - 0x378]
push edx
call esi
lea eax, [ebp - 0x170]
push eax
lea ecx, [ebp - 0x378]
push str._s_resources
push ecx
call fcn.0041b420
add esp, 0xc
push 0
lea edx, [ebp - 0x378]
push edx
call esi
lea eax, [ebp - 0x170]
push eax
lea ecx, [ebp - 0x378]
push str._s_resourcesen_us
push ecx
call fcn.0041b420
add esp, 0xc
push 0
lea edx, [ebp - 0x378]
push edx
call esi
lea eax, [ebp - 0x170]
push eax
lea ecx, [ebp - 0x378]
push str._s_resourceszh_cn
push ecx
call fcn.0041b420
add esp, 0xc
push 0
lea edx, [ebp - 0x378]
push edx
call esi
push str.DamAgent.res
lea eax, [ebp - 0x170]
push eax
lea ecx, [ebp - 0x88c]
push str._s_resourcesen_us_s
push ecx
call fcn.0041b420
mov edi, dword [sym.imp.KERNEL32.dll_DeleteFileA]
add esp, 0x10
lea edx, [ebp - 0x88c]
push edx
call edi
push str.DamAgent_en.res
lea eax, [ebp - 0x170]
push eax
lea ecx, [ebp - 0x788]
push str._s_s
push ecx
call fcn.0041b420
mov esi, dword [sym.imp.KERNEL32.dll_MoveFileA]
add esp, 0x10
lea edx, [ebp - 0x88c]
push edx
lea eax, [ebp - 0x788]
push eax
call esi
push str.DamAgent.res
lea ecx, [ebp - 0x170]
push ecx
lea edx, [ebp - 0x88c]
push str._s_resourceszh_cn_s
push edx
call fcn.0041b420
add esp, 0x10
lea eax, [ebp - 0x88c]
push eax
call edi
push str.DamAgent_zh.res
lea ecx, [ebp - 0x170]
push ecx
lea edx, [ebp - 0x788]
push str._s_s
push edx
call fcn.0041b420
add esp, 0x10
lea eax, [ebp - 0x88c]
push eax
lea ecx, [ebp - 0x788]
push ecx
call esi
push 0x104
lea edx, [ebp - 0x684]
push edx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
lea eax, [ebp - 0x684]
dec eax
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x404de4
mov ecx, dword [str._system32]
mov edx, dword [0x44baa8]
mov dword [eax], ecx
mov cx, word [0x44baac]
mov dword [eax + 4], edx
lea edx, [ebp - 0x170]
push edx
mov word [eax + 8], cx
lea eax, [ebp - 0x274]
push str._sDamAgent.exe
push eax
call fcn.0041b420
add esp, 0xc
call fcn.004016f9
test eax, eax
je 0x404e46
push str.DamAgent64.exe
lea ecx, [ebp - 0x170]
push ecx
push str._s_s
lea edx, [ebp - 0x788]
push edx
jmp 0x404e5e
push str.DamAgent32.exe
lea eax, [ebp - 0x170]
push eax
push str._s_s
lea ecx, [ebp - 0x788]
push ecx
call fcn.0041b420
add esp, 0x10
lea edx, [ebp - 0x274]
push edx
lea eax, [ebp - 0x788]
push eax
call fcn.0041bc56
lea ecx, [ebp - 0x684]
push ecx
lea edx, [ebp - 0x47c]
push str._sDamAgent.exe
push edx
call fcn.0041b420
mov esi, dword [sym.imp.KERNEL32.dll_CopyFileA]
add esp, 0x14
push 0
lea eax, [ebp - 0x47c]
push eax
lea ecx, [ebp - 0x274]
push ecx
call esi
call fcn.004016f9
test eax, eax
je 0x404ed1
call fcn.004017a8
push 0
lea edx, [ebp - 0x47c]
push edx
lea eax, [ebp - 0x274]
push eax
call esi
call fcn.00401014
lea ecx, [ebp - 0x170]
push ecx
lea edx, [ebp - 0x274]
push str._sDamAgentTray.exe
push edx
call fcn.0041b420
lea eax, [ebp - 0x684]
push eax
lea ecx, [ebp - 0x47c]
push str._sDamAgentTray.exe
push ecx
call fcn.0041b420
add esp, 0x18
push 0
lea edx, [ebp - 0x47c]
push edx
lea eax, [ebp - 0x274]
push eax
call esi
lea ecx, [ebp - 0x170]
push ecx
lea edx, [ebp - 0x274]
push str._s_svchost.exe
push edx
call fcn.0041b420
lea eax, [ebp - 0x684]
push eax
lea ecx, [ebp - 0x47c]
push str._shssvchost.exe
push ecx
call fcn.0041b420
add esp, 0x18
push 0
lea edx, [ebp - 0x47c]
push edx
lea eax, [ebp - 0x274]
push eax
call esi
lea ecx, [ebp - 0x170]
push ecx
lea edx, [ebp - 0x274]
push str._sAPIRead.exe
push edx
call fcn.0041b420
lea eax, [ebp - 0x684]
push eax
lea ecx, [ebp - 0x47c]
push str._sAPIRead.exe
push ecx
call fcn.0041b420
add esp, 0x18
push 0
lea edx, [ebp - 0x47c]
push edx
lea eax, [ebp - 0x274]
push eax
call esi
lea ecx, [ebp - 0x170]
push ecx
lea edx, [ebp - 0x274]
push str._sChkRead.dll
push edx
call fcn.0041b420
lea eax, [ebp - 0x684]
push eax
lea ecx, [ebp - 0x47c]
push str._sChkRead.dll
push ecx
call fcn.0041b420
add esp, 0x18
push 0
lea edx, [ebp - 0x47c]
push edx
lea eax, [ebp - 0x274]
push eax
call esi
call fcn.004016f9
test eax, eax
je 0x40500a
call fcn.004017a8
push 0
lea ecx, [ebp - 0x47c]
push ecx
lea edx, [ebp - 0x274]
push edx
call esi
call fcn.00401014
push str.DamAgent.ini
lea eax, [ebp - 0x170]
push eax
lea ecx, [ebp - 0x1244]
push str._s_s
push ecx
call fcn.0041b420
add esp, 0x10
lea edx, [ebp - 0x1244]
push edx
push 1
push str.LvdunDlp
push str.MainInfo
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
mov edi, 0x10
cmp eax, 1
jne 0x405329
push str.components
push str.C:iNode_DAM_Agent_
lea eax, [ebp - 0xa98]
push 0x44b780
push eax
call fcn.0041b420
lea ecx, [ebp - 0xa98]
push ecx
call fcn.00401924
add esp, 0x14
test eax, eax
jne 0x40508d
push eax
lea edx, [ebp - 0xa98]
push edx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
push str.componentsRepository
push str.C:iNode_DAM_Agent_
lea eax, [ebp - 0x103c]
push 0x44b780
push eax
call fcn.0041b420
lea ecx, [ebp - 0x103c]
push ecx
call fcn.00401924
add esp, 0x14
test eax, eax
jne 0x4050c9
push eax
lea edx, [ebp - 0x103c]
push edx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
push str.attrib_S_H_C:__iNode_DAM_Agent__components_Repository
lea ecx, [ebp - 0x64]
call fcn.0040182f
mov eax, dword [ebp - 0x64]
cmp dword [ebp - 0x50], edi
jae 0x4050e1
lea eax, [ebp - 0x64]
push eax
call fcn.0041bcb5
lea eax, [ebp - 0x170]
push eax
lea ecx, [ebp - 0x274]
push str._scomponents.zip
push ecx
call fcn.0041b420
lea edx, [ebp - 0x274]
push edx
call fcn.00401631
add esp, 0x14
test eax, eax
je 0x405263
lea eax, [ebp - 0x170]
push eax
lea ecx, [ebp - 0x1784]
call fcn.0040182f
push 8
push str.7za.exe
lea ecx, [ebp - 0x1784]
call fcn.0040181b
push 4
push str._x__
lea ecx, [ebp - 0x1784]
call fcn.0040181b
lea eax, [ebp - 0x274]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x405155
sub eax, edx
push eax
lea ecx, [ebp - 0x274]
push ecx
lea ecx, [ebp - 0x1784]
call fcn.0040181b
push 1
push 0x44b938
lea ecx, [ebp - 0x1784]
call fcn.0040181b
push 4
push str.__o_
lea ecx, [ebp - 0x1784]
call fcn.0040181b
push 0x13
push str.C:iNode_DAM_Agent_
lea ecx, [ebp - 0x1784]
call fcn.0040181b
push 4
push str.tmp_
lea ecx, [ebp - 0x1784]
call fcn.0040181b
push 3
push 0x44b924
lea ecx, [ebp - 0x1784]
call fcn.0040181b
mov eax, dword [ebp - 0x1784]
cmp dword [ebp - 0x1770], edi
jae 0x4051df
lea eax, [ebp - 0x1784]
push eax
call fcn.004013e3
sub esp, 0x18
mov ecx, esp
mov dword [ebp - 0x1788], esp
push str.DamSetup
mov dword [ebp - 0xc], 0xf
mov dword [ebp - 0x10], 0
mov byte [ebp - 0x20], 0
call fcn.0040182f
lea edx, [ebp - 0x20]
push edx
lea eax, [ebp - 0x1784]
push eax
call fcn.00401479
add esp, 0x24
test eax, eax
je 0x405250
mov eax, dword [ebp - 0x20]
cmp dword [ebp - 0xc], edi
jae 0x40522e
lea eax, [ebp - 0x20]
push eax
call fcn.004013e3
mov eax, dword [ebp - 0x20]
add esp, 4
cmp dword [ebp - 0xc], edi
jae 0x405242
lea eax, [ebp - 0x20]
push str.Everything_is_Ok
push eax
call fcn.0041bbd0
add esp, 8
lea ecx, [ebp - 0x20]
call fcn.004016d6
lea ecx, [ebp - 0x1784]
call fcn.004016d6
push str.tmpcomponents
push str.C:iNode_DAM_Agent_
lea ecx, [ebp - 0xca8]
push 0x44b780
push ecx
call fcn.0041b420
lea edx, [ebp - 0xca8]
push edx
call fcn.004014a6
lea eax, [ebp - 0xca8]
push eax
call fcn.00401514
lea ecx, [ebp - 0xca8]
push ecx
call fcn.004013e3
lea edx, [ebp - 0xa98]
push edx
call fcn.004013e3
lea eax, [ebp - 0x103c]
push eax
call fcn.004013e3
lea ecx, [ebp - 0x1790]
push ecx
push 5
lea edx, [ebp - 0xa98]
push edx
lea eax, [ebp - 0xca8]
push eax
call fcn.004011ea
add esp, 0x34
test eax, eax
jne 0x40530b
mov ecx, dword [ebp - 0x1790]
push ecx
lea edx, [ebp - 0x24]
push str.Fail_7_err_is__d
push edx
call fcn.0041b420
lea eax, [ebp - 0x24]
push eax
call fcn.004013e3
mov ecx, dword [ebp - 0x178c]
add esp, 0x10
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea edx, [ebp - 0xa98]
push str.Users
push edx
call fcn.00401708
add esp, 8
lea ecx, [ebp - 0x64]
call fcn.004016d6
jmp 0x40532e
call fcn.00401942
push str.H3C_DAM_Agent
call fcn.004010a5
push str.iNode_DAM_Agent
call fcn.004010a5
add esp, 8
push 0x64
call ebx
push 0x103
lea eax, [ebp - 0x57f]
push 0
push eax
mov byte [ebp - 0x580], 0
call fcn.0041bb50
push str.DamAgent.exe
lea ecx, [ebp - 0x170]
push ecx
lea edx, [ebp - 0x580]
push str._s_s
push edx
call fcn.0041b420
lea eax, [ebp - 0x580]
push eax
call fcn.00401631
add esp, 0x20
test eax, eax
jne 0x4053f8
push 0xf
push str.szDamAgentPath
lea ecx, [ebp - 0x1768]
call fcn.0040124e
lea eax, [ebp - 0x580]
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4053b0
sub eax, edx
push eax
lea ecx, [ebp - 0x580]
push ecx
lea ecx, [ebp - 0x1768]
call fcn.0040181b
push 0x11
push str.__is_not_exist___
lea ecx, [ebp - 0x1768]
call fcn.0040181b
mov eax, dword [ebp - 0x1768]
cmp dword [ebp - 0x1754], edi
jae 0x4053f2
lea eax, [ebp - 0x1768]
push eax
jmp 0x4054fe
push 0
push 0
push 0
lea edx, [ebp - 0x580]
push edx
push str.open
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteA]
push 0xf
push str.szDamAgentPath
lea ecx, [ebp - 0x1768]
mov esi, eax
call fcn.0040124e
lea eax, [ebp - 0x580]
lea edx, [eax + 1]
nop
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x405430
sub eax, edx
push eax
lea eax, [ebp - 0x580]
push eax
lea ecx, [ebp - 0x1768]
call fcn.0040181b
mov eax, esi
cdq
push edx
push eax
lea ecx, [ebp - 0x20]
push ecx
call fcn.004018cf
push eax
lea edx, [ebp - 0x64]
push str.__hRet
push edx
call fcn.00401618
add esp, 0x18
push 0xffffffffffffffff
push 0
push eax
lea ecx, [ebp - 0x1768]
call fcn.0040168b
lea ecx, [ebp - 0x64]
call fcn.004016d6
lea ecx, [ebp - 0x20]
call fcn.004016d6
mov eax, dword [ebp - 0x1768]
cmp dword [ebp - 0x1754], edi
jae 0x4054a0
lea eax, [ebp - 0x1768]
push eax
call fcn.004013e3
add esp, 4
cmp esi, 0x20
jge 0x4054bd
lea eax, [ebp - 0x580]
push eax
call fcn.0041bcb5
add esp, 4
xor esi, esi
lea edi, [esi + 4]
lea ecx, [ebp - 0x1788]
push ecx
push str.iNode_DAM_Agent
mov dword [ebp - 0x1788], 0
call fcn.004014b0
add esp, 8
cmp dword [ebp - 0x1788], edi
je 0x405564
push 0x32
inc esi
call ebx
cmp esi, 0x4b0
jb 0x4054c2
push str.iNode_DAM_Agent_is_not_running___
call fcn.004013e3
add esp, 4
cmp dword [ebp - 0x1794], 0
je 0x405534
push str.Global_evnt_Rem_mon_switch_
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov esi, eax
test esi, esi
je 0x405534
push esi
call dword [sym.imp.KERNEL32.dll_SetEvent]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x178c]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [ebp - 0x1768]
call fcn.004016d6
mov eax, 2
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041b411
mov esp, ebp
pop ebp
ret 0x10
push str.iNode_DAM_Agent_is_running.
jmp 0x4054fe
push str.Fail_4.
call fcn.004013e3
mov eax, dword [ebp - 0x178c]
add esp, 4
push eax
mov dword [ebp - 0x1790], 0x160
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4055a7
push str.Fail_3.2.
call fcn.004013e3
add esp, 4
mov ecx, dword [ebp - 0x178c]
push ecx
call edi
lea ecx, [ebp - 0x1768]
call fcn.004016d6
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
xor eax, eax
pop ebx
call fcn.0041b411
mov esp, ebp
pop ebp
ret 0x10