Function at 0x402810
Capabilities:
Check if file exists

Disassembly:
sub esp, 0x214
mov eax, dword [0x56c3c0]
xor eax, esp
mov dword [esp + 0x210], eax
push ebp
mov ebp, dword [esp + 0x21c]
push esi
push edi
push 0x53ef00
lea eax, [esp + 0x18]
push eax
mov dword [esp + 0x18], ebp
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenW]
push ebp
call esi
cmp eax, 8
mov edi, dword [sym.imp.KERNEL32.dll_lstrcatW]
jle 0x40286d
push 9
push ebp
lea ecx, [esp + 0x24]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
xor edx, edx
mov word [esp + 0x2c], dx
jmp 0x402875
push ebp
lea eax, [esp + 0x18]
push eax
call edi
mov ecx, 0x3a
cmp cx, word [esp + 0x1e]
jne 0x402888
xor edx, edx
mov word [esp + 0x20], dx
push ebp
call esi
cmp eax, 1
jne 0x40289c
push 0x53ef0c
lea eax, [esp + 0x18]
push eax
call edi
mov edi, dword [sym.imp.KERNEL32.dll_CreateFileW]
push 0
push 0x20000000
push 3
push 0
push 3
push 0
lea ecx, [esp + 0x2c]
push ecx
call edi
cmp eax, 0xffffffff
jne 0x402906
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0
lea edx, [esp + 0x20]
push edx
push 2
mov edi, eax
call dword [0x5784e0]
movzx esi, word [ebp]
shl esi, 0x10
or esi, 0x8004
call fcn.00401350
xor eax, eax
cmp edi, 2
pop edi
pop esi
sete al
pop ebp
mov ecx, dword [esp + 0x210]
xor ecx, esp
call fcn.004d6555
add esp, 0x214
ret
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
call ebx
push 0
push 0x20000080
push 3
push 0
push 3
push 0xc0000000
lea eax, [esp + 0x30]
push eax
call edi
mov esi, eax
cmp esi, 0xffffffff
je 0x402952
push esi
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
push esi
mov dword [esp + 0x14], eax
call ebx
cmp dword [esp + 0x10], 0
je 0x402952
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x40296c
mov ecx, dword [esp + 0x22c]
push ecx
mov ecx, ebp
call fcn.00402e30
add esp, 4
test eax, eax
jne 0x402b0e
cmp dword [esp + 0x22c], 0
je 0x4029d2
movzx edx, word [ebp]
push edx
call fcn.0040b680
mov esi, eax
add esp, 4
cmp esi, 0xffffffff
jne 0x402991
xor eax, eax
jmp 0x402b0e
mov edx, ebp
mov ecx, esi
call fcn.004018b0
push esi
mov dword [esp + 0x14], eax
call ebx
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x402b0e
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [esp + 0x22c]
push eax
mov ecx, ebp
call fcn.00402e30
add esp, 4
test eax, eax
jne 0x402b0e
push 0
push 0x20000000
push 3
push 0
push 3
push 0xc0000000
lea ecx, [esp + 0x30]
push ecx
call edi
mov esi, eax
cmp esi, 0xffffffff
je 0x402a3a
cmp dword [esp + 0x22c], 0
je 0x402a4f
push 0
lea eax, [esp + 0x14]
push eax
push 0
push 0
push 0
push 0
push 0x90020
push esi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
push esi
call ebx
push 0
push 0x20000000
push 3
push 0
push 3
push 0xc0000000
lea ecx, [esp + 0x30]
push ecx
call edi
mov esi, eax
cmp esi, 0xffffffff
jne 0x402a4f
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor edx, edx
cmp eax, 2
sete dl
mov eax, edx
jmp 0x402b0e
mov edx, ebp
mov ecx, esi
call fcn.004018b0
cmp dword [esp + 0x22c], 0
mov ebp, eax
je 0x402af2
test ebp, ebp
jne 0x402af6
push esi
call ebx
push ebp
push 0x20000000
push 3
push ebp
push 3
push 0xc0000000
lea eax, [esp + 0x30]
push eax
call edi
mov esi, eax
cmp esi, 0xffffffff
je 0x402ad3
push ebp
lea edx, [esp + 0x14]
push edx
push ebp
push ebp
push ebp
push ebp
push 0x90020
push esi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
push esi
call ebx
push ebp
push 0x20000000
push 3
push ebp
push 3
push 0xc0000000
lea eax, [esp + 0x30]
push eax
call edi
mov esi, eax
cmp esi, 0xffffffff
jne 0x402ae5
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor ecx, ecx
cmp eax, 2
sete cl
mov eax, ecx
jmp 0x402b0e
mov edx, dword [esp + 0x14]
mov ecx, esi
call fcn.004018b0
mov ebp, eax
test ebp, ebp
je 0x402afa
xor edi, edi
jmp 0x402b02
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push esi
call ebx
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, ebp
mov ecx, dword [esp + 0x220]
pop ebx
pop edi
pop esi
pop ebp
xor ecx, esp
call fcn.004d6555
add esp, 0x214
ret