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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x525ef7
mov eax, dword fs:[0]
push eax
sub esp, 0x30c
mov eax, dword [0x5640a8]
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 ebx, edx
mov dword [ebp - 0x318], ebx
mov edi, ecx
mov dword [ebp - 0x314], edi
xor eax, eax
mov dword [ebp - 0x2fc], 0
mov word [ebp - 0x90], ax
lea ecx, [ebp - 0x90]
mov eax, dword [0x5651c4]
mov edx, 0x53cb10
test eax, eax
mov dword [ebp - 0x98], vtable.ui::CDuiString.0
mov dword [ebp - 0x94], ecx
cmovne edx, eax
mov esi, edx
mov dword [ebp - 0x304], edx
lea eax, [esi + 2]
mov dword [ebp - 0x300], eax
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x4b5567
sub esi, dword [ebp - 0x300]
sar esi, 1
cmp esi, 0x3f
jl 0x4b55a9
lea eax, [esi*2 + 2]
mov dword [ebp - 0x94], 0
push eax
push 0
call fcn.00502ac4
mov edx, dword [ebp - 0x304]
mov ecx, eax
add esp, 8
mov dword [ebp - 0x94], ecx
push esi
push edx
push ecx
call fcn.00508740
mov eax, dword [ebp - 0x94]
xor ecx, ecx
add esp, 0xc
mov word [eax + esi*2], cx
mov dword [ebp - 4], ecx
mov eax, dword [0x56513c]
cmp word [eax], cx
jne 0x4b5604
mov edx, ebx
mov ecx, edi
call fcn.004b3650
mov ecx, dword [ebp - 0x94]
mov esi, eax
lea eax, [ebp - 0x90]
mov dword [ebp - 0x98], vtable.ui::CDuiString.0
cmp ecx, eax
je 0x4b5a69
push ecx
call fcn.004fdfef
add esp, 4
jmp 0x4b5a69
push eax
lea ecx, [ebp - 0x98]
call fcn.004522b0
cmp byte [0x56e830], 0
je 0x4b5624
mov esi, dword [0x56e82c]
jmp 0x4b5743
mov ebx, dword [ebp - 0x94]
push 0x340
call fcn.004e1dfa
mov esi, eax
add esp, 4
mov dword [ebp - 0x304], esi
lea edi, [esi + 0x138]
mov dword [esi], 0
push edi
push 0x104
mov dword [esi + 4], 0xffffffff
mov dword [esi + 0x134], 0xffffffff
call dword [sym.imp.KERNEL32.DLL_GetCurrentDirectoryW]
add edi, 0xfffffffe
nop dword [eax + eax]
mov ax, word [edi + 2]
lea edi, [edi + 2]
test ax, ax
jne 0x4b5670
mov eax, dword [0x53ca10]
push 0
push 0x80
push 3
push 0
push 1
push Ordinal_1
push ebx
mov dword [edi], eax
mov dword [ebp - 0x300], 0
call dword [sym.imp.KERNEL32.DLL_CreateFileW]
mov dword [ebp - 0x300], eax
cmp eax, 0xffffffff
je 0x4b5aad
push eax
call dword [sym.imp.KERNEL32.DLL_GetFileType]
cmp eax, 1
push 0x1c
sete bl
call fcn.004e1dfa
mov edi, eax
add esp, 4
mov byte [edi], 1
mov byte [edi + 1], bl
mov ecx, dword [ebp - 0x300]
mov dword [edi + 4], ecx
mov byte [edi + 8], 0
mov dword [edi + 0xc], 0
test bl, bl
je 0x4b5701
push 1
push 0
push 0
push dword [ebp - 0x300]
call dword [sym.imp.KERNEL32.DLL_SetFilePointer]
mov dword [edi + 0xc], eax
mov ecx, edi
call fcn.004730a0
mov dword [esi], eax
mov eax, dword [0x56e8a4]
mov dword [0x56e8a0], eax
test eax, eax
jne 0x4b5ab7
push 8
call fcn.004e1dfa
mov ebx, dword [ebp - 0x318]
mov esi, eax
mov eax, dword [ebp - 0x304]
add esp, 4
mov edi, dword [ebp - 0x314]
mov dword [esi], 1
mov dword [esi + 4], eax
test esi, esi
je 0x4b5a44
lea eax, [ebp - 0x2f8]
mov edx, ebx
push eax
lea eax, [ebp - 0x300]
push eax
push ecx
mov ecx, esi
call fcn.00474a50
add esp, 0xc
test eax, eax
je 0x4b590d
push 0x53dd6c
push ebx
call fcn.004fa4ad
add esp, 8
test eax, eax
jne 0x4b5881
push ebx
lea ecx, [ebp - 0xc8]
call fcn.00403170
push 0x53ca10
push eax
lea eax, [ebp - 0xb0]
mov byte [ebp - 4], 1
push eax
call fcn.00415000
add esp, 0xc
lea ecx, [ebp - 0xc8]
mov byte [ebp - 4], 3
call fcn.00402450
cmp dword [ebp - 0x9c], 8
lea eax, [ebp - 0x2f8]
push eax
lea eax, [ebp - 0x300]
push eax
lea edx, [ebp - 0xb0]
cmovae edx, dword [ebp - 0xb0]
push ecx
mov ecx, esi
call fcn.00474a50
add esp, 0xc
test eax, eax
jne 0x4b5872
lea eax, [ebp - 0x2f8]
mov edx, esi
push eax
lea ecx, [ebp - 0x310]
call fcn.00474c50
add esp, 4
mov byte [ebp - 4], 4
mov eax, 0xea0ea0eb
mov ecx, dword [ebp - 0x30c]
sub ecx, dword [ebp - 0x310]
imul ecx
add edx, ecx
sar edx, 9
mov eax, edx
shr eax, 0x1f
add eax, edx
je 0x4b5867
lea eax, [ebp - 0x310]
mov edx, esi
push eax
mov ecx, edi
call fcn.004b4f10
add esp, 4
mov dword [ebp - 0x2fc], eax
test eax, eax
je 0x4b5867
lea ecx, [ebp - 0x310]
call fcn.00474d60
lea ecx, [ebp - 0xb0]
call fcn.00402450
mov ebx, dword [ebp - 0x2fc]
jmp 0x4b598e
lea ecx, [ebp - 0x310]
call fcn.00474d60
lea ecx, [ebp - 0xb0]
mov byte [ebp - 4], 0
call fcn.00402450
cmp byte [0x56e830], 0
jne 0x4b5891
mov ecx, esi
call fcn.00474bf0
test ebx, ebx
je 0x4b58a1
push ebx
lea ecx, [ebp - 0x98]
call fcn.004522b0
push dword [ebp - 0x94]
mov esi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
call esi
test eax, eax
jne 0x4b58c6
push ebx
call esi
test eax, eax
je 0x4b58c6
push ebx
lea ecx, [ebp - 0x98]
call fcn.004524d0
push dword [ebp - 0x94]
call esi
test eax, eax
je 0x4b59c3
mov edx, ebx
mov ecx, edi
call fcn.004b3650
mov esi, eax
mov dword [ebp - 0x98], vtable.ui::CDuiString.0
mov eax, dword [ebp - 0x94]
lea ecx, [ebp - 0x90]
cmp eax, ecx
je 0x4b5a69
push eax
call fcn.004fdfef
add esp, 4
jmp 0x4b5a69
mov ebx, dword [ebp - 0xcc]
test ebx, ebx
jne 0x4b59ee
test byte [ebp - 0xec], 0x10
je 0x4b59c3
lea eax, [ebp - 0x2f8]
mov edx, esi
push eax
lea ecx, [ebp - 0x310]
call fcn.00474c50
add esp, 4
mov byte [ebp - 4], 5
mov eax, 0xea0ea0eb
mov ecx, dword [ebp - 0x30c]
sub ecx, dword [ebp - 0x310]
imul ecx
add edx, ecx
sar edx, 9
mov eax, edx
shr eax, 0x1f
add eax, edx
je 0x4b59b8
lea eax, [ebp - 0x310]
mov edx, esi
push eax
mov ecx, edi
call fcn.004b4f10
mov ebx, eax
add esp, 4
mov dword [ebp - 0x2fc], ebx
test ebx, ebx
je 0x4b59b8
lea ecx, [ebp - 0x310]
call fcn.00474d60
mov eax, dword [ebp - 0x94]
lea ecx, [ebp - 0x90]
mov dword [ebp - 0x98], vtable.ui::CDuiString.0
cmp eax, ecx
je 0x4b59b1
push eax
call fcn.004fdfef
add esp, 4
mov eax, ebx
jmp 0x4b5a6b
lea ecx, [ebp - 0x310]
call fcn.00474d60
mov eax, dword [ebp - 0x94]
lea ecx, [ebp - 0x90]
mov dword [ebp - 0x98], vtable.ui::CDuiString.0
cmp eax, ecx
je 0x4b59e6
push eax
call fcn.004fdfef
add esp, 4
mov esi, dword [ebp - 0x2fc]
jmp 0x4b5a69
push ebx
call fcn.004e22d3
add esp, 4
mov edi, eax
cmp dword [esi], 1
je 0x4b5a0a
mov dword [0x56e8a0], 0x80000
jmp 0x4b5a2b
push ecx
mov ecx, dword [esi + 4]
push ebx
push edi
push dword [ebp - 0x300]
call fcn.004748c0
mov dword [0x56e8a0], eax
test eax, eax
je 0x4b5a87
cmp eax, 0x600
je 0x4b5a87
push edi
call fcn.004e22c5
add esp, 4
cmp byte [0x56e830], 0
jne 0x4b5a44
mov ecx, esi
call fcn.00474bf0
mov eax, dword [ebp - 0x94]
lea ecx, [ebp - 0x90]
mov dword [ebp - 0x98], vtable.ui::CDuiString.0
cmp eax, ecx
je 0x4b5a67
push eax
call fcn.004fdfef
add esp, 4
xor esi, esi
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.004e1bb1
mov esp, ebp
pop ebp
ret
test edi, edi
je 0x4b5a44
mov ecx, dword [ebp - 0x314]
mov edx, edi
push ebx
call fcn.004b5220
push edi
mov dword [ebp - 0x2fc], eax
call fcn.004e22c5
add esp, 8
jmp 0x4b59c3
mov dword [0x56e8a0], 0x200
push 0x340
push esi
call fcn.004e2095
add esp, 8
jmp 0x4b5a44