Function at 0x40ac40
Capabilities:
Get common file path
Get program files directory

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x41ed22
push eax
mov dword fs:[0], esp
sub esp, 0xa18
call fcn.0040a9e0
test eax, eax
jne 0x40ac9e
mov eax, dword [esp + 0xa28]
test eax, eax
jne 0x40ac87
push 0x40
push 0x41f6e4
push 0x420580
call fcn.004010e0
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
xor eax, eax
mov ecx, dword [esp + 0xa18]
mov dword fs:[0], ecx
add esp, 0xa24
ret
mov dword [esp + 0xc], 0
mov dword [esp + 0xa20], 0
call fcn.00418592
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [esp + 4], eax
lea eax, [esp]
push eax
push 0x2001f
push 0
push str.SOFTWAREMicrosoftWindowsCurrentVersionUninstall46AA30DF_ED7B_438a_9462_60AB9A6D57E4
push reloc.OLEAUT32.dll_SysReAllocString
mov byte [esp + 0xa34], 1
mov dword [esp + 0x14], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40ad31
mov ecx, dword [esp]
lea edx, [esp]
push edx
push str.InstallLocation
lea eax, [esp + 0x220]
mov dword [esp + 0x14], ecx
push eax
lea ecx, [esp + 0x18]
mov dword [esp + 0xc], 0x400
call fcn.00403c70
test eax, eax
jne 0x40ad31
lea ecx, [esp + 0x218]
push ecx
lea ecx, [esp + 8]
call fcn.004034d0
push esi
mov esi, dword [sym.imp.SHELL32.dll_SHGetFolderPathA]
push edi
lea edx, [esp + 0x11c]
push edx
push 0
push 0
push 0x26
push 0
call esi
call fcn.00401230
test eax, eax
je 0x40adb4
lea eax, [esp + 0x11c]
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40ad60
sub eax, edx
push eax
lea eax, [esp + 0x120]
push eax
lea ecx, [esp + 0x228]
push ecx
call fcn.0040e18e
add esp, 0xc
test eax, eax
jne 0x40adb4
lea edx, [esp + 0x620]
push edx
push eax
push eax
push 0x1a
push eax
call esi
lea eax, [esp + 0x620]
push eax
lea ecx, [esp + 0x10]
call fcn.004034d0
push str.TheWorld
lea ecx, [esp + 0x10]
call fcn.00403510
call fcn.00418592
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [esp + 8], eax
push str.extensionsExtDownloadExtDownload.ini
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x18]
push ecx
mov byte [esp + 0xa34], 2
call fcn.0040ab80
add esp, 0xc
push eax
lea ecx, [esp + 0xc]
mov byte [esp + 0xa2c], 3
call fcn.0040ab10
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
mov byte [esp + 0xa28], 2
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40ae1e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov esi, dword [esp + 8]
mov edi, dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
push esi
push str.ThunderAgent.Agent
push str.DownProgID
push str.Download
call edi
lea eax, [esi - 0x10]
mov byte [esp + 0xa28], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40ae5c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
call fcn.00418592
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [esp + 8], eax
push str.TheWorld.ini
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x18]
push ecx
mov byte [esp + 0xa34], 4
call fcn.0040ab80
add esp, 0xc
push eax
lea ecx, [esp + 0xc]
mov byte [esp + 0xa2c], 5
call fcn.0040ab10
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
mov byte [esp + 0xa28], 4
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40aec6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov esi, dword [esp + 8]
push esi
push 0x41f65c
push str.889D2FEB_5411_4565_8998_1DD2C5261283
push str.IEBhoState
call edi
lea eax, [esi - 0x10]
mov byte [esp + 0xa28], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40aefe
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
push 0x104
lea eax, [esp + 0x1c]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push str.....Profilesexplorer.ini
lea ecx, [esp + 0x1c]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathAppendA]
lea edx, [esp + 0x18]
push edx
push 0x41f65c
push 0x420530
push str.Explorer
call edi
mov eax, dword [esp + 0xa30]
test eax, eax
pop edi
pop esi
jne 0x40af5b
push 0x40
push 0x41f6e4
push 0x420514
call fcn.004010e0
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
mov eax, dword [esp + 4]
add eax, 0xfffffff0
mov byte [esp + 0xa20], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40af81
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0xc]
test eax, eax
je 0x40af90
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [esp + 0xa18]
mov eax, 1
mov dword fs:[0], ecx
add esp, 0xa24
ret