Function at 0x46aa70
Capabilities:
Check if file exists
Get disk information
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5086a3
mov eax, dword fs:[0]
push eax
sub esp, 0x298
mov eax, dword [0x556620]
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 + 8]
xor ecx, ecx
mov esi, dword [ebp + 0xc]
mov ebx, dword [ebp + 0x10]
mov edi, dword [ebp + 0x14]
push 0xffffffffffffffff
mov dword [ebp - 0x220], 0
push ecx
mov word [ebp - 0x238], cx
lea ecx, [ebp - 0x238]
push eax
mov dword [ebp - 0x23c], esi
mov dword [ebp - 0x27c], ebx
mov dword [ebp - 0x224], 7
mov dword [ebp - 0x228], 0
call fcn.00407980
lea eax, [ebp - 0x275]
mov dword [ebp - 4], 0
push eax
lea eax, [ebp - 0x238]
mov byte [ebp - 0x275], 0
push eax
call fcn.0041e350
add esp, 8
test al, al
je 0x46ac7c
cmp byte [ebp - 0x275], 0
mov byte [esi], 0
je 0x46b089
xor eax, eax
mov dword [ebp - 0x260], 7
mov dword [ebp - 0x264], 0
mov word [ebp - 0x274], ax
push 4
push 0x517008
push 4
push eax
lea ecx, [ebp - 0x238]
mov byte [ebp - 4], 1
call fcn.00408670
test eax, eax
lea eax, [ebp - 0x238]
jne 0x46abc3
cmp dword [ebp - 0x224], 8
lea ecx, [ebp - 0x274]
push ecx
cmovae eax, dword [ebp - 0x238]
push eax
call fcn.0046a550
add esp, 8
test al, al
je 0x46ac5c
lea eax, [ebp - 0x238]
cmp ebx, eax
je 0x46aba4
push 0xffffffffffffffff
push 0
push eax
mov ecx, ebx
call fcn.00407980
lea eax, [ebp - 0x274]
cmp edi, eax
je 0x46ac59
push 0xffffffffffffffff
push 0
push eax
mov ecx, edi
call fcn.00407980
jmp 0x46ac59
push eax
lea eax, [ebp - 0x258]
push eax
call fcn.0041e050
add esp, 8
cmp dword [eax + 0x14], 8
mov byte [ebp - 4], 2
jb 0x46abdf
mov eax, dword [eax]
lea ecx, [ebp - 0x274]
push ecx
push eax
call fcn.0046a550
add esp, 8
mov byte [ebp - 0x275], al
cmp dword [ebp - 0x244], 8
mov byte [ebp - 4], 1
jb 0x46ac16
push dword [ebp - 0x258]
call fcn.0040823e
mov al, byte [ebp - 0x275]
add esp, 4
test al, al
je 0x46ac5c
lea eax, [ebp - 0x238]
cmp ebx, eax
je 0x46ac30
push 0xffffffffffffffff
push 0
push eax
mov ecx, ebx
call fcn.00407980
lea eax, [ebp - 0x274]
push eax
lea eax, [ebp - 0x258]
push eax
call fcn.0043f4d0
add esp, 8
mov ecx, edi
push eax
call fcn.00407aa0
lea ecx, [ebp - 0x258]
call fcn.00408450
mov byte [esi], 1
cmp dword [ebp - 0x260], 8
jb 0x46b089
push dword [ebp - 0x274]
call fcn.0040823e
add esp, 4
jmp 0x46b089
push 4
push 0x517008
push 4
push 0
lea ecx, [ebp - 0x238]
call fcn.00408670
test eax, eax
jne 0x46ad15
push 0xffffffffffffffff
push 4
lea eax, [ebp - 0x258]
push eax
lea ecx, [ebp - 0x238]
call fcn.00407940
mov esi, eax
lea eax, [ebp - 0x238]
cmp eax, esi
je 0x46acf8
cmp dword [ebp - 0x224], 8
jb 0x46accf
push dword [ebp - 0x238]
call fcn.0040823e
add esp, 4
xor eax, eax
mov dword [ebp - 0x224], 7
push esi
lea ecx, [ebp - 0x238]
mov dword [ebp - 0x228], 0
mov word [ebp - 0x238], ax
call fcn.00407ae0
cmp dword [ebp - 0x244], 8
jb 0x46ad0f
push dword [ebp - 0x258]
call fcn.0040823e
add esp, 4
mov esi, dword [ebp - 0x23c]
lea eax, [ebp - 0x238]
push eax
call fcn.0043f8f0
add esp, 4
test al, al
je 0x46ad30
mov byte [esi], 0
jmp 0x46b089
or eax, 0xffffffff
mov byte [ebp - 0x275], 0
mov dword [ebp - 0x240], 0x5c
push eax
push 0
lea eax, [ebp - 0x258]
push eax
lea ecx, [ebp - 0x238]
call fcn.00407940
mov esi, eax
lea eax, [ebp - 0x238]
cmp eax, esi
je 0x46adf1
cmp dword [ebp - 0x224], 8
jb 0x46ad80
push dword [ebp - 0x238]
call fcn.0040823e
add esp, 4
xor eax, eax
mov dword [ebp - 0x224], 7
mov dword [ebp - 0x228], 0
mov word [ebp - 0x238], ax
cmp dword [esi + 0x14], 8
jae 0x46adbe
mov eax, dword [esi + 0x10]
inc eax
je 0x46adcc
add eax, eax
push eax
lea eax, [ebp - 0x238]
push esi
push eax
call fcn.004dd9e0
add esp, 0xc
jmp 0x46adcc
mov eax, dword [esi]
mov dword [ebp - 0x238], eax
mov dword [esi], 0
mov eax, dword [esi + 0x10]
mov dword [ebp - 0x228], eax
mov eax, dword [esi + 0x14]
mov dword [ebp - 0x224], eax
xor eax, eax
mov dword [esi + 0x14], 7
mov dword [esi + 0x10], 0
mov word [esi], ax
cmp dword [ebp - 0x244], 8
jb 0x46ae08
push dword [ebp - 0x258]
call fcn.0040823e
add esp, 4
push 1
push 0
lea eax, [ebp - 0x240]
push eax
lea ecx, [ebp - 0x238]
call fcn.0040b680
cmp eax, 0xffffffff
jne 0x46ae6d
cmp dword [ebp - 0x224], 8
lea eax, [ebp - 0x238]
cmovae eax, dword [ebp - 0x238]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
test eax, eax
je 0x46ae6d
cmp eax, 1
je 0x46ae6d
cmp byte [ebp - 0x275], 0
jne 0x46b080
push 1
push 0x514704
lea ecx, [ebp - 0x238]
call fcn.0040efb0
mov byte [ebp - 0x275], 1
cmp dword [ebp - 0x224], 8
lea eax, [ebp - 0x238]
cmovae eax, dword [ebp - 0x238]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x46aec1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp esi, 2
je 0x46b057
cmp esi, 3
je 0x46b057
cmp esi, 0x7b
je 0x46b057
cmp esi, 0xa1
jne 0x46b08b
jmp 0x46b057
test eax, 0x400
je 0x46b057
test ebx, ebx
je 0x46b53e
test edi, edi
je 0x46b53e
cmp dword [ebx + 0x14], 8
mov dword [ebx + 0x10], 0
jb 0x46aeeb
mov ebx, dword [ebx]
xor eax, eax
mov word [ebx], ax
cmp dword [edi + 0x14], 8
mov dword [edi + 0x10], eax
jb 0x46aefd
mov eax, dword [edi]
jmp 0x46aeff
mov eax, edi
xor ecx, ecx
push ecx
push 0x2200000
push 3
mov word [eax], cx
lea eax, [ebp - 0x238]
cmp dword [ebp - 0x224], 8
push ecx
cmovae eax, dword [ebp - 0x238]
push 7
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x298], eax
cmp eax, 0xffffffff
je 0x46b534
xorps xmm0, xmm0
mov dword [ebp - 0x28c], 0
movq qword [ebp - 0x294], xmm0
push 0x4268
mov dword [ebp - 0x294], 0
mov dword [ebp - 0x290], 0
mov dword [ebp - 0x28c], 0
call fcn.00405f0d
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x46b52f
push 0x4268
push 0
lea esi, [ebx + 0x4268]
mov dword [ebp - 0x294], ebx
push ebx
mov dword [ebp - 0x28c], esi
call fcn.004dead0
add esp, 0xc
mov dword [ebp - 0x290], esi
push 0
lea eax, [ebp - 0x25c]
mov byte [ebp - 4], 4
push eax
sub esi, ebx
mov dword [ebp - 0x25c], 0
push esi
push ebx
push 0
push 0
push 0x900a8
push dword [ebp - 0x298]
mov dword [ebp - 0x220], esi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
push dword [ebp - 0x298]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test esi, esi
je 0x46b23c
mov eax, dword [ebp - 0x25c]
test eax, eax
je 0x46b23c
cmp eax, dword [ebp - 0x220]
ja 0x46b23c
mov eax, dword [ebx]
cmp eax, 0x80000013
je 0x46b026
cmp eax, 0x80000007
jne 0x46b0c0
push ebx
mov byte [ebp - 4], 0
call fcn.0040823e
mov ebx, dword [ebp - 0x27c]
add esp, 4
mov dword [ebp - 0x294], 0
mov dword [ebp - 0x290], 0
mov dword [ebp - 0x28c], 0
push 1
push 0xffffffffffffffff
lea eax, [ebp - 0x220]
mov dword [ebp - 0x220], 0x5c
push eax
lea ecx, [ebp - 0x238]
call fcn.00429030
cmp eax, 0xffffffff
jne 0x46ad44
mov eax, dword [ebp - 0x23c]
mov byte [eax], 0
xor esi, esi
cmp dword [ebp - 0x224], 8
jb 0x46b0a2
push dword [ebp - 0x238]
call fcn.0040823e
add esp, 4
mov eax, esi
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.00401580
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x23c]
mov byte [eax], 1
mov eax, dword [ebx]
cmp eax, 0xa0000003
jne 0x46b302
xor eax, eax
push 0x208
push eax
mov word [ebp - 0x21c], ax
lea eax, [ebp - 0x21a]
push eax
call fcn.004dead0
push 0x514704
lea eax, [ebp - 0x238]
push eax
lea eax, [ebp - 0x258]
push eax
call fcn.0042abc0
add esp, 0x18
cmp dword [eax + 0x14], 8
mov byte [ebp - 4], 5
jb 0x46b118
mov eax, dword [eax]
push 0x104
lea ecx, [ebp - 0x21c]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetVolumeNameForVolumeMountPointW]
lea ecx, [ebp - 0x258]
mov byte [ebp - 4], 4
mov esi, eax
call fcn.00408450
test esi, esi
je 0x46b24f
xorps xmm0, xmm0
mov dword [ebp - 0x280], 0
mov eax, 0x104
movq qword [ebp - 0x288], xmm0
mov dword [ebp - 0x23c], eax
mov dword [ebp - 0x288], 0
mov dword [ebp - 0x284], 0
mov dword [ebp - 0x280], 0
mov byte [ebp - 4], 6
jmp 0x46b190
push eax
lea ecx, [ebp - 0x288]
call fcn.0046d700
mov esi, dword [ebp - 0x288]
lea eax, [ebp - 0x23c]
push eax
push dword [ebp - 0x23c]
lea eax, [ebp - 0x21c]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_GetVolumePathNamesForVolumeNameW]
test eax, eax
jne 0x46b1d6
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xea
jne 0x46b231
mov eax, dword [ebp - 0x23c]
jmp 0x46b190
cmp word [esi], 0
je 0x46b220
lea esp, [esp]
cmp dword [edi + 0x10], 0
jne 0x46b220
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x46b231
test eax, 0x400
jne 0x46b201
push esi
mov ecx, edi
call fcn.00412520
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x46b206
sub ecx, edx
sar ecx, 1
lea esi, [esi + ecx*2]
add esi, 2
cmp word [esi], ax
jne 0x46b1e0
lea ecx, [ebp - 0x288]
mov byte [ebp - 4], 4
call fcn.0041eb80
jmp 0x46b25a
lea ecx, [ebp - 0x288]
call fcn.0041eb80
push ebx
mov esi, 3
call fcn.0040823e
add esp, 4
jmp 0x46b08b
lea eax, [ebx + 0x10]
mov ecx, edi
push eax
call fcn.00412520
mov esi, dword [ebp - 0x27c]
lea eax, [ebp - 0x238]
cmp esi, eax
je 0x46b276
push 0xffffffffffffffff
push 0
push eax
mov ecx, esi
call fcn.00407980
cmp dword [edi + 0x10], 0
je 0x46b2f2
push 0x517008
push 4
push 0
mov ecx, edi
call fcn.0041ebb0
test eax, eax
jne 0x46b2b5
push 0xffffffffffffffff
push 4
lea eax, [ebp - 0x258]
mov ecx, edi
push eax
call fcn.00407940
push eax
mov ecx, edi
call fcn.00407aa0
lea ecx, [ebp - 0x258]
call fcn.00408450
cmp dword [esi + 0x10], 0
je 0x46b2f2
lea eax, [ebp - 0x220]
mov ecx, esi
push eax
call fcn.0041b510
mov eax, dword [eax]
cmp word [eax - 2], 0x5c
je 0x46b2f2
lea eax, [ebp - 0x220]
mov ecx, edi
push eax
call fcn.0041b510
mov eax, dword [eax]
cmp word [eax - 2], 0x5c
jne 0x46b2f2
push 0x5c
mov ecx, esi
call fcn.00464900
push ebx
xor esi, esi
call fcn.0040823e
add esp, 4
jmp 0x46b08b
cmp eax, 0xa000000c
jne 0x46b23c
test byte [ebx + 0x10], 1
je 0x46b4de
mov esi, dword [ebp - 0x228]
lea eax, [ebp - 0x220]
push eax
xorps xmm0, xmm0
mov dword [ebp - 0x240], esi
push 0x104
lea ecx, [ebp - 0x288]
movq qword [ebp - 0x288], xmm0
mov dword [ebp - 0x280], 0
mov dword [ebp - 0x220], 0
call fcn.0041e8f0
lea eax, [ebp - 0x220]
mov byte [ebp - 4], 7
push eax
inc esi
mov dword [ebp - 0x29c], 0
xorps xmm0, xmm0
mov dword [ebp - 0x220], 0x30
push esi
lea ecx, [ebp - 0x2a4]
movq qword [ebp - 0x2a4], xmm0
call fcn.0041e8f0
cmp dword [ebp - 0x224], 8
lea eax, [ebp - 0x238]
mov byte [ebp - 4], 8
cmovae eax, dword [ebp - 0x238]
push eax
push esi
mov esi, dword [ebp - 0x2a4]
push esi
call fcn.00403887
add esp, 0xc
test eax, eax
jne 0x46b4b5
mov ecx, dword [ebp - 0x240]
test ecx, ecx
je 0x46b3ee
cmp dword [ebp - 0x224], 8
lea eax, [ebp - 0x238]
cmovae eax, dword [ebp - 0x238]
cmp word [eax + ecx*2 - 2], 0x5c
jne 0x46b3ee
xor eax, eax
mov word [esi + ecx*2 - 2], ax
push esi
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
test eax, eax
je 0x46b4b5
xor eax, eax
mov dword [ebp - 0x244], 7
mov dword [ebp - 0x248], 0
mov word [ebp - 0x258], ax
movzx eax, word [ebx + 0xa]
lea ecx, [ebp - 0x258]
shr eax, 1
push eax
movzx eax, word [ebx + 8]
shr eax, 1
add eax, 0xa
mov byte [ebp - 4], 9
lea eax, [ebx + eax*2]
push eax
call fcn.004073d0
cmp dword [ebp - 0x244], 8
lea eax, [ebp - 0x258]
cmovae eax, dword [ebp - 0x258]
push eax
push esi
push dword [ebp - 0x288]
call dword [sym.imp.SHLWAPI.dll_PathCombineW]
test eax, eax
jne 0x46b473
lea ecx, [ebp - 0x258]
lea esi, [eax + 3]
call fcn.00408450
jmp 0x46b4ba
mov esi, dword [ebp - 0x27c]
lea eax, [ebp - 0x238]
cmp esi, eax
je 0x46b48f
push 0xffffffffffffffff
push 0
push eax
mov ecx, esi
call fcn.00407980
push dword [ebp - 0x288]
mov ecx, edi
call fcn.00412520
push edi
push esi
call fcn.00469420
add esp, 8
lea ecx, [ebp - 0x258]
xor esi, esi
call fcn.00408450
jmp 0x46b4ba
mov esi, 3
lea ecx, [ebp - 0x2a4]
call fcn.0041eb80
lea ecx, [ebp - 0x288]
call fcn.0041eb80
push ebx
call fcn.0040823e
add esp, 4
jmp 0x46b08b
mov esi, dword [ebp - 0x27c]
lea eax, [ebp - 0x238]
cmp esi, eax
je 0x46b4fa
push 0xffffffffffffffff
push 0
push eax
mov ecx, esi
call fcn.00407980
movzx eax, word [ebx + 0xa]
mov ecx, edi
shr eax, 1
push eax
movzx eax, word [ebx + 8]
shr eax, 1
add eax, 0xa
lea eax, [ebx + eax*2]
push eax
call fcn.004073d0
push edi
push esi
call fcn.00469420
add esp, 8
xor esi, esi
push ebx
call fcn.0040823e
add esp, 4
jmp 0x46b08b
call fcn.004dccf8
mov esi, 3
jmp 0x46b08b
mov eax, dword [ebp - 0x23c]
mov byte [eax], 1
jmp 0x46b089