Function at 0x40a5d0
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x421cc0
mov eax, dword fs:[0]
push eax
sub esp, 0x34
mov eax, dword [0x42c00c]
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 - 0x30], ecx
xor eax, eax
mov dword [ebp - 0x2c], eax
mov dword [ebp - 4], eax
call fcn.00407ce0
mov edi, eax
test edi, edi
je case.0x40a999.0
mov eax, dword [edi]
mov esi, dword [eax + 0xc]
mov ecx, esi
call dword [0x422280]
mov ecx, edi
call esi
add eax, 0x10
mov dword [ebp - 0x18], eax
xor ebx, ebx
mov dword [ebp - 4], 1
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x28], ebx
mov byte [ebp - 4], 2
call fcn.00407ce0
mov edi, eax
test edi, edi
je 0x40ab3d
mov eax, dword [edi]
mov esi, dword [eax + 0xc]
mov ecx, esi
call dword [0x422280]
mov ecx, edi
call esi
lea esi, [eax + 0x10]
mov dword [ebp - 0x14], esi
push dword [ebp - 0x30]
lea eax, [ebp - 0x18]
mov byte [ebp - 4], 3
push str..Scsi_u:
push eax
call fcn.0040c120
mov edi, dword [ebp - 0x18]
add esp, 0xc
mov dword [ebp - 0x24], 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 - 0x30], eax
cmp eax, 0xffffffff
jne 0x40a6b3
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x2c], eax
jmp 0x40aaad
push 0x3c
call fcn.0041630b
mov ebx, eax
add esp, 4
mov dword [ebp - 0x34], ebx
test ebx, ebx
jne 0x40a6d2
mov dword [ebp - 0x2c], 8
jmp 0x40aaa4
push 0x22c
call fcn.0041630b
mov ecx, eax
add esp, 4
mov dword [ebp - 0x28], ecx
test ecx, ecx
jne 0x40a6f4
mov dword [ebp - 0x2c], 8
jmp 0x40aaa4
mov byte [ebp - 0x1d], 0
jmp 0x40a703
mov ecx, dword [ebp - 0x28]
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 ecx
mov dword [ebx + 0x38], 0
call fcn.00411430
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.00416140
mov al, byte [ebp - 0x1d]
add esp, 0xc
mov ecx, dword [ebp - 0x28]
mov byte [ebx + 0x28], al
lea eax, [ebp - 0x1c]
mov byte [ebx + 0x26], 0xec
push 0
push eax
push 0x22c
push ecx
push 0x3c
push ebx
push 0x4d008
push dword [ebp - 0x30]
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x40a7da
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x2c], eax
mov al, byte [ebp - 0x1d]
inc al
mov byte [ebp - 0x1d], al
cmp al, 2
jb 0x40a700
jmp 0x40aaa4
mov edx, dword [ebp - 0x28]
mov ebx, 0xa
add edx, 0x41
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 ebx, 1
jne 0x40a7e5
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, 0x15
or eax, ecx
jge 0x40a818
push 0x15
lea ecx, [ebp - 0x14]
call fcn.0040bd10
mov esi, dword [ebp - 0x14]
mov eax, dword [ebp - 0x28]
push 0x14
add eax, 0x40
mov byte [esi + 0x14], 0
push eax
push esi
call fcn.00416140
add esp, 0xc
push dword [esi - 8]
push esi
call fcn.0041422d
add esp, 8
test eax, eax
js case.0x40a999.21
cmp eax, dword [esi - 8]
jg case.0x40a999.21
mov dword [esi - 0xc], eax
xor ebx, ebx
mov byte [eax + esi], 0
mov al, byte [esi]
test al, al
je 0x40a8ca
mov edi, esi
nop dword [eax]
movsx eax, al
push eax
call fcn.00415e65
add esp, 4
test eax, eax
je 0x40a87b
test ebx, ebx
mov eax, edi
cmovne eax, ebx
mov ebx, eax
jmp 0x40a87d
xor ebx, ebx
push edi
call fcn.004144ff
mov edi, eax
add esp, 4
mov al, byte [edi]
test al, al
jne 0x40a860
mov edi, dword [ebp - 0x24]
test ebx, ebx
je 0x40a8ca
sub ebx, esi
js case.0x40a999.21
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, ebx
or eax, ecx
jge 0x40a8ba
push ebx
lea ecx, [ebp - 0x14]
call fcn.0040bd10
mov esi, dword [ebp - 0x14]
cmp ebx, dword [esi - 8]
jg case.0x40a999.21
mov dword [esi - 0xc], ebx
mov byte [ebx + esi], 0
movsx eax, byte [esi]
mov ebx, esi
push eax
call fcn.00415e65
add esp, 4
test eax, eax
je 0x40a9b8
push ebx
call fcn.004144ff
mov ebx, eax
add esp, 4
movsx ecx, byte [ebx]
push ecx
call fcn.00415e65
add esp, 4
test eax, eax
jne 0x40a8e0
cmp ebx, esi
je 0x40a9b8
mov ecx, dword [esi - 0xc]
sub ebx, esi
test ecx, ecx
js 0x40ab51
mov eax, dword [esi - 8]
mov edx, 1
sub edx, dword [esi - 4]
sub eax, ecx
or eax, edx
jge 0x40a92d
push ecx
lea ecx, [ebp - 0x14]
call fcn.0040bd10
mov esi, dword [ebp - 0x14]
mov ecx, dword [esi - 0xc]
lea eax, [ebx + esi]
sub ecx, ebx
mov dword [ebp - 0x24], ecx
lea edx, [ecx + 1]
test edx, edx
je 0x40a990
test eax, eax
jne 0x40a95d
call fcn.004162dd
mov dword [eax], 0x16
call fcn.004138a0
mov ecx, dword [ebp - 0x24]
mov eax, 0x16
jmp 0x40a992
mov eax, dword [esi - 0xc]
inc eax
cmp eax, edx
jae 0x40a97f
call fcn.004162dd
mov dword [eax], 0x22
call fcn.004138a0
mov ecx, dword [ebp - 0x24]
mov eax, 0x22
jmp 0x40a992
push edx
lea eax, [ebx + esi]
push eax
push esi
call fcn.00411680
mov ecx, dword [ebp - 0x24]
add esp, 0xc
xor eax, eax
movzx eax, byte [eax + 0x40ab7c]
jmp dword [eax*4 + 0x40ab6c]
test ecx, ecx
js case.0x40a999.21
cmp ecx, dword [esi - 8]
jg case.0x40a999.21
mov dword [esi - 0xc], ecx
mov byte [ecx + esi], 0
mov ebx, dword [ebp - 0x3c]
lea ecx, [esi - 0x10]
mov edx, dword [ebx]
sub edx, 0x10
mov dword [ebp - 0x38], edx
cmp ecx, edx
je 0x40aaa1
lea eax, [edx + 0xc]
mov dword [ebp - 0x40], eax
mov eax, dword [eax]
shr eax, 0x1f
test al, al
jne 0x40aa96
mov eax, dword [ecx]
mov dword [ebp - 0x24], eax
cmp eax, dword [edx]
jne 0x40aa96
mov eax, dword [eax]
mov ebx, dword [eax + 0x10]
mov ecx, ebx
call dword [0x422280]
mov ecx, dword [ebp - 0x24]
call ebx
lea edx, [esi - 0x10]
mov dword [ebp - 0x24], eax
mov ecx, dword [edx + 0xc]
lea ebx, [edx + 0xc]
shr ecx, 0x1f
test cl, cl
jne 0x40aa1f
cmp eax, dword [edx]
jne 0x40aa1f
mov dword [ebp - 0x24], edx
lock inc dword [ebx]
jmp 0x40aa5b
mov eax, dword [eax]
push 1
push dword [edx + 4]
mov ebx, dword [eax]
mov ecx, ebx
call dword [0x422280]
mov ecx, dword [ebp - 0x24]
call ebx
mov ebx, eax
mov dword [ebp - 0x24], ebx
test ebx, ebx
je 0x40ab65
mov eax, dword [esi - 0xc]
lea ecx, [ebx + 0x10]
mov dword [ebx + 4], eax
mov eax, esi
mov edx, dword [esi - 0xc]
inc edx
push edx
push eax
call fcn.00407a60
add esp, 8
mov ecx, dword [ebp - 0x40]
or eax, 0xffffffff
mov byte [ebp - 4], 4
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x40aa89
mov ecx, dword [ebp - 0x38]
push ecx
mov eax, dword [ecx]
mov dword [ebp - 0x38], eax
mov eax, dword [eax]
mov ebx, dword [eax + 4]
mov ecx, ebx
call dword [0x422280]
mov ecx, dword [ebp - 0x38]
call ebx
mov ecx, dword [ebp - 0x3c]
mov eax, dword [ebp - 0x24]
add eax, 0x10
mov dword [ecx], eax
jmp 0x40aaa1
push dword [ecx + 4]
mov ecx, ebx
push esi
call fcn.0040bd70
mov ebx, dword [ebp - 0x34]
push dword [ebp - 0x30]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call fcn.004162f0
add esp, 4
push dword [ebp - 0x28]
call fcn.004162f0
add esp, 4
lea ecx, [esi - 0x10]
mov byte [ebp - 4], 5
or eax, 0xffffffff
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x40aae9
mov ebx, dword [ecx]
push ecx
mov eax, dword [ebx]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x422280]
mov ecx, ebx
call esi
lea ecx, [edi - 0x10]
mov dword [ebp - 4], 6
or eax, 0xffffffff
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x40ab14
mov edi, dword [ecx]
push ecx
mov eax, dword [edi]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x422280]
mov ecx, edi
call esi
mov eax, dword [ebp - 0x2c]
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.0040fb5d
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.00407b20
push 0x80004005
call fcn.00407b20
push 0x80070057
call fcn.00407b20
push 0x80070057
call fcn.00407b20
push 0x8007000e
call fcn.00407b20
call fcn.0040bfe0
nop
mov al, byte [0x5b0040a9]
stosd dword es:[edi], eax
inc eax
add byte [edi - 0x55], al
inc eax
add byte [ebx], dh
stosd dword es:[edi], eax
inc eax
add byte [eax], al
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ecx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [edx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [edx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [eax]
int3