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

Disassembly:
sub esp, 0x218
push ebx
push ebp
push esi
mov esi, dword [esp + 0x228]
test esi, esi
push edi
je 0x4a8c92
mov ebx, dword [esp + 0x230]
test ebx, ebx
je 0x4a8c92
mov byte [ebx], 0
mov eax, dword [0x567d70]
mov cx, word [0x567d74]
mov dl, byte [0x567d76]
mov dword [esp + 0x18], eax
lea eax, [esp + 0x18]
push 6
push eax
push esi
mov word [esp + 0x28], cx
mov byte [esp + 0x2a], dl
call dword [sym.imp.SHLWAPI.dll_StrCmpNIA]
test eax, eax
jne 0x4a8af5
add esi, 6
lea ecx, [esp + 0x124]
push esi
push str.CLSID_sInprocServer32
push 0x104
push ecx
call fcn.00431100
add esp, 0x10
mov edi, dword [sym.imp.SHLWAPI.dll_SHGetValueA]
lea edx, [esp + 0x10]
lea eax, [esp + 0x20]
push edx
lea ecx, [esp + 0x18]
push eax
push ecx
lea edx, [esp + 0x130]
push 0
push edx
push SysReAllocString
mov dword [esp + 0x2c], 1
mov dword [esp + 0x28], 0x104
call edi
mov ebp, dword [sym.imp.SHLWAPI.dll_PathFindFileNameA]
test eax, eax
jne 0x4a8a2e
lea eax, [esp + 0x20]
push eax
call ebp
test eax, eax
je 0x4a8a2e
lea ecx, [esp + 0x20]
sub eax, ecx
mov edi, eax
cmp edi, 0x7fffffff
ja 0x4a8a1c
lea esi, [esp + 0x20]
mov edx, 0x104
mov eax, ebx
sub esi, ebx
lea ecx, [edi + edx - 0x104]
test ecx, ecx
je 0x4a8a14
mov cl, byte [esi + eax]
test cl, cl
je 0x4a8a14
mov byte [eax], cl
inc eax
dec edx
jne 0x4a89e6
dec eax
pop edi
pop esi
pop ebp
mov byte [eax], 0
mov eax, 1
pop ebx
add esp, 0x218
ret 8
test edx, edx
jne 0x4a8a19
dec eax
mov byte [eax], 0
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x218
ret 8
push esi
push 0x567d58
lea edx, [esp + 0x12c]
push 0x104
push edx
call fcn.00431100
add esp, 0x10
lea eax, [esp + 0x10]
lea ecx, [esp + 0x20]
lea edx, [esp + 0x14]
push eax
push ecx
push edx
lea eax, [esp + 0x130]
push 0
push eax
push SysReAllocString
mov dword [esp + 0x2c], 1
mov dword [esp + 0x28], 0x104
call edi
test eax, eax
jne 0x4a8c92
lea ecx, [esp + 0x20]
push ecx
call ebp
test eax, eax
je 0x4a8c92
lea edx, [esp + 0x20]
sub eax, edx
mov edi, eax
cmp edi, 0x7fffffff
ja 0x4a8ae3
lea esi, [esp + 0x20]
mov edx, 0x104
mov eax, ebx
sub esi, ebx
lea ecx, [edi + edx - 0x104]
test ecx, ecx
je 0x4a8adb
mov cl, byte [esi + eax]
test cl, cl
je 0x4a8adb
mov byte [eax], cl
inc eax
dec edx
jne 0x4a8aad
dec eax
pop edi
pop esi
pop ebp
mov byte [eax], 0
mov eax, 1
pop ebx
add esp, 0x218
ret 8
test edx, edx
jne 0x4a8ae0
dec eax
mov byte [eax], 0
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x218
ret 8
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcmpiA]
xor ebp, ebp
mov edi, 0x567ae0
mov edx, dword [edi]
push esi
push edx
call ebx
test eax, eax
je 0x4a8b4c
add edi, 8
inc ebp
cmp edi, 0x567bb0
jb 0x4a8b02
mov edi, dword [esp + 0x230]
push str.Windows
push esi
call ebx
test eax, eax
jne 0x4a8b7c
push 0x104
push edi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
xor ecx, ecx
pop edi
cmp ecx, eax
pop esi
sbb eax, eax
pop ebp
neg eax
pop ebx
add esp, 0x218
ret 8
mov eax, dword [ebp*8 + 0x567ae4]
mov edi, dword [esp + 0x230]
push 0
push eax
push edi
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
test eax, eax
je 0x4a8b1f
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x218
ret 8
push str.System
push esi
call ebx
test eax, eax
jne 0x4a8ba9
push 0x104
push edi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
xor edx, edx
pop edi
cmp edx, eax
pop esi
sbb eax, eax
pop ebp
neg eax
pop ebx
add esp, 0x218
ret 8
push 0x567d4c
push esi
call ebx
test eax, eax
jne 0x4a8bd4
push 0x104
push edi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
neg eax
pop edi
pop esi
sbb eax, eax
pop ebp
neg eax
pop ebx
add esp, 0x218
ret 8
push 0x567d44
push esi
call ebx
test eax, eax
jne 0x4a8c01
push edi
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
xor ecx, ecx
pop edi
cmp ecx, eax
pop esi
sbb eax, eax
pop ebp
neg eax
pop ebx
add esp, 0x218
ret 8
lea edx, [esp + 0x10]
lea eax, [esp + 0x14]
push edx
push edi
push eax
push esi
push 0x567d00
push SysReAllocString
mov dword [esp + 0x2c], 1
mov dword [esp + 0x28], 0x104
call dword [sym.imp.SHLWAPI.dll_SHGetValueA]
test eax, eax
jne 0x4a8c43
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x218
ret 8
push str.ProgramFiles
push esi
call ebx
test eax, eax
jne 0x4a8c5c
mov ecx, dword [esp + 0x10]
push ecx
push edi
push str.ProgramFilesDir
jmp 0x4a8c73
push 0x567cf4
push esi
call ebx
test eax, eax
jne 0x4a8c92
mov edx, dword [esp + 0x10]
push edx
push edi
push str.CommonFilesDir
push str.SoftwareMicrosoftWindowsCurrentVersion
push reloc.OLEAUT32.dll_SysReAllocString
call fcn.004a8cb0
add esp, 0x14
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x218
ret 8
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x218
ret 8