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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x547109
mov eax, dword fs:[0]
push eax
sub esp, 0xc0
mov eax, dword [0x5a92d0]
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 [0x5a801c], 0
jne 0x407028
mov eax, 0x5c19c0
jmp 0x4073c0
mov dword [0x5a801c], 0
mov dword [ebp - 0x98], 0
mov dword [ebp - 0x9c], 0
push 0x558300
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [ebp - 0x94], eax
cmp dword [ebp - 0x94], 0
je 0x4070c1
mov dword [ebp - 0xa0], 0
push 0x558330
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 0x40709f
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.00406e00
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 0x4070d4
mov eax, 0x5c19c0
jmp 0x4073c0
push 0x104
push 0x5c19c0
mov ecx, dword [ebp - 0x98]
push ecx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push 0x5c
push 0x5c19c0
call fcn.00408810
add esp, 8
mov dword [ebp - 0xa4], eax
cmp dword [ebp - 0xa4], 0
je 0x407114
xor edx, edx
mov eax, dword [ebp - 0xa4]
mov word [eax], dx
push 0x5c19c0
lea ecx, [ebp - 0x28]
call fcn.00406210
mov dword [ebp - 4], 0
cmp dword [ebp - 0x9c], 0
je 0x4071d6
push 0x558340
lea ecx, [ebp - 0x28]
push ecx
lea edx, [ebp - 0x88]
push edx
call fcn.00405d60
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.00408590
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4071d6
push 0x55835c
lea edx, [ebp - 0x28]
push edx
lea eax, [ebp - 0x70]
push eax
call fcn.00405d60
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.00408590
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4071d6
mov dword [ebp - 0xa8], 1
jmp 0x4071e0
mov dword [ebp - 0xa8], 0
mov dl, byte [ebp - 0xa8]
mov byte [ebp - 0x8e], dl
mov eax, dword [ebp - 0x8c]
and eax, 2
je 0x407206
and dword [ebp - 0x8c], 0xfffffffd
lea ecx, [ebp - 0x70]
call fcn.00406500
mov dword [ebp - 4], 0
mov ecx, dword [ebp - 0x8c]
and ecx, 1
je 0x40722a
and dword [ebp - 0x8c], 0xfffffffe
lea ecx, [ebp - 0x88]
call fcn.00406500
movzx edx, byte [ebp - 0x8e]
test edx, edx
je 0x407251
push 0x55835c
push 0x104
push 0x5c19c0
call fcn.0052f527
add esp, 0xc
jmp 0x4073a1
cmp dword [ebp - 0x9c], 0
jne 0x4072fc
push 0x55838c
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebp - 0x58]
push ecx
call fcn.00405d60
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.00408590
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4072fc
push str.SynCom.dll.manifest
lea ecx, [ebp - 0x28]
push ecx
lea edx, [ebp - 0x40]
push edx
call fcn.00405d60
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.00408590
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4072fc
mov dword [ebp - 0xb0], 1
jmp 0x407306
mov dword [ebp - 0xb0], 0
mov cl, byte [ebp - 0xb0]
mov byte [ebp - 0x8d], cl
mov edx, dword [ebp - 0x8c]
and edx, 8
je 0x40732c
and dword [ebp - 0x8c], 0xfffffff7
lea ecx, [ebp - 0x40]
call fcn.00406500
mov dword [ebp - 4], 0
mov eax, dword [ebp - 0x8c]
and eax, 4
je 0x40734d
and dword [ebp - 0x8c], 0xfffffffb
lea ecx, [ebp - 0x58]
call fcn.00406500
movzx ecx, byte [ebp - 0x8d]
test ecx, ecx
je 0x407371
push str.SynCom.dll.manifest
push 0x104
push 0x5c19c0
call fcn.0052f527
add esp, 0xc
jmp 0x4073a1
mov edx, 2
imul eax, edx, 0
mov dword [ebp - 0xac], eax
cmp dword [ebp - 0xac], 0x208
jae 0x40738d
jmp 0x407392
call fcn.0052dc54
xor ecx, ecx
mov edx, dword [ebp - 0xac]
mov word [edx + 0x5c19c0], cx
mov dword [ebp - 0xc8], 0x5c19c0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x28]
call fcn.00406500
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.0052d5fc
mov esp, ebp
pop ebp
ret