Function at 0x409b40
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4214e0
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.00407230
mov edi, eax
test edi, edi
je case.0x409f09.0
mov eax, dword [edi]
mov esi, dword [eax + 0xc]
mov ecx, esi
call dword [0x422284]
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.00407230
mov edi, eax
test edi, edi
je 0x40a0af
mov eax, dword [edi]
mov esi, dword [eax + 0xc]
mov ecx, esi
call dword [0x422284]
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.0040b690
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 0x409c23
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x2c], eax
jmp 0x40a01f
push 0x3c
call fcn.0041556d
mov ebx, eax
add esp, 4
mov dword [ebp - 0x34], ebx
test ebx, ebx
jne 0x409c42
mov dword [ebp - 0x2c], 8
jmp 0x40a016
push 0x22c
call fcn.0041556d
mov ecx, eax
add esp, 4
mov dword [ebp - 0x28], ecx
test ecx, ecx
jne 0x409c64
mov dword [ebp - 0x2c], 8
jmp 0x40a016
mov byte [ebp - 0x1d], 0
jmp 0x409c73
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.00410550
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.004153a0
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 0x409d4a
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 0x409c70
jmp 0x40a016
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 0x409d55
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, 0x15
or eax, ecx
jge 0x409d88
push 0x15
lea ecx, [ebp - 0x14]
call fcn.0040b280
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.004153a0
add esp, 0xc
push dword [esi - 8]
push esi
call fcn.00413305
add esp, 8
test eax, eax
js case.0x409f09.21
cmp eax, dword [esi - 8]
jg case.0x409f09.21
mov dword [esi - 0xc], eax
xor ebx, ebx
mov byte [eax + esi], 0
mov al, byte [esi]
test al, al
je 0x409e3a
mov edi, esi
nop dword [eax]
movsx eax, al
push eax
call fcn.00414fcf
add esp, 4
test eax, eax
je 0x409deb
test ebx, ebx
mov eax, edi
cmovne eax, ebx
mov ebx, eax
jmp 0x409ded
xor ebx, ebx
push edi
call fcn.004135d7
mov edi, eax
add esp, 4
mov al, byte [edi]
test al, al
jne 0x409dd0
mov edi, dword [ebp - 0x24]
test ebx, ebx
je 0x409e3a
sub ebx, esi
js case.0x409f09.21
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, ebx
or eax, ecx
jge 0x409e2a
push ebx
lea ecx, [ebp - 0x14]
call fcn.0040b280
mov esi, dword [ebp - 0x14]
cmp ebx, dword [esi - 8]
jg case.0x409f09.21
mov dword [esi - 0xc], ebx
mov byte [ebx + esi], 0
movsx eax, byte [esi]
mov ebx, esi
push eax
call fcn.00414fcf
add esp, 4
test eax, eax
je 0x409f28
push ebx
call fcn.004135d7
mov ebx, eax
add esp, 4
movsx ecx, byte [ebx]
push ecx
call fcn.00414fcf
add esp, 4
test eax, eax
jne 0x409e50
cmp ebx, esi
je 0x409f28
mov ecx, dword [esi - 0xc]
sub ebx, esi
test ecx, ecx
js 0x40a0c3
mov eax, dword [esi - 8]
mov edx, 1
sub edx, dword [esi - 4]
sub eax, ecx
or eax, edx
jge 0x409e9d
push ecx
lea ecx, [ebp - 0x14]
call fcn.0040b280
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 0x409f00
test eax, eax
jne 0x409ecd
call fcn.0041553d
mov dword [eax], 0x16
call fcn.004131c8
mov ecx, dword [ebp - 0x24]
mov eax, 0x16
jmp 0x409f02
mov eax, dword [esi - 0xc]
inc eax
cmp eax, edx
jae 0x409eef
call fcn.0041553d
mov dword [eax], 0x22
call fcn.004131c8
mov ecx, dword [ebp - 0x24]
mov eax, 0x22
jmp 0x409f02
push edx
lea eax, [ebx + esi]
push eax
push esi
call fcn.004107a0
mov ecx, dword [ebp - 0x24]
add esp, 0xc
xor eax, eax
movzx eax, byte [eax + 0x40a0ec]
jmp dword [eax*4 + 0x40a0dc]
test ecx, ecx
js case.0x409f09.21
cmp ecx, dword [esi - 8]
jg case.0x409f09.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 0x40a013
lea eax, [edx + 0xc]
mov dword [ebp - 0x40], eax
mov eax, dword [eax]
shr eax, 0x1f
test al, al
jne 0x40a008
mov eax, dword [ecx]
mov dword [ebp - 0x24], eax
cmp eax, dword [edx]
jne 0x40a008
mov eax, dword [eax]
mov ebx, dword [eax + 0x10]
mov ecx, ebx
call dword [0x422284]
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 0x409f8f
cmp eax, dword [edx]
jne 0x409f8f
mov dword [ebp - 0x24], edx
lock inc dword [ebx]
jmp 0x409fcd
mov eax, dword [eax]
push 1
push dword [edx + 4]
mov ebx, dword [eax]
mov ecx, ebx
call dword [0x422284]
mov ecx, dword [ebp - 0x24]
call ebx
mov edx, eax
mov dword [ebp - 0x24], edx
test edx, edx
je 0x40a0d7
mov eax, dword [esi - 0xc]
lea ebx, [edx + 0x10]
mov dword [edx + 4], eax
mov ecx, esi
mov edx, dword [esi - 0xc]
inc edx
push edx
push ecx
mov ecx, ebx
call fcn.00406fb0
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 0x409ffb
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 [0x422284]
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 0x40a013
push dword [ecx + 4]
mov ecx, ebx
push esi
call fcn.0040b2e0
mov ebx, dword [ebp - 0x34]
push dword [ebp - 0x30]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call fcn.00415550
add esp, 4
push dword [ebp - 0x28]
call fcn.00415550
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 0x40a05b
mov ebx, dword [ecx]
push ecx
mov eax, dword [ebx]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x422284]
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 0x40a086
mov edi, dword [ecx]
push ecx
mov eax, dword [edi]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x422284]
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.0040ed1d
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.00407070
push 0x80004005
call fcn.00407070
push 0x80070057
call fcn.00407070
push 0x80070057
call fcn.00407070
push 0x8007000e
call fcn.00407070
call fcn.0040b550
adc byte [edi - 0x5f32ffc0], bl
inc eax
add byte [ecx - 0x5affbf60], bh
mov al, byte [0x3000040]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add dword [ebx], eax
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add al, byte [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add al, byte [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 [ebx]
add ah, cl
int3