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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4785d8
mov eax, dword fs:[0]
push eax
sub esp, 0x2e8
mov eax, dword [0x49a670]
xor eax, esp
mov dword [esp + 0x2e0], eax
push ebx
push esi
push edi
mov eax, dword [0x49a670]
xor eax, esp
push eax
lea eax, [esp + 0x2f8]
mov dword fs:[0], eax
mov dword [esp + 0x28], ecx
lea ecx, [esp + 0x10]
call fcn.0040bcf0
mov dword [esp + 0x14], eax
mov byte [eax + 0x39], 1
mov eax, dword [esp + 0x14]
mov dword [eax + 4], eax
mov eax, dword [esp + 0x14]
mov dword [eax], eax
mov eax, dword [esp + 0x14]
xor esi, esi
mov dword [eax + 8], eax
mov dword [esp + 0x18], esi
push esi
push 8
lea eax, [esp + 0xec]
push eax
push esi
mov dword [esp + 0x310], esi
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
mov ebx, 7
lea eax, [esp + 0xe4]
mov dword [esp + 0x9c], ebx
mov dword [esp + 0x98], esi
mov word [esp + 0x88], si
lea ecx, [eax + 2]
lea ecx, [ecx]
mov dx, word [eax]
add eax, 2
cmp dx, si
jne 0x40da80
sub eax, ecx
sar eax, 1
push eax
lea ecx, [esp + 0xe8]
push ecx
lea ecx, [esp + 0x8c]
call fcn.00401850
mov dword [esp + 0xb8], ebx
mov dword [esp + 0xb4], esi
mov word [esp + 0xa4], si
lea ecx, [esp + 0x38]
mov byte [esp + 0x300], 2
call fcn.004242e6
push 6
push 0x480ee0
lea ecx, [esp + 0x8c]
mov byte [esp + 0x308], 3
call fcn.00406100
cmp dword [esp + 0x9c], 8
mov eax, dword [esp + 0x88]
jae 0x40dafe
lea eax, [esp + 0x88]
push esi
push eax
lea ecx, [esp + 0x40]
call fcn.00424374
cmp eax, esi
je 0x40dcc3
lea ecx, [esp + 0x38]
call fcn.00423fe1
lea ecx, [esp + 0x38]
mov dword [esp + 0x34], eax
call fcn.004242a9
test eax, eax
jne 0x40dcb9
mov edx, dword [esp + 0x38]
mov eax, dword [edx + 0x38]
push 0x10
lea ecx, [esp + 0x3c]
call eax
test eax, eax
jne 0x40dcb9
lea ecx, [esp + 0x24]
push ecx
lea ecx, [esp + 0x3c]
call fcn.004246aa
mov edx, dword [eax]
mov eax, edx
mov byte [esp + 0x300], 4
lea edi, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, si
jne 0x40db63
sub eax, edi
sar eax, 1
push eax
push edx
lea ecx, [esp + 0xa8]
call fcn.00401850
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
mov byte [esp + 0x300], 3
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40dba8
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x1c]
push ecx
lea ecx, [esp + 0x3c]
mov dword [esp + 0x20], esi
mov dword [esp + 0x24], esi
call fcn.00424205
cmp dword [esp + 0xb4], esi
je 0x40dcb9
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0x48], esp
push 0xffffffffffffffff
push esi
lea edx, [esp + 0xc4]
mov dword [ecx + 0x18], ebx
mov dword [ecx + 0x14], esi
push edx
mov word [ecx + 4], si
call fcn.00401760
mov eax, dword [esp + 0x3c]
mov ecx, dword [esp + 0x38]
push eax
push ecx
lea edx, [esp + 0x80]
push edx
call fcn.0040be00
add esp, 0x28
mov ecx, dword [eax]
mov dword [esp + 0xbc], ecx
mov edx, dword [eax + 4]
push 0xffffffffffffffff
add eax, 8
push esi
push eax
lea ecx, [esp + 0xd0]
mov byte [esp + 0x30c], 5
mov dword [esp + 0xcc], edx
mov dword [esp + 0xe8], ebx
mov dword [esp + 0xe4], esi
mov word [esp + 0xd4], si
call fcn.00401760
lea eax, [esp + 0xbc]
push eax
lea ecx, [esp + 0x54]
push ecx
lea ecx, [esp + 0x18]
mov byte [esp + 0x308], 6
call fcn.0040ceb0
mov edi, 8
cmp dword [esp + 0xdc], edi
jb 0x40dc88
mov edx, dword [esp + 0xc8]
push edx
call fcn.0042397c
add esp, 4
cmp dword [esp + 0x7c], edi
mov dword [esp + 0xdc], ebx
mov dword [esp + 0xd8], esi
mov word [esp + 0xc8], si
mov byte [esp + 0x300], 3
jb 0x40dcb9
mov eax, dword [esp + 0x68]
push eax
call fcn.0042397c
add esp, 4
cmp dword [esp + 0x34], esi
jne 0x40db11
mov ecx, dword [esp + 0x14]
mov edi, dword [ecx]
lea ebx, [esp + 0x10]
mov dword [esp + 0x24], esi
mov dword [esp + 0x20], edi
mov dword [esp + 0x1c], ebx
lea esp, [esp]
cmp ebx, esi
mov edx, dword [esp + 0x14]
mov dword [esp + 0x30], edx
je 0x40dcf4
lea eax, [esp + 0x10]
cmp ebx, eax
je 0x40dcf9
call fcn.0042df67
cmp edi, dword [esp + 0x30]
je 0x40ddaa
mov eax, dword [esp + 0x24]
mov ecx, eax
add eax, 1
cmp ecx, 0xf
mov dword [esp + 0x24], eax
jge 0x40ddaa
cmp ebx, esi
jne 0x40dd22
call fcn.0042df67
cmp edi, dword [ebx + 4]
jne 0x40dd2c
call fcn.0042df67
push 0xffffffffffffffff
lea eax, [edi + 0x18]
push esi
push eax
lea ecx, [esp + 0xc8]
mov dword [esp + 0xe0], 7
mov dword [esp + 0xdc], esi
mov word [esp + 0xcc], si
call fcn.00401760
mov ecx, dword [esp + 0x28]
lea edx, [esp + 0xbc]
push edx
mov byte [esp + 0x304], 7
call fcn.00404a30
cmp dword [esp + 0xd4], 8
mov byte [esp + 0x300], 3
jb 0x40dd94
mov eax, dword [esp + 0xc0]
push eax
call fcn.0042397c
add esp, 4
lea ecx, [esp + 0x1c]
call fcn.0040bc80
mov edi, dword [esp + 0x20]
mov ebx, dword [esp + 0x1c]
jmp 0x40dce0
mov ecx, dword [esp + 0x28]
mov eax, dword [ecx + 4]
cmp eax, esi
je 0x40ddd3
mov ecx, dword [ecx + 8]
sub ecx, eax
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
jne 0x40de87
lea ecx, [esp + 0x38]
mov byte [esp + 0x300], 2
call fcn.0042430c
mov ebx, 8
cmp dword [esp + 0xb8], ebx
jb 0x40de02
mov edx, dword [esp + 0xa4]
push edx
call fcn.0042397c
add esp, 4
cmp dword [esp + 0x9c], ebx
mov edi, 7
mov dword [esp + 0xb8], edi
mov dword [esp + 0xb4], esi
mov word [esp + 0xa4], si
jb 0x40de36
mov eax, dword [esp + 0x88]
push eax
call fcn.0042397c
add esp, 4
mov eax, dword [esp + 0x14]
push eax
lea ecx, [esp + 0x14]
push ecx
mov dword [esp + 0xa0], esi
mov word [esp + 0x90], si
mov dword [esp + 0xa4], edi
mov edx, dword [eax]
mov esi, ecx
push edx
push esi
lea ecx, [esp + 0x2c]
push ecx
mov ecx, esi
mov dword [esp + 0x314], 0xffffffff
call fcn.0040d000
mov edx, dword [esp + 0x14]
push edx
call fcn.0042397c
add esp, 4
xor eax, eax
jmp 0x40df37
lea ecx, [esp + 0x38]
mov byte [esp + 0x300], 2
call fcn.0042430c
mov ebx, 8
cmp dword [esp + 0xb8], ebx
jb 0x40deb6
mov eax, dword [esp + 0xa4]
push eax
call fcn.0042397c
add esp, 4
cmp dword [esp + 0x9c], ebx
mov edi, 7
mov dword [esp + 0xb8], edi
mov dword [esp + 0xb4], esi
mov word [esp + 0xa4], si
jb 0x40deea
mov ecx, dword [esp + 0x88]
push ecx
call fcn.0042397c
add esp, 4
mov eax, dword [esp + 0x14]
push eax
lea ecx, [esp + 0x14]
mov dword [esp + 0x9c], esi
mov word [esp + 0x8c], si
push ecx
mov dword [esp + 0xa4], edi
mov edx, dword [eax]
push edx
mov esi, ecx
push esi
lea edx, [esp + 0x2c]
push edx
mov dword [esp + 0x314], 0xffffffff
call fcn.0040d000
mov eax, dword [esp + 0x14]
push eax
call fcn.0042397c
add esp, 4
mov eax, 1
mov ecx, dword [esp + 0x2f8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x2e0]
xor ecx, esp
call fcn.0042caa2
mov esp, ebp
pop ebp
ret