Function at 0x4956d0
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5108a5
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
push ebx
push esi
push edi
mov eax, dword [0x550144]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [ebp - 0x14], ebx
xor eax, eax
mov dword [ebp - 0x18], eax
call fcn.00450310
mov ecx, eax
test ecx, ecx
je 0x495b1a
mov eax, dword [ecx]
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x10], esi
mov dword [ebp - 4], 0
or ecx, 0xffffffff
mov eax, dword [ebx + 0x24]
mov edi, dword [eax]
cmp edi, eax
je 0x495ae0
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ecx, dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov edx, dword [ebp - 0x14]
movzx eax, word [edi + 0xa]
cmp eax, dword [ebp + 8]
jne 0x495ad0
cmp dword [edi + 0xc], 0
je 0x4957e3
mov eax, dword [0x550c0c]
cmp eax, 0xffffffff
jne 0x495795
push 0x53661c
push str.kernel32
call ecx
push eax
call ebx
mov esi, eax
test esi, esi
je 0x4957cc
push 0x550c0c
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call esi
test eax, eax
je 0x4957cc
mov eax, dword [0x550c0c]
mov ecx, dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x4957e3
cmp dword [0x5545f0], 0
jne 0x4957d8
push str.Kernel32.dll
call ecx
test eax, eax
je 0x4957ba
push str.Wow64EnableWow64FsRedirection
push eax
call ebx
mov dword [0x5545f0], eax
cmp dword [0x5545f0], 0
jne 0x4957d8
mov dword [ebp - 0x18], 1
jmp 0x4957e3
mov dword [0x550c0c], 0
jmp 0x4957e3
push 0
call dword [0x5545f0]
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x10]
push eax
mov eax, dword [edi + 0x10]
lea ebx, [edi + 0x10]
push ecx
sub eax, 0x10
mov esi, esp
push eax
mov dword [ebp - 0x1c], esi
call fcn.0048d310
add eax, 0x10
add esp, 4
mov dword [esi], eax
mov esi, dword [ebp - 0x14]
mov ecx, esi
call fcn.004965d0
test eax, eax
jne 0x4958cf
mov eax, dword [esi]
lea ecx, [ebp - 0x24]
push ecx
mov ecx, esi
call dword [eax]
push ebx
push eax
lea eax, [ebp - 0x20]
mov byte [ebp - 4], 1
push eax
call fcn.00497170
add esp, 0xc
mov byte [ebp - 4], 2
mov ecx, dword [eax]
mov esi, dword [ebp - 0x10]
lea edx, [ecx - 0x10]
lea ebx, [esi - 0x10]
cmp edx, ebx
je 0x49588e
cmp dword [ebx + 0xc], 0
lea esi, [ebx + 0xc]
jl 0x49587f
mov eax, dword [edx]
cmp eax, dword [ebx]
jne 0x49587f
push edx
call fcn.0048d310
add esp, 4
mov dword [ebp - 0x1c], eax
or ecx, 0xffffffff
lock xadd dword [esi], ecx
dec ecx
test ecx, ecx
jg 0x495877
mov ecx, dword [ebx]
push ebx
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x1c]
lea esi, [eax + 0x10]
mov dword [ebp - 0x10], esi
jmp 0x49588e
push dword [ecx - 0xc]
push ecx
lea ecx, [ebp - 0x10]
call fcn.0044f580
mov esi, dword [ebp - 0x10]
mov byte [ebp - 4], 1
or ebx, 0xffffffff
mov edx, dword [ebp - 0x20]
mov eax, ebx
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4958af
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0
mov eax, ebx
mov edx, dword [ebp - 0x24]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4958d2
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x4958d2
mov esi, dword [ebp - 0x10]
mov eax, dword [0x550c0c]
cmp eax, 0xffffffff
jne 0x495918
push 0x53661c
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 0x4959a4
push 0x550c0c
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call ebx
test eax, eax
je 0x4959a4
mov eax, dword [0x550c0c]
test eax, eax
je 0x495a37
mov eax, dword [edi + 0x14]
cmp dword [eax - 0xc], 0
jle 0x495a37
push 0x5c
push esi
call fcn.004e0757
add esp, 8
test eax, eax
je 0x4959e3
sub eax, esi
sar eax, 1
cmp eax, 0xffffffff
je 0x4959e3
push eax
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebp - 0x10]
call fcn.0048d250
mov byte [ebp - 4], 3
lea ebx, [esi - 0x10]
mov ecx, dword [eax]
lea edx, [ecx - 0x10]
cmp edx, ebx
je 0x4959c2
cmp dword [ebx + 0xc], 0
lea esi, [ebx + 0xc]
jl 0x4959b3
mov eax, dword [edx]
cmp eax, dword [ebx]
jne 0x4959b3
push edx
call fcn.0048d310
add esp, 4
mov dword [ebp - 0x1c], eax
or ecx, 0xffffffff
lock xadd dword [esi], ecx
dec ecx
test ecx, ecx
jg 0x49599c
mov ecx, dword [ebx]
push ebx
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x1c]
lea esi, [eax + 0x10]
mov dword [ebp - 0x10], esi
jmp 0x4959c2
mov dword [0x550c0c], 0
jmp 0x495a37
push dword [ecx - 0xc]
push ecx
lea ecx, [ebp - 0x10]
call fcn.0044f580
mov esi, dword [ebp - 0x10]
mov byte [ebp - 4], 0
or eax, 0xffffffff
mov edx, dword [ebp - 0x28]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4959ee
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x4959ee
lea ecx, [ebp - 0x10]
call fcn.0044f770
mov esi, dword [ebp - 0x10]
mov eax, dword [esi - 0xc]
test eax, eax
je 0x495a25
lea ecx, [eax - 1]
test ecx, ecx
js 0x495b10
cmp ecx, eax
jg 0x495b10
movzx eax, word [esi + ecx*2]
cmp eax, 0x5c
je 0x495a25
cmp eax, 0x2f
je 0x495a25
push 1
push 0x536960
lea ecx, [ebp - 0x10]
call fcn.0048c830
mov eax, dword [edi + 0x14]
lea ecx, [ebp - 0x10]
push dword [eax - 0xc]
push eax
call fcn.0048c830
mov esi, dword [ebp - 0x10]
movzx eax, word [edi + 8]
push esi
push dword [edi + 0x14]
push eax
push str.HandleFile_mode_d__alias_d__path_s.
push 0x550bb8
call fcn.0048d900
add esp, 0x14
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x495a7b
movzx eax, word [edi + 8]
sub eax, 0
je 0x495a74
sub eax, 1
jne 0x495a7b
mov ecx, esi
call fcn.0048ad50
jmp 0x495a7b
mov ecx, esi
call fcn.0048b140
cmp dword [ebp - 0x18], 0
je 0x495ac1
xor eax, eax
mov dword [ebp - 0x18], eax
cmp dword [0x5545f0], eax
jne 0x495ab9
push str.Kernel32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x495ab0
push str.Wow64EnableWow64FsRedirection
push eax
call ebx
mov dword [0x5545f0], eax
cmp dword [0x5545f0], 0
je 0x495ac7
push 1
call dword [0x5545f0]
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ecx, dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov edx, dword [ebp - 0x14]
mov eax, dword [edi]
mov edi, eax
cmp eax, dword [edx + 0x24]
jne 0x495742
or ecx, 0xffffffff
mov dword [ebp - 4], 0xffffffff
add esi, 0xfffffff0
lock xadd dword [esi + 0xc], ecx
dec ecx
test ecx, ecx
jg 0x495afc
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
push 0x80070057
call fcn.00450260
push 0x80004005
call fcn.00450260
int3