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

Disassembly:
push 0xffffffffffffffff
push 0x45a37a
mov eax, dword fs:[0]
push eax
sub esp, 0x22c
mov eax, dword [0x474534]
xor eax, esp
mov dword [esp + 0x228], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x474534]
xor eax, esp
push eax
lea eax, [esp + 0x240]
mov dword fs:[0], eax
mov esi, ecx
call fcn.00420920
lea eax, [esp + 0x20]
push eax
mov ecx, esi
call fcn.004021e0
xor esi, esi
mov dword [esp + 0x248], esi
mov ecx, dword [esp + 0x20]
mov eax, dword [ecx - 0xc]
cmp eax, esi
je 0x454aab
mov edx, dword [0x475a0c]
mov eax, dword [edx + 0xc]
mov ecx, 0x475a0c
call eax
add eax, 0x10
mov dword [esp + 0x1c], eax
mov byte [esp + 0x248], 1
mov edx, dword [0x475a0c]
mov eax, dword [edx + 0xc]
mov ecx, 0x475a0c
call eax
lea ebp, [eax + 0x10]
mov dword [esp + 0x18], ebp
mov bl, 2
mov byte [esp + 0x248], bl
cmp dword [ebp - 0xc], esi
jne 0x4546d7
mov eax, dword [esp + 0x20]
cmp dword [eax - 0xc], esi
jl 0x4546d7
push 0x46e4f0
push eax
call fcn.00404ea5
add esp, 8
cmp eax, esi
je 0x4546d7
sub eax, dword [esp + 0x20]
sar eax, 1
cmp eax, 1
jne 0x4546d7
lea eax, [esp + 0x20]
lea edi, [esp + 0x18]
call fcn.004026c0
mov ebp, dword [esp + 0x18]
push ebp
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x4546d7
mov esi, edi
call fcn.00402500
mov ebp, dword [esp + 0x18]
mov eax, dword [ebp - 0xc]
test eax, eax
jne 0x4547ec
push 0x20a
push eax
lea ecx, [esp + 0x36]
push ecx
mov word [esp + 0x38], ax
call fcn.00408780
add esp, 0xc
push 0x104
lea edx, [esp + 0x30]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea edx, [esp + 0x2c]
lea edi, [esp + 0x1c]
call fcn.004022b0
mov esi, dword [esp + 0x1c]
push 0x5c
push esi
call fcn.00404e75
add esp, 8
test eax, eax
je 0x454777
sub eax, esi
sar eax, 1
cmp eax, 0xffffffff
je 0x454777
add eax, 1
lea ecx, [esp + 0x24]
mov edx, edi
call fcn.004022f0
mov byte [esp + 0x248], 3
call fcn.004026c0
mov byte [esp + 0x248], bl
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 0x454777
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x1c]
cmp dword [ecx - 0xc], 0
je 0x4547ec
lea edx, [esp + 0x20]
push edx
lea eax, [esp + 0x28]
push eax
lea ebx, [esp + 0x24]
call fcn.00402360
add esp, 8
lea edi, [esp + 0x18]
mov byte [esp + 0x248], 4
call fcn.004026c0
mov byte [esp + 0x248], 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 0x4547d0
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ebp, dword [esp + 0x18]
push ebp
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x4547ec
lea esi, [esp + 0x18]
call fcn.00402500
mov ebp, dword [esp + 0x18]
mov eax, dword [ebp - 0xc]
test eax, eax
jne 0x45490c
lea esi, [esp + 0x1c]
call fcn.00402500
push 0x208
lea ecx, [esp + 0x32]
push 0
push ecx
mov word [esp + 0x38], 0
call fcn.00408780
add esp, 0xc
push 0x104
lea edx, [esp + 0x30]
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
lea eax, [esp + 0x2c]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x454832
sub eax, edx
sar eax, 1
lea ecx, [esp + 0x2c]
mov ebx, eax
push ecx
lea eax, [esp + 0x20]
call fcn.004028d0
mov edx, dword [esp + 0x1c]
cmp dword [edx - 0xc], 0
je 0x45490c
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x2c]
push ecx
mov ebx, 0x46e4f4
call fcn.00402420
lea edx, [esp + 0x28]
push edx
lea ecx, [esp + 0x30]
push ecx
mov ebx, eax
mov byte [esp + 0x258], 5
call fcn.00402360
add esp, 0x10
lea edi, [esp + 0x18]
mov byte [esp + 0x248], 6
call fcn.004026c0
mov byte [esp + 0x248], 5
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 0x4548c8
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x248], 2
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4548f0
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ebp, dword [esp + 0x18]
push ebp
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x45490c
lea esi, [esp + 0x18]
call fcn.00402500
mov ebp, dword [esp + 0x18]
cmp dword [ebp - 0xc], 0
jne 0x454a39
lea esi, [esp + 0x1c]
call fcn.00402500
push 0x208
lea ecx, [esp + 0x32]
push 0
push ecx
mov word [esp + 0x38], 0
call fcn.00408780
add esp, 0xc
push 0x104
lea edx, [esp + 0x30]
push edx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
lea eax, [esp + 0x2c]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x454951
sub eax, edx
sar eax, 1
lea ecx, [esp + 0x2c]
mov ebx, eax
push ecx
lea eax, [esp + 0x20]
call fcn.004028d0
cmp dword [ebp - 0xc], 0
je 0x454a39
mov edx, dword [esp + 0x1c]
cmp dword [edx - 0xc], 0
je 0x454a35
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x28]
push ecx
mov ebx, 0x46e4f8
call fcn.00402420
lea edx, [esp + 0x28]
push edx
lea ecx, [esp + 0x34]
push ecx
mov ebx, eax
mov byte [esp + 0x258], 7
call fcn.00402360
add esp, 0x10
lea edi, [esp + 0x18]
mov byte [esp + 0x248], 8
call fcn.004026c0
mov byte [esp + 0x248], 7
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4549f1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x248], 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 0x454a19
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ebp, dword [esp + 0x18]
push ebp
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x454a35
lea esi, [esp + 0x18]
call fcn.00402500
mov ebp, dword [esp + 0x18]
cmp dword [ebp - 0xc], 0
mov edi, dword [sym.imp.KERNEL32.dll_LoadLibraryW]
je 0x454a55
push ebp
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x454a55
push ebp
call edi
mov esi, eax
test esi, esi
jne 0x454a5e
mov ecx, dword [esp + 0x20]
push ecx
call edi
mov esi, eax
add ebp, 0xfffffff0
mov byte [esp + 0x248], 1
lea edx, [ebp + 0xc]
or eax, 0xffffffff
lock xadd dword [edx], eax
dec eax
test eax, eax
jg 0x454a83
mov ecx, dword [ebp]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push ebp
call eax
mov byte [esp + 0x248], 0
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 0x454aab
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x248], 0xffffffff
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 0x454ad6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, esi
mov ecx, dword [esp + 0x240]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x228]
xor ecx, esp
call fcn.0040470b
add esp, 0x238
ret