Function at 0x495670
Capabilities:
Check if file exists
Check os version

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x50d662
mov eax, dword fs:[0]
push eax
sub esp, 0x140
mov eax, dword [0x54b144]
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 dword [ebp - 0x14c], ecx
mov eax, dword [ebp + 0xc]
mov ebx, dword [ebp + 0x10]
mov dword [ebp - 0x148], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x134], ebx
mov dword [ebp - 0x144], eax
mov dword [ebp - 0x140], 0
call fcn.004501e0
mov ecx, eax
test ecx, ecx
je 0x495c50
mov eax, dword [ecx]
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x130], esi
push 0x118
lea eax, [ebp - 0x128]
mov dword [ebp - 4], 0
push 0
push eax
call fcn.004dcc10
add esp, 0xc
mov dword [ebp - 0x12c], 0x11c
lea eax, [ebp - 0x12c]
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
or edi, 0xffffffff
test eax, eax
jne 0x495728
xor ebx, ebx
jmp 0x495c14
mov eax, dword [0x54bbfc]
cmp eax, 0xffffffff
jne 0x495774
push str.IsWow64Process
push str.kernel32
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ebx, eax
test ebx, ebx
je 0x495802
push 0x54bbfc
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call ebx
test eax, eax
je 0x495802
mov eax, dword [0x54bbfc]
mov ebx, dword [ebp - 0x134]
test eax, eax
je 0x49580c
call fcn.00487190
test eax, eax
je 0x495839
push str.X64_ev.sys
lea eax, [ebp - 0x138]
push ebx
push eax
call fcn.0048bbf0
add esp, 0xc
mov byte [ebp - 4], 1
lea ebx, [esi - 0x10]
mov ecx, dword [eax]
or edi, 0xffffffff
lea edx, [ecx - 0x10]
cmp edx, ebx
je 0x495ace
cmp dword [ebx + 0xc], 0
lea esi, [ebx + 0xc]
jl 0x495ab9
mov eax, dword [edx]
cmp eax, dword [ebx]
jne 0x495ab9
push edx
call fcn.0048ce30
add esp, 4
mov dword [ebp - 0x134], eax
mov ecx, edi
lock xadd dword [esi], ecx
dec ecx
test ecx, ecx
jg 0x4957f4
mov ecx, dword [ebx]
push ebx
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x134]
lea esi, [eax + 0x10]
mov dword [ebp - 0x130], esi
jmp 0x495ace
mov dword [0x54bbfc], 0
call fcn.00487190
test eax, eax
je 0x4958d4
push str._ev.sys
push dword [ebp - 0x134]
lea eax, [ebp - 0x134]
push eax
call fcn.0048bbf0
add esp, 0xc
mov byte [ebp - 4], 3
jmp 0x495852
push str.X64.sys
lea eax, [ebp - 0x134]
push ebx
push eax
call fcn.0048bbf0
add esp, 0xc
mov byte [ebp - 4], 2
mov ecx, dword [eax]
lea ebx, [esi - 0x10]
or edi, 0xffffffff
lea edx, [ecx - 0x10]
cmp edx, ebx
je 0x4958c5
cmp dword [ebx + 0xc], 0
lea esi, [ebx + 0xc]
jl 0x4958b0
mov eax, dword [edx]
cmp eax, dword [ebx]
jne 0x4958b0
push edx
call fcn.0048ce30
add esp, 4
mov dword [ebp - 0x138], eax
mov ecx, edi
lock xadd dword [esi], ecx
dec ecx
test ecx, ecx
jg 0x495898
mov ecx, dword [ebx]
push ebx
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x138]
lea esi, [eax + 0x10]
mov byte [ebp - 4], 0
mov edx, dword [ebp - 0x134]
mov dword [ebp - 0x130], esi
jmp 0x495ad8
push dword [ecx - 0xc]
push ecx
lea ecx, [ebp - 0x130]
call fcn.0044f440
mov esi, dword [ebp - 0x130]
mov byte [ebp - 4], 0
mov edx, dword [ebp - 0x134]
jmp 0x495ad8
cmp dword [ebp - 0x128], 5
jne 0x495a4a
push str.XP.sys
push dword [ebp - 0x134]
lea eax, [ebp - 0x13c]
push eax
call fcn.0048bbf0
add esp, 0xc
mov byte [ebp - 4], 4
lea ebx, [esi - 0x10]
mov ecx, dword [eax]
lea edx, [ecx - 0x10]
cmp edx, ebx
je 0x495962
cmp dword [ebx + 0xc], 0
lea esi, [ebx + 0xc]
jl 0x49594d
mov eax, dword [edx]
cmp eax, dword [ebx]
jne 0x49594d
push edx
call fcn.0048ce30
add esp, 4
mov dword [ebp - 0x138], eax
mov ecx, edi
lock xadd dword [esi], ecx
dec ecx
test ecx, ecx
jg 0x495942
mov ecx, dword [ebx]
push ebx
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x138]
lea esi, [eax + 0x10]
mov dword [ebp - 0x130], esi
jmp 0x495962
push dword [ecx - 0xc]
push ecx
lea ecx, [ebp - 0x130]
call fcn.0044f440
mov esi, dword [ebp - 0x130]
mov byte [ebp - 4], 0
mov eax, edi
mov edx, dword [ebp - 0x13c]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x495983
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ebx, dword [ebp - 0x144]
push ebx
push ecx
mov eax, esp
lea ecx, [ebp - 0x130]
push ecx
push dword [ebp - 0x148]
push eax
call fcn.00496cb0
mov ecx, dword [ebp - 0x14c]
add esp, 0xc
call fcn.00496110
push dword [ebx]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4959c4
mov ebx, 1
jmp 0x495c14
mov ecx, ebx
call fcn.0044f630
push str..sys
push dword [ebp - 0x134]
lea eax, [ebp - 0x138]
push eax
call fcn.0048bbf0
add esp, 0xc
mov byte [ebp - 4], 5
lea ebx, [esi - 0x10]
mov ecx, dword [eax]
lea edx, [ecx - 0x10]
cmp edx, ebx
je 0x495ace
cmp dword [ebx + 0xc], 0
lea esi, [ebx + 0xc]
jl 0x495ab9
mov eax, dword [edx]
cmp eax, dword [ebx]
jne 0x495ab9
push edx
call fcn.0048ce30
add esp, 4
mov dword [ebp - 0x13c], eax
mov ecx, edi
lock xadd dword [esi], ecx
dec ecx
test ecx, ecx
jg 0x495aae
mov ecx, dword [ebx]
push ebx
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x13c]
lea esi, [eax + 0x10]
mov dword [ebp - 0x130], esi
jmp 0x495ace
push str..sys
push dword [ebp - 0x134]
lea eax, [ebp - 0x138]
push eax
call fcn.0048bbf0
add esp, 0xc
mov byte [ebp - 4], 6
lea ebx, [esi - 0x10]
mov ecx, dword [eax]
or edi, 0xffffffff
lea edx, [ecx - 0x10]
cmp edx, ebx
je 0x495ace
cmp dword [ebx + 0xc], 0
lea esi, [ebx + 0xc]
jl 0x495ab9
mov eax, dword [edx]
cmp eax, dword [ebx]
jne 0x495ab9
push edx
call fcn.0048ce30
add esp, 4
mov dword [ebp - 0x13c], eax
mov ecx, edi
lock xadd dword [esi], ecx
dec ecx
test ecx, ecx
jg 0x495aae
mov ecx, dword [ebx]
push ebx
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x13c]
lea esi, [eax + 0x10]
mov dword [ebp - 0x130], esi
jmp 0x495ace
push dword [ecx - 0xc]
push ecx
lea ecx, [ebp - 0x130]
call fcn.0044f440
mov esi, dword [ebp - 0x130]
mov byte [ebp - 4], 0
mov edx, dword [ebp - 0x138]
add edx, 0xfffffff0
mov eax, edi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x495aef
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
cmp dword [ebp + 8], 0
je 0x495b91
mov eax, dword [0x54bbfc]
cmp eax, 0xffffffff
jne 0x495b37
push str.IsWow64Process
push str.kernel32
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ebx, eax
test ebx, ebx
je 0x495b66
push 0x54bbfc
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call ebx
test eax, eax
je 0x495b66
mov eax, dword [0x54bbfc]
test eax, eax
je 0x495b91
mov eax, dword [0x54f5ec]
test eax, eax
jne 0x495b87
push str.Kernel32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x495b72
push str.Wow64EnableWow64FsRedirection
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x54f5ec], eax
jmp 0x495b77
mov dword [0x54bbfc], 0
jmp 0x495b91
mov eax, dword [0x54f5ec]
test eax, eax
jne 0x495b87
mov dword [ebp - 0x140], 1
jmp 0x495b91
push 0
call eax
mov dword [ebp - 0x140], eax
mov ebx, dword [ebp - 0x144]
lea eax, [ebp - 0x130]
push ebx
push ecx
mov ecx, esp
push eax
push dword [ebp - 0x148]
push ecx
call fcn.00496cb0
mov ecx, dword [ebp - 0x14c]
add esp, 0xc
call fcn.00496110
push dword [ebx]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
mov ecx, 1
mov ebx, 0
cmovne ebx, ecx
cmp dword [ebp - 0x140], 0
je 0x495c14
mov eax, dword [0x54f5ec]
test eax, eax
jne 0x495c10
push str.Kernel32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x495c07
push str.Wow64EnableWow64FsRedirection
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x54f5ec], eax
jmp 0x495c0c
mov eax, dword [0x54f5ec]
test eax, eax
je 0x495c14
push 1
call eax
mov dword [ebp - 4], 0xffffffff
add esi, 0xfffffff0
lock xadd dword [esi + 0xc], edi
dec edi
test edi, edi
jg 0x495c30
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, ebx
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.004dafe6
mov esp, ebp
pop ebp
ret 0x10
push 0x80004005
call fcn.00450130
int3