Function at 0x40da00
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x541356
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.00417597
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x40da48
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.00417597
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x40da7b
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.00518f10
mov ebx, dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
add esp, 0xc
push 1
push 0x17
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 0x40dcdd
lea eax, [esi + esi]
call fcn.0051b8f0
mov edi, esp
test edi, edi
je 0x40dcdd
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 0x40dcdd
mov eax, edi
mov edx, edi
lea esi, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40db35
sub eax, esi
sar eax, 1
push eax
push edx
lea ecx, [ebp - 0x118]
call fcn.004046e0
lea ecx, [ebp - 0x118]
call fcn.0040f2b0
test al, al
je 0x40dba1
mov eax, dword [ebp - 0x118]
push 0x5712c4
push 0x570cac
push eax
lea ecx, [ebp - 0x11c]
push str._s_s_s
push ecx
call fcn.00403cc0
add esp, 0x10
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 2
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 0x40dce6
lea eax, [esi + esi]
call fcn.0051b8f0
mov edi, esp
test edi, edi
je 0x40dce6
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 0x40dce6
mov eax, edi
mov edx, edi
lea esi, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40dc06
sub eax, esi
sar eax, 1
push eax
push edx
lea ecx, [ebp - 0x118]
call fcn.004046e0
lea ecx, [ebp - 0x118]
call fcn.0040f2b0
mov esi, dword [ebp - 0x118]
test al, al
je 0x40dc72
push 0x5712c4
push 0x570cac
push esi
lea ecx, [ebp - 0x11c]
push str._s_s_s
push ecx
call fcn.00403cc0
add esp, 0x10
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 0x40dc98
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 0x40dcbb
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.005155a4
mov esp, ebp
pop ebp
ret
xor edx, edx
xor eax, eax
jmp 0x40db44
xor edx, edx
xor eax, eax
jmp 0x40dc15