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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x634
mov esi, dword [ebp + 8]
mov eax, dword [0x43300c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
call fcn.0040d0bb
add esp, 4
xor ebx, ebx
cmp eax, 0x103
ja 0x40b854
lea edi, [ebp - 0x422]
push 0x208
push ebx
push edi
call fcn.0040f9d0
add esp, 0xc
push ebx
push edi
push 0x104
push esi
call dword [sym.imp.KERNEL32.dll_GetFullPathNameW]
test eax, eax
je 0x40b854
lea ebx, [ebp - 0x62a]
push 0x208
push 0
push ebx
call fcn.0040f9d0
add esp, 0xc
push edi
push ebx
call dword [sym.imp.SHLWAPI.dll_PathCanonicalizeW]
test eax, eax
je 0x40b852
push ebx
push esi
call fcn.004147e1
add esp, 8
test eax, eax
je 0x40b86e
xor ebx, ebx
and bl, 1
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040dac1
mov eax, ebx
add esp, 0x634
pop esi
pop edi
pop ebx
pop ebp
ret
push 0x104
push esi
push edi
call fcn.0040d26d
add esp, 0xc
push edi
call dword [sym.imp.SHLWAPI.dll_PathStripToRootW]
test eax, eax
je 0x40b852
cmp word [esi], 0x5c
jne 0x40b899
push edi
call dword [sym.imp.SHLWAPI.dll_PathIsUNCServerShareW]
test eax, eax
je 0x40b852
xor edi, edi
lea esi, [ebp - 0x21a]
push 0x20a
push edi
push esi
call fcn.0040f9d0
add esp, 0xc
push 0x104
push ebx
push esi
call fcn.0040d26d
add esp, 0xc
lea eax, [ebp - 0x630]
mov dword [eax], edi
mov edi, eax
push eax
push 0x42e110
push esi
call fcn.004163e3
add esp, 0xc
test eax, eax
je 0x40ba64
mov esi, eax
mov dword [ebp - 0x640], eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
bt eax, 0xa
jae 0x40ba37
sub esp, 0x1c
movaps xmm0, xmmword [0x42b540]
movups xmmword [esp + 4], xmm0
mov dword [esp], esi
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0x2200000
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x638], eax
cmp eax, 0xffffffff
je 0x40b9ab
mov edi, 0x4000
push edi
call fcn.0040cf57
add esp, 4
mov esi, eax
push edi
xor edi, edi
push edi
push eax
call fcn.0040f9d0
add esp, 0xc
mov dword [ebp - 0x634], edi
push edi
lea eax, [ebp - 0x634]
push eax
mov eax, 0x4000
push eax
push esi
push edi
push edi
push 0x900a8
push dword [ebp - 0x638]
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov dl, 1
test eax, eax
je 0x40b9bc
mov eax, dword [esi]
cmp eax, 0xa000000c
lea edi, [ebp - 0x630]
je 0x40b9c7
xor ecx, ecx
inc ecx
cmp eax, 0xa0000003
jne 0x40ba08
cmp word [esi + 0xa], 5
jb 0x40b9ce
movzx eax, word [esi + 8]
and eax, 0xfffffffe
mov dword [ebp - 0x63c], esi
add eax, esi
add eax, 0x10
jmp 0x40b9e7
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
setne bl
xor ecx, ecx
inc ecx
jmp 0x40ba17
xor ecx, ecx
inc ecx
lea edi, [ebp - 0x630]
jmp 0x40ba08
cmp word [esi + 0xa], 5
jae 0x40b9d5
xor edx, edx
xor ecx, ecx
inc ecx
jmp 0x40ba08
movzx eax, word [esi + 8]
and eax, 0xfffffffe
mov dword [ebp - 0x63c], esi
add eax, esi
add eax, 0x14
push 4
push str.___
push eax
call fcn.004163a9
add esp, 0xc
xor ecx, ecx
test eax, eax
setne cl
or bl, cl
mov edx, ebx
mov esi, dword [ebp - 0x63c]
push esi
mov esi, ecx
mov ebx, edx
call fcn.0040d268
mov ecx, esi
add esp, 4
mov eax, dword [ebp - 0x638]
inc eax
cmp eax, 2
jb 0x40ba33
push dword [ebp - 0x638]
mov esi, ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, esi
test ecx, ecx
jne 0x40ba66
push edi
push 0x42e110
push 0
call fcn.004163e3
add esp, 0xc
mov esi, eax
push eax
push dword [ebp - 0x640]
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
test esi, esi
mov esi, dword [ebp - 0x640]
jne 0x40b8e8
xor ebx, ebx
xor bl, 1
jmp 0x40b854