Function at 0x406ec0
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x544749
mov eax, dword fs:[0]
push eax
sub esp, 0xc0
mov eax, dword [0x5a62c0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x8c], 0
cmp dword [0x5a501c], 0
jne 0x406f08
mov eax, 0x5be920
jmp 0x4072a0
mov dword [0x5a501c], 0
mov dword [ebp - 0x98], 0
mov dword [ebp - 0x9c], 0
push 0x555300
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [ebp - 0x94], eax
cmp dword [ebp - 0x94], 0
je 0x406fa1
mov dword [ebp - 0xa0], 0
push 0x555330
mov eax, dword [ebp - 0x94]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0xa0], eax
cmp dword [ebp - 0xa0], 0
je 0x406f7f
lea ecx, [ebp - 0x9c]
push ecx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [ebp - 0xa0]
mov edx, dword [ebp - 0x94]
push edx
call fcn.00406d30
add esp, 4
mov dword [ebp - 0x98], eax
mov eax, dword [ebp - 0x94]
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
cmp dword [ebp - 0x98], 0
jne 0x406fb4
mov eax, 0x5be920
jmp 0x4072a0
push 0x104
push 0x5be920
mov ecx, dword [ebp - 0x98]
push ecx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push 0x5c
push 0x5be920
call fcn.00408700
add esp, 8
mov dword [ebp - 0xa4], eax
cmp dword [ebp - 0xa4], 0
je 0x406ff4
xor edx, edx
mov eax, dword [ebp - 0xa4]
mov word [eax], dx
push 0x5be920
lea ecx, [ebp - 0x28]
call fcn.00406170
mov dword [ebp - 4], 0
cmp dword [ebp - 0x9c], 0
je 0x4070b6
push 0x555340
lea ecx, [ebp - 0x28]
push ecx
lea edx, [ebp - 0x88]
push edx
call fcn.00405dd0
add esp, 0xc
mov dword [ebp - 0xb4], eax
mov eax, dword [ebp - 0xb4]
mov dword [ebp - 0xc0], eax
mov byte [ebp - 4], 1
mov ecx, dword [ebp - 0x8c]
or ecx, 1
mov dword [ebp - 0x8c], ecx
mov ecx, dword [ebp - 0xc0]
call fcn.00408480
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4070b6
push 0x55535c
lea edx, [ebp - 0x28]
push edx
lea eax, [ebp - 0x70]
push eax
call fcn.00405dd0
add esp, 0xc
mov dword [ebp - 0xb8], eax
mov ecx, dword [ebp - 0x8c]
or ecx, 2
mov dword [ebp - 0x8c], ecx
mov ecx, dword [ebp - 0xb8]
call fcn.00408480
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4070b6
mov dword [ebp - 0xa8], 1
jmp 0x4070c0
mov dword [ebp - 0xa8], 0
mov dl, byte [ebp - 0xa8]
mov byte [ebp - 0x8e], dl
mov eax, dword [ebp - 0x8c]
and eax, 2
je 0x4070e6
and dword [ebp - 0x8c], 0xfffffffd
lea ecx, [ebp - 0x70]
call fcn.00406460
mov dword [ebp - 4], 0
mov ecx, dword [ebp - 0x8c]
and ecx, 1
je 0x40710a
and dword [ebp - 0x8c], 0xfffffffe
lea ecx, [ebp - 0x88]
call fcn.00406460
movzx edx, byte [ebp - 0x8e]
test edx, edx
je 0x407131
push 0x55535c
push 0x104
push 0x5be920
call fcn.0052dba7
add esp, 0xc
jmp 0x407281
cmp dword [ebp - 0x9c], 0
jne 0x4071dc
push 0x55538c
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebp - 0x58]
push ecx
call fcn.00405dd0
add esp, 0xc
mov dword [ebp - 0xbc], eax
mov edx, dword [ebp - 0xbc]
mov dword [ebp - 0xc4], edx
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x8c]
or eax, 4
mov dword [ebp - 0x8c], eax
mov ecx, dword [ebp - 0xc4]
call fcn.00408480
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4071dc
push str.SynCom.dll.manifest
lea ecx, [ebp - 0x28]
push ecx
lea edx, [ebp - 0x40]
push edx
call fcn.00405dd0
add esp, 0xc
mov dword [ebp - 0xcc], eax
mov eax, dword [ebp - 0x8c]
or eax, 8
mov dword [ebp - 0x8c], eax
mov ecx, dword [ebp - 0xcc]
call fcn.00408480
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4071dc
mov dword [ebp - 0xb0], 1
jmp 0x4071e6
mov dword [ebp - 0xb0], 0
mov cl, byte [ebp - 0xb0]
mov byte [ebp - 0x8d], cl
mov edx, dword [ebp - 0x8c]
and edx, 8
je 0x40720c
and dword [ebp - 0x8c], 0xfffffff7
lea ecx, [ebp - 0x40]
call fcn.00406460
mov dword [ebp - 4], 0
mov eax, dword [ebp - 0x8c]
and eax, 4
je 0x40722d
and dword [ebp - 0x8c], 0xfffffffb
lea ecx, [ebp - 0x58]
call fcn.00406460
movzx ecx, byte [ebp - 0x8d]
test ecx, ecx
je 0x407251
push str.SynCom.dll.manifest
push 0x104
push 0x5be920
call fcn.0052dba7
add esp, 0xc
jmp 0x407281
mov edx, 2
imul eax, edx, 0
mov dword [ebp - 0xac], eax
cmp dword [ebp - 0xac], 0x208
jae 0x40726d
jmp 0x407272
call fcn.0052c2d4
xor ecx, ecx
mov edx, dword [ebp - 0xac]
mov word [edx + 0x5be920], cx
mov dword [ebp - 0xc8], 0x5be920
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x28]
call fcn.00406460
mov eax, dword [ebp - 0xc8]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0052bc7c
mov esp, ebp
pop ebp
ret