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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x630
mov eax, dword [0x43300c]
mov esi, dword [ebp + 8]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
call fcn.00416af2
add esp, 4
cmp eax, 0x103
ja 0x40b2d2
lea edi, [ebp - 0x422]
push 0x208
push 0
push edi
call fcn.0040fff0
add esp, 0xc
push 0
push edi
push 0x104
push esi
call dword [sym.imp.KERNEL32.dll_GetFullPathNameW]
test eax, eax
je 0x40b2d2
lea ebx, [ebp - 0x62a]
push 0x208
push 0
push ebx
call fcn.0040fff0
add esp, 0xc
push edi
push ebx
call dword [sym.imp.SHLWAPI.dll_PathCanonicalizeW]
test eax, eax
je 0x40b2d2
push ebx
push esi
call fcn.00414da8
add esp, 8
test eax, eax
je 0x40b2ee
xor ebx, ebx
mov ecx, dword [ebp - 0x10]
and bl, 1
xor ecx, ebp
call fcn.0040e0d1
mov eax, ebx
add esp, 0x630
pop esi
pop edi
pop ebx
pop ebp
ret
push 0x104
push esi
push edi
call fcn.00416f6b
add esp, 0xc
push edi
call dword [sym.imp.SHLWAPI.dll_PathStripToRootW]
test eax, eax
je 0x40b2d2
cmp word [esi], 0x5c
jne 0x40b319
push edi
call dword [sym.imp.SHLWAPI.dll_PathIsUNCServerShareW]
test eax, eax
je 0x40b2d2
lea esi, [ebp - 0x21a]
push 0x20a
push 0
push esi
call fcn.0040fff0
add esp, 0xc
push 0x104
push ebx
push esi
call fcn.00416f6b
add esp, 0xc
lea edi, [ebp - 0x630]
mov dword [ebp - 0x630], 0
push edi
push 0x42df42
push esi
call fcn.00416ffc
add esp, 0xc
test eax, eax
je 0x40b4e3
mov esi, eax
mov dword [ebp - 0x63c], eax
jmp 0x40b3ab
test ecx, ecx
lea edi, [ebp - 0x630]
jne 0x40b4e5
push edi
push 0x42df42
push 0
call fcn.00416ffc
add esp, 0xc
mov esi, eax
push eax
push dword [ebp - 0x63c]
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
test esi, esi
mov esi, dword [ebp - 0x63c]
je 0x40b4e3
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
test eax, 0x400
je 0x40b37e
push 0
push 0x2200000
push 3
push 0
push 7
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp eax, 0xffffffff
je 0x40b447
push 0x4000
call fcn.0040d9ae
add esp, 4
mov esi, eax
push 0x4000
push 0
push eax
call fcn.0040fff0
add esp, 0xc
mov dword [ebp - 0x634], 0
push 0
lea eax, [ebp - 0x634]
push eax
push 0x4000
push esi
push 0
push 0
push 0x900a8
push edi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x40b45a
mov eax, dword [esi]
cmp eax, 0xa000000c
je 0x40b468
cmp eax, 0xa0000003
mov dword [ebp - 0x638], 1
jne 0x40b47d
cmp word [esi + 0xa], 5
jae 0x40b481
xor ebx, ebx
jmp 0x40b4b8
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
mov ecx, 1
setne bl
jmp 0x40b4c7
mov dword [ebp - 0x638], 1
mov bl, 1
jmp 0x40b4b8
cmp word [esi + 0xa], 5
jae 0x40b48e
mov dword [ebp - 0x638], 1
xor ebx, ebx
jmp 0x40b4b8
mov bl, 1
jmp 0x40b4b8
movzx eax, word [esi + 8]
and eax, 0xfffffffe
lea eax, [esi + eax + 0x10]
jmp 0x40b499
movzx eax, word [esi + 8]
and eax, 0xfffffffe
lea eax, [esi + eax + 0x14]
push 4
push str.___
push eax
call fcn.00416f31
add esp, 0xc
xor ecx, ecx
test eax, eax
setne cl
or bl, cl
mov dword [ebp - 0x638], ecx
push esi
call fcn.0040d9b7
add esp, 4
mov ecx, dword [ebp - 0x638]
mov eax, edi
inc eax
cmp eax, 2
jb 0x40b370
push edi
mov esi, ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, esi
jmp 0x40b370
xor ebx, ebx
xor bl, 1
jmp 0x40b2d4