Function at 0x402890
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push reloc.kernel32.dll_LocalFree
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xf30
push ebx
push esi
mov ebx, ecx
push edi
lea ecx, [esp + 0x10]
call fcn.00405b50
lea ecx, [esp + 0x20]
mov dword [esp + 0xf44], 0
call fcn.004066c0
lea ecx, [esp + 0x14]
mov byte [esp + 0xf44], 1
call fcn.00407280
mov ecx, 0xd
mov esi, str.SOFTWAREMicrosoftWindowsCurrentVersionApp_Paths_
lea edi, [esp + 0x738]
rep movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
xor eax, eax
mov ecx, 0xf2
lea edi, [esp + 0x76d]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov edx, dword [ebp + 8]
mov ecx, 0xd
mov esi, str.SOFTWAREMicrosoftWindowsCurrentVersionUninstall_
lea edi, [esp + 0x338]
rep movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
xor eax, eax
mov ecx, 0xf2
lea edi, [esp + 0x36d]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov edi, 0x424db2
mov esi, edx
mov ecx, 1
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
mov byte [esp + 0xf44], 2
je 0x402bd6
lea eax, [ebx + 0x400]
mov esi, eax
mov ecx, edx
sub esi, edx
nop
mov dl, byte [ecx]
mov byte [esi + ecx], dl
inc ecx
test dl, dl
jne 0x402960
mov edx, eax
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402970
lea edi, [esp + 0x738]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x402981
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x738]
push ecx
push 0x80000002
lea ecx, [esp + 0x1c]
call fcn.00407400
test eax, eax
lea ecx, [esp + 0x14]
jne 0x402bda
lea edx, [esp + 0xc]
push edx
lea edi, [ebx + 0x1400]
push edi
mov esi, 0x400
push str.Game_Registry
mov dword [esp + 0x18], esi
call fcn.00407360
push edi
push 0x80000002
lea ecx, [esp + 0x1c]
call fcn.00407400
test eax, eax
jne 0x402bd6
lea eax, [esp + 0xc]
push eax
lea ecx, [ebx + 0x800]
push ecx
push str.Install_Dir
lea ecx, [esp + 0x20]
mov dword [esp + 0x18], esi
call fcn.00407360
lea edx, [esp + 0xc]
push edx
lea eax, [ebx + 0xc00]
push eax
push str.Product_GUID
lea ecx, [esp + 0x20]
mov dword [esp + 0x18], esi
call fcn.00407360
lea eax, [esp + 0xc]
push eax
push ebx
push str.Installed_From
lea ecx, [esp + 0x20]
mov dword [esp + 0x18], esi
call fcn.00407360
lea ecx, [esp + 0xc]
push ecx
lea edx, [ebx + 0x1c00]
push edx
push str.DisplayName
lea ecx, [esp + 0x20]
mov dword [esp + 0x18], esi
call fcn.00407360
lea eax, [esp + 0xc]
push eax
lea ecx, [ebx + 0x2208]
push ecx
push str.Language
lea ecx, [esp + 0x20]
mov dword [esp + 0x18], 0x104
call fcn.00407360
lea edx, [esp + 0xc]
push edx
lea eax, [ebx + 0x1800]
push eax
push str.Folder
lea ecx, [esp + 0x20]
mov dword [esp + 0x18], esi
call fcn.00407360
lea edx, [esp + 0x128]
mov eax, edi
sub edx, edi
mov edi, edi
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x402ab0
lea edi, [esp + 0x128]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x402ac2
mov cx, word [0x424ed8]
mov word [edi], cx
lea edi, [esp + 0x128]
dec edi
lea esp, [esp]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x402ae0
mov edx, dword [0x424ed4]
lea eax, [esp + 0x128]
push eax
push 0x80000002
lea ecx, [esp + 0x1c]
mov dword [edi], edx
call fcn.00407400
test eax, eax
jne 0x402b21
lea ecx, [ebx + 0x230c]
push ecx
push str.Language
lea ecx, [esp + 0x1c]
call fcn.00407390
jmp 0x402b2b
mov dword [ebx + 0x230c], 1
lea eax, [ebx + 0xc00]
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402b33
lea edi, [esp + 0x338]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x402b44
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
lea edx, [esp + 0x338]
push edx
rep movsb byte es:[edi], byte [esi]
push 0x80000002
lea ecx, [esp + 0x1c]
call fcn.00407400
test eax, eax
jne 0x402bd6
lea eax, [esp + 0xc]
push eax
lea ecx, [ebx + 0x1000]
push ecx
push str.LogFile
lea ecx, [esp + 0x20]
mov dword [esp + 0x18], 0x400
call fcn.00407360
add ebx, 0x2000
push ebx
lea ecx, [esp + 0x14]
call fcn.00405680
lea edx, [esp + 0x230]
push edx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
push 0x400
lea eax, [esp + 0xb3c]
push eax
lea ecx, [esp + 0x238]
push ecx
call dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
lea ecx, [esp + 0x14]
mov byte [esp + 0xf44], 1
call fcn.004073c0
lea ecx, [esp + 0x20]
mov byte [esp + 0xf44], 0
call fcn.00401390
lea ecx, [esp + 0x10]
mov dword [esp + 0xf44], 0xffffffff
call fcn.00401390
mov ecx, dword [esp + 0xf3c]
pop edi
pop esi
xor al, al
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 4