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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2a0
mov eax, dword [0x553948]
xor eax, ebp
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
mov edx, dword [ebp + 0x14]
push ebx
push esi
push edi
mov edi, dword [ebp + 0x10]
mov dword [ebp - 0x270], ecx
xor ebx, ebx
push 0xffffffffffffffff
mov dword [ebp - 0x27c], ebx
xor ecx, ecx
push ebx
mov word [ebp - 0x22c], cx
mov esi, 7
push eax
lea ecx, [ebp - 0x22c]
mov dword [ebp - 0x278], edi
mov dword [ebp - 0x26c], edx
mov dword [ebp - 0x218], esi
mov dword [ebp - 0x21c], ebx
call fcn.00406a40
lea edx, [ebp - 0x265]
push edx
lea eax, [ebp - 0x22c]
push eax
mov byte [ebp - 0x265], bl
call fcn.0041a240
add esp, 8
test al, al
je 0x466869
mov ecx, dword [ebp - 0x270]
mov byte [ecx], bl
lea esi, [ebx + 8]
cmp byte [ebp - 0x265], bl
je 0x46683b
push 4
push 0x516d60
push 4
xor edx, edx
push ebx
lea ecx, [ebp - 0x22c]
mov dword [ebp - 0x250], 7
mov dword [ebp - 0x254], ebx
mov word [ebp - 0x264], dx
call fcn.00407490
test eax, eax
jne 0x466792
mov eax, dword [ebp - 0x22c]
cmp dword [ebp - 0x218], esi
jae 0x466746
lea eax, [ebp - 0x22c]
lea ecx, [ebp - 0x264]
push ecx
push eax
call fcn.00466430
add esp, 8
test al, al
je 0x466824
push 0xffffffffffffffff
push ebx
lea edx, [ebp - 0x22c]
push edx
mov ecx, edi
call fcn.00406a40
mov ecx, dword [ebp - 0x26c]
push 0xffffffffffffffff
push ebx
lea eax, [ebp - 0x264]
push eax
call fcn.00406a40
mov ecx, dword [ebp - 0x270]
mov byte [ecx], 1
jmp 0x466824
lea edx, [ebp - 0x22c]
push edx
lea eax, [ebp - 0x248]
push eax
call fcn.0041a000
add esp, 8
cmp dword [eax + 0x14], esi
jb 0x4667af
mov eax, dword [eax]
lea ecx, [ebp - 0x264]
push ecx
push eax
call fcn.00466430
add esp, 8
mov bl, al
cmp dword [ebp - 0x234], esi
jb 0x4667d8
mov edx, dword [ebp - 0x248]
push edx
call fcn.00406fa9
add esp, 4
test bl, bl
je 0x466824
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x22c]
push eax
mov ecx, edi
call fcn.00406a40
lea ecx, [ebp - 0x264]
push ecx
lea edx, [ebp - 0x248]
push edx
call fcn.0043ebe0
mov ecx, dword [ebp - 0x26c]
add esp, 8
push eax
call fcn.00406360
lea ecx, [ebp - 0x248]
call fcn.0040a440
mov eax, dword [ebp - 0x270]
mov byte [eax], 1
cmp dword [ebp - 0x250], esi
jb 0x46683b
mov ecx, dword [ebp - 0x264]
push ecx
call fcn.00406fa9
add esp, 4
cmp dword [ebp - 0x218], esi
jb 0x467164
mov edx, dword [ebp - 0x22c]
push edx
call fcn.00406fa9
add esp, 4
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00401316
mov esp, ebp
pop ebp
ret
push 4
push 0x516d60
push 4
push ebx
lea ecx, [ebp - 0x22c]
call fcn.00407490
test eax, eax
jne 0x4668d5
push 0xffffffffffffffff
push 4
lea ecx, [ebp - 0x22c]
push ecx
lea ecx, [ebp - 0x248]
mov dword [ebp - 0x234], esi
mov dword [ebp - 0x238], ebx
mov word [ebp - 0x248], ax
call fcn.00406a40
lea edx, [ebp - 0x248]
push edx
lea ecx, [ebp - 0x22c]
call fcn.00406360
cmp dword [ebp - 0x234], 8
jb 0x4668d5
mov eax, dword [ebp - 0x248]
push eax
call fcn.00406fa9
add esp, 4
lea ecx, [ebp - 0x22c]
push ecx
call fcn.0043fdb0
add esp, 4
test al, al
je 0x46691f
cmp dword [ebp - 0x218], 8
mov edx, dword [ebp - 0x270]
mov byte [edx], bl
jb 0x467164
mov eax, dword [ebp - 0x22c]
push eax
call fcn.00406fa9
add esp, 4
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00401316
mov esp, ebp
pop ebp
ret
or eax, 0xffffffff
mov byte [ebp - 0x265], bl
mov dword [ebp - 0x27c], 0x5c
push eax
xor ecx, ecx
push ebx
lea edx, [ebp - 0x22c]
mov word [ebp - 0x248], cx
push edx
lea ecx, [ebp - 0x248]
mov dword [ebp - 0x234], esi
mov dword [ebp - 0x238], ebx
call fcn.00406a40
lea eax, [ebp - 0x248]
push eax
lea ecx, [ebp - 0x22c]
call fcn.00406360
cmp dword [ebp - 0x234], 8
jb 0x466985
mov ecx, dword [ebp - 0x248]
push ecx
call fcn.00406fa9
add esp, 4
mov eax, dword [ebp - 0x21c]
cmp eax, ebx
jbe 0x466a1d
mov ecx, eax
mov dword [ebp - 0x274], ecx
cmp eax, 1
jb 0x466a1d
cmp dword [ebp - 0x218], 8
mov ebx, dword [ebp - 0x22c]
jae 0x4669b5
lea ebx, [ebp - 0x22c]
mov eax, ebx
test ecx, ecx
je 0x466a1d
jmp 0x4669c0
cmp word [eax], 0x5c
je 0x4669ce
add eax, 2
dec ecx
jne 0x4669c0
jmp 0x466a1d
test eax, eax
je 0x466a1d
mov esi, 1
lea edx, [ebp - 0x27c]
mov ecx, eax
nop
mov di, word [ecx]
cmp di, word [edx]
jne 0x466ae3
add ecx, 2
add edx, 2
dec esi
jne 0x4669e0
mov ecx, dword [ebp - 0x22c]
mov ebx, 8
cmp dword [ebp - 0x218], ebx
jae 0x466a0e
lea ecx, [ebp - 0x22c]
mov edi, dword [ebp - 0x278]
sub eax, ecx
sar eax, 1
cmp eax, 0xffffffff
jne 0x466a6c
mov eax, dword [ebp - 0x22c]
mov ebx, 8
cmp dword [ebp - 0x218], ebx
jae 0x466a36
lea eax, [ebp - 0x22c]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
test eax, eax
je 0x466a6c
cmp eax, 1
je 0x466a6c
cmp byte [ebp - 0x265], 0
jne 0x467150
push 1
push 0x514644
lea ecx, [ebp - 0x22c]
call fcn.0040e6e0
mov byte [ebp - 0x265], 1
mov esi, dword [ebp - 0x26c]
mov eax, dword [ebp - 0x22c]
cmp dword [ebp - 0x218], ebx
jae 0x466a86
lea eax, [ebp - 0x22c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x466b16
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp esi, 2
je 0x466c68
cmp esi, 3
je 0x466c68
cmp esi, 0x7b
je 0x466c68
cmp esi, 0xa1
je 0x466c68
lea ecx, [ebp - 0x22c]
call fcn.0040a440
pop edi
mov eax, esi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00401316
mov esp, ebp
pop ebp
ret
sbb edx, edx
and edx, 0xfffffffe
inc edx
je 0x4669f5
mov edi, dword [ebp - 0x278]
mov ecx, eax
sub ecx, ebx
sar ecx, 1
or edx, 0xffffffff
sub edx, ecx
mov ecx, dword [ebp - 0x274]
add ecx, edx
mov dword [ebp - 0x274], ecx
lea ebx, [eax + 2]
jmp 0x4669b5
test eax, 0x400
je 0x466c68
xor ecx, ecx
cmp edi, ecx
je 0x467145
cmp esi, ecx
je 0x467145
mov dword [edi + 0x10], ecx
cmp dword [edi + 0x14], ebx
jb 0x466b3f
mov eax, dword [edi]
jmp 0x466b41
mov eax, edi
xor edx, edx
mov word [eax], dx
mov dword [esi + 0x10], ecx
cmp dword [esi + 0x14], ebx
jb 0x466b52
mov eax, dword [esi]
jmp 0x466b54
mov eax, esi
xor edx, edx
mov word [eax], dx
mov eax, dword [ebp - 0x22c]
cmp dword [ebp - 0x218], ebx
jae 0x466b6d
lea eax, [ebp - 0x22c]
push ecx
push 0x2200000
push 3
push ecx
push 7
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x466d93
xor ebx, ebx
push 0x4268
mov dword [ebp - 0x28c], ebx
mov dword [ebp - 0x288], ebx
mov dword [ebp - 0x284], ebx
call fcn.004051ca
mov esi, eax
add esp, 4
cmp esi, ebx
je 0x46712a
push 0x4268
push 0
lea ebx, [esi + 0x4268]
push esi
mov dword [ebp - 0x28c], esi
mov dword [ebp - 0x284], ebx
call fcn.004e41d0
add esp, 0xc
push 0
lea eax, [ebp - 0x2a0]
push eax
mov dword [ebp - 0x288], ebx
sub ebx, esi
push ebx
push esi
push 0
push 0
push 0x900a8
push edi
mov dword [ebp - 0x2a0], 0
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
push edi
mov dword [ebp - 0x274], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x274], 0
je 0x466d88
mov eax, dword [ebp - 0x2a0]
xor edi, edi
cmp eax, edi
je 0x466d88
cmp eax, ebx
ja 0x466d88
mov eax, dword [esi]
cmp eax, 0x80000013
je 0x466c47
cmp eax, 0x80000007
jne 0x466c9b
push esi
call fcn.00406fa9
mov dword [ebp - 0x28c], edi
mov dword [ebp - 0x288], edi
mov dword [ebp - 0x284], edi
mov edi, dword [ebp - 0x278]
add esp, 4
push 1
push 0xffffffffffffffff
lea ecx, [ebp - 0x274]
push ecx
lea ecx, [ebp - 0x22c]
mov dword [ebp - 0x274], 0x5c
call fcn.00429d60
cmp eax, 0xffffffff
je 0x467150
xor ebx, ebx
lea esi, [ebx + 7]
jmp 0x466932
mov edx, dword [ebp - 0x270]
mov byte [edx], 1
mov eax, dword [esi]
cmp eax, 0xa0000003
jne 0x466ed2
push 0x208
lea ecx, [ebp - 0x20e]
xor eax, eax
push edi
push ecx
mov word [ebp - 0x210], ax
call fcn.004e41d0
push 0x514644
lea edx, [ebp - 0x22c]
push edx
lea eax, [ebp - 0x248]
push eax
call fcn.0042b920
add esp, 0x18
cmp dword [eax + 0x14], 8
jb 0x466cef
mov eax, dword [eax]
push 0x104
lea ecx, [ebp - 0x210]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetVolumeNameForVolumeMountPointW]
lea ecx, [ebp - 0x248]
mov ebx, eax
call fcn.0040a440
cmp ebx, edi
je 0x466e17
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x258], edi
mov dword [ebp - 0x254], edi
mov dword [ebp - 0x250], edi
mov edi, dword [sym.imp.KERNEL32.dll_GetVolumePathNamesForVolumeNameW]
mov dword [ebp - 0x270], 0x104
nop
mov edx, dword [ebp - 0x270]
push edx
lea ecx, [ebp - 0x258]
call fcn.0043d7e0
mov ecx, dword [ebp - 0x270]
mov esi, dword [ebp - 0x258]
lea eax, [ebp - 0x270]
push eax
push ecx
push esi
lea edx, [ebp - 0x210]
push edx
call edi
test eax, eax
jne 0x466db4
call ebx
cmp eax, 0xea
je 0x466d40
lea ecx, [ebp - 0x258]
call fcn.0041a9a0
lea ecx, [ebp - 0x28c]
call fcn.0041a9a0
lea ecx, [ebp - 0x22c]
call fcn.0040a440
pop edi
pop esi
mov eax, 3
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00401316
mov esp, ebp
pop ebp
ret
cmp word [esi], 0
mov ebx, dword [ebp - 0x26c]
je 0x466e0a
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp dword [ebx + 0x10], 0
jne 0x466e0a
push esi
call edi
cmp eax, 0xffffffff
je 0x466d7d
test eax, 0x400
jne 0x466de3
push esi
mov ecx, ebx
call fcn.004187e0
mov eax, esi
lea edx, [eax + 2]
jmp 0x466df0
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x466df0
sub eax, edx
sar eax, 1
cmp word [esi + eax*2 + 2], cx
lea esi, [esi + eax*2 + 2]
jne 0x466dc6
lea ecx, [ebp - 0x258]
call fcn.0041a9a0
jmp 0x466e2c
mov ecx, dword [ebp - 0x26c]
add esi, 0x10
push esi
call fcn.004187e0
mov ebx, dword [ebp - 0x26c]
mov esi, dword [ebp - 0x278]
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x22c]
push eax
mov ecx, esi
call fcn.00406a40
cmp dword [ebx + 0x10], 0
je 0x466ec2
push 0x516d60
push 4
push 0
mov ecx, ebx
call fcn.0041aae0
test eax, eax
jne 0x466e83
push 0xffffffffffffffff
push 4
lea ecx, [ebp - 0x248]
push ecx
mov ecx, ebx
call fcn.00406a00
push eax
mov ecx, ebx
call fcn.00406360
lea ecx, [ebp - 0x248]
call fcn.0040a440
cmp dword [esi + 0x10], 0
je 0x466ec2
lea edx, [ebp - 0x290]
push edx
mov ecx, esi
call fcn.00418820
mov eax, dword [eax]
mov edi, 0x5c
cmp word [eax - 2], di
je 0x466ec2
lea ecx, [ebp - 0x290]
push ecx
mov ecx, ebx
call fcn.00418820
mov edx, dword [eax]
cmp word [edx - 2], di
jne 0x466ec2
push edi
mov ecx, esi
call fcn.0045cdb0
lea ecx, [ebp - 0x28c]
call fcn.0041a9a0
jmp 0x467159
cmp eax, 0xa000000c
jne 0x466d88
test byte [esi + 0x10], 1
je 0x4670dd
mov eax, dword [ebp - 0x21c]
push 0x208
mov dword [ebp - 0x274], eax
mov dword [ebp - 0x29c], edi
mov dword [ebp - 0x298], edi
mov dword [ebp - 0x294], edi
call fcn.004051ca
mov ebx, eax
add esp, 4
cmp ebx, edi
je 0x4670c2
lea eax, [ebx + 0x208]
mov dword [ebp - 0x294], eax
xor eax, eax
movzx edx, ax
mov eax, edx
shl edx, 0x10
or eax, edx
mov ecx, 0x82
mov edi, ebx
rep stosd dword es:[edi], eax
mov edi, dword [ebp - 0x274]
lea eax, [ebx + 0x208]
mov dword [ebp - 0x298], eax
lea eax, [ebp - 0x27c]
push eax
inc edi
push edi
lea ecx, [ebp - 0x258]
mov dword [ebp - 0x29c], ebx
mov dword [ebp - 0x27c], 0x30
call fcn.0045e260
cmp dword [ebp - 0x218], 8
mov eax, dword [ebp - 0x22c]
jae 0x466f88
lea eax, [ebp - 0x22c]
mov ecx, dword [ebp - 0x258]
push eax
push edi
push ecx
call fcn.00402c49
add esp, 0xc
test eax, eax
jne 0x46704b
mov edi, dword [ebp - 0x274]
test edi, edi
je 0x466fcd
lea edx, [edi - 1]
push edx
lea ecx, [ebp - 0x22c]
call fcn.004188e0
cmp word [eax], 0x5c
jne 0x466fcd
mov ecx, dword [ebp - 0x258]
xor eax, eax
mov word [ecx + edi*2 - 2], ax
mov edx, dword [ebp - 0x258]
push edx
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
test eax, eax
je 0x46704b
movzx ecx, word [esi + 0xa]
movzx edx, word [esi + 8]
xor eax, eax
shr ecx, 1
shr edx, 1
mov word [ebp - 0x248], ax
push ecx
lea eax, [esi + edx*2 + 0x14]
push eax
lea ecx, [ebp - 0x248]
mov dword [ebp - 0x234], 7
mov dword [ebp - 0x238], 0
call fcn.004063e0
cmp dword [ebp - 0x234], 8
mov eax, dword [ebp - 0x248]
jae 0x46702d
lea eax, [ebp - 0x248]
mov ecx, dword [ebp - 0x258]
push eax
push ecx
push ebx
call dword [sym.imp.SHLWAPI.dll_PathCombineW]
test eax, eax
jne 0x467061
lea ecx, [ebp - 0x248]
call fcn.0040a440
lea ecx, [ebp - 0x258]
call fcn.0041a9a0
lea ecx, [ebp - 0x29c]
jmp 0x466d83
mov esi, dword [ebp - 0x278]
push 0xffffffffffffffff
push 0
lea edx, [ebp - 0x22c]
push edx
mov ecx, esi
call fcn.00406a40
mov edi, dword [ebp - 0x26c]
push ebx
mov ecx, edi
call fcn.004187e0
push edi
push esi
call fcn.004662f0
add esp, 8
lea ecx, [ebp - 0x248]
call fcn.0040a440
lea ecx, [ebp - 0x258]
call fcn.0041a9a0
lea ecx, [ebp - 0x29c]
call fcn.0041a9a0
lea ecx, [ebp - 0x28c]
call fcn.0041a9a0
jmp 0x467159
lea ecx, [ebp - 0x294]
mov dword [ebp - 0x290], edi
mov dword [ebp - 0x294], 0x5144e4
call fcn.0045a3d0
push 0xffffffffffffffff
push edi
mov edi, dword [ebp - 0x278]
lea eax, [ebp - 0x22c]
push eax
mov ecx, edi
call fcn.00406a40
movzx edx, word [esi + 8]
movzx ecx, word [esi + 0xa]
shr ecx, 1
shr edx, 1
lea eax, [esi + edx*2 + 0x14]
mov esi, dword [ebp - 0x26c]
push ecx
push eax
mov ecx, esi
call fcn.004063e0
push esi
push edi
call fcn.004662f0
add esp, 8
lea ecx, [ebp - 0x28c]
call fcn.0041a9a0
jmp 0x467159
lea ecx, [ebp - 0x294]
mov dword [ebp - 0x290], ebx
mov dword [ebp - 0x294], 0x5144e4
call fcn.0045a3d0
mov ecx, dword [ebp - 0x270]
mov byte [ecx], 1
jmp 0x467159
mov edx, dword [ebp - 0x270]
mov byte [edx], 0
lea ecx, [ebp - 0x22c]
call fcn.0040a440
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
xor eax, eax
pop ebx
call fcn.00401316
mov esp, ebp
pop ebp
ret