Function at 0x40d420
Capabilities:
Set file attributes

Disassembly:
push 0xffffffffffffffff
push 0x4623ae
mov eax, dword fs:[0]
push eax
mov eax, 0x1034
call fcn.0044f450
mov eax, dword [0x47f038]
xor eax, esp
mov dword [esp + 0x1030], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x47f038]
xor eax, esp
push eax
lea eax, [esp + 0x1048]
mov dword fs:[0], eax
mov eax, dword [esp + 0x105c]
mov esi, dword [esp + 0x1058]
mov ebx, ecx
push str.KMPRNAPI::SetDefaultPrinterInRemote_n
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], eax
call fcn.004412c0
add esp, 4
test esi, esi
je 0x40d810
cmp word [esi], 0
je 0x40d810
push 0x34
call fcn.0044e29f
add esp, 4
mov dword [esp + 0x20], eax
mov dword [esp + 0x1050], 0
test eax, eax
je 0x40d4be
mov ecx, eax
call fcn.0044b430
mov edi, eax
jmp 0x40d4c0
xor edi, edi
push 0x104
lea ecx, [esp + 0x438]
push ecx
push 0
mov dword [esp + 0x105c], 0xffffffff
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea edx, [esp + 0x434]
push 0x5c
push edx
call fcn.0044e95c
add esp, 8
cmp word [eax], 0
je 0x40d4fd
xor ecx, ecx
mov word [eax], cx
mov ebp, dword [sym.imp.USER32.dll_wsprintfW]
lea edx, [esp + 0x434]
push edx
lea eax, [esp + 0x230]
push str._sKxTmpSvc.exe
push eax
call ebp
lea eax, [ebx + 0xc38]
push eax
lea ecx, [esp + 0x34]
push str._sKxTmpSvc.exe
push ecx
call ebp
add esp, 0x18
xor eax, eax
jmp 0x40d540
movzx ecx, word [esp + eax + 0x24]
mov word [esp + eax + 0x63c], cx
add eax, 2
test cx, cx
jne 0x40d540
mov ecx, dword [ebx + 4]
push 0
push 0
lea edx, [esp + 0x2c]
push edx
lea eax, [esp + 0x238]
push eax
call fcn.00447d30
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CopyFile____ld_n
call fcn.004412c0
add esp, 8
push 0x80
lea ecx, [esp + 0x28]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea edx, [esp + 0x434]
push edx
lea eax, [esp + 0x230]
push str._sSetPrnt.exe
push eax
call ebp
lea eax, [ebx + 0xc38]
push eax
lea ecx, [esp + 0x34]
push str._sSetPrnt.exe
push ecx
call ebp
mov ecx, dword [ebx + 4]
add esp, 0x18
push 0
push 0
lea edx, [esp + 0x2c]
push edx
lea eax, [esp + 0x238]
push eax
call fcn.00447d30
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CopyFile____ld_n
call fcn.004412c0
add esp, 8
push 0x80
lea ecx, [esp + 0x28]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea edx, [esp + 0x63c]
push edx
push str.Kyocera_Mita_Remote_Installer_Temporary_Service
push str.KxTmpSvc
push esi
mov ecx, edi
call fcn.0044ad30
push 0
push 0
push str.KxTmpSvc
push esi
mov ecx, edi
call fcn.0044b030
lea eax, [esp + 0x14]
push eax
push reloc.OLEAUT32.dll_SysReAllocString
push esi
mov dword [esp + 0x20], 0
call dword [sym.imp.ADVAPI32.dll_RegConnectRegistryW]
mov ebx, eax
test ebx, ebx
je 0x40d6af
push ebx
push esi
push str.RegConnectRegistry_failed_____s___ld__n
call fcn.004412c0
add esp, 0xc
mov dword [esp + 0x14], 0
cmp ebx, 0x35
jne 0x40d6af
push str.__Try_to_start_Remote_Registry_service_n
call fcn.004412c0
add esp, 4
push 0
push 0
push str.RemoteRegistry
push esi
mov ecx, edi
call fcn.0044b030
push 0x1388
call dword [sym.imp.KERNEL32.dll_Sleep]
lea ecx, [esp + 0x14]
push ecx
push reloc.OLEAUT32.dll_SysReAllocString
push esi
call dword [sym.imp.ADVAPI32.dll_RegConnectRegistryW]
test eax, eax
je 0x40d6af
push eax
push esi
push str.RegConnectRegistry_failed_____s___ld__n
call fcn.004412c0
add esp, 0xc
push str.Set_default_printer_on_a_remote_computer_n
call fcn.004412c0
add esp, 4
cmp dword [esp + 0x14], 0
je 0x40d7a7
mov edx, dword [esp + 0x1c]
push edx
lea eax, [esp + 0x848]
push str.SETDEF___s_
push eax
call ebp
mov edx, dword [esp + 0x20]
push 0x20006
lea ecx, [esp + 0x854]
push ecx
push str.SetPrn
push 0x464918
push edx
call fcn.0044d960
add esp, 0x20
test eax, eax
je 0x40d78b
mov eax, dword [esp + 0x14]
push 0xf003f
push str.SetErr
push 0x464918
push eax
call fcn.0044da60
add esp, 0x10
push 0x80
push str.KxTmpSvc
push esi
mov ecx, edi
call fcn.0044b100
mov edx, dword [esp + 0x14]
push 0x20019
lea ecx, [esp + 0x848]
push ecx
push str.SetErr
push 0x464918
push edx
call fcn.0044d990
add esp, 0x14
test eax, eax
je 0x40d78b
lea eax, [esp + 0x844]
push eax
push str.ERROR___s_n
call fcn.004412c0
lea ecx, [esp + 0x852]
push ecx
call fcn.0044e92b
add esp, 0xc
cmp eax, 1
jne 0x40d78b
push str.___Applying_default_printer_on_a_remote_computer___Success._n
jmp 0x40d790
push str.___Applying_default_printer_on_a_remote_computer___Failed._n
call fcn.004412c0
mov eax, dword [esp + 0x18]
add esp, 4
test eax, eax
je 0x40d7a7
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push str.KxTmpSvc
push esi
mov ecx, edi
call fcn.0044af10
test edi, edi
je 0x40d7c8
mov ecx, edi
call fcn.0044b680
push edi
call fcn.0044e22a
add esp, 4
mov esi, dword [esp + 0x18]
add esi, 0xc38
push esi
lea edx, [esp + 0x28]
push str._sKxTmpSvc.exe
push edx
call ebp
mov edi, dword [esp + 0x24]
mov ecx, dword [edi + 4]
add esp, 0xc
lea eax, [esp + 0x24]
push eax
call fcn.00445e70
push esi
lea ecx, [esp + 0x28]
push str._sSetPrnt.exe
push ecx
call ebp
mov ecx, dword [edi + 4]
add esp, 0xc
lea edx, [esp + 0x24]
push edx
call fcn.00445e70
xor eax, eax
mov ecx, dword [esp + 0x1048]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x1030]
xor ecx, esp
call fcn.0044e1a0
add esp, 0x1040
ret 8