Function at 0x402980
Capabilities:
Get common file path
Get file attributes
Set current directory
Set file attributes
Terminate process

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x42b581
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, 0x1444
call fcn.0040e130
push ebx
push esi
mov ebx, ecx
push edi
lea ecx, [esp + 0x20]
call fcn.004070c0
lea ecx, [esp + 0x10]
mov dword [esp + 0x145c], 0
call fcn.00407ae0
lea ecx, [esp + 0x14]
mov byte [esp + 0x145c], 1
call fcn.00408cf0
mov ecx, 0xd
mov esi, str.SOFTWAREMicrosoftWindowsCurrentVersionApp_Paths_
lea edi, [esp + 0x748]
rep movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
xor eax, eax
mov ecx, 0xf2
lea edi, [esp + 0x77d]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0xd
mov esi, str.SOFTWAREMicrosoftWindowsCurrentVersionUninstall_
lea edi, [esp + 0xb48]
rep movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
xor eax, eax
mov ecx, 0xf2
lea edi, [esp + 0xb7d]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
xor eax, eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x2c], eax
xor eax, eax
mov al, byte [ebx + 0x2710]
lea ecx, [esp + 0x10]
mov byte [esp + 0x145c], 2
push eax
call fcn.00407650
mov edx, dword [ebp + 0xc]
mov edi, 0x42ddd2
mov esi, edx
mov ecx, 1
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
jne 0x402a85
mov al, byte [ebx + 0x2710]
test al, al
je 0x402a7e
push 0
push edx
push str.Could_not_find_product_key
push 0
call dword [0x43c2f8]
push 0xffffffffffffffff
call fcn.0040e894
lea eax, [ebx + 0x400]
mov esi, eax
mov ecx, edx
sub esi, edx
mov dl, byte [ecx]
mov byte [esi + ecx], dl
inc ecx
test dl, dl
jne 0x402a91
mov edx, eax
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402aa0
lea edi, [esp + 0x748]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x402ab1
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 + 0x748]
push ecx
push 0x80000002
lea ecx, [esp + 0x1c]
call fcn.00408ea0
test eax, eax
je 0x402b0b
mov al, byte [ebx + 0x2710]
test al, al
je 0x402b04
push 0
lea edx, [esp + 0x74c]
push edx
push str.Could_not_find_App_registry
push 0
call dword [0x43c2f8]
push 0xfffffffffffffffe
call fcn.0040e894
lea eax, [esp + 0x2c]
push eax
push str.Installed
lea ecx, [esp + 0x1c]
call fcn.00408e10
mov eax, dword [esp + 0x2c]
test eax, eax
jne 0x402b4e
mov al, byte [ebx + 0x2710]
test al, al
je 0x402b47
push 0
lea ecx, [esp + 0x74c]
push ecx
push str.Game_not_installed
push 0
call dword [0x43c2f8]
push 0xfffffffffffffffe
call fcn.0040e894
lea edx, [esp + 0xc]
push edx
lea edi, [ebx + 0x1400]
push edi
mov esi, 0x400
push str.Game_Registry
lea ecx, [esp + 0x20]
mov dword [esp + 0x18], esi
call fcn.00408db0
push edi
push 0x80000002
lea ecx, [esp + 0x1c]
call fcn.00408ea0
test eax, eax
je 0x402ba5
mov al, byte [ebx + 0x2710]
test al, al
je 0x402b9e
push 0
push edi
push str.Could_not_find_Product_Registry
push 0
call dword [0x43c2f8]
push 0xfffffffffffffffe
call fcn.0040e894
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.00408db0
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.00408db0
lea eax, [esp + 0xc]
push eax
push ebx
push str.Installed_From
lea ecx, [esp + 0x20]
mov dword [esp + 0x18], esi
call fcn.00408db0
lea ecx, [esp + 0xc]
push ecx
lea edx, [ebx + 0x2608]
push edx
push str.Language
lea ecx, [esp + 0x20]
mov dword [esp + 0x18], 0x104
call fcn.00408db0
lea eax, [esp + 0xc]
push eax
lea ecx, [ebx + 0x1800]
push ecx
push str.Folder
lea ecx, [esp + 0x20]
mov dword [esp + 0x18], esi
call fcn.00408db0
lea edx, [esp + 0x138]
mov eax, edi
sub edx, edi
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x402c44
lea edi, [esp + 0x138]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x402c56
mov dx, word [0x42e028]
mov word [edi], dx
lea edi, [esp + 0x138]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x402c70
mov eax, dword [0x42e024]
lea ecx, [esp + 0x138]
push ecx
push 0x80000002
lea ecx, [esp + 0x1c]
mov dword [edi], eax
call fcn.00408ea0
test eax, eax
jne 0x402cb0
lea edx, [ebx + 0x270c]
push edx
push str.Language
lea ecx, [esp + 0x1c]
call fcn.00408e10
jmp 0x402cba
mov dword [ebx + 0x270c], 1
lea eax, [ebx + 0xc00]
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402cc2
lea edi, [esp + 0xb48]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x402cd3
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
lea eax, [esp + 0xb48]
push eax
rep movsb byte es:[edi], byte [esi]
push 0x80000002
lea ecx, [esp + 0x1c]
call fcn.00408ea0
test eax, eax
je 0x402d2d
mov al, byte [ebx + 0x2710]
test al, al
je 0x402d26
push 0
lea ecx, [esp + 0xb4c]
push ecx
push str.Could_not_find_Uninstall_Entry
push 0
call dword [0x43c2f8]
push 0xfffffffffffffffe
call fcn.0040e894
lea edx, [esp + 0xc]
push edx
lea eax, [ebx + 0x1c00]
push eax
mov edi, 0x400
push str.DisplayName
lea ecx, [esp + 0x20]
mov dword [esp + 0x18], edi
call fcn.00408db0
lea ecx, [esp + 0xc]
push ecx
lea edx, [ebx + 0x2000]
push edx
push str.FriendlyName
lea ecx, [esp + 0x20]
mov dword [esp + 0x18], edi
call fcn.00408db0
lea ecx, [esp + 0xc]
push ecx
lea eax, [ebx + 0x1000]
push eax
push str.LogFile
lea ecx, [esp + 0x20]
mov dword [esp + 0x18], edi
mov dword [esp + 0x40], eax
call fcn.00408db0
lea esi, [ebx + 0x2400]
push esi
lea ecx, [esp + 0x24]
call fcn.00406bf0
lea edx, [esp + 0x640]
push edx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
push edi
lea eax, [esp + 0x1054]
push eax
lea ecx, [esp + 0x648]
push ecx
call dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
mov edx, dword [ebp + 8]
lea eax, [ebx + 0x2504]
push edx
push eax
lea ecx, [esp + 0x18]
call fcn.004076b0
lea eax, [esp + 0x1050]
mov edi, esi
mov dl, byte [edi]
mov cl, dl
cmp dl, byte [eax]
jne 0x402e0b
test cl, cl
je 0x402e07
mov dl, byte [edi + 1]
mov cl, dl
cmp dl, byte [eax + 1]
jne 0x402e0b
add edi, 2
add eax, 2
test cl, cl
jne 0x402de7
xor eax, eax
jmp 0x402e10
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x402f83
lea edi, [ebx + 0x2504]
push edi
push esi
lea eax, [esp + 0x248]
push str._s_s
push eax
call fcn.0040e8d4
add esp, 0x10
push 0
lea ecx, [esp + 0x244]
push ecx
lea ecx, [esp + 0x18]
call fcn.00407780
test al, al
je 0x402e93
lea edx, [esp + 0x240]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
and eax, 0xfffffffe
push eax
lea eax, [esp + 0x244]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
lea ecx, [esp + 0x240]
push ecx
lea ecx, [esp + 0x14]
call fcn.00407bb0
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
lea edx, [esp + 0x240]
push edx
lea ecx, [esp + 0x24]
call fcn.00406e50
test al, al
je 0x402ed0
mov al, byte [ebx + 0x2710]
test al, al
je 0x402ec9
push 0
lea eax, [esp + 0x244]
push eax
push str.Existing_Uninstall_Running
push 0
call dword [0x43c2f8]
push 0
call fcn.0040e894
push 0
push 0
lea ecx, [esp + 0x38]
push ecx
mov ecx, dword [ebp + 8]
push 1
lea edx, [esp + 0x38]
push edx
lea eax, [esp + 0x38]
push eax
push 0
push esi
push ecx
lea ecx, [esp + 0x34]
call fcn.00408740
mov edx, dword [ebp + 8]
push edx
lea eax, [esp + 0xf4c]
push eax
lea ecx, [esp + 0x18]
call fcn.00407720
push esi
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
push edi
push esi
lea ecx, [esp + 0x248]
push str._s_s
push ecx
call fcn.0040e8d4
xor eax, eax
mov byte [esp + 0x48], 0
mov ecx, 0x3f
lea edi, [esp + 0x49]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov al, byte [ebx + 0x2710]
add esp, 0x10
test al, al
je 0x402f65
mov edx, dword [str._debug]
mov ax, word [0x42ddf8]
mov cl, byte [0x42ddfa]
mov dword [esp + 0x38], edx
mov word [esp + 0x3c], ax
mov byte [esp + 0x3e], cl
lea edx, [esp + 0x38]
push edx
push esi
lea eax, [esp + 0x248]
push eax
lea ecx, [esp + 0x2c]
call fcn.004068b0
push 0
call fcn.0040e894
push 0
push 0
lea ecx, [esp + 0x38]
push ecx
mov ecx, dword [esp + 0x40]
push 1
lea edx, [esp + 0x38]
push edx
lea eax, [esp + 0x38]
push eax
push 0
push esi
push ecx
lea ecx, [esp + 0x34]
call fcn.00408740
lea ecx, [esp + 0x14]
mov byte [esp + 0x145c], 1
call fcn.00408e40
lea ecx, [esp + 0x10]
mov byte [esp + 0x145c], 0
call fcn.004067d0
lea ecx, [esp + 0x20]
mov dword [esp + 0x145c], 0xffffffff
call fcn.004067d0
mov ecx, dword [esp + 0x1454]
pop edi
pop esi
xor al, al
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 8