Function at 0x40d970
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x474e96
mov eax, dword fs:[0]
push eax
sub esp, 0x228
mov eax, dword [0x490d68]
xor eax, esp
mov dword [esp + 0x220], eax
push ebx
push esi
push edi
mov eax, dword [0x490d68]
xor eax, esp
push eax
lea eax, [esp + 0x238]
mov dword fs:[0], eax
mov edi, dword [ebp + 8]
mov eax, dword [edi + 0x88]
sub eax, dword [edi + 0x84]
lea esi, [edi + 0x78]
sar eax, 2
test eax, eax
ja 0x40d9d0
xor eax, eax
jmp 0x40dbdb
mov edx, dword [0x492d7c]
mov eax, dword [edx + 0xc]
mov ecx, 0x492d7c
call eax
add eax, 0x10
mov dword [esp + 0x10], eax
mov dword [esp + 0x240], 0
cmp dword [edi + 0x10], 0
jne 0x40da56
lea ecx, [esp + 0x18]
push ecx
call dword [sym.imp.SHELL32.dll_SHGetMalloc]
test eax, eax
jl 0x40da62
lea edx, [esp + 0x14]
push edx
push 0x15
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
jl 0x40da48
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0x24]
push eax
push ecx
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
lea edx, [esp + 0x24]
lea edi, [esp + 0x10]
call fcn.00402ae0
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
mov edx, dword [eax]
mov edx, dword [edx + 0x14]
push ecx
push eax
call edx
mov eax, dword [esp + 0x18]
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
jmp 0x40da62
lea eax, [edi + 4]
lea edi, [esp + 0x10]
call fcn.00402b20
mov eax, dword [esp + 0x10]
cmp dword [eax - 0xc], 0
mov ebx, 0x482218
je 0x40da76
mov ebx, str.360safe.setup.log
lea ecx, [esp + 0x10]
push ecx
lea edx, [esp + 0x24]
push edx
call fcn.0040dc10
mov byte [esp + 0x248], 1
mov eax, dword [esp + 0x28]
push 0x482288
push eax
call fcn.00459261
add esp, 0x10
mov dword [esp + 0x18], eax
test eax, eax
je 0x40db4f
push 2
push 0
push eax
call fcn.0045ac43
mov ebx, dword [esi + 0xc]
add esp, 0xc
cmp ebx, dword [esi + 0x10]
jbe 0x40dac5
call fcn.004577aa
mov edi, dword [esi]
jmp 0x40dad0
mov eax, dword [esi + 0x10]
mov dword [esp + 0x14], eax
cmp dword [esi + 0xc], eax
jbe 0x40dae1
call fcn.004577aa
mov eax, dword [esi]
test edi, edi
je 0x40daeb
cmp edi, eax
je 0x40daf0
call fcn.004577aa
cmp ebx, dword [esp + 0x14]
je 0x40db42
test edi, edi
jne 0x40db3a
call fcn.004577aa
xor eax, eax
cmp ebx, dword [eax + 0x10]
jb 0x40db0b
call fcn.004577aa
mov ecx, dword [ebx]
mov edx, dword [esp + 0x18]
push ecx
push 0x482290
push edx
call fcn.0045acc8
add esp, 0xc
test edi, edi
jne 0x40db3e
call fcn.004577aa
xor eax, eax
cmp ebx, dword [eax + 0x10]
jb 0x40db35
call fcn.004577aa
add ebx, 4
jmp 0x40dad0
mov eax, dword [edi]
jmp 0x40db01
mov eax, dword [edi]
jmp 0x40db2b
mov eax, dword [esp + 0x18]
push eax
call fcn.00458b65
add esp, 4
mov eax, dword [esi + 0x10]
mov dword [esp + 0x18], eax
cmp dword [esi + 0xc], eax
jbe 0x40db60
call fcn.004577aa
mov edi, dword [esi + 0xc]
mov ebx, dword [esi]
cmp edi, dword [esi + 0x10]
jbe 0x40db6f
call fcn.004577aa
mov ecx, dword [esp + 0x18]
mov eax, dword [esi]
push ecx
push ebx
push edi
push eax
push esi
lea ebx, [esp + 0x2c]
call fcn.0040e000
mov byte [esp + 0x240], 0
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40dbab
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x240], 0xffffffff
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40dbd6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 1
mov ecx, dword [esp + 0x238]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x220]
xor ecx, esp
call fcn.0045715c
mov esp, ebp
pop ebp
ret 4