Function at 0x40a4b0
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x421bd0
mov eax, dword fs:[0]
push eax
sub esp, 0x38
mov eax, dword [0x42c008]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x30], eax
xor eax, eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 4], eax
call fcn.0040af70
mov edi, eax
test edi, edi
je 0x40a8a8
mov eax, dword [edi]
mov esi, dword [eax + 0xc]
mov ecx, esi
call dword [0x4222ec]
mov ecx, edi
call esi
add eax, 0x10
mov dword [ebp - 0x38], eax
xor ebx, ebx
mov dword [ebp - 4], 1
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x1c], ebx
mov byte [ebp - 4], 2
call fcn.0040af70
mov edi, eax
test edi, edi
je 0x40a8b2
mov eax, dword [edi]
mov esi, dword [eax + 0xc]
mov ecx, esi
call dword [0x4222ec]
mov ecx, edi
call esi
lea esi, [eax + 0x10]
mov dword [ebp - 0x28], esi
push dword [ebp + 8]
lea eax, [ebp - 0x38]
mov byte [ebp - 4], 3
push str..Scsi_u:
push eax
call fcn.004097e0
mov edi, dword [ebp - 0x38]
add esp, 0xc
mov dword [ebp - 0x2c], edi
push ebx
push ebx
push 3
push ebx
push 3
push 0xc0000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x3c], eax
cmp eax, 0xffffffff
jne 0x40a593
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x20], eax
jmp 0x40a826
push 0x3c
call fcn.00414966
mov ebx, eax
add esp, 4
mov dword [ebp - 0x44], ebx
test ebx, ebx
jne 0x40a5b2
mov dword [ebp - 0x20], 8
jmp 0x40a81d
push 0x22c
call fcn.00414966
add esp, 4
mov dword [ebp - 0x1c], eax
test eax, eax
jne 0x40a5d2
mov dword [ebp - 0x20], 8
jmp 0x40a81d
mov byte [ebp - 0x15], 0
jmp 0x40a5e3
mov eax, dword [ebp - 0x1c]
mov dword [ebx + 4], 0
mov dword [ebx + 8], 0
mov dword [ebx + 0x14], 0
mov dword [ebx + 0x1c], 0
mov dword [ebx + 0x20], 0
mov dword [ebx + 0x24], 0
mov dword [ebx + 0x28], 0
mov dword [ebx + 0x2c], 0
push 0x22c
mov dword [ebx + 0x30], 0
push 0
mov dword [ebx + 0x34], 0
push eax
mov dword [ebx + 0x38], 0
call fcn.004116b0
push 8
lea eax, [ebx + 4]
mov dword [ebx], 0x1c
push str.SCSIDISK
push eax
mov dword [ebx + 0xc], 0x1388
mov dword [ebx + 0x18], 0x210
mov dword [ebx + 0x10], 0x1b0501
call fcn.004150f0
mov al, byte [ebp - 0x15]
add esp, 0x18
mov byte [ebx + 0x28], al
lea eax, [ebp - 0x14]
mov byte [ebx + 0x26], 0xec
push 0
push eax
push 0x22c
push dword [ebp - 0x1c]
push 0x3c
push ebx
push 0x4d008
push dword [ebp - 0x3c]
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x40a6b6
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x20], eax
mov al, byte [ebp - 0x15]
inc al
mov byte [ebp - 0x15], al
cmp al, 2
jb 0x40a5e0
jmp 0x40a81d
mov eax, dword [ebp - 0x1c]
mov edi, 0xa
add eax, 0x40
mov dword [ebp - 0x24], eax
lea edx, [eax + 1]
mov cl, byte [edx - 1]
lea edx, [edx + 2]
mov al, byte [edx - 2]
mov byte [edx - 3], al
mov byte [edx - 2], cl
sub edi, 1
jne 0x40a6c7
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, 0x15
or ecx, eax
mov edi, dword [ebp - 0x2c]
jge 0x40a6fd
push 0x15
lea ecx, [ebp - 0x28]
call fcn.0040c0b0
mov esi, dword [ebp - 0x28]
push 0x14
push dword [ebp - 0x24]
mov byte [esi + 0x14], 0
push esi
call fcn.004150f0
push dword [esi - 8]
push esi
call fcn.00414e07
add esp, 0x14
test eax, eax
js 0x40a89e
cmp eax, dword [esi - 8]
jg 0x40a89e
mov dword [esi - 0xc], eax
lea ecx, [ebp - 0x28]
mov byte [eax + esi], 0
call fcn.0040c440
mov ecx, dword [ebp - 0x30]
mov esi, dword [ebp - 0x28]
mov ecx, dword [ecx]
sub ecx, 0x10
lea eax, [esi - 0x10]
mov dword [ebp - 0x34], ecx
cmp eax, ecx
je 0x40a81d
cmp dword [ecx + 0xc], 0
lea edx, [ecx + 0xc]
mov dword [ebp - 0x40], edx
jl 0x40a811
mov eax, dword [eax]
mov dword [ebp - 0x24], eax
cmp eax, dword [ecx]
jne 0x40a811
mov eax, dword [eax]
mov ebx, dword [eax + 0x10]
mov ecx, ebx
call dword [0x4222ec]
mov ecx, dword [ebp - 0x24]
call ebx
lea ecx, [esi - 0x10]
mov dword [ebp - 0x24], eax
cmp dword [ecx + 0xc], 0
lea edx, [ecx + 0xc]
jl 0x40a79b
cmp eax, dword [ecx]
jne 0x40a79b
mov dword [ebp - 0x2c], ecx
lock inc dword [edx]
jmp 0x40a7d7
mov eax, dword [eax]
push 1
push dword [ecx + 4]
mov ebx, dword [eax]
mov ecx, ebx
call dword [0x4222ec]
mov ecx, dword [ebp - 0x24]
call ebx
mov ebx, eax
mov dword [ebp - 0x2c], ebx
test ebx, ebx
je 0x40a8bc
mov eax, dword [esi - 0xc]
mov dword [ebx + 4], eax
lea eax, [ebx + 0x10]
mov ecx, dword [esi - 0xc]
inc ecx
push ecx
push esi
push ecx
push eax
call fcn.0040c7a0
add esp, 0x10
mov ecx, dword [ebp - 0x40]
or eax, 0xffffffff
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x40a801
mov ecx, dword [ebp - 0x34]
push ecx
mov eax, dword [ecx]
mov dword [ebp - 0x34], eax
mov eax, dword [eax]
mov ebx, dword [eax + 4]
mov ecx, ebx
call dword [0x4222ec]
mov ecx, dword [ebp - 0x34]
call ebx
mov ecx, dword [ebp - 0x30]
mov eax, dword [ebp - 0x2c]
mov ebx, dword [ebp - 0x44]
add eax, 0x10
mov dword [ecx], eax
jmp 0x40a81d
push dword [esi - 0xc]
mov ecx, dword [ebp - 0x30]
push esi
call fcn.0040c360
push dword [ebp - 0x3c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call fcn.00414961
push dword [ebp - 0x1c]
call fcn.00414961
add esp, 8
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x40a85b
mov ebx, dword [esi]
push esi
mov eax, dword [ebx]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x4222ec]
mov ecx, ebx
call esi
lea ecx, [edi - 0x10]
or eax, 0xffffffff
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x40a87f
mov edi, dword [ecx]
push ecx
mov eax, dword [edi]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x4222ec]
mov ecx, edi
call esi
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0041038e
mov esp, ebp
pop ebp
ret
push 0x80070057
call fcn.00409590
push 0x80004005
call fcn.00409590
push 0x80004005
call fcn.00409590
call fcn.0040c430
int3