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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x294
mov eax, dword [0x54e938]
xor eax, ebp
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 0x10]
mov eax, dword [ebp + 8]
mov edx, dword [ebp + 0x14]
push ebx
push esi
push edi
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0x25c], ecx
xor ebx, ebx
push 0xffffffffffffffff
mov dword [ebp - 0x260], ebx
xor ecx, ecx
push ebx
mov word [ebp - 0x22c], cx
mov esi, 7
push eax
lea ecx, [ebp - 0x22c]
mov dword [ebp - 0x258], edi
mov dword [ebp - 0x254], edx
mov dword [ebp - 0x218], esi
mov dword [ebp - 0x21c], ebx
call fcn.00406960
lea edx, [ebp - 0x22c]
push edx
call fcn.00419c80
add esp, 4
test al, al
je 0x460139
cmp dword [ebp - 0x218], 8
mov byte [edi], bl
jb 0x4609f8
mov eax, dword [ebp - 0x22c]
push eax
call fcn.00406ec9
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 0x512bf0
push 4
push ebx
lea ecx, [ebp - 0x22c]
call fcn.004073b0
test eax, eax
jne 0x4601a7
push 0xffffffffffffffff
xor ecx, ecx
push 4
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.00406960
lea eax, [ebp - 0x248]
push eax
lea ecx, [ebp - 0x22c]
call fcn.00406280
cmp dword [ebp - 0x234], 8
jb 0x4601a7
mov ecx, dword [ebp - 0x248]
push ecx
call fcn.00406ec9
add esp, 4
lea edx, [ebp - 0x22c]
push edx
call fcn.0043d5c0
add esp, 4
test al, al
jne 0x460108
or eax, 0xffffffff
mov byte [ebp - 0x249], bl
mov dword [ebp - 0x260], 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.00406960
lea eax, [ebp - 0x248]
push eax
lea ecx, [ebp - 0x22c]
call fcn.00406280
cmp dword [ebp - 0x234], 8
jb 0x460224
mov ecx, dword [ebp - 0x248]
push ecx
call fcn.00406ec9
add esp, 4
mov eax, dword [ebp - 0x21c]
cmp eax, ebx
jbe 0x4602b5
mov ecx, eax
mov dword [ebp - 0x250], ecx
cmp eax, 1
jb 0x4602b5
cmp dword [ebp - 0x218], 8
mov edi, dword [ebp - 0x22c]
jae 0x460254
lea edi, [ebp - 0x22c]
mov eax, edi
cmp ecx, ebx
jbe 0x4602b5
lea ebx, [ebx]
cmp word [eax], 0x5c
je 0x46026e
add eax, 2
dec ecx
jne 0x460260
jmp 0x4602b5
cmp eax, ebx
je 0x4602b5
mov esi, 1
lea edx, [ebp - 0x260]
mov ecx, eax
nop
mov bx, word [ecx]
cmp bx, word [edx]
jne 0x46037a
add ecx, 2
add edx, 2
dec esi
jne 0x460280
cmp dword [ebp - 0x218], 8
mov ecx, dword [ebp - 0x22c]
jae 0x4602aa
lea ecx, [ebp - 0x22c]
sub eax, ecx
sar eax, 1
xor ebx, ebx
cmp eax, 0xffffffff
jne 0x460300
cmp dword [ebp - 0x218], 8
mov eax, dword [ebp - 0x22c]
jae 0x4602ca
lea eax, [ebp - 0x22c]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, ebx
je 0x460300
cmp eax, 1
je 0x460300
cmp byte [ebp - 0x249], 0
jne 0x4609e4
push 1
push 0x5104d4
lea ecx, [ebp - 0x22c]
call fcn.0040e560
mov byte [ebp - 0x249], 1
cmp dword [ebp - 0x218], 8
mov edi, dword [ebp - 0x254]
mov esi, dword [ebp - 0x25c]
mov eax, dword [ebp - 0x22c]
jae 0x460321
lea eax, [ebp - 0x22c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x4603a9
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp esi, 2
je 0x4604f8
cmp esi, 3
je 0x4604f8
cmp esi, 0x7b
je 0x4604f8
cmp esi, 0xa1
je 0x4604f8
lea ecx, [ebp - 0x22c]
call fcn.0040a2c0
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 0x460295
mov ecx, eax
sub ecx, edi
sar ecx, 1
or edx, 0xffffffff
sub edx, ecx
mov ecx, dword [ebp - 0x250]
add ecx, edx
mov dword [ebp - 0x250], ecx
lea edi, [eax + 2]
xor ebx, ebx
jmp 0x460254
test eax, 0x400
je 0x4604f8
cmp esi, ebx
je 0x4609d9
cmp edi, ebx
je 0x4609d9
mov ecx, 8
mov dword [esi + 0x10], ebx
cmp dword [esi + 0x14], ecx
jb 0x4603d5
mov eax, dword [esi]
jmp 0x4603d7
mov eax, esi
xor edx, edx
mov word [eax], dx
mov dword [edi + 0x10], ebx
cmp dword [edi + 0x14], ecx
jb 0x4603e8
mov eax, dword [edi]
jmp 0x4603ea
mov eax, edi
xor edx, edx
mov word [eax], dx
mov eax, dword [ebp - 0x22c]
cmp dword [ebp - 0x218], ecx
jae 0x460403
lea eax, [ebp - 0x22c]
push ebx
push 0x2200000
push 3
push ebx
push 7
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x460623
push 0x4268
mov dword [ebp - 0x280], ebx
mov dword [ebp - 0x27c], ebx
mov dword [ebp - 0x278], ebx
call fcn.004051ca
mov esi, eax
add esp, 4
cmp esi, ebx
je 0x4609be
push 0x4268
push 0
lea ebx, [esi + 0x4268]
push esi
mov dword [ebp - 0x280], esi
mov dword [ebp - 0x278], ebx
call fcn.004e15a0
add esp, 0xc
push 0
lea eax, [ebp - 0x294]
push eax
mov dword [ebp - 0x27c], ebx
sub ebx, esi
push ebx
push esi
push 0
push 0
push 0x900a8
push edi
mov dword [ebp - 0x294], 0
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
push edi
mov dword [ebp - 0x250], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x250], 0
je 0x460618
mov eax, dword [ebp - 0x294]
xor edi, edi
cmp eax, edi
je 0x460618
cmp eax, ebx
ja 0x460618
mov eax, dword [esi]
cmp eax, 0x80000013
je 0x4604db
cmp eax, 0x80000007
jne 0x46052b
push esi
call fcn.00406ec9
add esp, 4
mov dword [ebp - 0x280], edi
mov dword [ebp - 0x27c], edi
mov dword [ebp - 0x278], edi
xor ebx, ebx
push 1
push 0xffffffffffffffff
lea ecx, [ebp - 0x250]
push ecx
lea ecx, [ebp - 0x22c]
mov dword [ebp - 0x250], 0x5c
call fcn.00427880
cmp eax, 0xffffffff
je 0x4609e4
mov esi, 7
jmp 0x4601d1
mov edx, dword [ebp - 0x258]
mov byte [edx], 1
mov eax, dword [esi]
cmp eax, 0xa0000003
jne 0x460766
push 0x208
lea ecx, [ebp - 0x20e]
xor eax, eax
push edi
push ecx
mov word [ebp - 0x210], ax
call fcn.004e15a0
push 0x5104d4
lea edx, [ebp - 0x22c]
push edx
lea eax, [ebp - 0x248]
push eax
call fcn.00429440
add esp, 0x18
cmp dword [eax + 0x14], 8
jb 0x46057f
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.0040a2c0
cmp ebx, edi
je 0x4606a7
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x290], edi
mov dword [ebp - 0x28c], edi
mov dword [ebp - 0x288], edi
mov edi, dword [sym.imp.KERNEL32.dll_GetVolumePathNamesForVolumeNameW]
mov dword [ebp - 0x258], 0x104
nop
mov edx, dword [ebp - 0x258]
push edx
lea ecx, [ebp - 0x290]
call fcn.0043b020
mov ecx, dword [ebp - 0x258]
mov esi, dword [ebp - 0x290]
lea eax, [ebp - 0x258]
push eax
push ecx
push esi
lea edx, [ebp - 0x210]
push edx
call edi
test eax, eax
jne 0x460644
call ebx
cmp eax, 0xea
je 0x4605d0
lea ecx, [ebp - 0x290]
call fcn.0041a760
lea ecx, [ebp - 0x280]
call fcn.0041a760
lea ecx, [ebp - 0x22c]
call fcn.0040a2c0
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 - 0x254]
je 0x46069a
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp dword [ebx + 0x10], 0
jne 0x46069a
push esi
call edi
cmp eax, 0xffffffff
je 0x46060d
test eax, 0x400
jne 0x460673
push esi
mov ecx, ebx
call fcn.00418650
mov eax, esi
lea edx, [eax + 2]
jmp 0x460680
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x460680
sub eax, edx
sar eax, 1
cmp word [esi + eax*2 + 2], cx
lea esi, [esi + eax*2 + 2]
jne 0x460656
lea ecx, [ebp - 0x290]
call fcn.0041a760
jmp 0x4606bc
mov ecx, dword [ebp - 0x254]
add esi, 0x10
push esi
call fcn.00418650
mov ebx, dword [ebp - 0x254]
mov esi, dword [ebp - 0x25c]
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x22c]
push eax
mov ecx, esi
call fcn.00406960
cmp dword [ebx + 0x10], 0
je 0x460756
push 0x512bf0
push 4
push 0
mov ecx, ebx
call fcn.0041a790
test eax, eax
jne 0x460717
push 0xffffffffffffffff
push 4
lea ecx, [ebp - 0x248]
push ecx
mov ecx, ebx
call fcn.00406920
push eax
mov ecx, ebx
call fcn.00406280
lea ecx, [ebp - 0x248]
call fcn.0040a2c0
cmp dword [esi + 0x10], 0
je 0x460756
lea edx, [ebp - 0x264]
push edx
mov ecx, esi
call fcn.00418690
mov eax, dword [eax]
mov edi, 0x5c
cmp word [eax - 2], di
je 0x460756
lea ecx, [ebp - 0x264]
push ecx
mov ecx, ebx
call fcn.00418690
mov edx, dword [eax]
cmp word [edx - 2], di
jne 0x460756
push edi
mov ecx, esi
call fcn.00459030
lea ecx, [ebp - 0x280]
call fcn.0041a760
jmp 0x4609ed
cmp eax, 0xa000000c
jne 0x460618
test byte [esi + 0x10], 1
je 0x460971
mov eax, dword [ebp - 0x21c]
push 0x208
mov dword [ebp - 0x250], eax
mov dword [ebp - 0x270], edi
mov dword [ebp - 0x26c], edi
mov dword [ebp - 0x268], edi
call fcn.004051ca
mov ebx, eax
add esp, 4
cmp ebx, edi
je 0x460956
lea eax, [ebx + 0x208]
mov dword [ebp - 0x268], 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 - 0x250]
lea eax, [ebx + 0x208]
mov dword [ebp - 0x26c], eax
lea eax, [ebp - 0x260]
push eax
inc edi
push edi
lea ecx, [ebp - 0x290]
mov dword [ebp - 0x270], ebx
mov dword [ebp - 0x260], 0x30
call fcn.0045a4e0
cmp dword [ebp - 0x218], 8
mov eax, dword [ebp - 0x22c]
jae 0x46081c
lea eax, [ebp - 0x22c]
mov ecx, dword [ebp - 0x290]
push eax
push edi
push ecx
call fcn.00402c49
add esp, 0xc
test eax, eax
jne 0x4608df
mov edi, dword [ebp - 0x250]
test edi, edi
je 0x460861
lea edx, [edi - 1]
push edx
lea ecx, [ebp - 0x22c]
call fcn.00418750
cmp word [eax], 0x5c
jne 0x460861
mov ecx, dword [ebp - 0x290]
xor eax, eax
mov word [ecx + edi*2 - 2], ax
mov edx, dword [ebp - 0x290]
push edx
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
test eax, eax
je 0x4608df
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.00406300
cmp dword [ebp - 0x234], 8
mov eax, dword [ebp - 0x248]
jae 0x4608c1
lea eax, [ebp - 0x248]
mov ecx, dword [ebp - 0x290]
push eax
push ecx
push ebx
call dword [sym.imp.SHLWAPI.dll_PathCombineW]
test eax, eax
jne 0x4608f5
lea ecx, [ebp - 0x248]
call fcn.0040a2c0
lea ecx, [ebp - 0x290]
call fcn.0041a760
lea ecx, [ebp - 0x270]
jmp 0x460613
mov esi, dword [ebp - 0x25c]
push 0xffffffffffffffff
push 0
lea edx, [ebp - 0x22c]
push edx
mov ecx, esi
call fcn.00406960
mov edi, dword [ebp - 0x254]
push ebx
mov ecx, edi
call fcn.00418650
push edi
push esi
call fcn.0045ff90
add esp, 8
lea ecx, [ebp - 0x248]
call fcn.0040a2c0
lea ecx, [ebp - 0x290]
call fcn.0041a760
lea ecx, [ebp - 0x270]
call fcn.0041a760
lea ecx, [ebp - 0x280]
call fcn.0041a760
jmp 0x4609ed
lea ecx, [ebp - 0x268]
mov dword [ebp - 0x264], edi
mov dword [ebp - 0x268], 0x510374
call fcn.004565f0
push 0xffffffffffffffff
push edi
mov edi, dword [ebp - 0x25c]
lea eax, [ebp - 0x22c]
push eax
mov ecx, edi
call fcn.00406960
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 - 0x254]
push ecx
push eax
mov ecx, esi
call fcn.00406300
push esi
push edi
call fcn.0045ff90
add esp, 8
lea ecx, [ebp - 0x280]
call fcn.0041a760
jmp 0x4609ed
lea ecx, [ebp - 0x268]
mov dword [ebp - 0x264], ebx
mov dword [ebp - 0x268], 0x510374
call fcn.004565f0
mov ecx, dword [ebp - 0x258]
mov byte [ecx], 1
jmp 0x4609ed
mov edx, dword [ebp - 0x258]
mov byte [edx], 0
lea ecx, [ebp - 0x22c]
call fcn.0040a2c0
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