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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x523793
mov eax, dword fs:[0]
push eax
sub esp, 0x298
mov eax, dword [0x579630]
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 - 0x224], 7
mov dword [ebp - 0x228], 0
call fcn.00407d00
lea eax, [ebp - 0x275]
mov dword [ebp - 4], 0
push eax
lea eax, [ebp - 0x238]
mov byte [ebp - 0x275], 0
push eax
call fcn.00423ef0
add esp, 8
test al, al
je 0x4781f5
cmp byte [ebp - 0x275], 0
mov byte [esi], 0
je 0x478615
xor eax, eax
mov dword [ebp - 0x260], 7
mov dword [ebp - 0x264], 0
mov word [ebp - 0x274], ax
push 4
push 0x533c18
push 4
push eax
lea ecx, [ebp - 0x238]
mov byte [ebp - 4], 1
call fcn.004089f0
test eax, eax
lea eax, [ebp - 0x238]
jne 0x478112
cmp dword [ebp - 0x224], 8
lea ecx, [ebp - 0x274]
push ecx
cmovae eax, dword [ebp - 0x238]
push eax
call fcn.00477120
add esp, 8
test al, al
je 0x4781d5
lea eax, [ebp - 0x238]
cmp ebx, eax
je 0x4780c2
push 0xffffffffffffffff
push 0
push eax
mov ecx, ebx
call fcn.00407d00
call fcn.00474d80
test al, al
je 0x4780f3
cmp dword [ebp - 0x264], 0x10a
jb 0x4780f3
cmp edi, ebx
je 0x4781a4
push 0xffffffffffffffff
push 0
push ebx
mov ecx, edi
call fcn.00407d00
mov byte [esi], 0
jmp 0x4781d5
lea eax, [ebp - 0x274]
cmp edi, eax
je 0x4781d2
push 0xffffffffffffffff
push 0
push eax
mov ecx, edi
call fcn.00407d00
jmp 0x4781d2
push eax
lea eax, [ebp - 0x258]
push eax
call fcn.00423c70
add esp, 8
cmp dword [eax + 0x14], 8
mov byte [ebp - 4], 2
jb 0x47812e
mov eax, dword [eax]
lea ecx, [ebp - 0x274]
push ecx
push eax
call fcn.00477120
add esp, 8
mov byte [ebp - 0x275], al
cmp dword [ebp - 0x244], 8
mov byte [ebp - 4], 1
jb 0x478165
push dword [ebp - 0x258]
call fcn.004085be
mov al, byte [ebp - 0x275]
add esp, 4
test al, al
je 0x4781d5
lea eax, [ebp - 0x238]
cmp ebx, eax
je 0x47817f
push 0xffffffffffffffff
push 0
push eax
mov ecx, ebx
call fcn.00407d00
call fcn.00474d80
test al, al
je 0x4781a9
cmp dword [ebp - 0x264], 0x10a
jb 0x4781a9
cmp edi, ebx
je 0x4781a4
push 0xffffffffffffffff
push 0
push ebx
mov ecx, edi
call fcn.00407d00
mov byte [esi], 0
jmp 0x4781d5
lea eax, [ebp - 0x274]
push eax
lea eax, [ebp - 0x258]
push eax
call fcn.00443e10
add esp, 8
mov ecx, edi
push eax
call fcn.00407e20
lea ecx, [ebp - 0x258]
call fcn.004087d0
mov byte [esi], 1
cmp dword [ebp - 0x260], 8
jb 0x478615
push dword [ebp - 0x274]
call fcn.004085be
add esp, 4
jmp 0x478615
push 4
push 0x533c18
push 4
push 0
lea ecx, [ebp - 0x238]
call fcn.004089f0
test eax, eax
jne 0x47828e
push 0xffffffffffffffff
push 4
lea eax, [ebp - 0x258]
push eax
lea ecx, [ebp - 0x238]
call fcn.00407cc0
mov esi, eax
lea eax, [ebp - 0x238]
cmp eax, esi
je 0x478271
cmp dword [ebp - 0x224], 8
jb 0x478248
push dword [ebp - 0x238]
call fcn.004085be
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.00407e60
cmp dword [ebp - 0x244], 8
jb 0x478288
push dword [ebp - 0x258]
call fcn.004085be
add esp, 4
mov esi, dword [ebp - 0x23c]
lea eax, [ebp - 0x238]
push eax
call fcn.004441e0
add esp, 4
test al, al
je 0x4782a9
mov byte [esi], 0
jmp 0x478615
or eax, 0xffffffff
mov byte [ebp - 0x275], 0
mov dword [ebp - 0x240], 0x5c
lea ecx, [ecx]
push eax
push 0
lea eax, [ebp - 0x258]
push eax
lea ecx, [ebp - 0x238]
call fcn.00407cc0
mov esi, eax
lea eax, [ebp - 0x238]
cmp eax, esi
je 0x47836d
cmp dword [ebp - 0x224], 8
jb 0x4782fc
push dword [ebp - 0x238]
call fcn.004085be
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 0x47833a
mov eax, dword [esi + 0x10]
inc eax
je 0x478348
add eax, eax
push eax
lea eax, [ebp - 0x238]
push esi
push eax
call fcn.004f7f60
add esp, 0xc
jmp 0x478348
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 0x478384
push dword [ebp - 0x258]
call fcn.004085be
add esp, 4
push 1
push 0
lea eax, [ebp - 0x240]
push eax
lea ecx, [ebp - 0x238]
call fcn.0040cdd0
cmp eax, 0xffffffff
jne 0x4783e9
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 0x4783e9
cmp eax, 1
je 0x4783e9
cmp byte [ebp - 0x275], 0
jne 0x47860c
push 1
push 0x52da1c
lea ecx, [ebp - 0x238]
call fcn.0040ef80
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 0x47843d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp esi, 2
je 0x4785e3
cmp esi, 3
je 0x4785e3
cmp esi, 0x7b
je 0x4785e3
cmp esi, 0xa1
jne 0x478617
jmp 0x4785e3
test eax, 0x400
je 0x4785e3
test ebx, ebx
je 0x478ac8
test edi, edi
je 0x478ac8
cmp dword [ebx + 0x14], 8
mov dword [ebx + 0x10], 0
jb 0x478469
mov eax, dword [ebx]
jmp 0x47846b
mov eax, ebx
xor ecx, ecx
mov word [eax], cx
cmp dword [edi + 0x14], 8
mov dword [edi + 0x10], ecx
jb 0x47847d
mov eax, dword [edi]
jmp 0x47847f
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 0x478abe
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.00405f2d
mov esi, eax
add esp, 4
mov dword [ebp - 0x27c], esi
test esi, esi
je 0x478ab9
push 0x4268
lea eax, [esi + 0x4268]
mov dword [ebp - 0x294], esi
push 0
push esi
mov dword [ebp - 0x28c], eax
call fcn.004f9050
lea eax, [esi + 0x4268]
add esp, 0xc
mov dword [ebp - 0x290], eax
push 0
lea ecx, [ebp - 0x25c]
mov byte [ebp - 4], 4
push ecx
sub eax, esi
mov dword [ebp - 0x25c], 0
push eax
push esi
push 0
push 0
push 0x900a8
push dword [ebp - 0x298]
mov dword [ebp - 0x220], eax
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 0x4787bc
mov ecx, dword [ebp - 0x25c]
test ecx, ecx
je 0x4787bc
cmp ecx, dword [ebp - 0x220]
ja 0x4787bc
mov esi, dword [ebp - 0x27c]
mov eax, dword [esi]
cmp eax, 0x80000013
je 0x4785b8
cmp eax, 0x80000007
jne 0x47864c
push esi
mov byte [ebp - 4], 0
call fcn.004085be
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.0042c9f0
cmp eax, 0xffffffff
jne 0x4782c0
mov eax, dword [ebp - 0x23c]
mov byte [eax], 0
xor esi, esi
cmp dword [ebp - 0x224], 8
jb 0x47862e
push dword [ebp - 0x238]
call fcn.004085be
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.00401590
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x23c]
mov byte [eax], 1
mov eax, dword [esi]
cmp eax, 0xa0000003
jne 0x47888c
xor eax, eax
push 0x208
push eax
mov word [ebp - 0x21c], ax
lea eax, [ebp - 0x21a]
push eax
call fcn.004f9050
push 0x52da1c
lea eax, [ebp - 0x238]
push eax
lea eax, [ebp - 0x258]
push eax
call fcn.0042e6e0
add esp, 0x18
cmp dword [eax + 0x14], 8
mov byte [ebp - 4], 5
jb 0x4786a4
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.004087d0
test esi, esi
je 0x4787d4
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
push eax
lea ecx, [ebp - 0x288]
call fcn.0047b760
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 0x478758
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xea
jne 0x4787b1
mov eax, dword [ebp - 0x23c]
jmp 0x478712
cmp word [esi], 0
je 0x4787a0
mov edi, edi
cmp dword [edi + 0x10], 0
jne 0x4787a0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4787b1
test eax, 0x400
jne 0x478781
push esi
mov ecx, edi
call fcn.0040b8c0
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x478786
sub ecx, edx
sar ecx, 1
lea esi, [esi + ecx*2]
add esi, 2
cmp word [esi], ax
jne 0x478760
lea ecx, [ebp - 0x288]
mov byte [ebp - 4], 4
call fcn.004247a0
jmp 0x4787e5
lea ecx, [ebp - 0x288]
call fcn.004247a0
push dword [ebp - 0x27c]
mov esi, 3
call fcn.004085be
add esp, 4
jmp 0x478617
mov eax, dword [ebp - 0x27c]
mov ecx, edi
add eax, 0x10
push eax
call fcn.0040b8c0
lea eax, [ebp - 0x238]
cmp ebx, eax
je 0x4787fb
push 0xffffffffffffffff
push 0
push eax
mov ecx, ebx
call fcn.00407d00
cmp dword [edi + 0x10], 0
je 0x478877
push 0x533c18
push 4
push 0
mov ecx, edi
call fcn.004247d0
test eax, eax
jne 0x47883a
push 0xffffffffffffffff
push 4
lea eax, [ebp - 0x258]
mov ecx, edi
push eax
call fcn.00407cc0
push eax
mov ecx, edi
call fcn.00407e20
lea ecx, [ebp - 0x258]
call fcn.004087d0
cmp dword [ebx + 0x10], 0
je 0x478877
lea eax, [ebp - 0x220]
mov ecx, ebx
push eax
call fcn.004216e0
mov eax, dword [eax]
cmp word [eax - 2], 0x5c
je 0x478877
lea eax, [ebp - 0x220]
mov ecx, edi
push eax
call fcn.004216e0
mov eax, dword [eax]
cmp word [eax - 2], 0x5c
jne 0x478877
push 0x5c
mov ecx, ebx
call fcn.00470850
push dword [ebp - 0x27c]
xor esi, esi
call fcn.004085be
add esp, 4
jmp 0x478617
cmp eax, 0xa000000c
jne 0x4787bc
test byte [esi + 0x10], 1
je 0x478a69
mov esi, dword [ebp - 0x228]
lea eax, [ebp - 0x220]
push eax
xorps xmm0, xmm0
mov dword [ebp - 0x240], esi
push 0x104
lea ecx, [ebp - 0x2a4]
movq qword [ebp - 0x2a4], xmm0
mov dword [ebp - 0x29c], 0
mov dword [ebp - 0x220], 0
call fcn.00424640
lea eax, [ebp - 0x220]
mov byte [ebp - 4], 7
push eax
inc esi
mov dword [ebp - 0x280], 0
xorps xmm0, xmm0
mov dword [ebp - 0x220], 0x30
push esi
lea ecx, [ebp - 0x288]
movq qword [ebp - 0x288], xmm0
call fcn.00424640
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 - 0x288]
push esi
call fcn.00403897
add esp, 0xc
test eax, eax
jne 0x478a3b
mov ecx, dword [ebp - 0x240]
test ecx, ecx
je 0x478978
cmp dword [ebp - 0x224], 8
lea eax, [ebp - 0x238]
cmovae eax, dword [ebp - 0x238]
cmp word [eax + ecx*2 - 2], 0x5c
jne 0x478978
xor eax, eax
mov word [esi + ecx*2 - 2], ax
push esi
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
test eax, eax
je 0x478a3b
xor eax, eax
mov dword [ebp - 0x244], 7
mov dword [ebp - 0x248], 0
mov word [ebp - 0x258], ax
mov ecx, dword [ebp - 0x27c]
mov byte [ebp - 4], 9
movzx eax, word [ecx + 0xa]
shr eax, 1
push eax
movzx eax, word [ecx + 8]
add ecx, 0x14
shr eax, 1
lea eax, [ecx + eax*2]
push eax
lea ecx, [ebp - 0x258]
call fcn.00407750
cmp dword [ebp - 0x244], 8
lea eax, [ebp - 0x258]
cmovae eax, dword [ebp - 0x258]
push eax
push esi
mov esi, dword [ebp - 0x2a4]
push esi
call dword [sym.imp.SHLWAPI.dll_PathCombineW]
test eax, eax
jne 0x478a04
lea ecx, [ebp - 0x258]
lea esi, [eax + 3]
call fcn.004087d0
jmp 0x478a40
lea eax, [ebp - 0x238]
cmp ebx, eax
je 0x478a1a
push 0xffffffffffffffff
push 0
push eax
mov ecx, ebx
call fcn.00407d00
push esi
mov ecx, edi
call fcn.0040b8c0
push edi
push ebx
call fcn.00475bc0
add esp, 8
lea ecx, [ebp - 0x258]
xor esi, esi
call fcn.004087d0
jmp 0x478a40
mov esi, 3
lea ecx, [ebp - 0x288]
call fcn.004247a0
lea ecx, [ebp - 0x2a4]
call fcn.004247a0
push dword [ebp - 0x27c]
call fcn.004085be
add esp, 4
jmp 0x478617
lea eax, [ebp - 0x238]
cmp ebx, eax
je 0x478a7f
push 0xffffffffffffffff
push 0
push eax
mov ecx, ebx
call fcn.00407d00
movzx eax, word [esi + 0xa]
mov ecx, edi
shr eax, 1
push eax
movzx eax, word [esi + 8]
shr eax, 1
add eax, 0xa
lea eax, [esi + eax*2]
push eax
call fcn.00407750
push edi
push ebx
call fcn.00475bc0
add esp, 8
xor esi, esi
push dword [ebp - 0x27c]
call fcn.004085be
add esp, 4
jmp 0x478617
call fcn.004f7859
mov esi, 3
jmp 0x478617
mov eax, dword [ebp - 0x23c]
mov byte [eax], 1
jmp 0x478615