Function at 0x46d660
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4c9d75
mov eax, dword fs:[0]
push eax
sub esp, 0x34
mov eax, dword [0x519100]
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 dword [ebp - 0x3c], edx
mov dword [ebp - 0x2c], ecx
xor eax, eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x18], eax
call fcn.0046fac0
mov edi, eax
test edi, edi
je 0x46d98e
mov eax, dword [edi]
mov esi, dword [eax + 0xc]
mov ecx, esi
call dword [0x4cc2f8]
mov ecx, edi
call esi
add eax, 0x10
mov dword [ebp - 0x18], eax
mov dword [ebp - 4], 1
xor ebx, ebx
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x14], ebx
call fcn.0046fac0
mov edi, eax
test edi, edi
je 0x46d98e
mov eax, dword [edi]
mov esi, dword [eax + 0xc]
mov ecx, esi
call dword [0x4cc2f8]
mov ecx, edi
call esi
lea esi, [eax + 0x10]
mov dword [ebp - 0x30], esi
mov dword [ebp - 0x14], esi
mov byte [ebp - 4], 3
lea eax, [ebp - 0x18]
push dword [ebp - 0x2c]
push str..Scsi_u:
push eax
call fcn.0046f350
mov edi, dword [ebp - 0x18]
add esp, 0xc
mov dword [ebp - 0x34], 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 - 0x2c], eax
cmp eax, 0xffffffff
jne 0x46d745
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x28], eax
jmp 0x46d906
push 0x3c
call fcn.00498320
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x46d761
mov dword [ebp - 0x28], 8
jmp 0x46d8fd
push 0x22c
call fcn.00498320
add esp, 4
mov dword [ebp - 0x24], eax
test eax, eax
jne 0x46d781
mov dword [ebp - 0x28], 8
jmp 0x46d8fd
mov byte [ebp - 0x1d], 0
jmp 0x46d793
mov eax, dword [ebp - 0x24]
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.00486ef0
add esp, 0xc
mov dword [ebx], 0x1c
lea eax, [ebx + 4]
mov dword [ebx + 0xc], 0x1388
mov dword [ebx + 0x18], 0x210
mov dword [ebx + 0x10], 0x1b0501
push 8
push str.SCSIDISK
push eax
call fcn.004a1200
mov al, byte [ebp - 0x1d]
add esp, 0xc
mov byte [ebx + 0x28], al
lea eax, [ebp - 0x1c]
mov byte [ebx + 0x26], 0xec
push 0
push eax
push 0x22c
push dword [ebp - 0x24]
push 0x3c
push ebx
push 0x4d008
push dword [ebp - 0x2c]
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x46d869
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x28], eax
mov al, byte [ebp - 0x1d]
inc al
mov byte [ebp - 0x1d], al
cmp al, 2
jb 0x46d790
jmp 0x46d8fd
mov eax, dword [ebp - 0x24]
xor edx, edx
lea edi, [eax + 0x40]
mov dword [ebp - 0x38], edi
lea esi, [eax + 0x41]
mov cl, byte [edi + edx]
mov al, byte [esi + edx]
mov byte [edi + edx], al
mov byte [esi + edx], cl
add edx, 2
cmp edx, 0x14
jl 0x46d877
mov esi, dword [ebp - 0x30]
mov ecx, 1
mov edi, dword [ebp - 0x34]
mov eax, dword [esi - 8]
sub ecx, dword [esi - 4]
sub eax, 0x15
or eax, ecx
jge 0x46d8b0
push 0x15
lea ecx, [ebp - 0x14]
call fcn.0046ee30
mov esi, dword [ebp - 0x14]
push 0x14
push dword [ebp - 0x38]
mov byte [esi + 0x14], 0
push esi
call fcn.004a1200
add esp, 0xc
push dword [esi - 8]
push esi
call fcn.004a18de
add esp, 8
test eax, eax
js 0x46d998
cmp eax, dword [esi - 8]
jg 0x46d998
mov dword [esi - 0xc], eax
lea ecx, [ebp - 0x14]
mov byte [eax + esi], 0
call fcn.0046e6f0
mov ecx, dword [ebp - 0x3c]
lea eax, [ebp - 0x14]
push eax
call fcn.0046eb10
mov esi, dword [ebp - 0x14]
push dword [ebp - 0x2c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call fcn.00490970
add esp, 4
push dword [ebp - 0x24]
call fcn.00490970
add esp, 4
mov byte [ebp - 4], 1
or ecx, 0xffffffff
lea edx, [esi - 0x10]
mov eax, ecx
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x46d947
mov ebx, dword [edx]
push edx
mov eax, dword [ebx]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x4cc2f8]
mov ecx, ebx
call esi
or ecx, 0xffffffff
mov dword [ebp - 4], 0xffffffff
lea edx, [edi - 0x10]
lock xadd dword [edx + 0xc], ecx
dec ecx
test ecx, ecx
jg 0x46d96f
mov edi, dword [edx]
push edx
mov eax, dword [edi]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x4cc2f8]
mov ecx, edi
call esi
mov eax, dword [ebp - 0x28]
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.0048471b
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.0046f7f0
push 0x80070057
call fcn.0046f7f0
int3