Function at 0x40d1e0
Capabilities:
Get common file path
Get startup folder

Disassembly:
push 0xffffffffffffffff
push 0x47854c
mov eax, dword fs:[0]
push eax
sub esp, 0x264
mov eax, dword [0x49a670]
xor eax, esp
mov dword [esp + 0x260], eax
push ebp
push esi
push edi
mov eax, dword [0x49a670]
xor eax, esp
push eax
lea eax, [esp + 0x274]
mov dword fs:[0], eax
xor edi, edi
push edi
push 0x10
lea eax, [esp + 0x70]
push eax
mov esi, ecx
push edi
mov dword [esp + 0x20], esi
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
mov ebp, 7
lea eax, [esp + 0x68]
mov dword [esp + 0x64], ebp
mov dword [esp + 0x60], edi
mov word [esp + 0x50], di
lea edx, [eax + 2]
lea ebx, [ebx]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x40d250
sub eax, edx
sar eax, 1
push eax
lea ecx, [esp + 0x6c]
push ecx
lea ecx, [esp + 0x54]
call fcn.00401850
mov dword [esp + 0x27c], edi
mov dword [esp + 0x48], ebp
mov dword [esp + 0x44], edi
mov word [esp + 0x34], di
lea ecx, [esp + 0x18]
mov byte [esp + 0x27c], 1
call fcn.004242e6
push 6
push 0x480ee0
lea ecx, [esp + 0x54]
mov byte [esp + 0x284], 2
call fcn.00406100
mov eax, dword [esp + 0x50]
mov ebp, 8
cmp dword [esp + 0x64], ebp
jae 0x40d2be
lea eax, [esp + 0x50]
push edi
push eax
lea ecx, [esp + 0x20]
call fcn.00424374
cmp eax, edi
je 0x40d387
lea ecx, [esp + 0x18]
call fcn.00423fe1
lea ecx, [esp + 0x18]
mov ebp, eax
call fcn.004242a9
test eax, eax
jne 0x40d376
mov edx, dword [esp + 0x18]
mov eax, dword [edx + 0x38]
push 0x10
lea ecx, [esp + 0x1c]
call eax
test eax, eax
jne 0x40d376
lea ecx, [esp + 0x14]
push ecx
lea ecx, [esp + 0x1c]
call fcn.004246aa
mov edx, dword [eax]
mov eax, edx
mov byte [esp + 0x27c], 3
lea esi, [eax + 2]
lea ecx, [ecx]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x40d320
sub eax, esi
sar eax, 1
push eax
push edx
lea ecx, [esp + 0x38]
call fcn.00401850
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
mov byte [esp + 0x27c], 2
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40d362
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp dword [esp + 0x44], edi
je 0x40d376
lea ecx, [esp + 0x30]
push ecx
mov ecx, dword [esp + 0x14]
call fcn.00404a30
cmp ebp, edi
jne 0x40d2d1
mov esi, dword [esp + 0x10]
mov ebp, 8
mov eax, dword [esi + 4]
cmp eax, edi
je 0x40d3a8
mov ecx, dword [esi + 8]
sub ecx, eax
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
jne 0x40d3f4
lea ecx, [esp + 0x18]
mov byte [esp + 0x27c], 1
call fcn.0042430c
cmp dword [esp + 0x48], ebp
jb 0x40d3cc
mov ecx, dword [esp + 0x34]
push ecx
call fcn.0042397c
add esp, 4
cmp dword [esp + 0x64], ebp
mov dword [esp + 0x48], 7
mov dword [esp + 0x44], edi
mov word [esp + 0x34], di
jb 0x40d3f0
mov edx, dword [esp + 0x50]
push edx
call fcn.0042397c
add esp, 4
xor eax, eax
jmp 0x40d441
lea ecx, [esp + 0x18]
mov byte [esp + 0x27c], 1
call fcn.0042430c
cmp dword [esp + 0x48], ebp
jb 0x40d418
mov eax, dword [esp + 0x34]
push eax
call fcn.0042397c
add esp, 4
cmp dword [esp + 0x64], ebp
mov dword [esp + 0x48], 7
mov dword [esp + 0x44], edi
mov word [esp + 0x34], di
jb 0x40d43c
mov ecx, dword [esp + 0x50]
push ecx
call fcn.0042397c
add esp, 4
mov eax, 1
mov ecx, dword [esp + 0x274]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
mov ecx, dword [esp + 0x260]
xor ecx, esp
call fcn.0042caa2
add esp, 0x270
ret