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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
lea eax, [ebp - 4]
push edi
mov edi, dword [ebp + 0xc]
push eax
push 0xffdc
mov dword [ebp + 0xc], edi
call fcn.00408572
pop ecx
test eax, eax
pop ecx
jne 0x4037e2
cmp dword [ebp + 8], eax
je 0x4037d6
push dword [ebp + 0x10]
push edi
push dword [ebp + 8]
call fcn.0040a9c0
add esp, 0xc
push edi
call fcn.0040a290
pop ecx
jmp 0x403a70
push ebx
push esi
mov esi, dword [ebp - 4]
push 0x23
push edi
call fcn.0040a900
mov edi, eax
pop ecx
test edi, edi
pop ecx
je 0x403a1c
mov ebx, edi
sub ebx, dword [ebp + 0xc]
push ebx
push dword [ebp + 0xc]
push esi
call fcn.00409f50
and byte [esi + ebx], 0
add esi, ebx
lea eax, [edi + 1]
push 0x23
push eax
call fcn.0040a900
add esp, 0x14
mov dword [ebp + 0xc], eax
test eax, eax
je 0x403a21
mov ebx, eax
sub ebx, edi
lea eax, [ebx + 1]
push eax
push edi
push esi
call fcn.00409f50
mov eax, dword [ebp + 0xc]
and byte [ebx + esi + 1], 0
push str.Windows
push esi
lea ebx, [eax + 1]
mov dword [ebp + 0xc], ebx
call fcn.0040a860
add esp, 0x14
test eax, eax
jne 0x403869
push 0x104
push esi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
jmp 0x4039ff
push str.System
push esi
call fcn.0040a860
pop ecx
test eax, eax
pop ecx
jne 0x40388b
push 0x104
push esi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
jmp 0x4039ff
push str.Program_Files
push esi
call fcn.0040a860
pop ecx
test eax, eax
pop ecx
jne 0x4038e2
lea eax, [ebp - 8]
push eax
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
lea eax, [ebp - 0xc]
and dword [ebp - 0x10], 0
push eax
lea eax, [ebp - 0x10]
push esi
push eax
push 0
push str.ProgramFilesDir
push dword [ebp - 8]
mov dword [ebp - 0xc], 0x104
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x4039ff
push str.InstallDir
push esi
call fcn.0040a860
pop ecx
test eax, eax
pop ecx
jne 0x403906
push dword [0x414b14]
push esi
call fcn.0040a310
pop ecx
pop ecx
jmp 0x4039ff
push str.SourceDir
push esi
call fcn.0040a860
pop ecx
test eax, eax
pop ecx
jne 0x40393e
push dword [0x414c6c]
push esi
call fcn.0040a310
push 0x5c
push esi
call fcn.0040a5a0
add esp, 0x10
test eax, eax
je 0x4039ff
and byte [eax], 0
jmp 0x4039ff
push str.UserName
push esi
call fcn.0040a860
pop ecx
test eax, eax
pop ecx
jne 0x403975
mov eax, dword [0x414b68]
movzx ecx, byte [eax]
movzx edi, byte [ecx + eax + 2]
lea eax, [ecx + eax + 2]
push edi
inc eax
push eax
push esi
call fcn.00409f50
add esp, 0xc
and byte [edi + esi], 0
jmp 0x4039ff
push str.UserCompany
push esi
call fcn.0040a860
pop ecx
test eax, eax
pop ecx
jne 0x403990
mov eax, dword [0x414b68]
movzx ecx, byte [eax]
jmp 0x4039b0
push str.UserSerialNumber
push esi
call fcn.0040a860
pop ecx
test eax, eax
pop ecx
jne 0x4039b9
mov eax, dword [0x414b68]
movzx ecx, byte [eax]
lea eax, [ecx + eax + 2]
movsx ecx, byte [eax]
lea eax, [ecx + eax + 2]
movsx ecx, byte [eax]
jmp 0x403957
push str.Date
push esi
call fcn.0040a860
pop ecx
test eax, eax
pop ecx
jne 0x4039fc
lea eax, [ebp - 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemTime]
movzx eax, word [ebp - 0x20]
movzx ecx, word [ebp - 0x1e]
imul eax, eax, 0x64
add eax, ecx
movzx ecx, word [ebp - 0x1a]
imul eax, eax, 0x64
add eax, ecx
push eax
push 0x4121bc
push esi
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
jmp 0x4039ff
and byte [esi], 0
cmp byte [esi], 0
je 0x403a14
push esi
call fcn.00408524
push esi
call fcn.0040a290
pop ecx
add esi, eax
pop ecx
push 0x23
push ebx
jmp 0x4037ea
push dword [ebp + 0xc]
jmp 0x403a22
push edi
push esi
call fcn.0040a310
push esi
call fcn.0040a290
mov ecx, dword [ebp + 8]
add esi, eax
sub esi, dword [ebp - 4]
add esp, 0xc
test ecx, ecx
je 0x403a62
cmp dword [ebp + 0x10], 0
je 0x403a62
and byte [ecx], 0
test esi, esi
je 0x403a62
lea eax, [esi + 1]
cmp eax, dword [ebp + 0x10]
jb 0x403a55
mov eax, dword [ebp + 0x10]
push eax
push dword [ebp - 4]
push ecx
call fcn.00409f50
add esp, 0xc
lea eax, [ebp - 4]
push eax
call fcn.004085a5
pop ecx
mov eax, esi
pop esi
pop ebx
pop edi
leave
ret