Function at 0x3004e450
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x30212840
push 0x3015b760
mov eax, dword fs:[0]
push eax
sub esp, 0x40
push ebx
push esi
push edi
mov eax, dword [0x30215e88]
xor dword [ebp - 8], eax
xor eax, ebp
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov dword [ebp - 0x18], esp
mov esi, edx
mov ebx, ecx
mov dword [ebp - 0x4c], ebx
mov dword [ebp - 0x28], 0
pushfd
pop dword [ebp - 0x50]
mov eax, dword fs:[0x18]
test eax, eax
jne 0x3004e4af
mov dword [ebp - 0x30], 0xffffffff
mov dword [ebp - 0x34], 0xffffffff
jmp 0x3004e4be
mov ecx, dword [eax + 0x34]
mov dword [ebp - 0x30], ecx
mov eax, dword [eax + 0xbf4]
mov dword [ebp - 0x34], eax
mov dword [ebp - 4], 0
push 4
push 0x30200f40
push esi
call fcn.301674cb
add esp, 0xc
test eax, eax
jne 0x3004e4e8
add esi, 8
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x28], 1
jmp 0x3004e50e
push 0xe
push str._globalroot
push esi
call fcn.30164487
add esp, 0xc
test eax, eax
jne 0x3004e50b
add esi, 0x1c
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x28], 1
jmp 0x3004e50e
mov dword [ebp - 0x24], esi
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov dword [ebp - 0x3c], eax
mov dword [ebp - 4], 0xfffffffe
pushfd
pop dword [ebp - 0x20]
mov eax, dword fs:[0x18]
test eax, eax
jne 0x3004e539
or edi, 0xffffffff
mov dword [ebp - 0x2c], 0xffffffff
jmp 0x3004e545
mov edi, dword [eax + 0x34]
mov eax, dword [eax + 0xbf4]
mov dword [ebp - 0x2c], eax
push 0x10000
push 0
push dword [0x3026d8b0]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
mov dword [ebp - 0x1c], esi
mov eax, dword fs:[0x18]
test eax, eax
je 0x3004e57c
mov dword [eax + 0x34], edi
mov ecx, dword [ebp - 0x2c]
mov dword [eax + 0xbf4], ecx
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x3004e57c
push eax
popfd
pushfd
pop dword [ebp - 0x38]
mov eax, dword fs:[0x18]
test eax, eax
jne 0x3004e596
or edi, 0xffffffff
mov dword [ebp - 0x2c], 0xffffffff
jmp 0x3004e5a2
mov edi, dword [eax + 0x34]
mov eax, dword [eax + 0xbf4]
mov dword [ebp - 0x2c], eax
push 0x10000
push 0
push dword [0x3026d8b0]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 0x20], eax
mov ecx, dword fs:[0x18]
test ecx, ecx
je 0x3004e5db
mov dword [ecx + 0x34], edi
mov edx, dword [ebp - 0x2c]
mov dword [ecx + 0xbf4], edx
mov eax, dword [ebp - 0x38]
test eax, eax
je 0x3004e5d8
push eax
popfd
mov eax, dword [ebp - 0x20]
test esi, esi
je 0x3004e6ea
test eax, eax
je 0x3004e6ea
push 8
push str.device_
mov edi, dword [ebp - 0x24]
push edi
call fcn.30164487
add esp, 0xc
test eax, eax
je 0x3004e730
push 0xb
push 0x302034d8
push edi
call fcn.30164487
add esp, 0xc
test eax, eax
je 0x3004e730
cmp dword [ebp - 0x3c], 1
jbe 0x3004e66c
cmp word [edi + 2], 0x3a
jne 0x3004e66c
mov ecx, 0x10000
call fcn.30001150
mov esi, eax
test esi, esi
je 0x3004e6ea
mov ecx, dword [0x302034f0]
mov dword [esi], ecx
mov ecx, dword [0x302034f4]
mov dword [esi + 4], ecx
mov cx, word [0x302034f8]
mov word [esi + 8], cx
push 0x7ffc
push edi
push esi
call fcn.30167505
jmp 0x3004e81d
cmp dword [ebp - 0x28], 0
je 0x3004e6d3
mov eax, dword [0x30200f40]
mov dword [ebx], eax
mov eax, dword [0x30200f44]
mov dword [ebx + 4], eax
mov ax, word [0x30200f48]
mov word [ebx + 8], ax
push 0x7ffc
push edi
push ebx
call fcn.30167505
add esp, 0xc
mov edi, dword [ebp - 0x1c]
xor eax, eax
mov word [ebx + 0xfffe], ax
test edi, edi
je 0x3004e9e9
pushfd
pop dword [ebp - 0x48]
mov eax, dword fs:[0x18]
test eax, eax
jne 0x3004e9a5
mov dword [ebp - 0x2c], 0xffffffff
mov dword [ebp - 0x1c], 0xffffffff
jmp 0x3004e9b4
push 0
push esi
push 0x8000
push edi
call dword [sym.imp.KERNEL32.dll_GetFullPathNameW]
test eax, eax
jne 0x3004e84a
mov edi, dword [ebp - 0x1c]
push 0x8000
push dword [ebp - 0x24]
push ebx
call fcn.301646e4
push 4
push 0x302034f0
push ebx
call fcn.301674cb
add esp, 0x18
test eax, eax
jne 0x3004e69d
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [eax*2 - 6]
push eax
lea eax, [ebx + 8]
push eax
push ebx
call fcn.3015c790
add esp, 0xc
jmp 0x3004e69d
xor esi, esi
cmp dword [0x30240ac4], esi
jbe 0x3004e6ea
lea ebx, [ebx]
mov edx, dword [esi*4 + 0x30240a50]
mov ecx, edx
lea eax, [ecx + 2]
mov dword [ebp - 0x38], eax
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x3004e750
sub ecx, dword [ebp - 0x38]
sar ecx, 1
push ecx
push edx
push edi
call fcn.30164487
add esp, 0xc
test eax, eax
je 0x3004e77d
inc esi
cmp esi, dword [0x30240ac4]
jb 0x3004e740
jmp 0x3004e6ea
push dword [esi*4 + 0x30240a50]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov dword [ebp - 0x40], eax
mov esi, dword [esi*4 + 0x30240ad8]
test esi, esi
je 0x3004e6ea
mov ecx, 0x10000
call fcn.30001150
mov edx, eax
mov dword [ebp - 0x44], edx
test edx, edx
je 0x3004e6ea
mov ecx, dword [0x302034f0]
mov dword [edx], ecx
mov ecx, dword [0x302034f4]
mov dword [edx + 4], ecx
mov cx, word [0x302034f8]
mov word [edx + 8], cx
mov ecx, esi
mov dword [ebp - 0x38], ecx
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x3004e7d4
sub esi, ecx
lea edi, [edx - 2]
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x3004e7e4
mov ecx, esi
mov dword [ebp - 0x2c], esi
mov esi, dword [ebp - 0x38]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebp - 0x2c]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push 0x7ff9
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x40]
lea eax, [eax + ecx*2]
push eax
push edx
call fcn.30167505
mov esi, dword [ebp - 0x44]
add esp, 0xc
push 0
mov edi, dword [ebp - 0x1c]
push edi
push 0x8000
push esi
call dword [sym.imp.KERNEL32.dll_GetFullPathNameW]
mov ecx, esi
test eax, eax
jne 0x3004e842
call fcn.300011f0
jmp 0x3004e6ed
call fcn.300011f0
mov esi, dword [ebp - 0x1c]
mov eax, 0x7fff
mov dword [ebp - 0x2c], eax
xor eax, eax
mov ecx, dword [ebp - 0x20]
mov word [ecx + 0xfffe], ax
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x8000
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_GetLongPathNameW]
test eax, eax
jne 0x3004e8d0
call edi
cmp eax, 2
je 0x3004e88e
call edi
cmp eax, 3
je 0x3004e88e
call edi
cmp eax, 0x7b
jne 0x3004e6ea
push 0x5c
push esi
call fcn.3015c159
add esp, 8
mov esi, eax
test esi, esi
je 0x3004e6ea
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov edx, dword [ebp - 0x2c]
sub edx, eax
mov dword [ebp - 0x2c], edx
lea ecx, [eax + eax]
push ecx
push esi
mov eax, dword [ebp - 0x20]
lea eax, [eax + edx*2]
push eax
call fcn.3015c210
add esp, 0xc
xor eax, eax
mov word [esi], ax
mov esi, dword [ebp - 0x1c]
jmp 0x3004e864
push ebx
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenW]
call edi
mov ecx, 0x8000
sub ecx, eax
push ecx
mov eax, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x20]
lea eax, [ecx + eax*2]
push eax
push ebx
call fcn.30167505
push 4
push 0x302034f0
push ebx
call fcn.301674cb
add esp, 0x18
test eax, eax
jne 0x3004e91d
push ebx
call edi
lea eax, [eax*2 - 6]
push eax
lea eax, [ebx + 8]
push eax
push ebx
call fcn.3015c790
add esp, 0xc
call fcn.3004fc10
test eax, eax
je 0x3004e69a
push dword [0x30240a44]
push dword [0x302409cc]
push ebx
call fcn.30164487
add esp, 0xc
test eax, eax
jne 0x3004e69a
mov eax, dword [0x30240a44]
lea esi, [ebx + eax*2]
lea eax, [ebx + eax*2]
push eax
call edi
lea eax, [eax*2 + 2]
push eax
push esi
lea eax, [esi + 2]
push eax
call fcn.3015c790
mov eax, dword [0x302409d0]
add eax, eax
push eax
push dword [0x30240ad0]
push ebx
call fcn.3015c210
add esp, 0x18
jmp 0x3004e69a
mov ecx, dword [eax + 0x34]
mov dword [ebp - 0x2c], ecx
mov eax, dword [eax + 0xbf4]
mov dword [ebp - 0x1c], eax
push edi
push 0
push dword [0x3026d8b0]
mov esi, dword [sym.imp.KERNEL32.dll_HeapFree]
call esi
mov eax, dword fs:[0x18]
test eax, eax
je 0x3004e9ef
mov ecx, dword [ebp - 0x2c]
mov dword [eax + 0x34], ecx
mov ecx, dword [ebp - 0x1c]
mov dword [eax + 0xbf4], ecx
mov eax, dword [ebp - 0x48]
test eax, eax
je 0x3004e9ef
push eax
popfd
jmp 0x3004e9ef
mov esi, dword [sym.imp.KERNEL32.dll_HeapFree]
mov edx, dword [ebp - 0x20]
test edx, edx
je 0x3004ea4b
pushfd
pop edi
mov eax, dword fs:[0x18]
test eax, eax
jne 0x3004ea12
mov dword [ebp - 0x2c], 0xffffffff
mov dword [ebp - 0x20], 0xffffffff
jmp 0x3004ea21
mov ecx, dword [eax + 0x34]
mov dword [ebp - 0x2c], ecx
mov eax, dword [eax + 0xbf4]
mov dword [ebp - 0x20], eax
push edx
push 0
push dword [0x3026d8b0]
call esi
mov eax, dword fs:[0x18]
test eax, eax
je 0x3004ea4b
mov ecx, dword [ebp - 0x2c]
mov dword [eax + 0x34], ecx
mov ecx, dword [ebp - 0x20]
mov dword [eax + 0xbf4], ecx
test edi, edi
je 0x3004ea4b
push edi
popfd
cmp word [ebx + 2], 0x3a
jne 0x3004ea68
cmp word [ebx + 4], 0x5c
jne 0x3004ea68
movzx eax, word [ebx]
push eax
call fcn.30165bfe
add esp, 4
mov word [ebx], ax
mov eax, dword fs:[0x18]
test eax, eax
je 0x3004ea8a
mov ecx, dword [ebp - 0x30]
mov dword [eax + 0x34], ecx
mov ecx, dword [ebp - 0x34]
mov dword [eax + 0xbf4], ecx
mov eax, dword [ebp - 0x50]
test eax, eax
je 0x3004ea8a
push eax
popfd
mov eax, ebx
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret