Function at 0x3004b890
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x302179f0
push 0x3015f8a0
mov eax, dword fs:[0]
push eax
sub esp, 0x40
push ebx
push esi
push edi
mov eax, dword [0x3021ae88]
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 0x3004b8ef
mov dword [ebp - 0x30], 0xffffffff
mov dword [ebp - 0x34], 0xffffffff
jmp 0x3004b8fe
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 0x30204b60
push esi
call fcn.3016b61b
add esp, 0xc
test eax, eax
jne 0x3004b928
add esi, 8
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x28], 1
jmp 0x3004b94e
push 0xe
push str._globalroot
push esi
call fcn.30169d44
add esp, 0xc
test eax, eax
jne 0x3004b94b
add esi, 0x1c
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x28], 1
jmp 0x3004b94e
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 0x3004b979
or edi, 0xffffffff
mov dword [ebp - 0x2c], 0xffffffff
jmp 0x3004b985
mov edi, dword [eax + 0x34]
mov eax, dword [eax + 0xbf4]
mov dword [ebp - 0x2c], eax
push 0x10000
push 0
push dword [0x30271450]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
mov dword [ebp - 0x1c], esi
mov eax, dword fs:[0x18]
test eax, eax
je 0x3004b9bc
mov dword [eax + 0x34], edi
mov ecx, dword [ebp - 0x2c]
mov dword [eax + 0xbf4], ecx
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x3004b9bc
push eax
popfd
pushfd
pop dword [ebp - 0x38]
mov eax, dword fs:[0x18]
test eax, eax
jne 0x3004b9d6
or edi, 0xffffffff
mov dword [ebp - 0x2c], 0xffffffff
jmp 0x3004b9e2
mov edi, dword [eax + 0x34]
mov eax, dword [eax + 0xbf4]
mov dword [ebp - 0x2c], eax
push 0x10000
push 0
push dword [0x30271450]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 0x20], eax
mov ecx, dword fs:[0x18]
test ecx, ecx
je 0x3004ba1b
mov dword [ecx + 0x34], edi
mov edx, dword [ebp - 0x2c]
mov dword [ecx + 0xbf4], edx
mov eax, dword [ebp - 0x38]
test eax, eax
je 0x3004ba18
push eax
popfd
mov eax, dword [ebp - 0x20]
test esi, esi
je 0x3004bb2a
test eax, eax
je 0x3004bb2a
push 8
push str.device_
mov edi, dword [ebp - 0x24]
push edi
call fcn.30169d44
add esp, 0xc
test eax, eax
je 0x3004bb70
push 0xb
push 0x302070e8
push edi
call fcn.30169d44
add esp, 0xc
test eax, eax
je 0x3004bb70
cmp dword [ebp - 0x3c], 1
jbe 0x3004baac
cmp word [edi + 2], 0x3a
jne 0x3004baac
mov ecx, 0x10000
call fcn.30001150
mov esi, eax
test esi, esi
je 0x3004bb2a
mov ecx, dword [0x30207100]
mov dword [esi], ecx
mov ecx, dword [0x30207104]
mov dword [esi + 4], ecx
mov cx, word [0x30207108]
mov word [esi + 8], cx
push 0x7ffc
push edi
push esi
call fcn.3016b655
jmp 0x3004bc5d
cmp dword [ebp - 0x28], 0
je 0x3004bb13
mov eax, dword [0x30204b60]
mov dword [ebx], eax
mov eax, dword [0x30204b64]
mov dword [ebx + 4], eax
mov ax, word [0x30204b68]
mov word [ebx + 8], ax
push 0x7ffc
push edi
push ebx
call fcn.3016b655
add esp, 0xc
mov edi, dword [ebp - 0x1c]
xor eax, eax
mov word [ebx + 0xfffe], ax
test edi, edi
je 0x3004be29
pushfd
pop dword [ebp - 0x48]
mov eax, dword fs:[0x18]
test eax, eax
jne 0x3004bde5
mov dword [ebp - 0x2c], 0xffffffff
mov dword [ebp - 0x1c], 0xffffffff
jmp 0x3004bdf4
push 0
push esi
push 0x8000
push edi
call dword [sym.imp.KERNEL32.dll_GetFullPathNameW]
test eax, eax
jne 0x3004bc8a
mov edi, dword [ebp - 0x1c]
push 0x8000
push dword [ebp - 0x24]
push ebx
call fcn.301686b6
push 4
push 0x30207100
push ebx
call fcn.3016b61b
add esp, 0x18
test eax, eax
jne 0x3004badd
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.301608d0
add esp, 0xc
jmp 0x3004badd
xor esi, esi
cmp dword [0x302456bc], esi
jbe 0x3004bb2a
lea ebx, [ebx]
mov edx, dword [esi*4 + 0x30245648]
mov ecx, edx
lea eax, [ecx + 2]
mov dword [ebp - 0x38], eax
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x3004bb90
sub ecx, dword [ebp - 0x38]
sar ecx, 1
push ecx
push edx
push edi
call fcn.30169d44
add esp, 0xc
test eax, eax
je 0x3004bbbd
inc esi
cmp esi, dword [0x302456bc]
jb 0x3004bb80
jmp 0x3004bb2a
push dword [esi*4 + 0x30245648]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov dword [ebp - 0x40], eax
mov esi, dword [esi*4 + 0x302456d0]
test esi, esi
je 0x3004bb2a
mov ecx, 0x10000
call fcn.30001150
mov edx, eax
mov dword [ebp - 0x44], edx
test edx, edx
je 0x3004bb2a
mov ecx, dword [0x30207100]
mov dword [edx], ecx
mov ecx, dword [0x30207104]
mov dword [edx + 4], ecx
mov cx, word [0x30207108]
mov word [edx + 8], cx
mov ecx, esi
mov dword [ebp - 0x38], ecx
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x3004bc14
sub esi, ecx
lea edi, [edx - 2]
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x3004bc24
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.3016b655
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 0x3004bc82
call fcn.300011f0
jmp 0x3004bb2d
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 0x3004bd10
call edi
cmp eax, 2
je 0x3004bcce
call edi
cmp eax, 3
je 0x3004bcce
call edi
cmp eax, 0x7b
jne 0x3004bb2a
push 0x5c
push esi
call fcn.30160299
add esp, 8
mov esi, eax
test esi, esi
je 0x3004bb2a
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.30160350
add esp, 0xc
xor eax, eax
mov word [esi], ax
mov esi, dword [ebp - 0x1c]
jmp 0x3004bca4
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.3016b655
push 4
push 0x30207100
push ebx
call fcn.3016b61b
add esp, 0x18
test eax, eax
jne 0x3004bd5d
push ebx
call edi
lea eax, [eax*2 - 6]
push eax
lea eax, [ebx + 8]
push eax
push ebx
call fcn.301608d0
add esp, 0xc
call fcn.3004d050
test eax, eax
je 0x3004bada
push dword [0x3024563c]
push dword [0x302455c4]
push ebx
call fcn.30169d44
add esp, 0xc
test eax, eax
jne 0x3004bada
mov eax, dword [0x3024563c]
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.301608d0
mov eax, dword [0x302455c8]
add eax, eax
push eax
push dword [0x302456c8]
push ebx
call fcn.30160350
add esp, 0x18
jmp 0x3004bada
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 [0x30271450]
mov esi, dword [sym.imp.KERNEL32.dll_HeapFree]
call esi
mov eax, dword fs:[0x18]
test eax, eax
je 0x3004be2f
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 0x3004be2f
push eax
popfd
jmp 0x3004be2f
mov esi, dword [sym.imp.KERNEL32.dll_HeapFree]
mov edx, dword [ebp - 0x20]
test edx, edx
je 0x3004be8b
pushfd
pop edi
mov eax, dword fs:[0x18]
test eax, eax
jne 0x3004be52
mov dword [ebp - 0x2c], 0xffffffff
mov dword [ebp - 0x20], 0xffffffff
jmp 0x3004be61
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 [0x30271450]
call esi
mov eax, dword fs:[0x18]
test eax, eax
je 0x3004be8b
mov ecx, dword [ebp - 0x2c]
mov dword [eax + 0x34], ecx
mov ecx, dword [ebp - 0x20]
mov dword [eax + 0xbf4], ecx
test edi, edi
je 0x3004be8b
push edi
popfd
cmp word [ebx + 2], 0x3a
jne 0x3004bea8
cmp word [ebx + 4], 0x5c
jne 0x3004bea8
movzx eax, word [ebx]
push eax
call fcn.30169bde
add esp, 4
mov word [ebx], ax
mov eax, dword fs:[0x18]
test eax, eax
je 0x3004beca
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 0x3004beca
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