Function at 0x452ae0
Capabilities:
Check if file exists
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x511e98
mov eax, dword fs:[0]
push eax
sub esp, 0x480
mov eax, dword [0x5524b4]
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 edi, dword [ebp + 8]
mov dword [ebp - 0x45c], edi
test edi, edi
jne 0x452b22
xor eax, eax
jmp 0x45328e
call fcn.00407db0
mov ecx, eax
test ecx, ecx
jne 0x452b37
push 0x80004005
call fcn.00408240
mov eax, dword [ecx]
call dword [eax + 0xc]
mov dword [ebp - 0x488], eax
lea ecx, [eax + 0x10]
mov dword [ebp - 0x48c], ecx
cmp dword [edi + 0x128], 0
mov ebx, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov dword [ebp - 4], 0
mov dword [ebp - 0x458], reloc.WS2_32.dll_accept
je 0x452c39
cmp dword [edi + 0x12c], 8
lea eax, [edi + 0x118]
jb 0x452b80
mov eax, dword [eax]
lea ecx, [ebp - 0x460]
push ecx
lea ecx, [ebp - 0x458]
push ecx
push eax
call fcn.004535c0
add esp, 0xc
test al, al
je 0x452c39
mov edi, dword [ebp - 0x460]
lea eax, [ebp - 0x454]
push eax
push 0x20019
push 0
push edi
push dword [ebp - 0x458]
mov dword [ebp - 0x454], 0
call ebx
mov esi, eax
test esi, esi
je 0x452bf0
cmp dword [ebp - 0x458], reloc.WS2_32.dll_accept
jne 0x452bf0
lea eax, [ebp - 0x454]
push eax
push 0x20019
push 0
push edi
push reloc.OLEAUT32.dll_SysReAllocString
call ebx
mov esi, eax
call fcn.004028f0
test al, al
je 0x452c16
test esi, esi
je 0x452c16
lea eax, [ebp - 0x454]
push eax
push 0x20119
push 0
push edi
push dword [ebp - 0x458]
call ebx
mov esi, eax
push edi
call fcn.004a4c9c
add esp, 4
push dword [ebp - 0x454]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
je 0x45324f
mov edi, dword [ebp - 0x45c]
cmp dword [edi + 0x140], 0
je 0x452d14
cmp dword [edi + 0x144], 8
lea eax, [edi + 0x130]
jb 0x452c57
mov eax, dword [eax]
lea ecx, [ebp - 0x460]
push ecx
lea ecx, [ebp - 0x458]
push ecx
push eax
call fcn.004535c0
add esp, 0xc
test al, al
je 0x452d14
mov edi, dword [ebp - 0x460]
lea eax, [ebp - 0x454]
mov ebx, dword [ebp - 0x458]
push eax
push 0x20019
push 0
push edi
push ebx
mov dword [ebp - 0x454], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov esi, eax
test esi, esi
je 0x452ccc
cmp ebx, reloc.WS2_32.dll_accept
jne 0x452ccc
lea eax, [ebp - 0x454]
push eax
push 0x20019
push 0
push edi
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov esi, eax
call fcn.004028f0
test al, al
je 0x452cf1
test esi, esi
je 0x452cf1
lea eax, [ebp - 0x454]
push eax
push 0x20119
push 0
push edi
push ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov esi, eax
push edi
call fcn.004a4c9c
add esp, 4
push dword [ebp - 0x454]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
je 0x45324f
mov edi, dword [ebp - 0x45c]
cmp dword [edi + 0x1a0], 0
mov ebx, dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
mov esi, dword [sym.imp.SHLWAPI.dll_PathAppendW]
je 0x452ddc
push 0x208
lea eax, [ebp - 0x420]
push 0
push eax
call fcn.004ab2f0
add esp, 0xc
lea eax, [ebp - 0x420]
push 0
push 0
push eax
push 0
call ebx
cmp dword [edi + 0x1a4], 8
lea esi, [edi + 0x190]
jb 0x452d65
mov eax, dword [esi]
jmp 0x452d67
mov eax, esi
push eax
lea eax, [ebp - 0x420]
push eax
mov eax, dword [sym.imp.SHLWAPI.dll_PathAppendW]
call eax
lea eax, [ebp - 0x420]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x45324f
push 0x208
push eax
lea eax, [ebp - 0x218]
push eax
call fcn.004ab2f0
add esp, 0xc
lea eax, [ebp - 0x218]
push 0
push 0x19
push eax
push 0
call ebx
cmp dword [esi + 0x14], 8
jb 0x452db7
mov esi, dword [esi]
push esi
mov esi, dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea eax, [ebp - 0x218]
push eax
call esi
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x45324f
cmp dword [edi + 0x1b8], 0
je 0x452e3a
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.004ab2f0
add esp, 0xc
lea eax, [ebp - 0x218]
push 0
push 0x1a
push eax
push 0
call ebx
cmp dword [edi + 0x1bc], 8
lea eax, [edi + 0x1a8]
jb 0x452e1b
mov eax, dword [eax]
push eax
lea eax, [ebp - 0x218]
push eax
call esi
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x45324f
cmp dword [edi + 0x1d0], 0
je 0x452e9e
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.004ab2f0
add esp, 0xc
lea eax, [ebp - 0x218]
push 0
push 0x1c
push eax
push 0
call ebx
cmp dword [edi + 0x1d4], 8
lea eax, [edi + 0x1c0]
jb 0x452e79
mov eax, dword [eax]
push eax
lea eax, [ebp - 0x218]
push eax
call esi
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x452e9e
mov esi, 1
jmp 0x45326a
cmp dword [edi + 0x1f4], 0
je 0x453236
xor esi, esi
mov dword [ebp - 0x46c], esi
mov dword [ebp - 0x468], esi
mov dword [ebp - 0x464], esi
push 0x51f5e8
lea ecx, [ebp - 0x484]
mov byte [ebp - 4], 1
call fcn.004034c0
lea ecx, [edi + 0x1e4]
cmp dword [ecx + 0x10], esi
jne 0x452f05
mov eax, dword [ebp - 0x470]
cmp eax, 8
jb 0x453227
inc eax
lea ecx, [ebp - 0x484]
push eax
push dword [ebp - 0x484]
call fcn.00408870
jmp 0x453227
xor eax, eax
mov dword [ebp - 0x424], 7
mov dword [ebp - 0x428], 0
mov word [ebp - 0x438], ax
push dword [ebp - 0x474]
mov ebx, dword [ebp - 0x470]
lea eax, [ebp - 0x484]
cmp ebx, 8
mov byte [ebp - 4], 3
push 0
cmovae eax, dword [ebp - 0x484]
push eax
call fcn.0044d6a0
mov edi, eax
cmp edi, 0xffffffff
je 0x453127
nop word [eax + eax]
push dword [ebp - 0x474]
cmp ebx, 8
lea ecx, [ebp - 0x484]
mov ebx, dword [ebp - 0x45c]
cmovae ecx, dword [ebp - 0x484]
add ebx, 0x1e4
push edi
push ecx
mov ecx, ebx
call fcn.004154a0
mov esi, eax
lea eax, [ebp - 0x450]
cmp esi, 0xffffffff
je 0x45302c
mov ecx, esi
sub ecx, edi
push ecx
push edi
push eax
mov ecx, ebx
call fcn.00415aa0
mov edi, eax
lea eax, [ebp - 0x438]
cmp eax, edi
je 0x452ffd
mov eax, dword [ebp - 0x424]
cmp eax, 8
jb 0x452fd4
inc eax
lea ecx, [ebp - 0x438]
push eax
push dword [ebp - 0x438]
call fcn.00408870
xor eax, eax
mov dword [ebp - 0x424], 7
push edi
lea ecx, [ebp - 0x438]
mov dword [ebp - 0x428], 0
mov word [ebp - 0x438], ax
call fcn.00417340
mov eax, dword [ebp - 0x43c]
mov byte [ebp - 4], 3
cmp eax, 8
jb 0x45301f
inc eax
lea ecx, [ebp - 0x450]
push eax
push dword [ebp - 0x450]
call fcn.00408870
mov edi, dword [ebp - 0x474]
add edi, esi
jmp 0x4530af
push 0xffffffffffffffff
push edi
push eax
mov ecx, ebx
call fcn.00415aa0
mov esi, eax
lea eax, [ebp - 0x438]
cmp eax, esi
je 0x45308a
mov eax, dword [ebp - 0x424]
cmp eax, 8
jb 0x453061
inc eax
lea ecx, [ebp - 0x438]
push eax
push dword [ebp - 0x438]
call fcn.00408870
xor eax, eax
mov dword [ebp - 0x424], 7
push esi
lea ecx, [ebp - 0x438]
mov dword [ebp - 0x428], 0
mov word [ebp - 0x438], ax
call fcn.00417340
mov eax, dword [ebp - 0x43c]
mov byte [ebp - 4], 3
cmp eax, 8
jb 0x4530ac
inc eax
lea ecx, [ebp - 0x450]
push eax
push dword [ebp - 0x450]
call fcn.00408870
or edi, 0xffffffff
cmp dword [ebp - 0x428], 0
je 0x4530ed
lea eax, [ebp - 0x438]
push eax
lea ecx, [ebp - 0x46c]
call fcn.0044db00
cmp dword [ebp - 0x424], 8
lea eax, [ebp - 0x438]
mov dword [ebp - 0x428], 0
cmovae eax, dword [ebp - 0x438]
xor ecx, ecx
mov word [eax], cx
cmp edi, 0xffffffff
je 0x4530fd
mov ebx, dword [ebp - 0x470]
jmp 0x452f60
mov eax, dword [ebp - 0x424]
cmp eax, 8
jb 0x45311b
inc eax
lea ecx, [ebp - 0x438]
push eax
push dword [ebp - 0x438]
call fcn.00408870
mov ebx, dword [ebp - 0x470]
mov esi, dword [ebp - 0x46c]
xor eax, eax
mov dword [ebp - 0x424], 7
mov dword [ebp - 0x428], 0
mov word [ebp - 0x438], ax
cmp ebx, 8
jb 0x45315e
lea eax, [ebx + 1]
push eax
push dword [ebp - 0x484]
lea ecx, [ebp - 0x484]
call fcn.00408870
mov ebx, dword [ebp - 0x468]
cmp esi, ebx
je 0x453221
mov edi, dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.004ab2f0
add esp, 0xc
lea eax, [ebp - 0x218]
push 0
push 0
push eax
push 0
call edi
cmp dword [esi + 0x14], 8
jb 0x4531a1
mov eax, dword [esi]
jmp 0x4531a3
mov eax, esi
push eax
lea eax, [ebp - 0x218]
push eax
mov eax, dword [sym.imp.SHLWAPI.dll_PathAppendW]
call eax
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x453256
push 0x208
push eax
lea eax, [ebp - 0x420]
push eax
call fcn.004ab2f0
add esp, 0xc
lea eax, [ebp - 0x420]
push 0
push 0x19
push eax
push 0
call edi
cmp dword [esi + 0x14], 8
jb 0x4531f5
mov eax, dword [esi]
jmp 0x4531f7
mov eax, esi
push eax
lea eax, [ebp - 0x420]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea eax, [ebp - 0x420]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x453256
add esi, 0x18
cmp esi, ebx
jne 0x453172
mov edi, dword [ebp - 0x45c]
lea ecx, [ebp - 0x46c]
mov byte [ebp - 4], 0
call fcn.0042b760
push dword [edi + 0x1fc]
lea eax, [edi + 0xc0]
push eax
call fcn.004548e0
add esp, 8
test eax, eax
jne 0x453268
mov esi, 1
jmp 0x45326a
lea ecx, [ebp - 0x46c]
call fcn.0042b760
mov esi, 1
jmp 0x45326a
xor esi, esi
mov edi, dword [ebp - 0x488]
or eax, 0xffffffff
mov dword [ebp - 4], 0xffffffff
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x45328c
mov ecx, dword [edi]
push edi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, esi
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.004a4bd0
mov esp, ebp
pop ebp
ret