Function at 0x40d650
Capabilities:
Set file attributes

Disassembly:
push 0xffffffffffffffff
push 0x467e8e
mov eax, dword fs:[0]
push eax
mov eax, 0x1034
call fcn.00454790
mov eax, dword [0x48807c]
xor eax, esp
mov dword [esp + 0x1030], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x48807c]
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.004454c0
add esp, 4
test esi, esi
je 0x40da40
cmp word [esi], 0
je 0x40da40
push 0x34
call fcn.004534f0
add esp, 4
mov dword [esp + 0x20], eax
mov dword [esp + 0x1050], 0
test eax, eax
je 0x40d6ee
mov ecx, eax
call fcn.0044f630
mov edi, eax
jmp 0x40d6f0
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.00453bad
add esp, 8
cmp word [eax], 0
je 0x40d72d
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 0x40d770
movzx ecx, word [esp + eax + 0x24]
mov word [esp + eax + 0x63c], cx
add eax, 2
test cx, cx
jne 0x40d770
mov ecx, dword [ebx + 4]
push 0
push 0
lea edx, [esp + 0x2c]
push edx
lea eax, [esp + 0x238]
push eax
call fcn.0044bf30
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CopyFile____ld_n
call fcn.004454c0
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.0044bf30
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CopyFile____ld_n
call fcn.004454c0
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.0044ef30
push 0
push 0
push str.KxTmpSvc
push esi
mov ecx, edi
call fcn.0044f230
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 0x40d8df
push ebx
push esi
push str.RegConnectRegistry_failed_____s___ld__n
call fcn.004454c0
add esp, 0xc
mov dword [esp + 0x14], 0
cmp ebx, 0x35
jne 0x40d8df
push str.__Try_to_start_Remote_Registry_service_n
call fcn.004454c0
add esp, 4
push 0
push 0
push str.RemoteRegistry
push esi
mov ecx, edi
call fcn.0044f230
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 0x40d8df
push eax
push esi
push str.RegConnectRegistry_failed_____s___ld__n
call fcn.004454c0
add esp, 0xc
push str.Set_default_printer_on_a_remote_computer_n
call fcn.004454c0
add esp, 4
cmp dword [esp + 0x14], 0
je 0x40d9d7
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 0x46a9d0
push edx
call fcn.00451b60
add esp, 0x20
test eax, eax
je 0x40d9bb
mov eax, dword [esp + 0x14]
push 0xf003f
push str.SetErr
push 0x46a9d0
push eax
call fcn.00451c60
add esp, 0x10
push 0x80
push str.KxTmpSvc
push esi
mov ecx, edi
call fcn.0044f300
mov edx, dword [esp + 0x14]
push 0x20019
lea ecx, [esp + 0x848]
push ecx
push str.SetErr
push 0x46a9d0
push edx
call fcn.00451b90
add esp, 0x14
test eax, eax
je 0x40d9bb
lea eax, [esp + 0x844]
push eax
push str.ERROR___s_n
call fcn.004454c0
lea ecx, [esp + 0x852]
push ecx
call fcn.00453b7c
add esp, 0xc
cmp eax, 1
jne 0x40d9bb
push str.___Applying_default_printer_on_a_remote_computer___Success._n
jmp 0x40d9c0
push str.___Applying_default_printer_on_a_remote_computer___Failed._n
call fcn.004454c0
mov eax, dword [esp + 0x18]
add esp, 4
test eax, eax
je 0x40d9d7
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push str.KxTmpSvc
push esi
mov ecx, edi
call fcn.0044f110
test edi, edi
je 0x40d9f8
mov ecx, edi
call fcn.0044f880
push edi
call fcn.004534ca
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.0044a070
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.0044a070
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.00453432
add esp, 0x1040
ret 8