Function at 0x418c40
Capabilities:
Hide graphical window

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x46860b
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x450
push ebx
push esi
push edi
xor eax, eax
mov ecx, 0x80
lea edi, [esp + 0x258]
rep stosd dword es:[edi], eax
mov edi, dword [ebp + 0xc]
push 8
lea eax, [edi + 0x14]
push eax
lea ecx, [esp + 0x260]
xor ebx, ebx
push ecx
mov dword [esp + 0x20], 0x401
mov dword [esp + 0x1c], ebx
call fcn.00458f80
add esp, 0xc
push ebx
push 0x80
push 1
push ebx
push ebx
push 0xc0000000
push str..KASEYAD
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [esp + 0x1c], eax
jne 0x418d03
add edi, 0x25
push edi
lea edx, [esp + 0x25c]
push edx
lea eax, [esp + 0x5c]
push str.ERROR:_Failed_to_open_Kaseya_driver_to_respond_to_a_file_access_request_by__s_to_protected_file__s._n
push eax
call fcn.00458ee7
lea ecx, [esp + 0x60]
push ecx
mov dword [esp + 0x64], 1
call fcn.0043e010
add esp, 0x14
mov ecx, dword [esp + 0x45c]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0x400
call fcn.00459619
mov esi, eax
add esp, 4
cmp esi, ebx
je 0x418f88
lea edx, [esp + 0x10]
push edx
push ebx
push 0x2969
call fcn.0043bdd0
mov eax, dword [esp + 0x1c]
add esp, 0xc
cmp eax, ebx
je 0x418e55
push 0x472dac
push eax
call fcn.0045a0f0
mov ebx, eax
mov eax, dword [esp + 0x18]
push 0x472da8
push eax
call fcn.0045a0f0
add esp, 0x10
test ebx, ebx
je 0x418e22
test eax, eax
je 0x418e22
mov eax, dword [esp + 0x10]
lea edx, [eax + 1]
nop
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x418d70
sub eax, edx
lea ebx, [eax + 0x400]
push ebx
push esi
call fcn.00459a66
mov esi, eax
add esp, 8
test esi, esi
je 0x418e3c
push ebx
call fcn.00459619
add esp, 4
test eax, eax
mov dword [esp + 0x18], eax
je 0x418e3c
mov ecx, ebx
mov edx, ecx
shr ecx, 2
xor eax, eax
mov edi, esi
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov ecx, dword [esp + 0x10]
push esi
lea eax, [esp + 0x25c]
push eax
push 0x472dac
push ecx
call fcn.0044dcb0
mov edx, dword [esp + 0x28]
mov edi, edx
add esp, 0x10
mov eax, esi
sub edi, esi
mov cl, byte [eax]
mov byte [edi + eax], cl
inc eax
test cl, cl
jne 0x418de1
xor eax, eax
mov ecx, ebx
shr ecx, 2
mov edi, esi
rep stosd dword es:[edi], eax
mov ecx, ebx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [ebp + 0xc]
push esi
add eax, 0x25
push eax
push 0x472da8
push edx
call fcn.0044dcb0
mov ecx, dword [esp + 0x28]
push ecx
call fcn.0045932f
mov edi, dword [ebp + 0xc]
add esp, 0x14
jmp 0x418e3c
lea edx, [edi + 0x25]
push edx
lea eax, [esp + 0x25c]
push eax
push str._s.exe_has_attempted_to_access_the_protected_file__s.
push esi
call fcn.00458ee7
add esp, 0x10
mov ecx, dword [esp + 0x10]
push ecx
call fcn.0045932f
add esp, 4
mov dword [esp + 0x10], 0
xor ebx, ebx
jmp 0x418e6f
lea edx, [edi + 0x25]
push edx
lea eax, [esp + 0x25c]
push eax
push str._s.exe_has_attempted_to_access_the_protected_file__s.
push esi
call fcn.00458ee7
add esp, 0x10
cmp esi, ebx
je 0x418f88
cmp dword [0x4cd608], ebx
je 0x418ece
mov ecx, dword [0x4cb474]
mov ebx, dword [sym.imp.USER32.dll_ShowWindow]
push 5
push ecx
call ebx
mov edx, dword [0x4cb474]
push edx
call dword [sym.imp.USER32.dll_SetForegroundWindow]
mov eax, dword [0x4cb474]
mov ecx, dword [0x4cb478]
push esi
push 0x418520
push eax
push 0x72
push ecx
call dword [sym.imp.USER32.dll_DialogBoxParamA]
mov edx, dword [0x4cb474]
push 0
push edx
mov dword [esp + 0x1c], eax
call ebx
xor ebx, ebx
jmp 0x418f90
lea ecx, [esp + 0x38]
call fcn.0044dfd0
mov eax, esi
mov dword [esp + 0x464], ebx
mov dword [esp + 0x28], 0x3ec
lea edx, [eax + 1]
jmp 0x418ef0
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x418ef0
sub eax, edx
inc eax
push str..pipekaseyaUser
lea ecx, [esp + 0x3c]
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], esi
call fcn.0044dff0
test eax, eax
je 0x418f72
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x28]
push ecx
lea edx, [esp + 0x20]
push edx
lea eax, [esp + 0x34]
push eax
lea ecx, [esp + 0x48]
mov dword [esp + 0x28], 0xffffffff
mov dword [esp + 0x34], ebx
mov dword [esp + 0x30], ebx
call fcn.0044e0d0
cmp dword [esp + 0x18], ebx
mov eax, dword [esp + 0x24]
jne 0x418f5c
cmp dword [esp + 0x20], 4
jne 0x418f5c
cmp eax, ebx
je 0x418f69
mov ecx, dword [eax]
mov dword [esp + 0x14], ecx
cmp eax, ebx
je 0x418f69
push eax
call fcn.0045932f
add esp, 4
lea ecx, [esp + 0x38]
call fcn.0044e230
lea ecx, [esp + 0x38]
mov dword [esp + 0x464], 0xffffffff
call fcn.0044e650
jmp 0x418f90
mov dword [esp + 0x14], 0x401
mov eax, dword [esp + 0x14]
sub eax, 0x401
lea esi, [edi + 0x25]
push esi
je 0x419005
dec eax
je 0x418fe5
dec eax
je 0x418fc5
lea edx, [esp + 0x25c]
push edx
lea eax, [esp + 0x5c]
push str.User_has_denied__s.exe_access_to_the_protected_file__s_just_for_now._n
push eax
call fcn.00458ee7
mov dword [edi + 8], 3
jmp 0x419023
lea ecx, [esp + 0x25c]
push ecx
lea edx, [esp + 0x5c]
push str.User_has_permanently_denied__s.exe_access_to_the_protected_file__s._n
push edx
call fcn.00458ee7
mov dword [edi + 8], 4
jmp 0x419023
lea eax, [esp + 0x25c]
push eax
lea ecx, [esp + 0x5c]
push str.User_has_permanently_approved__s.exe_access_to_the_protected_file__s._n
push ecx
call fcn.00458ee7
mov dword [edi + 8], 2
jmp 0x419023
lea edx, [esp + 0x25c]
push edx
lea eax, [esp + 0x5c]
push str.User_has_approved__s.exe_to_access_the_protected_file__s_just_for_now._n
push eax
call fcn.00458ee7
mov dword [edi + 8], 1
mov edx, dword [esp + 0x2c]
add esp, 0x10
push ebx
lea ecx, [esp + 0x38]
push ecx
push ebx
push ebx
push 0x129
push edi
push 0xa0000028
push edx
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov ebx, eax
mov eax, dword [esp + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
je 0x41906c
lea ecx, [esp + 0x50]
push ecx
mov dword [esp + 0x54], 4
call fcn.0043e010
add esp, 4
jmp 0x419099
push esi
lea edx, [esp + 0x25c]
push edx
lea eax, [esp + 0x5c]
push str.ERROR:_Failed_send_file_access_response_to_the_Kaseya_driver_for__s.exe_access_to_protected_file__s._n
push eax
call fcn.00458ee7
lea ecx, [esp + 0x60]
push ecx
mov dword [esp + 0x64], 1
call fcn.0043e010
add esp, 0x14
mov eax, dword [esp + 0x14]
cmp eax, 0x403
je 0x4190ab
cmp eax, 0x402
jne 0x4190b4
push edi
call fcn.00417360
add esp, 4
mov ecx, dword [esp + 0x45c]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret