Function at 0x409980
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x587816
mov eax, dword fs:[0]
push eax
sub esp, 0x8b4
mov eax, dword [0x5f50fc]
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
mov dword [ebp - 0x8b8], ecx
mov eax, dword [ebp + 8]
mov dword [ebp - 0x8c0], eax
test eax, eax
je 0x409c84
lea edx, [ebp - 0x8b4]
mov dword [eax], 0
mov eax, dword [ecx + 0x658]
add ecx, 0x658
push edx
lea edx, [ebp - 0x89c]
mov dword [ebp - 0x89c], 0
push edx
push str.DOCICON
xor ebx, ebx
mov dword [ebp - 0x8b4], 0
push str._DOCICON_
mov dword [ebp - 0x8a4], ebx
xor edi, edi
call dword [eax + 0x10]
push 0x208
mov esi, eax
lea eax, [ebp - 0x218]
push edi
push eax
call fcn.00568420
add esp, 0xc
lea eax, [ebp - 0x218]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test esi, esi
je 0x409c82
mov eax, dword [ebp - 0x89c]
cmp dword [eax], ebx
jle 0x409c82
call fcn.00423a43
mov ecx, eax
test ecx, ecx
je 0x409ca2
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x8a0], eax
mov ecx, dword [ebp - 0x89c]
or edx, 0xffffffff
mov dword [ebp - 4], edi
mov dword [ebp - 0x8b0], edi
cmp dword [ecx], edi
jle 0x409c5e
xor esi, esi
mov dword [ebp - 0x8ac], esi
nop
push dword [ebx + ecx + 0x290]
lea eax, [ebp - 0x898]
push 0x32
push eax
call fcn.0056b3b9
mov eax, dword [ebp - 0x89c]
add esp, 0xc
mov edx, dword [ebx + eax + 0x294]
test edx, edx
jne 0x409abd
xor eax, eax
jmp 0x409ae3
mov eax, edx
lea ecx, [eax + 2]
mov dword [ebp - 0x8a8], ecx
nop dword [eax + eax]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x409ad0
sub eax, dword [ebp - 0x8a8]
sar eax, 1
push eax
push edx
lea ecx, [ebp - 0x8a0]
call fcn.00407520
lea eax, [ebp - 0x218]
push eax
push str._SysFolder_
lea ecx, [ebp - 0x8a0]
call fcn.0040e190
mov ecx, dword [ebp - 0x8b8]
lea eax, [ebp - 0x8bc]
push eax
call fcn.0040c640
push dword [eax]
lea ecx, [ebp - 0x8a0]
mov byte [ebp - 4], 1
push str._InsFolder_
call fcn.0040e190
mov edx, dword [ebp - 0x8bc]
or eax, 0xffffffff
mov byte [ebp - 4], 0
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x409b51
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push dword [ebp - 0x8a0]
lea eax, [ebp - 0x62c]
push 0x104
push eax
call fcn.0056b3b9
lea eax, [ebp - 0x62c]
push eax
lea eax, [ebp - 0x424]
push 0x104
push eax
call fcn.0056b3b9
lea eax, [ebp - 0x898]
push eax
push str.File._s
lea eax, [ebp - 0x834]
push 0x104
push eax
call fcn.00402f80
mov eax, dword [ebp - 0x89c]
add esp, 0x28
cmp dword [ebx + eax + 0x20c], 2
jle 0x409bbf
mov eax, dword [ebx + eax + 0x218]
mov dword [ebp - 0x21c], eax
jmp 0x409bc9
mov dword [ebp - 0x21c], 1
test edi, edi
jne 0x409be3
push 0x680
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
jmp 0x409bfa
lea eax, [esi + 0x680]
push eax
push edi
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
test eax, eax
je 0x409c2e
inc dword [ebp - 0x8a4]
lea edi, [esi + eax]
mov ecx, 0x1a0
mov dword [ebp - 0x8a8], eax
lea esi, [ebp - 0x898]
rep movsd dword es:[edi], dword [esi]
mov esi, dword [ebp - 0x8ac]
mov edi, eax
add esi, 0x680
mov dword [ebp - 0x8ac], esi
mov eax, dword [ebp - 0x8b0]
add ebx, 0x514
mov ecx, dword [ebp - 0x89c]
inc eax
mov dword [ebp - 0x8b0], eax
cmp eax, dword [ecx]
jl 0x409a90
mov eax, dword [ebp - 0x8a0]
or edx, 0xffffffff
mov ebx, dword [ebp - 0x8a4]
mov ecx, dword [ebp - 0x8c0]
add eax, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
mov dword [ecx], edi
lock xadd dword [eax + 0xc], edx
dec edx
test edx, edx
jg 0x409c82
mov ecx, dword [eax]
push eax
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, ebx
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.005663a7
mov esp, ebp
pop ebp
ret 4
push 0x80004005
call fcn.00406af0
int3