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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5093e7
mov eax, dword fs:[0]
push eax
sub esp, 0x30c
mov eax, dword [0x541074]
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 dword [ebp - 0x300], ecx
xor eax, eax
mov dword [ebp - 0x2fc], 0
mov word [ebp - 0x90], ax
lea ecx, [ebp - 0x90]
mov eax, dword [0x542094]
mov edi, 0x51b9cc
test eax, eax
mov dword [ebp - 0x98], vtable.ui::CDuiString.0
mov dword [ebp - 0x94], ecx
cmovne edi, eax
mov esi, edi
lea edx, [esi + 2]
nop dword [eax]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x4a7740
sub esi, edx
sar esi, 1
cmp esi, 0x3f
jl 0x4a7778
lea eax, [esi*2 + 2]
mov dword [ebp - 0x94], 0
push eax
push 0
call fcn.004e7fed
mov ecx, eax
add esp, 8
mov dword [ebp - 0x94], ecx
push esi
push edi
push ecx
call fcn.004e9f3c
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 [0x54211c]
cmp word [eax], cx
jne 0x4a77d7
mov ecx, dword [ebp - 0x300]
mov edx, ebx
call fcn.004a4d30
mov ecx, dword [ebp - 0x94]
mov esi, eax
lea eax, [ebp - 0x90]
mov dword [ebp - 0x98], vtable.ui::CDuiString.0
cmp ecx, eax
je 0x4a7c6a
push ecx
call fcn.004e7744
add esp, 4
jmp 0x4a7c6a
push eax
lea ecx, [ebp - 0x98]
call fcn.00434530
cmp byte [0x5480b6], 0
je 0x4a77f7
mov esi, dword [0x548130]
jmp 0x4a790d
mov ebx, dword [ebp - 0x94]
push 0x340
call fcn.004c8893
mov esi, eax
add esp, 4
mov dword [ebp - 0x308], 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
mov ax, word [edi + 2]
lea edi, [edi + 2]
test ax, ax
jne 0x4a7840
mov eax, dword [0x51bb3c]
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocString
push ebx
mov dword [edi], eax
mov dword [ebp - 0x304], 0
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x304], eax
cmp eax, 0xffffffff
je 0x4a7ce4
push eax
call dword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 1
push 0x1c
sete bl
call fcn.004c8893
mov edi, eax
add esp, 4
mov byte [edi], 1
mov byte [edi + 1], bl
mov ecx, dword [ebp - 0x304]
mov dword [edi + 4], ecx
mov byte [edi + 8], 0
mov dword [edi + 0xc], 0
test bl, bl
je 0x4a78d1
push 1
push 0
push 0
push dword [ebp - 0x304]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [edi + 0xc], eax
mov ecx, edi
call fcn.0044f560
mov dword [esi], eax
mov eax, dword [0x5481a4]
mov dword [0x5481a0], eax
test eax, eax
jne 0x4a7cee
push 8
call fcn.004c8893
mov ebx, dword [ebp - 0x318]
mov esi, eax
mov eax, dword [ebp - 0x308]
add esp, 4
mov dword [esi], 1
mov dword [esi + 4], eax
test esi, esi
je 0x4a7c45
lea eax, [ebp - 0x2f8]
mov edx, ebx
push eax
lea eax, [ebp - 0x304]
push eax
push ecx
mov ecx, esi
call fcn.00450f10
add esp, 0xc
test eax, eax
je 0x4a7afc
push 0x51bb48
push ebx
call fcn.004e1212
add esp, 8
test eax, eax
jne 0x4a7a6a
push ebx
lea ecx, [ebp - 0xc8]
call fcn.00402d60
push 0x51bb3c
mov edx, eax
mov byte [ebp - 4], 1
lea ecx, [ebp - 0xb0]
call fcn.00404e40
add esp, 4
lea ecx, [ebp - 0xc8]
mov byte [ebp - 4], 3
call fcn.00402ca0
cmp dword [ebp - 0x9c], 8
lea eax, [ebp - 0x2f8]
push eax
lea eax, [ebp - 0x304]
push eax
lea edx, [ebp - 0xb0]
cmovae edx, dword [ebp - 0xb0]
push ecx
mov ecx, esi
call fcn.00450f10
add esp, 0xc
test eax, eax
jne 0x4a7a53
lea eax, [ebp - 0x2f8]
mov edx, esi
push eax
lea ecx, [ebp - 0x314]
call fcn.00451110
add esp, 4
mov edi, dword [ebp - 0x300]
mov eax, 0xea0ea0eb
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0x310]
sub ecx, dword [ebp - 0x314]
imul ecx
add edx, ecx
sar edx, 9
mov eax, edx
shr eax, 0x1f
add eax, edx
je 0x4a7a37
lea eax, [ebp - 0x314]
mov edx, esi
push eax
mov ecx, edi
call fcn.004a65f0
add esp, 4
mov dword [ebp - 0x2fc], eax
test eax, eax
je 0x4a7a37
lea ecx, [ebp - 0x314]
call fcn.00451220
lea ecx, [ebp - 0xb0]
call fcn.00402ca0
mov ebx, dword [ebp - 0x2fc]
jmp 0x4a7b87
lea ecx, [ebp - 0x314]
call fcn.00451220
lea ecx, [ebp - 0xb0]
mov byte [ebp - 4], 0
call fcn.00402ca0
jmp 0x4a7a70
mov edi, dword [ebp - 0x300]
lea ecx, [ebp - 0xb0]
mov byte [ebp - 4], 0
call fcn.00402ca0
jmp 0x4a7a70
mov edi, dword [ebp - 0x300]
cmp byte [0x5480b6], 0
jne 0x4a7a80
mov ecx, esi
call fcn.004510b0
test ebx, ebx
je 0x4a7a90
push ebx
lea ecx, [ebp - 0x98]
call fcn.00434530
push dword [ebp - 0x94]
mov esi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
call esi
test eax, eax
jne 0x4a7ab5
push ebx
call esi
test eax, eax
je 0x4a7ab5
push ebx
lea ecx, [ebp - 0x98]
call fcn.00434750
push dword [ebp - 0x94]
call esi
test eax, eax
je 0x4a7bbc
mov edx, ebx
mov ecx, edi
call fcn.004a4d30
mov esi, eax
mov dword [ebp - 0x98], vtable.ui::CDuiString.0
mov eax, dword [ebp - 0x94]
lea ecx, [ebp - 0x90]
cmp eax, ecx
je 0x4a7c6a
push eax
call fcn.004e7744
add esp, 4
jmp 0x4a7c6a
mov eax, dword [ebp - 0xcc]
mov dword [ebp - 0x308], eax
test eax, eax
jne 0x4a7bea
test byte [ebp - 0xec], 0x10
je 0x4a7bbc
lea eax, [ebp - 0x2f8]
mov edx, esi
push eax
lea ecx, [ebp - 0x314]
call fcn.00451110
add esp, 4
mov byte [ebp - 4], 5
mov eax, 0xea0ea0eb
mov ecx, dword [ebp - 0x310]
sub ecx, dword [ebp - 0x314]
imul ecx
add edx, ecx
sar edx, 9
mov eax, edx
shr eax, 0x1f
add eax, edx
je 0x4a7bb1
mov ecx, dword [ebp - 0x300]
lea eax, [ebp - 0x314]
push eax
mov edx, esi
call fcn.004a65f0
mov ebx, eax
add esp, 4
mov dword [ebp - 0x2fc], ebx
test ebx, ebx
je 0x4a7bb1
lea ecx, [ebp - 0x314]
call fcn.00451220
mov eax, dword [ebp - 0x94]
lea ecx, [ebp - 0x90]
mov dword [ebp - 0x98], vtable.ui::CDuiString.0
cmp eax, ecx
je 0x4a7baa
push eax
call fcn.004e7744
add esp, 4
mov eax, ebx
jmp 0x4a7c6c
lea ecx, [ebp - 0x314]
call fcn.00451220
mov eax, dword [ebp - 0x94]
lea ecx, [ebp - 0x90]
mov dword [ebp - 0x98], vtable.ui::CDuiString.0
cmp eax, ecx
je 0x4a7bdf
push eax
call fcn.004e7744
add esp, 4
mov esi, dword [ebp - 0x2fc]
jmp 0x4a7c6a
push eax
call fcn.004c8b41
add esp, 4
mov edi, eax
cmp dword [esi], 1
je 0x4a7c06
mov dword [0x5481a0], 0x80000
jmp 0x4a7c2c
push ecx
push dword [ebp - 0x308]
mov ecx, dword [esi + 4]
push edi
push dword [ebp - 0x304]
call fcn.00450d80
mov dword [0x5481a0], eax
test eax, eax
je 0x4a7c88
cmp eax, 0x600
je 0x4a7c88
push edi
call fcn.004c8d6c
add esp, 4
cmp byte [0x5480b6], 0
jne 0x4a7c45
mov ecx, esi
call fcn.004510b0
mov eax, dword [ebp - 0x94]
lea ecx, [ebp - 0x90]
mov dword [ebp - 0x98], vtable.ui::CDuiString.0
cmp eax, ecx
je 0x4a7c68
push eax
call fcn.004e7744
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.004c8882
mov esp, ebp
pop ebp
ret
test edi, edi
je 0x4a7c45
push ebx
lea ecx, [ebp - 0xc8]
call fcn.00402d60
push 0
push str..ico
mov ecx, eax
call fcn.00407500
lea ecx, [ebp - 0xc8]
mov esi, eax
call fcn.00402ca0
mov ecx, dword [ebp - 0x300]
cmp esi, 0xffffffff
mov edx, edi
setne al
movzx eax, al
push eax
push dword [ebp - 0x308]
call fcn.004a6900
push edi
mov dword [ebp - 0x2fc], eax
call fcn.004c8d6c
add esp, 0xc
jmp 0x4a7bbc
mov dword [0x5481a0], 0x200
push 0x340
push esi
call fcn.004c8b33
add esp, 8
jmp 0x4a7c45