Function at 0x10043a2
Capabilities:
Get common file path
Query environment variable
Query or enumerate registry key
Query or enumerate registry value
Set registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x3bc
mov eax, dword [0x100923c]
push ebx
push esi
push edi
mov dword [ebp - 4], eax
xor ebx, ebx
xor eax, eax
push 0x40
pop ecx
mov byte [ebp - 0x108], bl
lea edi, [ebp - 0x107]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
push 0x40
xor eax, eax
cmp dword [ebp + 8], ebx
mov byte [ebp - 0x20c], bl
pop ecx
lea edi, [ebp - 0x20b]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov dword [ebp - 0x3ac], ebx
stosb byte es:[edi], al
mov dword [ebp - 0x3a8], ebx
je 0x100484e
cmp dword [0x1009250], ebx
je 0x100441d
mov esi, 0x104
push esi
lea eax, [ebp - 0x108]
push eax
push 0x1001bcc
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
jmp 0x100447e
push ebx
lea eax, [ebp - 0x3ac]
push eax
push ebx
push 0x2001f
push ebx
push ebx
push ebx
push 0x10011e0
push 0x80000001
mov byte [ebp - 0x108], bl
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x1004479
lea eax, [ebp - 0x3b0]
push eax
lea eax, [ebp - 0x108]
push eax
lea eax, [ebp - 0x39c]
push eax
push ebx
push 0x1001220
push dword [ebp - 0x3ac]
mov dword [ebp - 0x3b0], 0x104
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov esi, 0x104
call fcn.01003032
lea eax, [ebp - 0x3b4]
push eax
xor edi, edi
inc edi
push edi
push ebx
push 0x1001b88
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x10044a9
mov dword [ebp - 0x3b4], ebx
push esi
lea eax, [ebp - 0x20c]
push eax
mov dword [ebp - 0x39c], ebx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
push 0x1001b78
push esi
lea eax, [ebp - 0x20c]
push eax
call fcn.01005cac
push edi
lea eax, [ebp - 0x3bc]
push eax
lea eax, [ebp - 0x3b8]
push eax
lea eax, [ebp - 0x20c]
push eax
call sub.ADVPACK.dll_GetVersionFromFile
cmp dword [ebp - 0x3b8], 0x50000
jb 0x1004505
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
jmp 0x1004516
push 0x10017f0
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [ebp - 0x3a8], edi
cmp eax, ebx
mov dword [ebp - 0x398], eax
je 0x100455b
cmp dword [ebp - 0x3a8], ebx
jne 0x100453b
push 0x1a3
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x1009264], eax
jmp 0x1004551
push 0x20e
push dword [ebp - 0x398]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x1009268], eax
cmp eax, ebx
je 0x100455b
mov dword [ebp - 0x39c], edi
cmp byte [ebp - 0x108], bl
je 0x100456b
mov dword [ebp - 0x3b0], ebx
jmp 0x100457f
push esi
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
mov dword [ebp - 0x3b0], edi
push 0x10016d0
push esi
lea eax, [ebp - 0x108]
push eax
call fcn.01005cac
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea edi, [ebp + eax - 0x108]
lea esi, [ebp - 4]
sub esi, edi
mov dword [ebp - 0x3a4], 0x1009020
mov dword [ebp - 0x3a0], ebx
mov eax, dword [ebp - 0x3a4]
test byte [eax + 0x1c], 1
je 0x10045ce
cmp dword [ebp - 0x39c], ebx
je 0x10045f8
push dword [ebp - 0x3b4]
lea eax, [ebp - 0x108]
push dword [ebp - 0x3b0]
push dword [ebp - 0x3a4]
push esi
push edi
push eax
push dword [ebp - 0x3ac]
call fcn.01003691
test eax, eax
jl 0x1004612
add dword [ebp - 0x3a0], 0x20
add dword [ebp - 0x3a4], 0x20
cmp dword [ebp - 0x3a0], 0x120
jb 0x10045ba
cmp dword [ebp - 0x3ac], ebx
je 0x1004626
push dword [ebp - 0x3ac]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x3b4], ebx
je 0x100463a
push dword [ebp - 0x3b4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 1
call fcn.010078ae
push dword [0x100924c]
call fcn.010056d3
cmp dword [ebp - 0x3a8], ebx
mov eax, dword [0x1009264]
je 0x100465e
mov eax, dword [0x1009268]
cmp eax, ebx
je 0x1004664
call eax
cmp dword [ebp - 0x398], ebx
je 0x1004678
push dword [ebp - 0x398]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
cmp dword [0x1009254], ebx
je 0x100484e
call fcn.01002da8
test eax, eax
jne 0x100484e
lea eax, [ebp - 0x398]
push eax
push 0x2001f
mov esi, 0x1001b74
lea edi, [ebp - 0x3a8]
movsw word es:[edi], word [esi]
push ebx
push 0x1001b48
movsb byte es:[edi], byte [esi]
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
push 0x80000001
call esi
test eax, eax
jne 0x10046ef
push 3
lea eax, [ebp - 0x3a8]
push eax
push 1
push ebx
push 0x1001b34
push dword [ebp - 0x398]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push dword [ebp - 0x398]
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
call edi
jmp 0x10046f5
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x398]
push eax
push 0x2001f
push ebx
push 0x1001afc
push 0x80000001
call esi
test eax, eax
jne 0x100484e
push ebx
push ebx
push ebx
push ebx
lea eax, [ebp - 0x3a0]
push eax
lea eax, [ebp - 0x394]
push eax
mov dword [ebp - 0x3a4], ebx
mov dword [ebp - 0x39c], ebx
push ebx
jmp 0x10047c5
lea eax, [ebp - 0x3a4]
push eax
push 0x2001f
push ebx
lea eax, [ebp - 0x394]
push eax
push dword [ebp - 0x398]
call esi
test eax, eax
jne 0x10047a7
lea eax, [ebp - 0x3a0]
push eax
lea eax, [ebp - 0x290]
push eax
push ebx
push ebx
push 0x1001af4
push dword [ebp - 0x3a4]
mov dword [ebp - 0x3a0], 0x82
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x100479f
push 0x1001acc
lea eax, [ebp - 0x290]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x10047e5
push dword [ebp - 0x3a4]
call edi
inc dword [ebp - 0x39c]
push ebx
push ebx
push ebx
push ebx
lea eax, [ebp - 0x3a0]
push eax
lea eax, [ebp - 0x394]
push eax
push dword [ebp - 0x39c]
push dword [ebp - 0x398]
mov dword [ebp - 0x3a0], 0x104
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
test eax, eax
je 0x100473a
jmp 0x1004846
lea eax, [ebp - 0x3a0]
push eax
lea eax, [ebp - 0x39c]
push eax
push ebx
push ebx
mov esi, 0x1001ac4
push esi
push dword [ebp - 0x3a4]
mov dword [ebp - 0x39c], ebx
mov dword [ebp - 0x3a0], 4
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
and byte [ebp - 0x39b], 0xdf
push 4
pop eax
push eax
lea ecx, [ebp - 0x39c]
push ecx
push eax
push ebx
push esi
push dword [ebp - 0x3a4]
mov dword [ebp - 0x3a0], eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push dword [ebp - 0x3a4]
call edi
push dword [ebp - 0x398]
call edi
cmp dword [0x1009250], ebx
je 0x100486c
call fcn.01002969
test eax, eax
je 0x1004864
call fcn.01002b39
cmp dword [0x1009250], ebx
jne 0x100487a
mov edi, dword [ebp + 8]
cmp edi, ebx
je 0x10048e5
call fcn.01002c29
jmp 0x100487d
mov edi, dword [ebp + 8]
cmp edi, ebx
je 0x10048e5
call fcn.010024ad
cmp eax, 1
je 0x10048ef
cmp eax, 2
jb 0x1004914
call fcn.010029f7
test eax, eax
jne 0x10048d1
push 5
push ebx
mov esi, 0x10013d0
push esi
push edi
call fcn.01003def
call fcn.01003299
test eax, eax
je 0x10048d1
cmp dword [0x1009250], ebx
mov eax, 0x1001ab0
jne 0x10048c7
mov eax, 0x1001aa0
push 5
push eax
push esi
push edi
call fcn.01003def
push ebx
push ebx
push 0x10013e0
push edi
call fcn.01003def
call fcn.010040f2
jmp 0x1004914
call fcn.01003135
cmp eax, 1
jne 0x10048f8
push ebx
push ebx
push 0x10013d0
jmp 0x100490e
cmp eax, 2
je 0x1004907
cmp eax, 3
je 0x1004907
cmp eax, 4
jne 0x1004914
push ebx
push ebx
push 0x10013e0
push edi
call fcn.01003def
cmp edi, ebx
je 0x1004925
cmp dword [0x1009258], ebx
je 0x1004925
call fcn.01002f87
mov ecx, dword [ebp - 4]
pop edi
pop esi
pop ebx
call fcn.01005857
leave
ret 4