Function at 0x40f280
Capabilities:
Get common file path
Query or enumerate registry value

Disassembly:
push 0xffffffffffffffff
push 0x45ef4e
mov eax, dword fs:[0]
push eax
sub esp, 0x644
mov eax, dword [0x47b038]
xor eax, esp
mov dword [esp + 0x640], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x47b038]
xor eax, esp
push eax
lea eax, [esp + 0x658]
mov dword fs:[0], eax
mov eax, dword [esp + 0x66c]
mov esi, dword [esp + 0x668]
xor edi, edi
mov ebp, ecx
mov dword [esp + 0x14], ebp
mov dword [esp + 0x20], edi
cmp eax, edi
je 0x40f2e2
cmp word [eax], di
je 0x40f2e2
mov dword [esp + 0x20], eax
cmp esi, edi
je 0x40f304
cmp word [esi], di
je 0x40f304
sub ecx, esi
mov eax, esi
lea edx, [ecx + 0x828]
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
cmp cx, di
jne 0x40f2f5
lea eax, [ebp + 0x828]
mov dword [esp + 0x1c], eax
cmp word [eax], di
je 0x40f519
cmp byte [ebp + 0x1c], 0
jne 0x40f4ef
mov ebx, dword [sym.imp.ADVAPI32.dll_RegConnectRegistryW]
lea eax, [esp + 0x18]
push eax
push reloc.OLEAUT32.dll_SysReAllocString
xor edx, edx
add ebp, 0xa30
push esi
mov word [ebp], dx
mov dword [esp + 0x24], edi
call ebx
mov edi, eax
test edi, edi
je 0x40f3f7
push edi
push esi
push str.RegConnectRegistry_failed_____s___ld__n
call fcn.0043e2c0
add esp, 0xc
mov dword [esp + 0x18], 0
cmp edi, 0x35
jne 0x40f4eb
push str.__Try_to_start_Remote_Registry_service_n
call fcn.0043e2c0
push 0x34
call fcn.0044ad7f
add esp, 8
mov dword [esp + 0x28], eax
xor edi, edi
mov dword [esp + 0x660], edi
cmp eax, edi
je 0x40f39c
mov ecx, eax
call fcn.00447f10
mov edi, eax
push 0
push 0
push str.RemoteRegistry
push esi
mov ecx, edi
mov dword [esp + 0x670], 0xffffffff
call fcn.00447b10
push 0x1388
call dword [sym.imp.KERNEL32.dll_Sleep]
lea ecx, [esp + 0x18]
push ecx
push reloc.OLEAUT32.dll_SysReAllocString
push esi
call ebx
test eax, eax
je 0x40f3e3
push eax
push esi
push str.RegConnectRegistry_failed_____s___ld__n
call fcn.0043e2c0
add esp, 0xc
test edi, edi
je 0x40f3f7
mov ecx, edi
call fcn.00448160
push edi
call fcn.0044ad0a
add esp, 4
mov eax, dword [esp + 0x18]
test eax, eax
je 0x40f4eb
lea edx, [esp + 0x2c]
push edx
push 0x20019
push 0
push str.SOFTWAREMicrosoftWindowsCurrentVersionSetup
push eax
mov dword [esp + 0x38], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov edi, dword [sym.imp.USER32.dll_wsprintfW]
mov ebx, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test eax, eax
jne 0x40f47e
lea eax, [esp + 0x24]
push eax
mov eax, dword [esp + 0x30]
lea ecx, [esp + 0x248]
push ecx
lea edx, [esp + 0x3c]
push edx
push 0
push str.DriverCachePath
push eax
mov dword [esp + 0x3c], 0x104
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x40f477
lea ecx, [esp + 0x244]
push ecx
push esi
push 0x465e90
push ebp
call edi
add esp, 0x10
mov edx, dword [esp + 0x2c]
push edx
call ebx
cmp word [ebp], 0
jne 0x40f491
push esi
push str._s_admin_Driver_Cache
push ebp
call edi
add esp, 0xc
push str._SystemRoot_
push ebp
call fcn.0044bc75
add esp, 8
test eax, eax
je 0x40f4d2
push esi
lea eax, [esp + 0x248]
push str._s_admin__
push eax
call edi
lea eax, [esp + 0x250]
mov edx, ebp
mov ecx, eax
add esp, 0xc
sub edx, ecx
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x40f4c3
push ebp
push str.DRIVER_CACHE____s__n
call fcn.0043e2c0
mov eax, dword [esp + 0x20]
add esp, 8
test eax, eax
je 0x40f4eb
push eax
call ebx
mov ebp, dword [esp + 0x14]
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x1c]
lea edx, [esp + 0x30]
push edx
push 0x104
add ebp, 0xc38
push ebp
push 1
push eax
mov dword [esp + 0x44], 0
push ecx
jmp 0x40f6af
lea eax, [esp + 0x1c]
push eax
push 0x20019
push edi
push str.SOFTWAREMicrosoftWindowsCurrentVersionSetup
xor edx, edx
lea ebx, [ebp + 0xa30]
push reloc.OLEAUT32.dll_SysReAllocString
mov word [ebx], dx
mov dword [esp + 0x28], edi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40f59a
lea ecx, [esp + 0x14]
push ecx
mov ecx, dword [esp + 0x20]
lea edx, [esp + 0x40]
push edx
lea eax, [esp + 0x40]
push eax
push edi
push str.DriverCachePath
push ecx
mov dword [esp + 0x2c], 0x104
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x40f58f
lea eax, [esp + 0x3c]
mov edx, ebx
mov ecx, eax
sub edx, ecx
lea ecx, [ecx]
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
cmp cx, di
jne 0x40f580
mov edx, dword [esp + 0x1c]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0x104
lea eax, [esp + 0x450]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
cmp word [ebx], di
jne 0x40f5ef
lea eax, [esp + 0x44c]
mov edx, ebx
mov ecx, eax
sub edx, ecx
nop
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
cmp cx, di
jne 0x40f5c0
mov eax, str.Driver_Cache
mov edx, ebx
sub edx, eax
jmp 0x40f5e0
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
cmp cx, di
jne 0x40f5e0
push str._SystemRoot_
push ebx
call fcn.0044bc75
add esp, 8
cmp eax, edi
je 0x40f67f
xor ecx, ecx
jmp 0x40f610
movzx edx, word [esp + ecx + 0x44c]
mov word [esp + ecx + 0x3c], dx
add ecx, 2
cmp dx, di
jne 0x40f610
add eax, 0x18
mov edx, eax
lea ebx, [ebx]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x40f630
lea edi, [esp + 0x3c]
sub eax, edx
add edi, 0xfffffffe
mov cx, word [edi + 2]
add edi, 2
test cx, cx
jne 0x40f644
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
lea eax, [esp + 0x3c]
rep movsb byte es:[edi], byte [esi]
mov edx, ebx
mov ecx, eax
sub edx, ecx
lea ebx, [ebx]
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x40f670
push ebx
push str.DRIVER_CACHE____s__n
call fcn.0043e2c0
mov eax, dword [esp + 0x28]
add esp, 8
lea edx, [esp + 0x28]
push edx
push 0x104
add ebp, 0xc38
push ebp
push 1
push eax
mov dword [esp + 0x3c], 0
push 0
call sub.WINSPOOL.DRV_GetPrinterDriverDirectoryW
xor eax, eax
mov ecx, dword [esp + 0x658]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x640]
xor ecx, esp
call fcn.0044ac80
add esp, 0x650
ret 8