Function at 0x420f40
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5fdd99
mov eax, dword fs:[0]
push eax
sub esp, 0x21c
mov eax, dword [0x6a3000]
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
mov ebx, ecx
mov dword [ebp - 0x228], ebx
lea eax, [ebp - 0x220]
mov dword [ebp - 0x220], 0
push eax
push 0
push 0
push 0x645d98
call dword [sym.imp.SHELL32.dll_SHGetKnownFolderPath]
test eax, eax
js 0x420fda
mov edx, dword [ebp - 0x220]
test edx, edx
jne 0x420fa8
xor ecx, ecx
jmp 0x420fbf
mov ecx, edx
lea edi, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x420fb0
sub ecx, edi
sar ecx, 1
push ecx
push edx
lea ecx, [ebx + 0x20]
call fcn.00412520
push dword [ebp - 0x220]
call dword [sym.imp.ole32.dll_CoTaskMemFree]
jmp 0x4210fa
lea eax, [ebp - 0x21c]
push eax
push 0
push 0
push 5
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
js 0x421182
mov dword [ebp - 4], 0
call fcn.00483151
mov ecx, eax
mov dword [ebp - 4], 0xffffffff
test ecx, ecx
je 0x4212da
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x224], eax
lea eax, [ebp - 0x21c]
mov dword [ebp - 4], 1
test eax, 0xffff0000
jne 0x421047
movzx eax, ax
lea ecx, [ebp - 0x224]
push eax
call fcn.004100f0
jmp 0x421072
lea ecx, [ebp - 0x21c]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x421050
sub ecx, edx
lea eax, [ebp - 0x21c]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x224]
call fcn.00412520
mov dword [ebp - 4], 2
mov eax, dword [ebp - 0x224]
mov edi, dword [ebx + 0x20]
sub edi, 0x10
lea esi, [eax - 0x10]
cmp esi, edi
je 0x4210d8
cmp dword [edi + 0xc], 0
jl 0x4210cc
mov ecx, dword [esi]
cmp ecx, dword [edi]
jne 0x4210cc
push esi
call fcn.004123f0
add esp, 4
mov dword [ebp - 0x224], eax
or ecx, 0xffffffff
lea edx, [edi + 0xc]
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4210c4
mov ecx, dword [edi]
push edi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x224]
add eax, 0x10
mov dword [ebx + 0x20], eax
jmp 0x4210d8
push dword [eax - 0xc]
lea ecx, [ebx + 0x20]
push eax
call fcn.00412520
mov dword [ebp - 4], 0xffffffff
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x4210f4
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov ebx, dword [ebp - 0x228]
lea ecx, [ebp - 0x14]
mov dword [ebp - 0x14], 0
call fcn.004214a0
mov dword [ebp - 4], 6
push dword [ebp - 0x14]
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
test eax, eax
mov eax, dword [ebp - 0x14]
je 0x4212a6
mov esi, dword [ebx + 0x28]
lea edi, [ebx + 0x28]
lea edx, [eax - 0x10]
sub esi, 0x10
cmp edx, esi
je 0x4212a6
cmp dword [esi + 0xc], 0
lea ebx, [esi + 0xc]
jl 0x421298
mov ecx, dword [edx]
cmp ecx, dword [esi]
jne 0x421298
push edx
call fcn.004123f0
add esp, 4
mov dword [ebp - 0x224], eax
or ecx, 0xffffffff
lock xadd dword [ebx], ecx
dec ecx
test ecx, ecx
jg 0x421178
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x224]
add eax, 0x10
mov dword [edi], eax
jmp 0x4212a3
lea eax, [ebp - 0x21c]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
je 0x421284
mov dword [ebp - 4], 3
call fcn.00483151
mov ecx, eax
mov dword [ebp - 4], 0xffffffff
test ecx, ecx
je 0x4212da
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x224], eax
lea eax, [ebp - 0x21c]
mov dword [ebp - 4], 4
test eax, 0xffff0000
jne 0x4211ec
movzx eax, ax
lea ecx, [ebp - 0x224]
push eax
call fcn.004100f0
jmp 0x421217
lea ecx, [ebp - 0x21c]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4211f5
sub ecx, edx
lea eax, [ebp - 0x21c]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x224]
call fcn.00412520
mov dword [ebp - 4], 5
mov eax, dword [ebp - 0x224]
mov edi, dword [ebx + 0x20]
sub edi, 0x10
lea esi, [eax - 0x10]
cmp esi, edi
je 0x4210d8
cmp dword [edi + 0xc], 0
jl 0x4210cc
mov ecx, dword [esi]
cmp ecx, dword [edi]
jne 0x4210cc
push esi
call fcn.004123f0
add esp, 4
mov dword [ebp - 0x224], eax
or ecx, 0xffffffff
lea edx, [edi + 0xc]
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4210c4
mov ecx, dword [edi]
push edi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x224]
add eax, 0x10
mov dword [ebx + 0x20], eax
jmp 0x4210d8
push 3
lea ecx, [ebx + 0x20]
push 0x66d328
call fcn.00412520
jmp 0x4210fa
push dword [eax - 0xc]
mov ecx, edi
push eax
call fcn.00412520
mov eax, dword [ebp - 0x14]
lea edx, [eax - 0x10]
or eax, 0xffffffff
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4212be
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
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.005ca888
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.0040c5c0
int3