Function at 0x40aeba
Capabilities:
Get common file path
Read .ini file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x144
push ebx
xor ebx, ebx
cmp byte [0x413780], bl
push esi
je 0x40b0dd
lea eax, [ebp - 0x144]
push 0x100
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
lea eax, [ebp - 0x144]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp byte [ebp + eax - 0x145], 0x5c
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatA]
je 0x40af10
lea eax, [ebp - 0x144]
push 0x4120e0
push eax
call esi
lea eax, [ebp - 0x144]
push 0x413780
push eax
call esi
lea eax, [ebp - 0x144]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll__lcreat]
cmp eax, 0xffffffff
mov dword [ebp - 4], eax
je 0x40b0dd
push dword [0x413a5c]
push 0x4000
push dword [0x413ab0]
push 0x4127ac
push str.Msg1000
push str.Language
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
mov ecx, dword [0x413ab0]
cmp byte [ecx], 0x7f
jne 0x40afd5
cmp eax, 1
jne 0x40afd5
push str.START_COMPONENT_r_n__NAME___WORKSTATION__r_n__START_GROUP_r_n____NAME___ComponentID__r_n____ID__1_r_n____CLASS___DMTFComponentID1.0__r_n____START_ATTRIBUTE_r_n______NAME___Manufacturer__r_n______ID__1_r_n______ACCESS__READ_ONLY_r_n______STORAGE__SPECIFIC_r_n______TYPE__STRING_255__r_n______VALUE____1___r_n____END_ATTRIBUTE_r_n____START_ATTRIBUTE_r_n______NAME___Product__r_n______ID__2_r_n______ACCESS__READ_ONLY_r_n______STORAGE__SPECIFIC_r_n______TYPE__STRING_255__r_n______VALUE____2___r_n____END_ATTRIBUTE_r_n____START_ATTRIBUTE_r_n______NAME___Version__r_n______ID__3_r_n______ACCESS__READ_ONLY_r_n______STORAGE__SPECIFIC_r_n______TYPE__STRING_255__r_n______VALUE____3___r_n____END_ATTRIBUTE_r_n____START_ATTRIBUTE_r_n______NAME___Serial_Number__r_n______ID__4_r_n______ACCESS__READ_ONLY_r_n______STORAGE__SPECIFIC_r_n______TYPE__STRING_255__r_n______VALUE____4___r_n____END_ATTRIBUTE_r_n____START_ATTRIBUTE_r_n______NAME____5___r_n______ID__5_r_n______ACCESS__READ_ONLY_r_n______STORAGE__SPECIFIC_r_n______TYPE__STRING_255__r_n______VALUE____6___r_n____END_ATTRIBUTE_r_n__END_GROUP_r_n__START_GROUP_r_n____NAME____5_Status__r_n____ID__2_r_n____CLASS___MICROSOFTJOBSTATUS1.0__r_n____START_ATTRIBUTE_r_n______NAME___Status__r_n______ID__1_r_n______ACCESS__READ_ONLY_r_n______STORAGE__SPECIFIC_r_n______TYPE__STRING_255__r_n______VALUE____7___r_n____END_ATTRIBUTE_r_n____START_ATTRIBUTE_r_n______NAME___Description__r_n______ID__2_r_n______ACCESS__READ_ONLY_r_n______STORAGE__SPECIFIC_r_n______TYPE__STRING_255__r_n______VALUE____8___r_n____END_ATTRIBUTE_r_n__END_GROUP_r_nEND_COMPONENT_r_n
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea eax, [ebp - 0x44]
push eax
call fcn.0040b0e1
mov esi, dword [0x413ab0]
pop ecx
mov al, byte [esi]
cmp al, bl
je 0x40b0b8
push edi
mov edi, dword [ebp - 4]
cmp al, 0x25
jne 0x40b0ab
mov al, byte [esi + 1]
cmp al, 0x31
jl 0x40b0ab
cmp al, 0x38
jg 0x40b0ab
cmp byte [esi + 2], 0x25
jne 0x40b0ab
cmp al, 0x34
jg 0x40b00b
movsx edi, al
sub edi, 0x30
shl edi, 7
add edi, 0x413780
jmp 0x40b05e
push 0x5e
push ecx
call fcn.0040bc63
pop ecx
cmp eax, ebx
pop ecx
je 0x40af7a
cmp byte [eax], bl
mov ecx, eax
je 0x40aff2
inc ecx
cmp byte [ecx], bl
jne 0x40afe9
cmp ecx, eax
jb 0x40affa
mov dl, byte [ecx]
mov byte [ecx + 1], dl
dec ecx
jmp 0x40afee
push 0x5e
mov byte [eax], 0xd
mov byte [eax + 1], 0xa
push dword [0x413ab0]
jmp 0x40afd8
cmp al, 0x35
jne 0x40b025
cmp dword [0x413710], ebx
je 0x40b01e
mov edi, str.Rollback
jmp 0x40b05e
mov edi, str.Uninstall
jmp 0x40b05e
cmp al, 0x36
jne 0x40b02e
lea edi, [ebp - 0x44]
jmp 0x40b05e
cmp al, 0x37
jne 0x40b048
cmp dword [0x4136c4], ebx
je 0x40b041
mov edi, str.Failed
jmp 0x40b05e
mov edi, str.Success
jmp 0x40b05e
cmp al, 0x38
jne 0x40b05e
cmp dword [0x4136c4], ebx
mov edi, str.Canceled_by_user
jne 0x40b05e
mov edi, 0x413470
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
sub eax, 3
cmp eax, ebx
jle 0x40b08a
lea edx, [esi + 3]
mov ecx, edx
cmp byte [ecx], bl
je 0x40b078
inc ecx
jmp 0x40b071
cmp ecx, edx
jb 0x40b09e
mov bl, byte [ecx]
mov byte [ecx + eax], bl
dec ecx
cmp ecx, edx
jae 0x40b07c
xor ebx, ebx
jmp 0x40b09e
jge 0x40b09e
lea ecx, [esi + 3]
mov dl, byte [ecx]
cmp dl, bl
je 0x40b09b
mov byte [ecx + eax], dl
inc ecx
jmp 0x40b08f
mov byte [ecx + eax], bl
mov al, byte [edi]
cmp al, bl
je 0x40b0aa
mov byte [esi], al
inc esi
inc edi
jmp 0x40b09e
dec esi
mov al, byte [esi + 1]
inc esi
cmp al, bl
jne 0x40af98
pop edi
push dword [0x413ab0]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
push dword [0x413ab0]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll__lwrite]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll__lclose]
pop esi
pop ebx
leave
ret