Function at 0x402097
Capabilities:
Get common file path

Disassembly:
mov eax, 0x44311b
call fcn.0043680c
sub esp, 0x218
push ebx
push esi
mov esi, ecx
xor ebx, ebx
push edi
lea ecx, [ebp - 0x10]
mov dword [ebp - 0x18], ebx
call fcn.004066b3
mov ecx, dword [esi + 0xfdc]
lea eax, [esi + 0xfdc]
mov dword [ebp - 4], 1
cmp dword [ecx - 4], ebx
je 0x4020da
push eax
lea ecx, [ebp - 0x10]
call fcn.00406a8d
cmp dword [esi + 0x420], ebx
je 0x4020f1
add esi, 0xa94
lea ecx, [ebp - 0x10]
push esi
call fcn.00406a8d
mov eax, dword [ebp - 0x10]
cmp dword [eax - 4], ebx
jne 0x40212e
push ebx
push 0x445354
push str.SoftwareAhnLabAutoup
lea eax, [ebp - 0x14]
push 0x80000001
push eax
call fcn.0040649a
add esp, 0x14
push eax
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 2
call fcn.00406a8d
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 1
call fcn.00406733
mov eax, dword [ebp - 0x10]
mov eax, dword [eax - 4]
cmp eax, ebx
jne 0x40220f
push 0x40
xor eax, eax
pop ecx
lea edi, [ebp - 0x11b]
mov byte [ebp - 0x11c], bl
push str.shfolder.dll
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
cmp esi, ebx
je 0x40220f
push str.SHGetFolderPathA
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, ebx
je 0x402208
lea ecx, [ebp - 0x11c]
push ecx
push ebx
push ebx
push 0x23
push ebx
call eax
test eax, eax
jne 0x402208
lea eax, [ebp - 0x11c]
push eax
call fcn.00436ed8
cmp eax, ebx
pop ecx
jle 0x402208
cmp byte [ebp + eax - 0x11d], 0x5c
jne 0x4021af
push str.AhnLabAIS
jmp 0x4021b4
push 0x44d3a8
lea eax, [ebp - 0x11c]
push eax
call fcn.00436ad0
pop ecx
lea eax, [ebp - 0x11c]
pop ecx
push str.AhnInst.log
push eax
call fcn.00405bc1
pop ecx
test eax, eax
pop ecx
jne 0x4021f0
lea eax, [ebp - 0x11c]
push str.AhnInstw.log
push eax
call fcn.00405bc1
pop ecx
test eax, eax
pop ecx
je 0x402208
lea eax, [ebp - 0x11c]
push eax
lea eax, [ebp - 0x10]
push 0x44d388
push eax
call fcn.004068d3
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [ebp - 0x10]
mov esi, 0x104
mov eax, dword [eax - 4]
cmp eax, ebx
jne 0x40229d
push 0x40
xor eax, eax
pop ecx
lea edi, [ebp - 0x11b]
mov byte [ebp - 0x11c], bl
push esi
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 0x11c]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
test eax, eax
je 0x40229d
lea eax, [ebp - 0x11c]
push eax
call fcn.00436ed8
test eax, eax
pop ecx
jbe 0x40229d
lea eax, [ebp - 0x11c]
push str.AhnInst.log
push eax
call fcn.00405bc1
pop ecx
test eax, eax
pop ecx
jne 0x402285
lea eax, [ebp - 0x11c]
push str.AhnInstw.log
push eax
call fcn.00405bc1
pop ecx
test eax, eax
pop ecx
je 0x40229d
lea eax, [ebp - 0x11c]
push eax
lea eax, [ebp - 0x10]
push 0x44d388
push eax
call fcn.004068d3
add esp, 0xc
mov eax, dword [ebp - 0x10]
cmp dword [eax - 4], ebx
jne 0x402344
push 0x41
xor eax, eax
pop ecx
lea edi, [ebp - 0x223]
mov byte [ebp - 0x224], bl
push esi
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x224]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
je 0x402327
xor eax, eax
lea edi, [ebp - 0x13]
mov byte [ebp - 0x14], bl
push 0x40
stosw word es:[edi], ax
stosb byte es:[edi], al
pop ecx
xor eax, eax
lea edi, [ebp - 0x11b]
mov byte [ebp - 0x11c], bl
rep stosd dword es:[edi], eax
push ebx
lea eax, [ebp - 0x11c]
push ebx
push eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x224]
push eax
call fcn.00436f23
add esp, 0x14
lea eax, [ebp - 0x11c]
push eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x10]
push 0x44d380
push eax
call fcn.004068d3
add esp, 0x10
jmp 0x402344
lea eax, [ebp - 0x224]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
lea eax, [ebp - 0x224]
lea ecx, [ebp - 0x10]
push eax
call fcn.00406ab0
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x10]
push eax
call fcn.004066f2
mov dword [ebp - 0x18], 1
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], bl
call fcn.00406733
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp + 8]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 4