Function at 0x40ca70
Capabilities:
Set file attributes

Disassembly:
push 0xffffffffffffffff
push 0x45ee8e
mov eax, dword fs:[0]
push eax
mov eax, 0x1034
call fcn.0044bf30
mov eax, dword [0x47b038]
xor eax, esp
mov dword [esp + 0x1030], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x47b038]
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.0043e2c0
add esp, 4
test esi, esi
je 0x40ce5c
cmp word [esi], 0
je 0x40ce5c
push 0x34
call fcn.0044ad7f
add esp, 4
mov dword [esp + 0x20], eax
mov dword [esp + 0x1050], 0
test eax, eax
je 0x40cb0e
mov ecx, eax
call fcn.00447f10
mov edi, eax
jmp 0x40cb10
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.0044b43c
add esp, 8
cmp word [eax], 0
je 0x40cb4d
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 0x40cb90
movzx ecx, word [esp + eax + 0x24]
mov word [esp + eax + 0x63c], cx
add eax, 2
test cx, cx
jne 0x40cb90
mov ecx, dword [ebx + 4]
push 0
lea edx, [esp + 0x28]
push edx
lea eax, [esp + 0x234]
push eax
call fcn.004449d0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CopyFile____ld_n
call fcn.0043e2c0
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
lea edx, [esp + 0x28]
push edx
lea eax, [esp + 0x234]
push eax
call fcn.004449d0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CopyFile____ld_n
call fcn.0043e2c0
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.00447810
push 0
push 0
push str.KxTmpSvc
push esi
mov ecx, edi
call fcn.00447b10
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 0x40ccfb
push ebx
push esi
push str.RegConnectRegistry_failed_____s___ld__n
call fcn.0043e2c0
add esp, 0xc
mov dword [esp + 0x14], 0
cmp ebx, 0x35
jne 0x40ccfb
push str.__Try_to_start_Remote_Registry_service_n
call fcn.0043e2c0
add esp, 4
push 0
push 0
push str.RemoteRegistry
push esi
mov ecx, edi
call fcn.00447b10
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 0x40ccfb
push eax
push esi
push str.RegConnectRegistry_failed_____s___ld__n
call fcn.0043e2c0
add esp, 0xc
push str.Set_default_printer_on_a_remote_computer_n
call fcn.0043e2c0
add esp, 4
cmp dword [esp + 0x14], 0
je 0x40cdf3
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 0x4618d4
push edx
call fcn.0044a440
add esp, 0x20
test eax, eax
je 0x40cdd7
mov eax, dword [esp + 0x14]
push 0xf003f
push str.SetErr
push 0x4618d4
push eax
call fcn.0044a540
add esp, 0x10
push 0x80
push str.KxTmpSvc
push esi
mov ecx, edi
call fcn.00447be0
mov edx, dword [esp + 0x14]
push 0x20019
lea ecx, [esp + 0x848]
push ecx
push str.SetErr
push 0x4618d4
push edx
call fcn.0044a470
add esp, 0x14
test eax, eax
je 0x40cdd7
lea eax, [esp + 0x844]
push eax
push str.ERROR___s_n
call fcn.0043e2c0
lea ecx, [esp + 0x852]
push ecx
call fcn.0044b40b
add esp, 0xc
cmp eax, 1
jne 0x40cdd7
push str.___Applying_default_printer_on_a_remote_computer___Success._n
jmp 0x40cddc
push str.___Applying_default_printer_on_a_remote_computer___Failed._n
call fcn.0043e2c0
mov eax, dword [esp + 0x18]
add esp, 4
test eax, eax
je 0x40cdf3
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push str.KxTmpSvc
push esi
mov ecx, edi
call fcn.004479f0
test edi, edi
je 0x40ce14
mov ecx, edi
call fcn.00448160
push edi
call fcn.0044ad0a
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.00442ba0
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.00442ba0
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.0044ac80
add esp, 0x1040
ret 8