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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x538862
mov eax, dword fs:[0]
push eax
sub esp, 0x25c
mov eax, dword [0x58d140]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push 0x56802c
lea ecx, [ebp - 0x24c]
mov byte [ebp - 0x239], 0
call fcn.00405e40
push 0
push 0x26
lea eax, [ebp - 0x238]
push eax
push 0
mov dword [ebp - 4], 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
lea ecx, [ebp - 0x238]
push ecx
lea ecx, [ebp - 0x240]
call fcn.00405e40
push str.Software_Updaterupdates.cnf
lea ecx, [ebp - 0x244]
mov byte [ebp - 4], 1
call fcn.00405e40
push eax
lea edx, [ebp - 0x240]
push edx
lea eax, [ebp - 0x248]
push eax
mov byte [ebp - 4], 2
call fcn.00403070
add esp, 0xc
mov byte [ebp - 4], 3
mov ecx, dword [eax]
mov esi, dword [ebp - 0x240]
lea eax, [ecx - 0x10]
add esi, 0xfffffff0
cmp eax, esi
je 0x40c681
cmp dword [esi + 0xc], 0
lea edi, [esi + 0xc]
jl 0x40c671
mov edx, dword [eax]
cmp edx, dword [esi]
jne 0x40c671
push eax
call fcn.00401590
mov ebx, eax
add esp, 4
or eax, 0xffffffff
lock xadd dword [edi], eax
dec eax
test eax, eax
jg 0x40c666
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
add ebx, 0x10
mov dword [ebp - 0x240], ebx
jmp 0x40c681
mov eax, dword [ecx - 0xc]
push eax
push ecx
lea ecx, [ebp - 0x240]
call fcn.004014d0
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x248]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c6a7
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x244]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c6cd
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [ebp - 0x264]
call fcn.004108f5
mov bl, 4
mov byte [ebp - 4], bl
mov eax, dword [ebp - 0x240]
mov ecx, dword [eax - 0xc]
push ecx
push eax
call dword [sym.imp.OLEAUT32.dll_SysReAllocStringLen]
test eax, eax
jne 0x40c6f7
call fcn.00401580
push 0
push 0x5001
push eax
lea ecx, [ebp - 0x264]
call fcn.004107d3
test eax, eax
je 0x40c764
push 0x56802c
lea ecx, [ebp - 0x244]
call fcn.00405e40
mov byte [ebp - 4], 5
mov eax, dword [eax]
push eax
lea ecx, [ebp - 0x264]
call fcn.004109d0
mov byte [ebp - 4], bl
mov eax, dword [ebp - 0x244]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c755
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [ebp - 0x264]
call fcn.00410b96
mov bl, 1
jmp 0x40c77f
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0xa
lea ecx, [ebp - 0x30]
push ecx
push eax
call fcn.0052af9e
mov bl, byte [ebp - 0x239]
add esp, 0xc
lea ecx, [ebp - 0x264]
mov byte [ebp - 4], 1
call fcn.00410c12
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x240]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40c7b4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x24c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c7dd
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0050e0a7
mov esp, ebp
pop ebp
ret