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

Disassembly:
sub esp, 0x18
push esi
mov esi, dword [esp + 0x20]
push edi
push str.Windows
push esi
call fcn.00412070
add esp, 8
test eax, eax
jne 0x40771c
push 0x104
push esi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
jmp 0x4077f9
push str.System
push esi
call fcn.00412070
add esp, 8
test eax, eax
jne 0x40773f
push 0x104
push esi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
jmp 0x4077f9
push str.CommonFiles
push esi
call fcn.00412070
add esp, 8
test eax, eax
jne 0x40780d
lea eax, [esp + 0x24]
push eax
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
jne 0x4077f9
lea ecx, [esp + 8]
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push ecx
lea edx, [esp + 0x10]
push esi
push edx
mov dword [esp + 0x18], eax
push eax
mov eax, dword [esp + 0x34]
push str.CommonFilesDir
push eax
mov dword [esp + 0x20], 0x104
call edi
test eax, eax
je 0x4077ee
mov eax, dword [esp + 0x24]
lea ecx, [esp + 8]
push ecx
lea edx, [esp + 0x10]
push esi
push edx
push 0
push str.ProgramFilesDir
push eax
call edi
push esi
call fcn.004020d0
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
add esp, 4
repne scasb al, byte es:[edi]
mov ecx, dword [str.Common_Files]
dec edi
mov dword [edi], ecx
mov edx, dword [0x41971c]
mov dword [edi + 4], edx
mov eax, dword [0x419720]
mov dword [edi + 8], eax
mov cl, byte [0x419724]
mov byte [edi + 0xc], cl
mov edx, dword [esp + 0x24]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp byte [esi], 0
je 0x407807
push esi
call fcn.00402110
add esp, 4
pop edi
pop esi
add esp, 0x18
ret
push str.Program_Files
push esi
call fcn.00412070
add esp, 8
test eax, eax
jne 0x407867
lea eax, [esp + 0x24]
push eax
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
jne 0x4077f9
lea ecx, [esp + 0xc]
lea edx, [esp + 8]
push ecx
push esi
push edx
mov dword [esp + 0x14], eax
push eax
mov eax, dword [esp + 0x34]
push str.ProgramFilesDir
push eax
mov dword [esp + 0x24], 0x104
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov ecx, dword [esp + 0x24]
push ecx
jmp 0x4077f3
push str.MyDocuments
push esi
call fcn.00412070
add esp, 8
test eax, eax
jne 0x407889
push 5
push esi
call fcn.00401090
add esp, 8
jmp 0x4077f9
push str.AppData
push esi
call fcn.00412070
add esp, 8
test eax, eax
jne 0x407909
push 0x1a
push esi
call fcn.00401090
add esp, 8
test eax, eax
jne 0x4077f9
mov eax, dword [0x41e124]
test eax, eax
jne 0x4077f9
push 0x104
push esi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
push esi
call fcn.004020d0
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
add esp, 4
repne scasb al, byte es:[edi]
mov edx, dword [str.Application_Data]
dec edi
mov dword [edi], edx
mov eax, dword [0x4196dc]
mov dword [edi + 4], eax
mov ecx, dword [0x4196e0]
mov dword [edi + 8], ecx
mov edx, dword [0x4196e4]
mov dword [edi + 0xc], edx
mov al, byte [0x4196e8]
mov byte [edi + 0x10], al
jmp 0x4077f9
push str.LocalAppData
push esi
call fcn.00412070
add esp, 8
test eax, eax
jne 0x4079e4
push 0x1c
push esi
call fcn.00401090
add esp, 8
test eax, eax
jne 0x4077f9
push 0x1a
push esi
call fcn.00401090
add esp, 8
test eax, eax
mov eax, dword [0x41e124]
jne 0x40799d
test eax, eax
jne 0x4077f9
push 0x104
push esi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
push esi
call fcn.004020d0
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
add esp, 4
repne scasb al, byte es:[edi]
mov ecx, dword [str.Application_Data]
dec edi
mov dword [edi], ecx
mov edx, dword [0x4196dc]
mov dword [edi + 4], edx
mov eax, dword [0x4196e0]
mov dword [edi + 8], eax
mov ecx, dword [0x4196e4]
mov dword [edi + 0xc], ecx
mov dl, byte [0x4196e8]
mov byte [edi + 0x10], dl
jmp 0x4077f9
test eax, eax
je 0x4077f9
push 0x5c
push esi
call fcn.00412290
add esp, 8
test eax, eax
jne 0x4079cc
mov eax, 0x4196c4
mov edx, esi
sub edx, eax
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x4079bd
jmp 0x4077f9
mov ecx, str.Local_SettingsApplication_Data
mov edx, eax
sub edx, ecx
mov al, byte [ecx]
mov byte [edx + ecx], al
inc ecx
test al, al
jne 0x4079d5
jmp 0x4077f9
push str.UserDir
push esi
call fcn.00412070
add esp, 8
test eax, eax
jne 0x407a45
push 0x28
push esi
call fcn.00401090
add esp, 8
test eax, eax
jne 0x4077f9
mov eax, dword [0x41e124]
test eax, eax
je 0x40770b
push 0x1a
push esi
call fcn.00401090
push 0x5c
push esi
call fcn.00412290
add esp, 0x10
test eax, eax
jne 0x407aa5
mov eax, 0x4196c4
mov edx, esi
sub edx, eax
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x407a36
jmp 0x4077f9
push str.InstallDir
push esi
call fcn.00412070
add esp, 8
test eax, eax
jne 0x407a6e
mov ecx, dword [0x41e184]
mov edx, esi
mov al, byte [ecx]
inc ecx
mov byte [edx], al
inc edx
test al, al
jne 0x407a5f
jmp 0x4077f9
push str.SourceDir
push esi
call fcn.00412070
add esp, 8
test eax, eax
jne 0x407aad
mov ecx, dword [0x41e0b8]
mov edx, esi
mov al, byte [ecx]
inc ecx
mov byte [edx], al
inc edx
test al, al
jne 0x407a88
push 0x5c
push esi
call fcn.00412290
add esp, 8
test eax, eax
je 0x4077f9
mov byte [eax], 0
jmp 0x4077f9
push str.Date
push esi
call fcn.00412070
add esp, 8
test eax, eax
jne 0x407b0e
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x12]
and eax, 0xffff
and edx, 0xffff
lea eax, [eax + eax*4]
lea ecx, [eax + eax*4]
lea eax, [edx + ecx*4]
mov ecx, dword [esp + 0x16]
and ecx, 0xffff
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
lea edx, [ecx + eax*4]
push edx
push 0x41966c
push esi
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
jmp 0x4077f9
mov byte [esi], 0
pop edi
pop esi
add esp, 0x18
ret