Function at 0x41dca0
Capabilities:
Check if file exists
Delete file
Get file attributes
Set file attributes

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x44c
push ebx
push esi
push edi
mov esi, eax
xor eax, eax
xor ebx, ebx
mov dword [esp + 0x1b8], 0x94
mov dword [esp + 0x1bc], ebx
mov ecx, 0x23
lea edi, [esp + 0x1c0]
rep stosd dword es:[edi], eax
mov byte [esp + 0x10], bl
mov ecx, 0x13
lea edi, [esp + 0x11]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov byte [esp + 0x168], bl
xor eax, eax
mov ecx, 0x13
lea edi, [esp + 0x169]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
call fcn.00401050
push 2
call fcn.0043f090
call fcn.00421b20
push eax
call fcn.00421bc0
push esi
call fcn.0041dc30
add esp, 0xc
push 0x403
push esi
call dword [sym.imp.USER32.dll_KillTimer]
call fcn.0043c940
call fcn.0043c2d0
mov ecx, dword [0x4736e0]
mov edx, dword [0x4736e4]
mov eax, dword [str.Agent_stopped]
mov dword [esp + 0x258], ecx
push 0x50
lea ecx, [esp + 0x16c]
mov dword [esp + 0x260], edx
mov dword [esp + 0x258], eax
mov ax, word [0x4736e8]
push ecx
lea edx, [esp + 0x18]
push edx
mov word [esp + 0x26c], ax
call fcn.0041bd90
mov esi, 1
add esp, 0xc
cmp eax, esi
jne 0x41ddba
lea eax, [esp + 0x254]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x41dd95
lea ecx, [esp + 0x10]
push ecx
sub eax, edx
lea edx, [esp + eax + 0x258]
push str._v_s
push edx
call fcn.00458ee7
add esp, 0xc
jmp 0x41ddff
lea edi, [esp + 0x254]
dec edi
mov al, byte [edi + 1]
inc edi
cmp al, bl
jne 0x41ddc2
mov eax, dword [str.._Version_unavailable]
mov ecx, dword [0x4736c0]
mov edx, dword [0x4736c4]
mov dword [edi], eax
mov eax, dword [0x4736c8]
mov dword [edi + 4], ecx
mov ecx, dword [0x4736cc]
mov dword [edi + 8], edx
mov dx, word [0x4736d0]
mov dword [edi + 0xc], eax
mov dword [edi + 0x10], ecx
mov word [edi + 0x14], dx
lea eax, [esp + 0x254]
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x41de10
sub eax, edx
push 0x4cb4b0
lea eax, [esp + eax + 0x258]
push str.._Agent_started_at__s._n
push eax
call fcn.00458ee7
lea ecx, [esp + 0x25c]
push ecx
mov dword [esp + 0x260], esi
call fcn.0043e010
add esp, 0x10
lea edx, [esp + 0x1b8]
push edx
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [esp + 0x1c8], 2
je 0x41de6a
cmp eax, ebx
je 0x41dea5
call fcn.0041af00
jmp 0x41dea5
cmp eax, ebx
je 0x41dea5
call fcn.004330a0
test eax, eax
jne 0x41dea0
lea eax, [esp + 0x254]
push str.Kaseya_NT_file_system_filter_driver_was_not_unloaded.
push eax
call fcn.00458ee7
lea ecx, [esp + 0x258]
push ecx
mov dword [esp + 0x25c], esi
call fcn.0043e010
add esp, 0xc
call fcn.00433100
xor eax, eax
mov ecx, 0x41
lea edi, [esp + 0x60]
rep stosd dword es:[edi], eax
push 0x104
lea edx, [esp + 0x64]
push edx
push ebx
stosb byte es:[edi], al
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [esp + 0x60]
push 0x5c
push eax
call fcn.0045a180
add esp, 8
cmp eax, ebx
je 0x41dedc
mov byte [eax + 1], bl
jmp 0x41def2
mov cx, word [0x472f84]
mov dl, byte [0x472f86]
mov word [esp + 0x60], cx
mov byte [esp + 0x62], dl
lea edi, [esp + 0x60]
dec edi
mov al, byte [edi + 1]
inc edi
cmp al, bl
jne 0x41def7
mov eax, dword [str.lastChk.txt]
mov ecx, dword [0x472f7c]
mov edx, dword [0x472f80]
mov esi, dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov dword [edi], eax
lea eax, [esp + 0x60]
mov dword [edi + 4], ecx
push eax
mov dword [edi + 8], edx
call esi
test eax, eax
jne 0x41df54
lea ecx, [esp + 0x60]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x41df54
test al, 1
je 0x41df54
push 0x80
lea edx, [esp + 0x64]
push edx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea eax, [esp + 0x60]
push eax
call esi
call fcn.004462d0
call fcn.004517a0
mov eax, dword [0x4cb480]
cmp eax, ebx
je 0x41df74
push eax
call dword [sym.imp.USER32.dll_DestroyMenu]
mov dword [0x4cb480], ebx
cmp dword [0x4cb470], ebx
je 0x41df8d
lea esp, [esp]
call fcn.00415b90
cmp dword [0x4cb470], ebx
jne 0x41df80
call fcn.004275e0
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret