Function at 0x410050
Capabilities:
Get common file path
Get hostname
Query environment variable
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c0
mov eax, dword [0x447044]
xor eax, ebp
mov dword [ebp - 4], eax
xor eax, eax
push 0x206
push eax
lea ecx, [ebp - 0x28a]
push ecx
mov word [ebp - 0x28c], ax
call fcn.004272d0
xor edx, edx
push 0x7e
push edx
lea eax, [ebp - 0x82]
push eax
mov dword [ebp - 0x29c], 0x10
mov word [ebp - 0x84], dx
call fcn.004272d0
add esp, 0x18
mov dword [ebp - 0x298], 0x40
mov dword [ebp - 0x294], 1
xor eax, eax
lea esp, [esp]
movzx ecx, word [eax + str.C:Program_FilesWW2017CF]
mov word [eax + 0x108a308], cx
add eax, 2
test cx, cx
jne 0x4100c0
push str.GetNativeSystemInfo
push str.kernel32
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x4100fa
lea ecx, [ebp - 0x2c0]
push ecx
call eax
movzx eax, word [ebp - 0x2c0]
test eax, eax
je 0x410111
xor edx, edx
cmp eax, 9
sete dl
mov eax, edx
jmp 0x410113
xor eax, eax
mov dword [0x1088270], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov dword [0x108826c], eax
lea eax, [ebp - 0x29c]
push eax
push 0x1088278
call dword [sym.imp.KERNEL32.dll_GetComputerNameW]
test eax, eax
jne 0x410149
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041f53e
mov esp, ebp
pop ebp
ret
push 0x104
push 0x1088298
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
test eax, eax
je 0x410139
push 0x104
push 0x10884a0
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x410139
cmp dword [0x1088270], 0
push ebx
push esi
push edi
je 0x4102d3
mov edi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
lea ecx, [ebp - 0x290]
push ecx
push 0x20219
push 0
push str.SOFTWAREMicrosoftWindowsCurrentVersion
push reloc.OLEAUT32.dll_SysReAllocString
call edi
test eax, eax
jne 0x410629
mov ebx, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
lea edx, [ebp - 0x298]
push edx
mov edx, dword [ebp - 0x290]
lea eax, [ebp - 0x84]
push eax
lea ecx, [ebp - 0x294]
push ecx
push 0
push str.ProgramFilesDir
push edx
call ebx
test eax, eax
jne 0x4102c7
lea esp, [esp]
movzx ecx, word [ebp + eax - 0x84]
mov word [eax + 0x10888b0], cx
add eax, 2
test cx, cx
jne 0x4101e0
push 0x80
lea eax, [ebp - 0x84]
push 0
push eax
call fcn.004272d0
mov ecx, dword [ebp - 0x290]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
add esp, 0xc
push ecx
call esi
lea edx, [ebp - 0x290]
push edx
push 0x20119
push 0
push str.SOFTWAREMicrosoftWindowsCurrentVersion
push reloc.OLEAUT32.dll_SysReAllocString
call edi
test eax, eax
jne 0x410629
lea eax, [ebp - 0x298]
push eax
mov eax, dword [ebp - 0x290]
lea ecx, [ebp - 0x84]
push ecx
lea edx, [ebp - 0x294]
push edx
push 0
push str.ProgramFilesDir
push eax
call ebx
test eax, eax
jne 0x4102ab
jmp 0x410270
movzx ecx, word [ebp + eax - 0x84]
mov word [eax + 0x10886a8], cx
add eax, 2
test cx, cx
jne 0x410270
push 0x80
lea ecx, [ebp - 0x84]
push 0
push ecx
call fcn.004272d0
mov edx, dword [ebp - 0x290]
add esp, 0xc
push edx
call esi
jmp 0x41036a
mov eax, dword [ebp - 0x290]
push eax
call esi
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041f53e
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0x290]
push ecx
jmp 0x410623
lea edx, [ebp - 0x290]
push edx
push 0x20019
push 0
push str.SOFTWAREMicrosoftWindowsCurrentVersion
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x410629
lea eax, [ebp - 0x298]
push eax
mov eax, dword [ebp - 0x290]
lea ecx, [ebp - 0x84]
push ecx
lea edx, [ebp - 0x294]
push edx
push 0
push str.ProgramFilesDir
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x41061c
lea ebx, [ebx]
movzx ecx, word [ebp + eax - 0x84]
mov word [eax + 0x10886a8], cx
add eax, 2
test cx, cx
jne 0x410330
push 0x80
lea ecx, [ebp - 0x84]
push 0
push ecx
call fcn.004272d0
mov edx, dword [ebp - 0x290]
add esp, 0xc
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0x104
lea eax, [ebp - 0x28c]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x410629
push 0x208
push 0
push 0x1088ab8
call fcn.004272d0
add esp, 0xc
xor eax, eax
lea esp, [esp]
movzx ecx, word [ebp + eax - 0x28c]
mov word [eax + 0x1088ab8], cx
add eax, 2
test cx, cx
jne 0x4103a0
lea ecx, [ebp - 0x28c]
push 0x5c
push ecx
call fcn.0041faf1
add esp, 8
test eax, eax
je 0x410629
lea edx, [ebp - 0x28c]
push 0x5c
push edx
call fcn.0041faf1
add eax, 2
mov edx, 0x1088cc0
add esp, 8
sub edx, eax
jmp 0x4103f0
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x4103f0
lea eax, [ebp - 0x28c]
push 0x5c
push eax
call fcn.0041faf1
xor ecx, ecx
add esp, 8
mov word [eax + 2], cx
xor eax, eax
jmp 0x410420
movzx ecx, word [ebp + eax - 0x28c]
mov word [eax + 0x10890d0], cx
add eax, 2
test cx, cx
jne 0x410420
lea edx, [ebp - 0x28c]
push 0x5c
push edx
call fcn.0041faf1
xor ecx, ecx
add esp, 8
mov word [eax], cx
xor eax, eax
nop
movzx ecx, word [ebp + eax - 0x28c]
mov word [eax + 0x10892d8], cx
add eax, 2
test cx, cx
jne 0x410450
push 0x208
lea edx, [ebp - 0x28c]
push 0
push edx
call fcn.004272d0
add esp, 0xc
xor eax, eax
nop
movzx ecx, word [eax + 0x1088cc0]
mov word [ebp + eax - 0x28c], cx
add eax, 2
test cx, cx
jne 0x410480
lea eax, [ebp - 0x28c]
push 0x2e
push eax
call fcn.0041faf1
add esp, 8
test eax, eax
je 0x410629
lea ecx, [ebp - 0x28c]
push 0x2e
push ecx
call fcn.0041faf1
xor edx, edx
add esp, 8
mov word [eax], dx
xor eax, eax
jmp 0x4104d0
movzx ecx, word [ebp + eax - 0x28c]
mov word [eax + 0x1088ec8], cx
add eax, 2
test cx, cx
jne 0x4104d0
mov edi, dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
push 0x104
push 0x10894e0
push str._TEMP_
call edi
mov esi, dword [sym.imp.USER32.dll_wsprintfW]
push 0x1088ec8
push str.C:UsersPublicSMR7Debug_s
push 0x10896e8
call esi
add esp, 0xc
push 0x104
push 0x10898f0
push str._SystemDrive_
call edi
push 0x43549c
push 0x10892d8
push 0x439b00
push 0x1086e00
call esi
push 0x435478
push 0x10892d8
push 0x439b00
push 0x1087418
call esi
push str.Presto_7.ini
push 0x10892d8
push 0x439b00
push 0x1087a30
call esi
push str.C:UsersPublicSMR7WM7installTemp
push str._sPolicySystem
push 0x1087210
call esi
push str.C:UsersPublicSMR7WM7installTemp
push str._sInfo
push 0x1087828
call esi
add esp, 0x48
push str.C:UsersPublicSMR7WM7installTemp
push 0x43dc04
push 0x1087e40
call esi
push 0x43549c
push str.C:UsersPublicSMR7WM7installTemp
push str._sPolicySystem_s
push 0x1087008
call esi
push 0x435478
push str.C:UsersPublicSMR7WM7installTemp
push str._sInfo_s
push 0x1087620
call esi
push str.Presto_7.ini
push str.C:UsersPublicSMR7WM7installTemp
push 0x439b00
push 0x1087c38
call esi
add esp, 0x3c
xor eax, eax
jmp 0x4105f0
movzx ecx, word [eax + str.C:UsersPublicSMR7WM7installTemp]
mov word [eax + 0x1088058], cx
add eax, 2
test cx, cx
jne 0x4105f0
pop edi
pop esi
mov eax, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041f53e
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x290]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
xor eax, eax
pop ebx
call fcn.0041f53e
mov esp, ebp
pop ebp
ret