Function at 0x1004f960
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10104e53
mov eax, dword fs:[0]
push eax
sub esp, 0x5c
mov eax, dword [0x1014857c]
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, dword [ebp + 0xc]
xor ecx, ecx
mov eax, dword [ebp + 8]
mov dword [ebp - 0x5c], eax
mov dword [ebp - 0x44], ecx
test edx, edx
je 0x1004fde5
mov ecx, edx
lea ebx, [eax + 4]
mov dword [ebp - 0x4c], ebx
lea esi, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x1004f9b0
sub ecx, esi
sar ecx, 1
push ecx
push edx
mov ecx, ebx
call fcn.10009760
push 0x1010fab8
push 0x10118a64
mov ecx, ebx
call fcn.100219f0
mov ecx, dword [ebx]
mov esi, dword [ecx - 0xc]
cmp esi, 1
jg 0x1004f9f4
lea eax, [ecx - 0x10]
push eax
call fcn.10007860
add esp, 4
add eax, 0x10
jmp 0x1004fa27
mov ecx, dword [ecx - 0x10]
test ecx, ecx
je 0x1004fa04
mov eax, dword [ecx]
call dword [eax + 0x10]
test eax, eax
jne 0x1004fa10
call fcn.100081d0
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0x10]
push eax
mov eax, dword [ebx]
lea ecx, [ebp - 0x50]
push 1
lea eax, [eax + esi*2]
add eax, 0xfffffffe
push eax
call fcn.100066f0
mov eax, dword [ebp - 0x50]
mov edx, 0x1010fab8
mov ecx, eax
nop
mov si, word [ecx]
cmp si, word [edx]
jne 0x1004fa5b
test si, si
je 0x1004fa52
mov si, word [ecx + 2]
cmp si, word [edx + 2]
jne 0x1004fa5b
add ecx, 4
add edx, 4
test si, si
jne 0x1004fa30
mov dword [ebp - 0x44], 0
jmp 0x1004fa63
sbb ecx, ecx
or ecx, 1
mov dword [ebp - 0x44], ecx
or edi, 0xffffffff
lea edx, [eax - 0x10]
mov eax, edi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x1004fa7d
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
cmp dword [ebp - 0x44], 0
mov esi, 0x40
jne 0x1004fb13
mov edx, dword [ebx]
xor esi, esi
mov ecx, dword [edx - 0xc]
lea eax, [ecx - 1]
test eax, eax
cmovns esi, eax
cmp esi, ecx
jl 0x1004fab3
lea eax, [edx - 0x10]
push eax
call fcn.10007860
add esp, 4
lea esi, [eax + 0x10]
mov dword [ebp - 0x44], esi
jmp 0x1004fade
mov ecx, dword [edx - 0x10]
test ecx, ecx
je 0x1004fac3
mov eax, dword [ecx]
call dword [eax + 0x10]
test eax, eax
jne 0x1004facf
call fcn.100081d0
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0x10]
push eax
push esi
push dword [ebx]
lea ecx, [ebp - 0x44]
call fcn.100066f0
mov esi, dword [ebp - 0x44]
lea eax, [ebp - 0x44]
mov dword [ebp - 4], 0
push eax
mov ecx, ebx
call fcn.1000b4d0
lea edx, [esi - 0x10]
mov dword [ebp - 4], 0xffffffff
mov esi, 0xc0
mov eax, edi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x1004fb13
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push ebx
mov dword [ebp - 0x50], esi
call fcn.1005d770
add esp, 4
test eax, eax
jne 0x1004fda2
lea eax, [ebp - 0x40]
push eax
call fcn.1004bc80
mov dword [ebp - 0x60], eax
push 0x1010fab8
lea eax, [ebp - 0x58]
mov dword [ebp - 4], 1
push ebx
or esi, 1
push eax
mov dword [ebp - 0x44], esi
call fcn.10029630
add esp, 0x10
mov edx, eax
mov eax, dword [ebp - 0x60]
mov ebx, dword [ebp - 0x50]
mov ecx, ebx
or ecx, 3
mov dword [ebp - 4], 2
mov dword [ebp - 0x44], ecx
cmp dword [eax + 0x14], 8
jb 0x1004fb71
mov eax, dword [eax]
push eax
push edx
lea eax, [ebp - 0x54]
push eax
call fcn.10029630
add esp, 0xc
push dword [eax]
or ebx, 7
mov dword [ebp - 4], 3
mov dword [ebp - 0x44], ebx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x1004fbff
lea eax, [ebp - 0x28]
push eax
call fcn.1004bb10
mov esi, eax
push 0x1010fab8
push dword [ebp - 0x4c]
lea eax, [ebp - 0x68]
mov dword [ebp - 4], 4
or ebx, 8
push eax
mov dword [ebp - 0x44], ebx
call fcn.10029630
add esp, 0x10
mov ebx, dword [ebp - 0x50]
mov ecx, ebx
or ecx, 0x1f
mov dword [ebp - 4], 5
cmp dword [esi + 0x14], 8
mov dword [ebp - 0x44], ecx
jb 0x1004fbde
mov esi, dword [esi]
push esi
push eax
lea eax, [ebp - 0x64]
push eax
call fcn.10029630
add esp, 0xc
or ebx, 0x3f
push dword [eax]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
mov byte [ebp - 0x45], 0
test eax, eax
je 0x1004fc03
mov byte [ebp - 0x45], 1
test bl, 0x20
je 0x1004fc28
mov edx, dword [ebp - 0x64]
and ebx, 0xffffffdf
mov dword [ebp - 0x44], ebx
add edx, 0xfffffff0
mov eax, edi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x1004fc28
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 4
test bl, 0x10
je 0x1004fc54
mov edx, dword [ebp - 0x68]
and ebx, 0xffffffef
mov dword [ebp - 0x44], ebx
add edx, 0xfffffff0
mov eax, edi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x1004fc54
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
test bl, 8
je 0x1004fc64
lea ecx, [ebp - 0x28]
and ebx, 0xfffffff7
call fcn.10029430
mov edx, dword [ebp - 0x54]
mov esi, ebx
and ebx, 0xfffffffb
mov dword [ebp - 4], 2
mov dword [ebp - 0x44], ebx
add edx, 0xfffffff0
mov eax, edi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x1004fc8d
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x58]
mov eax, esi
and eax, 0xfffffff9
mov dword [ebp - 4], 1
mov dword [ebp - 0x44], eax
add edx, 0xfffffff0
mov eax, edi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x1004fcb6
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
and esi, 0xfffffff8
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x40]
mov dword [ebp - 0x44], esi
call fcn.10029430
cmp byte [ebp - 0x45], 0
mov ebx, dword [ebp - 0x4c]
jne 0x1004fda2
push 0x1010fab8
lea eax, [ebp - 0x54]
push ebx
push eax
call fcn.10029630
add esp, 0xc
mov dword [ebp - 0x58], eax
mov dword [ebp - 4], 6
mov ecx, dword [eax]
mov byte [ebp - 4], 7
mov ecx, dword [ecx - 0x10]
test ecx, ecx
je 0x1004fd0c
mov eax, dword [ecx]
call dword [eax + 0x10]
mov ecx, eax
test ecx, ecx
jne 0x1004fd22
call fcn.100081d0
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0x10]
mov ecx, eax
test ecx, ecx
je 0x1004fe03
mov eax, dword [ecx]
call dword [eax + 0xc]
mov ecx, dword [ebp - 0x58]
add eax, 0x10
mov dword [ebp - 0x4c], eax
or esi, 0x100
mov eax, dword [ebp - 0x5c]
mov dword [ebp - 0x44], esi
mov ecx, dword [ecx]
mov eax, dword [eax + 0x250]
push dword [eax - 0xc]
push eax
push dword [ecx - 0xc]
lea eax, [ebp - 0x4c]
push ecx
push eax
call fcn.100299e0
add esp, 0x14
lea eax, [ebp - 0x4c]
mov ecx, ebx
push eax
call fcn.1000b4d0
mov edx, dword [ebp - 0x4c]
mov eax, edi
mov byte [ebp - 4], 6
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x1004fd81
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x54]
mov eax, edi
mov dword [ebp - 4], 0xffffffff
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x1004fda2
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push 0x10118a68
lea eax, [ebp - 0x5c]
push ebx
push eax
call fcn.10029630
add esp, 0xc
push eax
mov ecx, 0x1014be8c
mov dword [ebp - 4], 8
call fcn.10051510
mov edx, dword [ebp - 0x5c]
mov dword [ebp - 4], 0xffffffff
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], edi
dec edi
test edi, edi
jg 0x1004fde5
mov ecx, dword [edx]
push edx
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 ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.100810f8
mov esp, ebp
pop ebp
ret 8
push 0x80004005
call fcn.100076a0
int3