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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5246a8
mov eax, dword fs:[0]
push eax
sub esp, 0x47c
mov eax, dword [0x569564]
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]
test edi, edi
jne 0x4a733c
xor eax, eax
jmp 0x4a7748
call fcn.00407140
mov ecx, eax
test ecx, ecx
jne 0x4a7351
push 0x80004005
call fcn.004069a0
mov eax, dword [ecx]
call dword [eax + 0xc]
mov dword [ebp - 0x484], eax
lea ecx, [eax + 0x10]
mov dword [ebp - 0x488], ecx
cmp dword [edi + 0xd4], 0
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov dword [ebp - 4], 0
mov dword [ebp - 0x458], reloc.WS2_32.dll_accept
je 0x4a745b
cmp dword [edi + 0xd8], 8
lea eax, [edi + 0xc4]
jb 0x4a739a
mov eax, dword [eax]
lea ecx, [ebp - 0x45c]
push ecx
lea ecx, [ebp - 0x458]
push ecx
push eax
call fcn.004a7dc0
add esp, 0xc
test al, al
je 0x4a745b
mov ebx, dword [ebp - 0x45c]
lea eax, [ebp - 0x454]
push eax
push 0x20019
push 0
push ebx
push dword [ebp - 0x458]
mov dword [ebp - 0x454], 0
call esi
mov esi, eax
test esi, esi
je 0x4a740e
cmp dword [ebp - 0x458], reloc.WS2_32.dll_accept
jne 0x4a740e
lea eax, [ebp - 0x454]
push eax
push 0x20019
push 0
push ebx
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov esi, eax
call fcn.00516040
test al, al
je 0x4a7438
test esi, esi
je 0x4a7438
lea eax, [ebp - 0x454]
push eax
push 0x20119
push 0
push ebx
push dword [ebp - 0x458]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov esi, eax
push ebx
call fcn.004ac317
add esp, 4
push dword [ebp - 0x454]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
je 0x4a76b0
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
cmp dword [edi + 0xec], 0
je 0x4a7534
cmp dword [edi + 0xf0], 8
lea eax, [edi + 0xdc]
jb 0x4a7479
mov eax, dword [eax]
lea ecx, [ebp - 0x45c]
push ecx
lea ecx, [ebp - 0x458]
push ecx
push eax
call fcn.004a7dc0
add esp, 0xc
test al, al
je 0x4a7534
mov ebx, dword [ebp - 0x45c]
lea eax, [ebp - 0x454]
push eax
push 0x20019
push 0
push ebx
push dword [ebp - 0x458]
mov dword [ebp - 0x454], 0
call esi
mov esi, eax
test esi, esi
je 0x4a74ed
cmp dword [ebp - 0x458], reloc.WS2_32.dll_accept
jne 0x4a74ed
lea eax, [ebp - 0x454]
push eax
push 0x20019
push 0
push ebx
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov esi, eax
call fcn.00516040
test al, al
je 0x4a7517
test esi, esi
je 0x4a7517
lea eax, [ebp - 0x454]
push eax
push 0x20119
push 0
push ebx
push dword [ebp - 0x458]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov esi, eax
push ebx
call fcn.004ac317
add esp, 4
push dword [ebp - 0x454]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
je 0x4a76b0
cmp dword [edi + 0x104], 0
mov ebx, dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
mov esi, dword [sym.imp.SHLWAPI.dll_PathAppendW]
je 0x4a75fc
push 0x208
lea eax, [ebp - 0x420]
push 0
push eax
call fcn.004e9750
add esp, 0xc
lea eax, [ebp - 0x420]
push 0
push 0
push eax
push 0
call ebx
cmp dword [edi + 0x108], 8
lea esi, [edi + 0xf4]
jb 0x4a7585
mov eax, dword [esi]
jmp 0x4a7587
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 0x4a76b0
push 0x208
push eax
lea eax, [ebp - 0x218]
push eax
call fcn.004e9750
add esp, 0xc
lea eax, [ebp - 0x218]
push 0
push 0x19
push eax
push 0
call ebx
cmp dword [esi + 0x14], 8
jb 0x4a75d7
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 0x4a76b0
cmp dword [edi + 0x11c], 0
je 0x4a7656
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.004e9750
add esp, 0xc
lea eax, [ebp - 0x218]
push 0
push 0x1a
push eax
push 0
call ebx
cmp dword [edi + 0x120], 8
lea eax, [edi + 0x10c]
jb 0x4a763b
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 0x4a76b0
cmp dword [edi + 0x134], 0
je 0x4a76b7
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.004e9750
add esp, 0xc
lea eax, [ebp - 0x218]
push 0
push 0x1c
push eax
push 0
call ebx
cmp dword [edi + 0x138], 8
lea eax, [edi + 0x124]
jb 0x4a7695
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 0x4a76b7
mov esi, 1
jmp 0x4a7724
cmp dword [edi + 0x14c], 0
je 0x4a7722
xor esi, esi
mov dword [ebp - 0x468], esi
mov dword [ebp - 0x464], esi
mov dword [ebp - 0x460], esi
push 0x536d60
lea ecx, [ebp - 0x480]
mov byte [ebp - 4], 1
call fcn.004075b0
lea ecx, [edi + 0x13c]
mov dword [ebp - 0x45c], ecx
cmp dword [ecx + 0x10], esi
jne 0x4a7764
mov eax, dword [ebp - 0x46c]
cmp eax, 8
jb 0x4a7717
inc eax
lea ecx, [ebp - 0x480]
push eax
push dword [ebp - 0x480]
call fcn.00409960
lea ecx, [ebp - 0x468]
call fcn.00448de2
xor esi, esi
mov edi, dword [ebp - 0x484]
or eax, 0xffffffff
mov dword [ebp - 4], 0xffffffff
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x4a7746
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.004ac267
mov esp, ebp
pop ebp
ret
xor eax, eax
mov dword [ebp - 0x424], 7
mov dword [ebp - 0x428], 0
mov word [ebp - 0x438], ax
push dword [ebp - 0x470]
mov ebx, dword [ebp - 0x46c]
lea eax, [ebp - 0x480]
cmp ebx, 8
mov byte [ebp - 4], 3
push 0
cmovae eax, dword [ebp - 0x480]
push eax
call fcn.0045621d
mov edi, eax
cmp edi, 0xffffffff
je 0x4a7981
nop dword [eax]
nop dword [eax + eax]
push dword [ebp - 0x470]
cmp ebx, 8
lea ecx, [ebp - 0x480]
mov ebx, dword [ebp - 0x45c]
cmovae ecx, dword [ebp - 0x480]
push edi
push ecx
mov ecx, ebx
call fcn.004127c0
mov esi, eax
lea eax, [ebp - 0x450]
cmp esi, 0xffffffff
je 0x4a7886
mov ecx, esi
sub ecx, edi
push ecx
push edi
push eax
mov ecx, ebx
call fcn.00412dd0
mov edi, eax
lea eax, [ebp - 0x438]
cmp eax, edi
je 0x4a7857
mov eax, dword [ebp - 0x424]
cmp eax, 8
jb 0x4a782e
inc eax
lea ecx, [ebp - 0x438]
push eax
push dword [ebp - 0x438]
call fcn.00409960
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.004140f0
mov eax, dword [ebp - 0x43c]
mov byte [ebp - 4], 3
cmp eax, 8
jb 0x4a7879
inc eax
lea ecx, [ebp - 0x450]
push eax
push dword [ebp - 0x450]
call fcn.00409960
mov edi, dword [ebp - 0x470]
add edi, esi
jmp 0x4a7909
push 0xffffffffffffffff
push edi
push eax
mov ecx, ebx
call fcn.00412dd0
mov esi, eax
lea eax, [ebp - 0x438]
cmp eax, esi
je 0x4a78e4
mov eax, dword [ebp - 0x424]
cmp eax, 8
jb 0x4a78bb
inc eax
lea ecx, [ebp - 0x438]
push eax
push dword [ebp - 0x438]
call fcn.00409960
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.004140f0
mov eax, dword [ebp - 0x43c]
mov byte [ebp - 4], 3
cmp eax, 8
jb 0x4a7906
inc eax
lea ecx, [ebp - 0x450]
push eax
push dword [ebp - 0x450]
call fcn.00409960
or edi, 0xffffffff
cmp dword [ebp - 0x428], 0
je 0x4a7947
lea eax, [ebp - 0x438]
push eax
lea ecx, [ebp - 0x468]
call fcn.004563ed
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 0x4a7957
mov ebx, dword [ebp - 0x46c]
jmp 0x4a77c0
mov eax, dword [ebp - 0x424]
cmp eax, 8
jb 0x4a7975
inc eax
lea ecx, [ebp - 0x438]
push eax
push dword [ebp - 0x438]
call fcn.00409960
mov ebx, dword [ebp - 0x46c]
mov esi, dword [ebp - 0x468]
xor eax, eax
mov dword [ebp - 0x424], 7
mov dword [ebp - 0x428], 0
mov word [ebp - 0x438], ax
cmp ebx, 8
jb 0x4a79b8
lea eax, [ebx + 1]
push eax
push dword [ebp - 0x480]
lea ecx, [ebp - 0x480]
call fcn.00409960
mov ebx, dword [ebp - 0x464]
cmp esi, ebx
je 0x4a7717
mov edi, dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
nop dword [eax]
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.004e9750
add esp, 0xc
lea eax, [ebp - 0x218]
push 0
push 0
push eax
push 0
call edi
cmp dword [esi + 0x14], 8
jb 0x4a79ff
mov eax, dword [esi]
jmp 0x4a7a01
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 0x4a7a80
push 0x208
push eax
lea eax, [ebp - 0x420]
push eax
call fcn.004e9750
add esp, 0xc
lea eax, [ebp - 0x420]
push 0
push 0x19
push eax
push 0
call edi
cmp dword [esi + 0x14], 8
jb 0x4a7a4f
mov eax, dword [esi]
jmp 0x4a7a51
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 0x4a7a80
add esi, 0x18
cmp esi, ebx
jne 0x4a79d0
jmp 0x4a7717
lea ecx, [ebp - 0x468]
call fcn.00448de2
mov esi, 1
jmp 0x4a7724