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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x526157
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, 0x53cb08
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 0x4b5777
sub esi, dword [ebp - 0x300]
sar esi, 1
cmp esi, 0x3f
jl 0x4b57b9
lea eax, [esi*2 + 2]
mov dword [ebp - 0x94], 0
push eax
push 0
call fcn.00502cb9
mov edx, dword [ebp - 0x304]
mov ecx, eax
add esp, 8
mov dword [ebp - 0x94], ecx
push esi
push edx
push ecx
call fcn.005089c0
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 0x4b5814
mov edx, ebx
mov ecx, edi
call fcn.004b3860
mov ecx, dword [ebp - 0x94]
mov esi, eax
lea eax, [ebp - 0x90]
mov dword [ebp - 0x98], vtable.ui::CDuiString.0
cmp ecx, eax
je 0x4b5c79
push ecx
call fcn.004fe1ff
add esp, 4
jmp 0x4b5c79
push eax
lea ecx, [ebp - 0x98]
call fcn.004525a0
cmp byte [0x56e90c], 0
je 0x4b5834
mov esi, dword [0x56e908]
jmp 0x4b5953
mov ebx, dword [ebp - 0x94]
push 0x340
call fcn.004e204b
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 0x4b5880
mov eax, dword [0x53ca00]
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocString
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 0x4b5cbd
push eax
call dword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 1
push 0x1c
sete bl
call fcn.004e204b
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 0x4b5911
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.004733a0
mov dword [esi], eax
mov eax, dword [0x56e980]
mov dword [0x56e97c], eax
test eax, eax
jne 0x4b5cc7
push 8
call fcn.004e204b
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 0x4b5c54
lea eax, [ebp - 0x2f8]
mov edx, ebx
push eax
lea eax, [ebp - 0x300]
push eax
push ecx
mov ecx, esi
call fcn.00474d50
add esp, 0xc
test eax, eax
je 0x4b5b1d
push 0x53dda4
push ebx
call fcn.004fa70d
add esp, 8
test eax, eax
jne 0x4b5a91
push ebx
lea ecx, [ebp - 0xc8]
call fcn.00403170
push 0x53ca00
push eax
lea eax, [ebp - 0xb0]
mov byte [ebp - 4], 1
push eax
call fcn.004151f0
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.00474d50
add esp, 0xc
test eax, eax
jne 0x4b5a82
lea eax, [ebp - 0x2f8]
mov edx, esi
push eax
lea ecx, [ebp - 0x310]
call fcn.00474f50
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 0x4b5a77
lea eax, [ebp - 0x310]
mov edx, esi
push eax
mov ecx, edi
call fcn.004b5120
add esp, 4
mov dword [ebp - 0x2fc], eax
test eax, eax
je 0x4b5a77
lea ecx, [ebp - 0x310]
call fcn.00475060
lea ecx, [ebp - 0xb0]
call fcn.00402450
mov ebx, dword [ebp - 0x2fc]
jmp 0x4b5b9e
lea ecx, [ebp - 0x310]
call fcn.00475060
lea ecx, [ebp - 0xb0]
mov byte [ebp - 4], 0
call fcn.00402450
cmp byte [0x56e90c], 0
jne 0x4b5aa1
mov ecx, esi
call fcn.00474ef0
test ebx, ebx
je 0x4b5ab1
push ebx
lea ecx, [ebp - 0x98]
call fcn.004525a0
push dword [ebp - 0x94]
mov esi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
call esi
test eax, eax
jne 0x4b5ad6
push ebx
call esi
test eax, eax
je 0x4b5ad6
push ebx
lea ecx, [ebp - 0x98]
call fcn.004527c0
push dword [ebp - 0x94]
call esi
test eax, eax
je 0x4b5bd3
mov edx, ebx
mov ecx, edi
call fcn.004b3860
mov esi, eax
mov dword [ebp - 0x98], vtable.ui::CDuiString.0
mov eax, dword [ebp - 0x94]
lea ecx, [ebp - 0x90]
cmp eax, ecx
je 0x4b5c79
push eax
call fcn.004fe1ff
add esp, 4
jmp 0x4b5c79
mov ebx, dword [ebp - 0xcc]
test ebx, ebx
jne 0x4b5bfe
test byte [ebp - 0xec], 0x10
je 0x4b5bd3
lea eax, [ebp - 0x2f8]
mov edx, esi
push eax
lea ecx, [ebp - 0x310]
call fcn.00474f50
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 0x4b5bc8
lea eax, [ebp - 0x310]
mov edx, esi
push eax
mov ecx, edi
call fcn.004b5120
mov ebx, eax
add esp, 4
mov dword [ebp - 0x2fc], ebx
test ebx, ebx
je 0x4b5bc8
lea ecx, [ebp - 0x310]
call fcn.00475060
mov eax, dword [ebp - 0x94]
lea ecx, [ebp - 0x90]
mov dword [ebp - 0x98], vtable.ui::CDuiString.0
cmp eax, ecx
je 0x4b5bc1
push eax
call fcn.004fe1ff
add esp, 4
mov eax, ebx
jmp 0x4b5c7b
lea ecx, [ebp - 0x310]
call fcn.00475060
mov eax, dword [ebp - 0x94]
lea ecx, [ebp - 0x90]
mov dword [ebp - 0x98], vtable.ui::CDuiString.0
cmp eax, ecx
je 0x4b5bf6
push eax
call fcn.004fe1ff
add esp, 4
mov esi, dword [ebp - 0x2fc]
jmp 0x4b5c79
push ebx
call fcn.004e2524
add esp, 4
mov edi, eax
cmp dword [esi], 1
je 0x4b5c1a
mov dword [0x56e97c], 0x80000
jmp 0x4b5c3b
push ecx
mov ecx, dword [esi + 4]
push ebx
push edi
push dword [ebp - 0x300]
call fcn.00474bc0
mov dword [0x56e97c], eax
test eax, eax
je 0x4b5c97
cmp eax, 0x600
je 0x4b5c97
push edi
call fcn.004e2516
add esp, 4
cmp byte [0x56e90c], 0
jne 0x4b5c54
mov ecx, esi
call fcn.00474ef0
mov eax, dword [ebp - 0x94]
lea ecx, [ebp - 0x90]
mov dword [ebp - 0x98], vtable.ui::CDuiString.0
cmp eax, ecx
je 0x4b5c77
push eax
call fcn.004fe1ff
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.004e1de4
mov esp, ebp
pop ebp
ret
test edi, edi
je 0x4b5c54
mov ecx, dword [ebp - 0x314]
mov edx, edi
push ebx
call fcn.004b5430
push edi
mov dword [ebp - 0x2fc], eax
call fcn.004e2516
add esp, 8
jmp 0x4b5bd3
mov dword [0x56e97c], 0x200
push 0x340
push esi
call fcn.004e22e6
add esp, 8
jmp 0x4b5c54