Function at 0x403788
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 reloc.KERNEL32.dll_lstrlenA
mov dword [ebp + 0xc], edi
call fcn.004083a1
pop ecx
test eax, eax
pop ecx
jne 0x4037c9
cmp dword [ebp + 8], eax
je 0x4037bd
push dword [ebp + 0x10]
push edi
push dword [ebp + 8]
call fcn.0040a750
add esp, 0xc
push edi
call fcn.0040a0d0
pop ecx
jmp 0x403a57
push ebx
push esi
mov esi, dword [ebp - 4]
push 0x23
push edi
call fcn.0040a690
mov edi, eax
pop ecx
test edi, edi
pop ecx
je 0x403a03
mov ebx, edi
sub ebx, dword [ebp + 0xc]
push ebx
push dword [ebp + 0xc]
push esi
call fcn.00409d90
and byte [esi + ebx], 0
add esi, ebx
lea eax, [edi + 1]
push 0x23
push eax
call fcn.0040a690
add esp, 0x14
mov dword [ebp + 0xc], eax
test eax, eax
je 0x403a08
mov ebx, eax
sub ebx, edi
lea eax, [ebx + 1]
push eax
push edi
push esi
call fcn.00409d90
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.0040a5f0
add esp, 0x14
test eax, eax
jne 0x403850
push 0x104
push esi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
jmp 0x4039e6
push str.System
push esi
call fcn.0040a5f0
pop ecx
test eax, eax
pop ecx
jne 0x403872
push 0x104
push esi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
jmp 0x4039e6
push str.Program_Files
push esi
call fcn.0040a5f0
pop ecx
test eax, eax
pop ecx
jne 0x4038c9
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 0x4039e6
push str.InstallDir
push esi
call fcn.0040a5f0
pop ecx
test eax, eax
pop ecx
jne 0x4038ed
push dword [0x411aa0]
push esi
call fcn.0040a150
pop ecx
pop ecx
jmp 0x4039e6
push str.SourceDir
push esi
call fcn.0040a5f0
pop ecx
test eax, eax
pop ecx
jne 0x403925
push dword [0x411bf8]
push esi
call fcn.0040a150
push 0x5c
push esi
call fcn.0040a360
add esp, 0x10
test eax, eax
je 0x4039e6
and byte [eax], 0
jmp 0x4039e6
push str.UserName
push esi
call fcn.0040a5f0
pop ecx
test eax, eax
pop ecx
jne 0x40395c
mov eax, dword [0x411af4]
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.00409d90
add esp, 0xc
and byte [edi + esi], 0
jmp 0x4039e6
push str.UserCompany
push esi
call fcn.0040a5f0
pop ecx
test eax, eax
pop ecx
jne 0x403977
mov eax, dword [0x411af4]
movzx ecx, byte [eax]
jmp 0x403997
push str.UserSerialNumber
push esi
call fcn.0040a5f0
pop ecx
test eax, eax
pop ecx
jne 0x4039a0
mov eax, dword [0x411af4]
movzx ecx, byte [eax]
lea eax, [ecx + eax + 2]
movsx ecx, byte [eax]
lea eax, [ecx + eax + 2]
movsx ecx, byte [eax]
jmp 0x40393e
push str.Date
push esi
call fcn.0040a5f0
pop ecx
test eax, eax
pop ecx
jne 0x4039e3
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 0x4111a8
push esi
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
jmp 0x4039e6
and byte [esi], 0
cmp byte [esi], 0
je 0x4039fb
push esi
call fcn.00408353
push esi
call fcn.0040a0d0
pop ecx
add esi, eax
pop ecx
push 0x23
push ebx
jmp 0x4037d1
push dword [ebp + 0xc]
jmp 0x403a09
push edi
push esi
call fcn.0040a150
push esi
call fcn.0040a0d0
mov ecx, dword [ebp + 8]
add esi, eax
sub esi, dword [ebp - 4]
add esp, 0xc
test ecx, ecx
je 0x403a49
cmp dword [ebp + 0x10], 0
je 0x403a49
and byte [ecx], 0
test esi, esi
je 0x403a49
lea eax, [esi + 1]
cmp eax, dword [ebp + 0x10]
jb 0x403a3c
mov eax, dword [ebp + 0x10]
push eax
push dword [ebp - 4]
push ecx
call fcn.00409d90
add esp, 0xc
lea eax, [ebp - 4]
push eax
call fcn.004083d4
pop ecx
mov eax, esi
pop esi
pop ebx
pop edi
leave
ret