Function at 0x46e6e0
Capabilities:
Check if file exists

Disassembly:
push edi
push esi
push ebx
mov ebx, ecx
sub esp, 0x50
mov eax, dword [0x5398d0]
mov dword [esp + 0x4c], eax
xor eax, eax
mov eax, dword [ecx]
mov dword [esp + 0x20], 0xffffffff
mov dword [esp + 0x24], 0xffffffff
mov dword [esp + 0x28], 0xffffffff
mov eax, dword [eax - 0xc]
mov esi, dword [ecx + eax + 8]
mov dword [esp + 8], 5
mov dword [esp + 4], str._dev_
mov dword [esp], esi
call sub.msvcrt.dll_strncmp
test eax, eax
jne 0x46e73f
lea edi, [esi + 5]
mov eax, edi
call fcn.004674e0
test eax, eax
cmovs esi, edi
lea eax, [esp + 0x28]
mov dword [esp + 4], str.csmi_u__u_n
mov dword [esp + 0x10], eax
lea eax, [esp + 0x24]
mov dword [esp + 0xc], eax
lea eax, [esp + 0x20]
mov dword [esp + 8], eax
mov dword [esp], esi
call fcn.00499f40
test eax, eax
js 0x46e779
mov dword [esp], esi
call sub.msvcrt.dll_strlen
cmp eax, dword [esp + 0x28]
je 0x46e7b0
mov eax, dword [ebx]
add ebx, dword [eax - 0xc]
mov dword [esp], 0x16
mov ecx, ebx
call fcn.00422200
sub esp, 4
mov edx, dword [esp + 0x4c]
sub edx, dword [0x5398d0]
jne 0x46e8d7
add esp, 0x50
pop ebx
pop esi
pop edi
ret
mov eax, dword [esp + 0x20]
cmp eax, 9
ja 0x46e779
cmp dword [esp + 0x24], 0x1f
ja 0x46e779
lea edi, [esp + 0x2e]
mov dword [esp + 0xc], eax
mov dword [esp + 8], str..Scsi_u:
mov dword [esp + 4], 0x1d
mov dword [esp], edi
call fcn.0048cd90
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], 0
mov dword [esp + 8], 3
mov dword [esp + 4], 0xc0000000
mov dword [esp], edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
sub esp, 0x1c
mov esi, eax
cmp eax, 0xffffffff
je 0x46e850
cmp byte [0x529708], 1
jbe 0x46e83c
mov dword [esp + 4], edi
mov dword [esp], str.__s:_successfully_opened_n
call fcn.004026d0
mov eax, dword [esp + 0x24]
mov dword [ebx + 4], esi
mov dword [ebx + 8], eax
mov eax, 1
jmp 0x46e78f
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x46e8af
mov edx, dword [ebx]
add ebx, dword [edx - 0xc]
cmp eax, 5
je 0x46e88c
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], edi
mov dword [esp + 8], str._s:_Error_ld
mov dword [esp + 4], 5
mov dword [esp], ebx
call fcn.00422370
xor eax, eax
jmp 0x46e78f
mov dword [esp + 0xc], edi
mov dword [esp + 8], str._s:_access_denied
mov dword [esp + 4], 0xd
mov dword [esp], ebx
call fcn.00422370
xor eax, eax
jmp 0x46e78f
mov dword [esp + 0xc], edi
mov dword [esp + 8], str._s:_not_found
mov dword [esp + 4], 2
mov eax, dword [ebx]
add ebx, dword [eax - 0xc]
mov dword [esp], ebx
call fcn.00422370
xor eax, eax
jmp 0x46e78f
call fcn.00485600
lea esi, [esi]
push ebx
mov ebx, ecx
sub esp, 0x18
call fcn.0046e6e0
test al, al
jne 0x46e8f8
xor eax, eax
jmp 0x46e92c
mov eax, dword [ebx]
mov ecx, dword [eax - 0x1c]
mov eax, dword [ebx + 8]
add ecx, ebx
cmp eax, 0x1f
jbe 0x46e938
mov dword [esp + 0xc], eax
mov dword [esp + 8], str.Invalid_port_number__d
mov dword [esp + 4], 0x16
mov eax, dword [ecx]
add ecx, dword [eax - 0xc]
mov dword [esp], ecx
call fcn.00422370
test al, al
je 0x46e947
add esp, 0x18
pop ebx
ret
mov dword [esp], eax
call fcn.0046e2d0
sub esp, 4
test al, al
jne 0x46e92c
mov eax, dword [ebx]
mov eax, dword [eax + 0x14]
cmp eax, 0x467470
jne 0x46e978
mov eax, dword [ebx + 4]
cmp eax, 0xffffffff
je 0x46e8ef
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebx + 4], 0xffffffff
xor eax, eax
sub esp, 4
jmp 0x46e92c
mov ecx, ebx
call eax
xor eax, eax
jmp 0x46e92c