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

Disassembly:
push 0xffffffffffffffff
push 0x47a05a
mov eax, dword fs:[0]
push eax
sub esp, 0x224
mov eax, dword [0x486534]
xor eax, esp
mov dword [esp + 0x220], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x486534]
xor eax, esp
push eax
lea eax, [esp + 0x238]
mov dword fs:[0], eax
mov esi, ecx
call fcn.00424210
lea eax, [esp + 0x1c]
push eax
mov ecx, esi
call fcn.004021e0
xor esi, esi
mov dword [esp + 0x240], esi
mov ecx, dword [esp + 0x1c]
mov eax, dword [ecx - 0xc]
cmp eax, esi
je 0x4747ab
mov edx, dword [0x487a0c]
mov eax, dword [edx + 0xc]
mov ecx, 0x487a0c
call eax
add eax, 0x10
mov dword [esp + 0x18], eax
mov byte [esp + 0x240], 1
mov edx, dword [0x487a0c]
mov eax, dword [edx + 0xc]
mov ecx, 0x487a0c
call eax
lea ebp, [eax + 0x10]
mov dword [esp + 0x14], ebp
mov bl, 2
mov byte [esp + 0x240], bl
cmp dword [ebp - 0xc], esi
jne 0x4743d7
mov eax, dword [esp + 0x1c]
cmp dword [eax - 0xc], esi
jl 0x4743d7
push 0x47f080
push eax
call fcn.00404ed9
add esp, 8
cmp eax, esi
je 0x4743d7
sub eax, dword [esp + 0x1c]
sar eax, 1
cmp eax, 1
jne 0x4743d7
lea eax, [esp + 0x1c]
lea edi, [esp + 0x14]
call fcn.004026c0
mov ebp, dword [esp + 0x14]
push ebp
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x4743d7
mov esi, edi
call fcn.00402500
mov ebp, dword [esp + 0x14]
mov eax, dword [ebp - 0xc]
test eax, eax
jne 0x4744ec
push 0x20a
push eax
lea ecx, [esp + 0x32]
push ecx
mov word [esp + 0x34], ax
call fcn.004087b0
add esp, 0xc
push 0x104
lea edx, [esp + 0x2c]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea edx, [esp + 0x28]
lea edi, [esp + 0x18]
call fcn.004022b0
mov esi, dword [esp + 0x18]
push 0x5c
push esi
call fcn.00404ea9
add esp, 8
test eax, eax
je 0x474477
sub eax, esi
sar eax, 1
cmp eax, 0xffffffff
je 0x474477
add eax, 1
lea ecx, [esp + 0x20]
mov edx, edi
call fcn.004022f0
mov byte [esp + 0x240], 3
call fcn.004026c0
mov byte [esp + 0x240], bl
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x474477
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x18]
cmp dword [ecx - 0xc], 0
je 0x4744ec
lea edx, [esp + 0x1c]
push edx
lea eax, [esp + 0x24]
push eax
lea ebx, [esp + 0x20]
call fcn.00402360
add esp, 8
lea edi, [esp + 0x14]
mov byte [esp + 0x240], 4
call fcn.004026c0
mov byte [esp + 0x240], 2
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4744d0
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ebp, dword [esp + 0x14]
push ebp
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x4744ec
lea esi, [esp + 0x14]
call fcn.00402500
mov ebp, dword [esp + 0x14]
mov eax, dword [ebp - 0xc]
test eax, eax
jne 0x47460c
lea esi, [esp + 0x18]
call fcn.00402500
push 0x208
lea ecx, [esp + 0x2e]
push 0
push ecx
mov word [esp + 0x34], 0
call fcn.004087b0
add esp, 0xc
push 0x104
lea edx, [esp + 0x2c]
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
lea eax, [esp + 0x28]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x474532
sub eax, edx
sar eax, 1
lea ecx, [esp + 0x28]
mov ebx, eax
push ecx
lea eax, [esp + 0x1c]
call fcn.004028d0
mov edx, dword [esp + 0x18]
cmp dword [edx - 0xc], 0
je 0x47460c
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x28]
push ecx
mov ebx, 0x47f084
call fcn.00402420
lea edx, [esp + 0x24]
push edx
lea ecx, [esp + 0x2c]
push ecx
mov ebx, eax
mov byte [esp + 0x250], 5
call fcn.00402360
add esp, 0x10
lea edi, [esp + 0x14]
mov byte [esp + 0x240], 6
call fcn.004026c0
mov byte [esp + 0x240], 5
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4745c8
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x240], 2
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4745f0
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ebp, dword [esp + 0x14]
push ebp
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x47460c
lea esi, [esp + 0x14]
call fcn.00402500
mov ebp, dword [esp + 0x14]
cmp dword [ebp - 0xc], 0
jne 0x474739
lea esi, [esp + 0x18]
call fcn.00402500
push 0x208
lea ecx, [esp + 0x2e]
push 0
push ecx
mov word [esp + 0x34], 0
call fcn.004087b0
add esp, 0xc
push 0x104
lea edx, [esp + 0x2c]
push edx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
lea eax, [esp + 0x28]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x474651
sub eax, edx
sar eax, 1
lea ecx, [esp + 0x28]
mov ebx, eax
push ecx
lea eax, [esp + 0x1c]
call fcn.004028d0
cmp dword [ebp - 0xc], 0
je 0x474739
mov edx, dword [esp + 0x18]
cmp dword [edx - 0xc], 0
je 0x474735
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x24]
push ecx
mov ebx, 0x47f088
call fcn.00402420
lea edx, [esp + 0x24]
push edx
lea ecx, [esp + 0x30]
push ecx
mov ebx, eax
mov byte [esp + 0x250], 7
call fcn.00402360
add esp, 0x10
lea edi, [esp + 0x14]
mov byte [esp + 0x240], 8
call fcn.004026c0
mov byte [esp + 0x240], 7
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4746f1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x240], 2
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x474719
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ebp, dword [esp + 0x14]
push ebp
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x474735
lea esi, [esp + 0x14]
call fcn.00402500
mov ebp, dword [esp + 0x14]
cmp dword [ebp - 0xc], 0
mov edi, dword [sym.imp.KERNEL32.dll_LoadLibraryW]
je 0x474755
push ebp
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x474755
push ebp
call edi
mov esi, eax
test esi, esi
jne 0x47475e
mov ecx, dword [esp + 0x1c]
push ecx
call edi
mov esi, eax
add ebp, 0xfffffff0
mov byte [esp + 0x240], 1
lea edx, [ebp + 0xc]
or eax, 0xffffffff
lock xadd dword [edx], eax
dec eax
test eax, eax
jg 0x474783
mov ecx, dword [ebp]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push ebp
call eax
mov byte [esp + 0x240], 0
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4747ab
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x240], 0xffffffff
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4747d6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, esi
mov ecx, dword [esp + 0x238]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x220]
xor ecx, esp
call fcn.0040473f
add esp, 0x230
ret