Function at 0x10045510
Capabilities:
Check if file exists
Get common file path
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
xor edi, edi
mov esi, ecx
push edi
mov dword [ebp - 4], edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
test esi, esi
je 0x1004574f
mov ecx, esi
call fcn.10042740
test eax, eax
jne 0x1004574f
mov ecx, esi
call fcn.10044db0
mov ebx, eax
test ebx, ebx
je 0x10045656
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
push edi
push edi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
mov esi, eax
lea eax, [esi + esi]
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 8], eax
test eax, eax
je 0x10045718
push esi
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x1004564e
cmp esi, eax
jb 0x1004564e
mov ecx, ebx
call fcn.10042740
test eax, eax
je 0x10045633
mov dword [ebp - 0x10], str.system32_
lea edi, [ebp - 0x10]
mov dword [ebp - 0xc], str.SystemRoot_system32_
nop
mov ecx, dword [edi]
mov esi, ecx
lea edx, [esi + 2]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x100455b7
sub esi, edx
sar esi, 1
push esi
push ecx
push ebx
call fcn.101ac21a
add esp, 0xc
test eax, eax
je 0x100455e4
add edi, 4
lea eax, [ebp - 8]
cmp edi, eax
jb 0x100455b0
mov esi, dword [ebp - 8]
jmp 0x100455f4
lea edx, [ebx + esi*2]
mov esi, dword [ebp - 8]
mov ecx, esi
call fcn.10045b30
mov dword [ebp - 4], eax
lea eax, [ebp - 8]
cmp edi, eax
jne 0x10045646
movzx eax, word [ebx]
cmp eax, 0x5c
je 0x1004562a
cmp eax, 0x2f
je 0x1004562a
push eax
call fcn.10198daf
add esp, 4
test eax, eax
je 0x10045646
cmp word [ebx + 2], 0x3a
jne 0x10045646
movzx eax, word [ebx + 4]
cmp eax, 0x5c
je 0x1004562a
cmp eax, 0x2f
jne 0x10045646
mov edi, ebx
xor ebx, ebx
jmp 0x10045711
mov esi, dword [ebp - 8]
mov edx, ebx
mov ecx, esi
call fcn.10045b30
mov edi, eax
jmp 0x10045711
mov edi, dword [ebp - 4]
jmp 0x10045711
mov esi, dword [ebp - 8]
jmp 0x10045711
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7e
jne 0x10045734
mov ecx, esi
call fcn.10046310
mov ebx, eax
mov dword [ebp - 8], ebx
test ebx, ebx
je 0x10045734
mov ecx, 0x37e4
call fcn.10045e60
test eax, eax
je 0x10045690
call fcn.10045770
mov esi, eax
jmp 0x100456d2
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
mov ebx, eax
lea ecx, [ebx + ebx]
push ecx
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
test esi, esi
je 0x100456cf
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x100456c6
cmp ebx, eax
jae 0x100456cf
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
xor esi, esi
mov ebx, dword [ebp - 8]
test esi, esi
je 0x10045718
mov edx, ebx
mov ecx, esi
call fcn.10045b30
mov edi, eax
test edi, edi
je 0x10045711
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x100456f5
test al, 0x50
je 0x10045711
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x10045708
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
xor edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
push ebx
call dword [sym.imp.KERNEL32.dll_LocalFree]
test edi, edi
je 0x10045734
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x10045746
push 0x7e
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0xa0
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret