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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41c5d1
mov eax, dword fs:[0]
push eax
sub esp, 0x2fc
mov eax, dword [0x428024]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
xor eax, eax
mov dword [ebp - 0x240], 7
push eax
push 0x421bac
lea ecx, [ebp - 0x254]
mov dword [ebp - 0x244], 0
mov word [ebp - 0x254], ax
call fcn.00403fe0
mov dword [ebp - 4], 0
call fcn.00418fd0
test eax, eax
je 0x418298
lea ecx, [ebp - 0x224]
mov dword [ebp - 0x224], 0
push ecx
push eax
call dword [sym.imp.WTSAPI32.dll_WTSQueryUserToken]
test eax, eax
je 0x41827f
lea eax, [ebp - 0x220]
push eax
push 0
push dword [ebp - 0x224]
push 0x1a
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
js 0x418219
cmp word [ebp - 0x220], 0
jne 0x4181ee
xor ecx, ecx
jmp 0x418206
lea ecx, [ebp - 0x220]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4181f7
sub ecx, edx
sar ecx, 1
push ecx
lea eax, [ebp - 0x220]
push eax
lea ecx, [ebp - 0x254]
call fcn.00403fe0
cmp dword [ebp - 0x240], 8
lea ecx, [ebp - 0x254]
cmovae ecx, dword [ebp - 0x254]
test ecx, ecx
je 0x418271
lea eax, [ebp - 0x2ec]
push eax
call fcn.00417210
test eax, eax
js 0x418271
cmp dword [ebp - 0x2ec], 0x101
jbe 0x418271
push str.Directory_path_is_too_long.
push str.stealth_manager
call fcn.0040bc30
add esp, 8
lea ecx, [ebp - 0x254]
push 0
push 0x421bac
call fcn.00403fe0
push dword [ebp - 0x224]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x418298
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Query_user_token_error___d
push str.stealth_manager
call fcn.0040bc30
add esp, 0xc
cmp dword [ebp - 0x244], 0
ja 0x4182f2
push 0
push 0x1c
lea eax, [ebp - 0x220]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
cmp word [ebp - 0x220], 0
jne 0x4182c2
xor ecx, ecx
jmp 0x4182df
lea ecx, [ebp - 0x220]
lea edx, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4182d0
sub ecx, edx
sar ecx, 1
push ecx
lea eax, [ebp - 0x220]
push eax
lea ecx, [ebp - 0x254]
call fcn.00403fe0
xor eax, eax
mov dword [ebp - 0x2a0], 7
push eax
push 0x421bac
lea ecx, [ebp - 0x2b4]
mov dword [ebp - 0x2a4], 0
mov word [ebp - 0x2b4], ax
call fcn.00403fe0
mov byte [ebp - 4], 1
cmp dword [ebp - 0x244], 0
jbe 0x41847b
push 9
xor eax, eax
mov dword [ebp - 0x228], 7
push str.AppData_
lea ecx, [ebp - 0x23c]
mov dword [ebp - 0x22c], 0
mov word [ebp - 0x23c], ax
call fcn.00403fe0
mov byte [ebp - 4], 2
lea eax, [ebp - 0x23c]
cmp dword [ebp - 0x228], 8
mov esi, dword [ebp - 0x22c]
cmovae eax, dword [ebp - 0x23c]
push esi
push ecx
push eax
lea ecx, [ebp - 0x254]
call fcn.00407fd0
cmp eax, 0xffffffff
je 0x418415
add eax, esi
lea ecx, [ebp - 0x254]
push eax
push 0
lea eax, [ebp - 0x2d0]
push eax
call fcn.00407ce0
mov esi, eax
lea eax, [ebp - 0x254]
cmp eax, esi
je 0x4183f9
mov eax, dword [ebp - 0x240]
cmp eax, 8
jb 0x4183d0
inc eax
push eax
push dword [ebp - 0x254]
call fcn.00402ae0
xor eax, eax
mov dword [ebp - 0x240], 7
push esi
lea ecx, [ebp - 0x254]
mov dword [ebp - 0x244], 0
mov word [ebp - 0x254], ax
call fcn.004060b0
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x2bc]
cmp eax, 8
jb 0x418415
inc eax
push eax
push dword [ebp - 0x2d0]
call fcn.00402ae0
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x254]
push eax
lea ecx, [ebp - 0x2b4]
call fcn.004040e0
push 8
push str.Roaming_
lea ecx, [ebp - 0x2b4]
call fcn.00404200
xor ecx, ecx
mov eax, 0x1c
cmp word [str.Opera_SoftwareOpera_Stable_], cx
cmove eax, ecx
lea ecx, [ebp - 0x2b4]
push eax
push str.Opera_SoftwareOpera_Stable_
call fcn.00404200
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x228]
cmp eax, 8
jb 0x41847b
inc eax
push eax
push dword [ebp - 0x23c]
call fcn.00402ae0
cmp dword [ebp - 0x2a4], 0
jbe 0x418991
push ecx
lea edx, [ebp - 0x2b4]
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x2d0]
call fcn.004085b0
add esp, 4
lea edx, [ebp - 0x2d0]
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x23c]
call fcn.00405950
mov byte [ebp - 4], 6
lea eax, [ebp - 0x23c]
cmp dword [ebp - 0x228], 0x10
mov esi, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmovae eax, dword [ebp - 0x23c]
push eax
call esi
cmp eax, 0xffffffff
je 0x4185a2
test al, 0x10
je 0x4185a2
push 0x42192c
lea edx, [ebp - 0x23c]
lea ecx, [ebp - 0x284]
call fcn.00404af0
add esp, 4
push 0x428d00
mov edx, eax
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x29c]
call fcn.00404c00
add esp, 4
mov byte [ebp - 4], 9
mov eax, dword [ebp - 0x270]
cmp eax, 0x10
jb 0x418536
inc eax
push eax
push dword [ebp - 0x284]
call fcn.00402b40
cmp dword [ebp - 0x288], 0x10
lea eax, [ebp - 0x29c]
mov dword [ebp - 0x270], 0xf
cmovae eax, dword [ebp - 0x29c]
push eax
mov dword [ebp - 0x274], 0
mov byte [ebp - 0x284], 0
call esi
cmp eax, 0xffffffff
je 0x41858a
test al, 0x10
je 0x41858a
cmp dword [ebp - 0x288], 0x10
lea ecx, [ebp - 0x29c]
cmovae ecx, dword [ebp - 0x29c]
call fcn.0040ad80
mov eax, dword [ebp - 0x288]
cmp eax, 0x10
jb 0x4185a2
inc eax
push eax
push dword [ebp - 0x29c]
call fcn.00402b40
mov eax, dword [ebp - 0x228]
cmp eax, 0x10
jb 0x4185ba
inc eax
push eax
push dword [ebp - 0x23c]
call fcn.00402b40
mov eax, dword [ebp - 0x2bc]
mov dword [ebp - 0x228], 0xf
mov dword [ebp - 0x22c], 0
mov byte [ebp - 0x23c], 0
cmp eax, 8
jb 0x4185ed
inc eax
push eax
push dword [ebp - 0x2d0]
call fcn.00402ae0
mov dword [ebp - 4], 1
lea edx, [ebp - 0x2b4]
lea ecx, [ebp - 0x284]
mov byte [ebp - 4], 0xc
call fcn.00405950
push str.Preferences
mov edx, eax
mov byte [ebp - 4], 0xd
lea ecx, [ebp - 0x23c]
call fcn.0040b110
add esp, 4
mov byte [ebp - 4], 0xf
mov eax, dword [ebp - 0x270]
cmp eax, 0x10
jb 0x41863e
inc eax
push eax
push dword [ebp - 0x284]
call fcn.00402b40
cmp dword [ebp - 0x228], 0x10
lea ecx, [ebp - 0x2e8]
mov ebx, dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__stat64i32]
lea eax, [ebp - 0x23c]
cmovae eax, dword [ebp - 0x23c]
push ecx
push eax
mov dword [ebp - 0x270], 0xf
mov dword [ebp - 0x274], 0
mov byte [ebp - 0x284], 0
call ebx
add esp, 8
test eax, eax
jne 0x418979
push eax
push 0x421a0c
lea ecx, [ebp - 0x26c]
mov dword [ebp - 0x258], 0xf
mov dword [ebp - 0x25c], eax
mov byte [ebp - 0x26c], al
call fcn.00404420
mov byte [ebp - 4], 0x10
lea esi, [ebp - 0x23c]
mov ax, word [0x421c84]
cmp dword [ebp - 0x228], 0x10
mov word [ebp - 0x224], ax
mov al, byte [0x421c86]
cmovae esi, dword [ebp - 0x23c]
mov byte [ebp - 0x222], al
lea eax, [ebp - 0x2e8]
push eax
push esi
call ebx
add esp, 8
test eax, eax
jne 0x4187c5
lea edx, [ebp - 0x224]
mov ecx, esi
call fcn.0040a800
mov esi, eax
test esi, esi
je 0x4187c5
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x24]
mov ebx, eax
lea eax, [ebx + 1]
push eax
call fcn.004197e8
add esp, 4
mov edi, eax
lea eax, [ebx + 1]
push eax
push 0
push edi
call sub.VCRUNTIME140.dll_memset
mov edx, dword [esi]
add esp, 0xc
mov ecx, esi
push ebx
push 1
push edi
call dword [edx + 0x14]
cmp byte [edi], 0
jne 0x41878c
xor ecx, ecx
jmp 0x41879a
mov ecx, edi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x418791
sub ecx, edx
push ecx
push edi
lea ecx, [ebp - 0x26c]
call fcn.00404420
push edi
call fcn.00419543
mov eax, dword [esi]
add esp, 4
mov ecx, esi
call dword [eax + 0x10]
mov eax, dword [esi]
mov ecx, esi
push 1
call dword [eax]
mov ebx, dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__stat64i32]
cmp dword [ebp - 0x25c], 0
jbe 0x418961
push ecx
lea ecx, [ebp - 0x284]
call fcn.00409850
add esp, 4
push 0x4236f0
mov edx, eax
mov byte [ebp - 4], 0x11
lea ecx, [ebp - 0x29c]
call fcn.0040b110
add esp, 4
mov byte [ebp - 4], 0x13
mov eax, dword [ebp - 0x270]
cmp eax, 0x10
jb 0x418816
inc eax
push eax
push dword [ebp - 0x284]
call fcn.00402b40
push dword [ebp - 0x28c]
cmp dword [ebp - 0x288], 0x10
lea eax, [ebp - 0x29c]
push 0
cmovae eax, dword [ebp - 0x29c]
lea ecx, [ebp - 0x26c]
push eax
mov dword [ebp - 0x270], 0xf
mov dword [ebp - 0x274], 0
mov byte [ebp - 0x284], 0
call fcn.00406120
mov esi, eax
test esi, esi
jle 0x418949
push esi
push str._was_installed_by_oem_
lea ecx, [ebp - 0x26c]
call fcn.00410160
test eax, eax
jle 0x418949
push eax
push 0x42370c
lea ecx, [ebp - 0x26c]
call fcn.00410160
test eax, eax
jle 0x418949
add eax, 2
cmp eax, esi
jle 0x418949
sub eax, esi
lea ecx, [ebp - 0x26c]
push eax
push esi
call fcn.004047e0
lea ecx, [ebp - 0x26c]
cmp ecx, eax
je 0x4188c3
push 0xffffffffffffffff
push 0
push eax
call fcn.00404520
mov ax, word [0x421c84]
lea esi, [ebp - 0x23c]
cmp dword [ebp - 0x228], 0x10
mov word [ebp - 0x224], ax
mov al, byte [0x421c86]
cmovae esi, dword [ebp - 0x23c]
mov byte [ebp - 0x222], al
lea eax, [ebp - 0x2e8]
push eax
push esi
mov byte [ebp - 0x224], 0x77
call ebx
add esp, 8
lea edx, [ebp - 0x224]
mov ecx, esi
call fcn.0040a800
mov esi, eax
test esi, esi
je 0x418949
push dword [ebp - 0x25c]
cmp dword [ebp - 0x258], 0x10
lea ecx, [ebp - 0x26c]
mov eax, dword [esi]
cmovae ecx, dword [ebp - 0x26c]
push 1
push ecx
mov ecx, esi
call dword [eax + 0x1c]
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x10]
mov eax, dword [esi]
mov ecx, esi
push 1
call dword [eax]
mov eax, dword [ebp - 0x288]
cmp eax, 0x10
jb 0x418961
inc eax
push eax
push dword [ebp - 0x29c]
call fcn.00402b40
mov eax, dword [ebp - 0x258]
cmp eax, 0x10
jb 0x418979
inc eax
push eax
push dword [ebp - 0x26c]
call fcn.00402b40
mov eax, dword [ebp - 0x228]
cmp eax, 0x10
jb 0x418991
inc eax
push eax
push dword [ebp - 0x23c]
call fcn.00402b40
mov eax, dword [ebp - 0x2a0]
cmp eax, 8
jb 0x4189a9
inc eax
push eax
push dword [ebp - 0x2b4]
call fcn.00402ae0
xor eax, eax
mov dword [ebp - 0x2a0], 7
mov word [ebp - 0x2b4], ax
mov eax, dword [ebp - 0x240]
mov dword [ebp - 0x2a4], 0
cmp eax, 8
jb 0x4189de
inc eax
push eax
push dword [ebp - 0x254]
call fcn.00402ae0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00419532
mov esp, ebp
pop ebp
ret