Function at 0x4074f0
Capabilities:
Delete directory
Delete file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5a3d97
mov eax, dword fs:[0]
push eax
push ecx
mov eax, 0x1a4
call fcn.00596bf0
mov eax, dword [0x616930]
xor eax, ebp
mov dword [ebp - 0x18], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov eax, dword [ebp + 8]
lea ecx, [ebp - 0x1ac]
push ecx
mov ecx, str.C:WindowsTemp
mov dword [ebp - 0x1b0], eax
call fcn.00408e10
xor ebx, ebx
mov dword [ebp - 4], ebx
mov byte [ebp - 4], 1
push 0x13
mov esi, 0xf
push 0x5ade70
lea ecx, [ebp - 0x8c]
mov dword [ebp - 0x78], esi
mov dword [ebp - 0x7c], ebx
mov byte [ebp - 0x8c], bl
call fcn.0040b380
mov byte [ebp - 4], 2
push 0x14
push str.DCDistributionServer
lea ecx, [ebp - 0x70]
mov dword [ebp - 0x5c], esi
mov dword [ebp - 0x60], ebx
mov byte [ebp - 0x70], bl
call fcn.0040b380
mov byte [ebp - 4], 3
push 9
push str.UEMSAgent
lea ecx, [ebp - 0x54]
mov dword [ebp - 0x40], esi
mov dword [ebp - 0x44], ebx
mov byte [ebp - 0x54], bl
call fcn.0040b380
mov byte [ebp - 4], 4
push 0xa
push 0x5adea8
lea ecx, [ebp - 0x38]
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x28], ebx
mov byte [ebp - 0x38], bl
call fcn.0040b380
mov dword [ebp - 0x194], esi
mov dword [ebp - 0x198], ebx
mov byte [ebp - 0x1a8], bl
mov byte [ebp - 4], 6
xor edi, edi
jmp 0x4075e0
cmp edi, 4
jge 0x4076e7
mov edx, dword [ebp - 0x1ac]
mov eax, edx
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x4075f4
sub eax, esi
push eax
push edx
lea ecx, [ebp - 0x1a8]
call fcn.0040b380
push 1
push 0x5adcac
lea ecx, [ebp - 0x1a8]
call fcn.0040b260
lea eax, [edi*8]
sub eax, edi
cmp dword [ebp + eax*4 - 0x78], 0x10
lea eax, [ebp + eax*4 - 0x8c]
jb 0x407637
mov edx, dword [eax]
jmp 0x407639
mov edx, eax
mov eax, edx
lea esi, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x407640
sub eax, esi
push eax
push edx
lea ecx, [ebp - 0x1a8]
call fcn.0040b260
mov eax, dword [ebp - 0x1a8]
mov esi, 0x10
cmp dword [ebp - 0x194], esi
jae 0x40766f
lea eax, [ebp - 0x1a8]
mov ecx, dword [ebp - 0x1b0]
push ebx
push eax
call fcn.00407160
mov eax, dword [ebp - 0x1a8]
cmp dword [ebp - 0x194], esi
jae 0x407690
lea eax, [ebp - 0x1a8]
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
test eax, eax
je 0x4076c8
mov eax, dword [ebp - 0x1a8]
cmp dword [ebp - 0x194], esi
jae 0x4076af
lea eax, [ebp - 0x1a8]
push eax
push str.Directory_cleaned_successfully_:__s_n
call fcn.00402b00
add esp, 8
inc edi
mov esi, 0xf
jmp 0x4075e0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Directory_cleanup_failed_:__d_n
call fcn.00402b00
add esp, 8
inc edi
mov esi, 0xf
jmp 0x4075e0
push 0x11
push str.AgentUpgrader.exe
lea ecx, [ebp - 0x18c]
mov dword [ebp - 0x178], esi
mov dword [ebp - 0x17c], ebx
mov byte [ebp - 0x18c], bl
call fcn.0040b380
mov byte [ebp - 4], 7
push 0x16
push str.DCAgentServerInfo.json
lea ecx, [ebp - 0x170]
mov dword [ebp - 0x15c], esi
mov dword [ebp - 0x160], ebx
mov byte [ebp - 0x170], bl
call fcn.0040b380
mov byte [ebp - 4], 8
push 0x1b
push str.agentInstallerComponent.exe
lea ecx, [ebp - 0x154]
mov dword [ebp - 0x140], esi
mov dword [ebp - 0x144], ebx
mov byte [ebp - 0x154], bl
call fcn.0040b380
mov byte [ebp - 4], 9
push 0xc
push str.DMRootCA.crt
lea ecx, [ebp - 0x138]
mov dword [ebp - 0x124], esi
mov dword [ebp - 0x128], ebx
mov byte [ebp - 0x138], bl
call fcn.0040b380
mov byte [ebp - 4], 0xa
push 0x13
push str.DMRootCA_Server.crt
lea ecx, [ebp - 0x11c]
mov dword [ebp - 0x108], esi
mov dword [ebp - 0x10c], ebx
mov byte [ebp - 0x11c], bl
call fcn.0040b380
mov byte [ebp - 4], 0xb
push 0xd
push str.UEMSAgent.msi
lea ecx, [ebp - 0x100]
mov dword [ebp - 0xec], esi
mov dword [ebp - 0xf0], ebx
mov byte [ebp - 0x100], bl
call fcn.0040b380
mov byte [ebp - 4], 0xc
push 0xd
push str.UEMSAgent.mst
lea ecx, [ebp - 0xe4]
mov dword [ebp - 0xd0], esi
mov dword [ebp - 0xd4], ebx
mov byte [ebp - 0xe4], bl
call fcn.0040b380
mov byte [ebp - 4], 0xd
push 0x1a
push str.UEMSDistributionServer.msi
lea ecx, [ebp - 0xc8]
mov dword [ebp - 0xb4], esi
mov dword [ebp - 0xb8], ebx
mov byte [ebp - 0xc8], bl
call fcn.0040b380
mov byte [ebp - 4], 0xe
push 0x1a
push str.UEMSDistributionServer.mst
lea ecx, [ebp - 0xac]
mov dword [ebp - 0x98], esi
mov dword [ebp - 0x9c], ebx
mov byte [ebp - 0xac], bl
call fcn.0040b380
mov byte [ebp - 4], 0xf
xor edi, edi
cmp edi, 9
jge 0x407938
mov edx, dword [ebp - 0x1ac]
mov eax, edx
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x407865
sub eax, esi
push eax
push edx
lea ecx, [ebp - 0x1a8]
call fcn.0040b380
push 1
push 0x5adcac
lea ecx, [ebp - 0x1a8]
call fcn.0040b260
lea eax, [edi*8]
sub eax, edi
cmp dword [ebp + eax*4 - 0x178], 0x10
lea eax, [ebp + eax*4 - 0x18c]
jb 0x4078ab
mov edx, dword [eax]
jmp 0x4078ad
mov edx, eax
mov eax, edx
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x4078b2
sub eax, esi
push eax
push edx
lea ecx, [ebp - 0x1a8]
call fcn.0040b260
mov eax, dword [ebp - 0x1a8]
mov esi, 0x10
cmp dword [ebp - 0x194], esi
jae 0x4078e1
lea eax, [ebp - 0x1a8]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
je 0x407919
mov eax, dword [ebp - 0x1a8]
cmp dword [ebp - 0x194], esi
jae 0x407900
lea eax, [ebp - 0x1a8]
push eax
push str.File_deleted_successfully_:__s_n
call fcn.00402b00
add esp, 8
inc edi
mov esi, 0xf
jmp 0x407851
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.File_deletion_failed_:__d_n
call fcn.00402b00
add esp, 8
inc edi
mov esi, 0xf
jmp 0x407851
push fcn.00409020
push 9
push 0x1c
lea edx, [ebp - 0x18c]
push edx
mov byte [ebp - 4], 6
call fcn.0057c8e2
cmp dword [ebp - 0x194], 0x10
jb 0x407969
mov eax, dword [ebp - 0x1a8]
push eax
call fcn.0057af7f
add esp, 4
push fcn.00409020
push 4
push 0x1c
lea ecx, [ebp - 0x8c]
push ecx
mov dword [ebp - 0x194], esi
mov dword [ebp - 0x198], ebx
mov byte [ebp - 0x1a8], bl
mov byte [ebp - 4], 1
call fcn.0057c8e2
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x1ac]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4079bd
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 1
jmp 0x4079d8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x18]
xor ecx, ebp
call fcn.0057af8a
mov esp, ebp
pop ebp
ret 4