Function at 0x408250
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5412d6
mov eax, dword fs:[0]
push eax
sub esp, 0x114
mov eax, dword [0x594ca8]
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
call fcn.00417515
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x408298
push 0x80004005
call fcn.00404860
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x118], eax
mov dword [ebp - 4], 0
call fcn.00417515
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x4082cb
push 0x80004005
call fcn.00404860
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x11c], eax
push 0x57053a
lea ecx, [ebp - 0x11c]
mov byte [ebp - 4], 1
call fcn.00404440
push eax
lea ecx, [ebp - 0x118]
call fcn.00404790
push 0x103
lea ecx, [ebp - 0x113]
push 0
push ecx
mov byte [ebp - 0x114], 0
call fcn.00518ea0
mov ebx, dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
add esp, 0xc
push 1
push 0x19
lea edx, [ebp - 0x114]
push edx
push 0
call ebx
lea eax, [ebp - 0x114]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea esi, [eax + 1]
cmp esi, 0x3fffffff
jg 0x408523
lea eax, [esi + esi]
call fcn.0051b880
mov edi, esp
test edi, edi
je 0x408523
push esi
push edi
push 0xffffffffffffffff
lea edx, [ebp - 0x114]
xor ecx, ecx
push edx
push ecx
push 3
mov word [edi], cx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
je 0x408523
mov eax, edi
mov edx, edi
lea esi, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x408385
sub eax, esi
sar eax, 1
push eax
push edx
lea ecx, [ebp - 0x118]
call fcn.004046e0
lea ecx, [ebp - 0x118]
call fcn.0040f240
test al, al
je 0x4083ec
mov eax, dword [ebp - 0x118]
push 0x570c84
push eax
lea ecx, [ebp - 0x11c]
push str._s_s.lnk
push ecx
call fcn.00403cc0
add esp, 0xc
lea edx, [ebp - 0x11c]
mov dword [ebp - 0x120], esp
mov ecx, esp
push edx
call fcn.00404900
call fcn.00402330
add esp, 4
push 1
push 0
lea eax, [ebp - 0x114]
push eax
push 0
call ebx
lea ecx, [ebp - 0x114]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea esi, [eax + 1]
cmp esi, 0x3fffffff
jg 0x40852c
lea eax, [esi + esi]
call fcn.0051b880
mov edi, esp
test edi, edi
je 0x40852c
push esi
push edi
push 0xffffffffffffffff
lea eax, [ebp - 0x114]
xor edx, edx
push eax
push edx
push 3
mov word [edi], dx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
je 0x40852c
mov eax, edi
mov edx, edi
lea esi, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x408451
sub eax, esi
sar eax, 1
push eax
push edx
lea ecx, [ebp - 0x118]
call fcn.004046e0
lea ecx, [ebp - 0x118]
call fcn.0040f240
mov esi, dword [ebp - 0x118]
test al, al
je 0x4084b8
push 0x570c84
push esi
lea ecx, [ebp - 0x11c]
push str._s_s.lnk
push ecx
call fcn.00403cc0
add esp, 0xc
lea edx, [ebp - 0x11c]
mov dword [ebp - 0x120], esp
mov ecx, esp
push edx
call fcn.00404900
call fcn.00402330
add esp, 4
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x11c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4084de
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [esi - 0x10]
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x408501
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea esp, [ebp - 0x130]
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.0051553d
mov esp, ebp
pop ebp
ret
xor edx, edx
xor eax, eax
jmp 0x408394
xor edx, edx
xor eax, eax
jmp 0x408460