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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4b45d7
mov eax, dword fs:[0]
push eax
sub esp, 0x294
mov eax, dword [0x4e50cc]
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 edx, ecx
xor eax, eax
mov dword [ebp - 0x254], 7
mov dword [ebp - 0x258], 0
mov word [ebp - 0x268], ax
cmp word [edx], ax
jne 0x415416
xor ecx, ecx
jmp 0x41542f
lea esi, [ecx + 2]
lea esp, [esp]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x415420
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x268]
call fcn.00402ddd
mov dword [ebp - 4], 0
xor edi, edi
mov esi, dword [sym.imp.MSVCR120.dll_void___cdecl_operator_delete_void__]
cmp dword [ebp - 0x258], edi
je 0x415a4f
xor eax, eax
mov dword [ebp - 0x23c], 7
mov dword [ebp - 0x240], edi
mov word [ebp - 0x250], ax
mov dword [ebp - 0x224], 7
mov dword [ebp - 0x228], eax
mov word [ebp - 0x238], ax
push 0xffffffffffffffff
push eax
lea eax, [ebp - 0x268]
mov byte [ebp - 4], 2
push eax
lea ecx, [ebp - 0x238]
call fcn.004030ea
cmp dword [ebp - 0x224], 8
lea eax, [ebp - 0x238]
mov ebx, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
cmovae eax, dword [ebp - 0x238]
push eax
call ebx
test eax, eax
jne 0x4154e0
cmp dword [ebp - 0x224], 8
mov dword [ebp - 0x228], eax
lea eax, [ebp - 0x238]
cmovae eax, dword [ebp - 0x238]
xor ecx, ecx
mov word [eax], cx
cmp dword [ebp - 0x228], 0
jne 0x4159b1
xor eax, eax
push 0x20a
push eax
mov word [ebp - 0x220], ax
lea eax, [ebp - 0x21e]
push eax
call sub.MSVCR120.dll_memset
add esp, 0xc
lea eax, [ebp - 0x220]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
cmp word [ebp - 0x220], 0
jne 0x41552d
xor ecx, ecx
jmp 0x415545
lea ecx, [ebp - 0x220]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x415536
sub ecx, edx
sar ecx, 1
push ecx
lea eax, [ebp - 0x220]
push eax
lea ecx, [ebp - 0x250]
call fcn.00402ddd
push 1
push ecx
lea eax, [ebp - 0x26c]
mov dword [ebp - 0x26c], 0x5c
push eax
lea ecx, [ebp - 0x250]
call fcn.0040db31
cmp eax, 0xffffffff
je 0x4155ef
inc eax
lea ecx, [ebp - 0x250]
push eax
push 0
lea eax, [ebp - 0x284]
push eax
call fcn.00412285
mov edi, eax
lea eax, [ebp - 0x250]
cmp eax, edi
je 0x4155db
cmp dword [ebp - 0x23c], 8
jb 0x4155b2
push dword [ebp - 0x250]
call esi
add esp, 4
xor eax, eax
mov dword [ebp - 0x23c], 7
push edi
lea ecx, [ebp - 0x250]
mov dword [ebp - 0x240], 0
mov word [ebp - 0x250], ax
call fcn.0040309c
cmp dword [ebp - 0x270], 8
jb 0x4155ef
push dword [ebp - 0x284]
call esi
add esp, 4
cmp dword [ebp - 0x240], 0
je 0x41569a
lea eax, [ebp - 0x268]
push eax
lea edx, [ebp - 0x250]
lea ecx, [ebp - 0x284]
call fcn.00408d9e
mov edi, eax
add esp, 4
lea eax, [ebp - 0x238]
cmp eax, edi
je 0x415660
cmp dword [ebp - 0x224], 8
jb 0x415637
push dword [ebp - 0x238]
call esi
add esp, 4
xor eax, eax
mov dword [ebp - 0x224], 7
push edi
lea ecx, [ebp - 0x238]
mov dword [ebp - 0x228], 0
mov word [ebp - 0x238], ax
call fcn.0040309c
cmp dword [ebp - 0x270], 8
jb 0x415674
push dword [ebp - 0x284]
call esi
add esp, 4
cmp dword [ebp - 0x224], 8
lea eax, [ebp - 0x238]
cmovae eax, dword [ebp - 0x238]
push eax
call ebx
test eax, eax
jne 0x41569a
lea ecx, [ebp - 0x238]
call fcn.00415a90
cmp dword [ebp - 0x228], 0
jne 0x4159b1
cmp dword [ebp - 0x23c], 8
lea eax, [ebp - 0x250]
mov dword [ebp - 0x240], 0
cmovae eax, dword [ebp - 0x250]
xor ecx, ecx
push 0x104
mov word [eax], cx
lea eax, [ebp - 0x220]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x415719
cmp word [ebp - 0x220], 0
jne 0x4156ee
xor ecx, ecx
jmp 0x415706
lea ecx, [ebp - 0x220]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4156f7
sub ecx, edx
sar ecx, 1
push ecx
lea eax, [ebp - 0x220]
push eax
lea ecx, [ebp - 0x250]
call fcn.00402ddd
cmp dword [ebp - 0x240], 0
je 0x415823
push 0x4c6108
lea edx, [ebp - 0x250]
lea ecx, [ebp - 0x29c]
call fcn.004125c4
lea ecx, [ebp - 0x268]
mov byte [ebp - 4], 3
push ecx
mov edx, eax
lea ecx, [ebp - 0x284]
call fcn.004126bf
mov edi, eax
add esp, 8
lea eax, [ebp - 0x238]
cmp eax, edi
je 0x4157a0
cmp dword [ebp - 0x224], 8
jb 0x415777
push dword [ebp - 0x238]
call esi
add esp, 4
xor eax, eax
mov dword [ebp - 0x224], 7
push edi
lea ecx, [ebp - 0x238]
mov dword [ebp - 0x228], 0
mov word [ebp - 0x238], ax
call fcn.0040309c
cmp dword [ebp - 0x270], 8
jb 0x4157b4
push dword [ebp - 0x284]
call esi
add esp, 4
xor eax, eax
mov byte [ebp - 4], 2
cmp dword [ebp - 0x288], 8
mov dword [ebp - 0x270], 7
mov dword [ebp - 0x274], 0
mov word [ebp - 0x284], ax
jb 0x4157e9
push dword [ebp - 0x29c]
call esi
add esp, 4
cmp dword [ebp - 0x224], 8
lea eax, [ebp - 0x238]
cmovae eax, dword [ebp - 0x238]
push eax
call ebx
test eax, eax
jne 0x415823
cmp dword [ebp - 0x224], 8
mov dword [ebp - 0x228], eax
lea eax, [ebp - 0x238]
cmovae eax, dword [ebp - 0x238]
xor ecx, ecx
mov word [eax], cx
cmp dword [ebp - 0x228], 0
jne 0x4159b1
cmp dword [ebp - 0x23c], 8
lea eax, [ebp - 0x250]
mov dword [ebp - 0x240], 0
cmovae eax, dword [ebp - 0x250]
xor ecx, ecx
push 0x104
mov word [eax], cx
lea eax, [ebp - 0x220]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
test eax, eax
je 0x4158a2
cmp word [ebp - 0x220], 0
jne 0x415877
xor ecx, ecx
jmp 0x41588f
lea ecx, [ebp - 0x220]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x415880
sub ecx, edx
sar ecx, 1
push ecx
lea eax, [ebp - 0x220]
push eax
lea ecx, [ebp - 0x250]
call fcn.00402ddd
cmp dword [ebp - 0x240], 0
je 0x4159a8
push 0x4c6108
lea edx, [ebp - 0x250]
lea ecx, [ebp - 0x29c]
call fcn.004125c4
lea ecx, [ebp - 0x268]
mov byte [ebp - 4], 4
push ecx
mov edx, eax
lea ecx, [ebp - 0x284]
call fcn.004126bf
mov edi, eax
add esp, 8
lea eax, [ebp - 0x238]
cmp eax, edi
je 0x415929
cmp dword [ebp - 0x224], 8
jb 0x415900
push dword [ebp - 0x238]
call esi
add esp, 4
xor eax, eax
mov dword [ebp - 0x224], 7
push edi
lea ecx, [ebp - 0x238]
mov dword [ebp - 0x228], 0
mov word [ebp - 0x238], ax
call fcn.0040309c
cmp dword [ebp - 0x270], 8
jb 0x41593d
push dword [ebp - 0x284]
call esi
add esp, 4
xor eax, eax
mov dword [ebp - 0x270], 7
cmp dword [ebp - 0x288], 8
mov dword [ebp - 0x274], 0
mov word [ebp - 0x284], ax
jb 0x41596e
push dword [ebp - 0x29c]
call esi
add esp, 4
cmp dword [ebp - 0x224], 8
lea eax, [ebp - 0x238]
cmovae eax, dword [ebp - 0x238]
push eax
call ebx
test eax, eax
jne 0x4159a8
cmp dword [ebp - 0x224], 8
mov dword [ebp - 0x228], eax
lea eax, [ebp - 0x238]
cmovae eax, dword [ebp - 0x238]
xor ecx, ecx
mov word [eax], cx
cmp dword [ebp - 0x228], 0
je 0x4159ed
cmp dword [ebp - 0x224], 8
lea eax, [ebp - 0x238]
cmovae eax, dword [ebp - 0x238]
push eax
call ebx
test eax, eax
je 0x4159ed
cmp dword [ebp - 0x224], 8
lea eax, [ebp - 0x238]
cmovae eax, dword [ebp - 0x238]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov edi, eax
test edi, edi
jne 0x415a0a
cmp dword [ebp - 0x254], 8
lea eax, [ebp - 0x268]
cmovae eax, dword [ebp - 0x268]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov edi, eax
cmp dword [ebp - 0x224], 8
jb 0x415a1e
push dword [ebp - 0x238]
call esi
add esp, 4
xor eax, eax
mov dword [ebp - 0x224], 7
cmp dword [ebp - 0x23c], 8
mov dword [ebp - 0x228], 0
mov word [ebp - 0x238], ax
jb 0x415a4f
push dword [ebp - 0x250]
call esi
add esp, 4
cmp dword [ebp - 0x254], 8
jb 0x415a63
push dword [ebp - 0x268]
call esi
add esp, 4
mov eax, edi
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.004a5ae0
mov esp, ebp
pop ebp
ret