Function at 0x6012f4f0
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x6014aa54
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x198
push ebx
push esi
push edi
mov edi, dword [ebp + 0x10]
mov ecx, edi
call fcn.6010acb0
mov ebx, dword [ebp + 0xc]
push ebx
lea ecx, [esp + 0x18]
call fcn.601045b0
mov eax, dword [esp + 0x14]
push 0x60150230
push eax
mov dword [esp + 0x1b4], 0
call dword [sym.imp.MSVCR71.dll__mbspbrk]
add esp, 8
test eax, eax
je 0x6012f598
mov ecx, dword [esp + 0x14]
sub eax, ecx
mov dword [esp + 0x20], eax
js 0x6012f598
lea eax, [ecx - 0x10]
mov dword [esp + 0x1ac], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x6012f57e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, 0x80070057
mov ecx, dword [esp + 0x1a4]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp + 8]
push esi
lea ecx, [esp + 0x14]
call fcn.601045b0
mov eax, dword [esp + 0x10]
push 0x60150230
push eax
mov byte [esp + 0x1b4], 1
call dword [sym.imp.MSVCR71.dll__mbspbrk]
add esp, 8
test eax, eax
je 0x6012f5d2
sub eax, dword [esp + 0x10]
mov dword [esp + 0x20], eax
jns 0x6012f7d3
mov edx, dword [0x6015b6f8]
mov ecx, 0x6015b6f8
call dword [edx + 0xc]
add eax, 0x10
mov dword [esp + 0x24], eax
push ebx
push esi
lea ecx, [esp + 0x2c]
mov byte [esp + 0x1b4], 2
call fcn.60126fd0
mov esi, dword [esp + 0x24]
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x6012f69d
push esi
mov ecx, edi
call fcn.6010aef0
lea eax, [esi - 0x10]
mov byte [esp + 0x1ac], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x6012f637
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
mov byte [esp + 0x1ac], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x6012f65d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
mov dword [esp + 0x1ac], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x6012f686
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
xor eax, eax
mov ecx, dword [esp + 0x1a4]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x6012f73b
lea eax, [esi - 0x10]
mov byte [esp + 0x1ac], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x6012f6ce
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
mov byte [esp + 0x1ac], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x6012f6f4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
mov dword [esp + 0x1ac], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x6012fe91
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, 1
mov ecx, dword [esp + 0x1a4]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test eax, eax
jle 0x6012f749
and eax, 0xffff
or eax, 0x80070000
mov edi, eax
lea eax, [esi - 0x10]
mov byte [esp + 0x1ac], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x6012f76d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
mov byte [esp + 0x1ac], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x6012f793
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
mov dword [esp + 0x1ac], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x6012f7bc
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, edi
mov ecx, dword [esp + 0x1a4]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [0x6015b6f8]
mov ecx, 0x6015b6f8
mov dword [esp + 0x2c], 0
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [esp + 0x30], esi
lea ecx, [esp + 0x2c]
push ecx
push 0x6014df50
lea edx, [esp + 0x24]
push edx
lea ecx, [esp + 0x1c]
mov byte [esp + 0x1b8], 3
call fcn.60109f20
mov ebx, dword [esp + 0x1c]
mov eax, dword [ebx - 0xc]
test eax, eax
mov byte [esp + 0x1ac], 4
je 0x6012f8d7
mov edi, dword [sym.imp.MSVCR71.dll__mbspbrk]
lea esp, [esp]
push 0x60150230
push ebx
call edi
add esp, 8
test eax, eax
je 0x6012f84b
sub eax, ebx
mov dword [esp + 0x20], eax
jns 0x6012f984
mov eax, dword [esi - 0xc]
test eax, eax
je 0x6012f85b
lea ecx, [esp + 0x30]
call fcn.6012f3a0
push ebx
lea ecx, [esp + 0x34]
call fcn.6012f410
mov esi, dword [esp + 0x30]
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x6012fe49
lea eax, [esp + 0x2c]
push eax
push 0x6014df50
lea ecx, [esp + 0x5c]
push ecx
lea ecx, [esp + 0x1c]
call fcn.60109f20
push eax
lea ecx, [esp + 0x20]
mov byte [esp + 0x1b0], 0xb
call fcn.6010a570
mov eax, dword [esp + 0x54]
add eax, 0xfffffff0
mov byte [esp + 0x1ac], 4
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x6012f8c8
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov ebx, dword [esp + 0x1c]
mov eax, dword [ebx - 0xc]
test eax, eax
jne 0x6012f830
lea eax, [ebx - 0x10]
mov byte [esp + 0x1ac], 3
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x6012f8f9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
lea eax, [esi - 0x10]
mov byte [esp + 0x1ac], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x6012f91b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
mov byte [esp + 0x1ac], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x6012f941
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
mov dword [esp + 0x1ac], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x6012f96a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, 0x80004005
mov ecx, dword [esp + 0x1a4]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
xor eax, eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
add esi, 0xfffffff0
push esi
mov byte [esp + 0x1b0], 5
mov dword [esp + 0x28], esi
call fcn.60109070
add eax, 0x10
add esp, 4
mov dword [esp + 0x28], eax
push 0x6015022c
lea ecx, [esp + 0x2c]
mov byte [esp + 0x1b0], 6
call fcn.6012f410
mov ecx, 0x50
xor eax, eax
lea edi, [esp + 0x5c]
mov dword [esp + 0x58], 0xffffffff
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x28]
push eax
lea ecx, [esp + 0x5c]
mov byte [esp + 0x1b0], 7
call fcn.6012f310
test eax, eax
jne 0x6012fac5
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esp + 0x5c]
shr ecx, 4
test cl, 1
je 0x6012fa95
cmp byte [esp + 0x88], 0x2e
jne 0x6012fa38
mov al, byte [esp + 0x89]
test al, al
je 0x6012fa95
cmp al, 0x2e
jne 0x6012fa38
mov al, byte [esp + 0x8a]
test al, al
je 0x6012fa95
lea edx, [esp + 0x88]
push edx
lea ecx, [esp + 0x1c]
call fcn.601045b0
mov eax, dword [esp + 0x18]
push ebx
push eax
mov byte [esp + 0x1b4], 8
call dword [sym.imp.SHLWAPI.dll_PathMatchSpecA]
test eax, eax
je 0x6012fa6f
mov ecx, dword [esp + 0x18]
push ecx
lea ecx, [esp + 0x38]
call fcn.6010aef0
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
mov byte [esp + 0x1ac], 7
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x6012fa95
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov ecx, dword [esp + 0x58]
lea eax, [esp + 0x5c]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x6012fa04
call edi
cmp eax, 0x12
je 0x6012fac5
push eax
call fcn.6011aed0
add esp, 4
test eax, eax
je 0x6012fa04
mov eax, dword [esp + 0x38]
test eax, eax
jne 0x6012fb31
lea ecx, [esp + 0x58]
call fcn.6012f2d0
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
mov byte [esp + 0x1ac], 5
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x6012fafc
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
lea ecx, [esp + 0x34]
call fcn.6010a7a0
lea ecx, [esp + 0x1c]
call fcn.601042d0
mov byte [esp + 0x1ac], 1
lea eax, [esi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x6012fe7f
mov ecx, dword [esi]
push esi
jmp 0x6012fe7a
xor edi, edi
test eax, eax
mov dword [esp + 0x20], eax
jbe 0x6012fc28
nop
mov eax, dword [esp + 0x24]
push eax
call fcn.60109070
add eax, 0x10
add esp, 4
mov dword [esp + 0x18], eax
lea ecx, [esp + 0x18]
mov byte [esp + 0x1ac], 9
call fcn.6012f3a0
cmp edi, dword [esp + 0x38]
jae 0x6012fc6f
mov ecx, dword [esp + 0x34]
mov eax, dword [ecx + edi*4]
push eax
lea ecx, [esp + 0x1c]
call fcn.6012f410
mov edx, dword [esp + 0x10]
mov esi, dword [esp + 0x2c]
cmp dword [edx - 0xc], esi
jle 0x6012fba5
lea ecx, [esp + 0x18]
call fcn.6012f3a0
mov eax, dword [ebp + 8]
add esi, eax
push esi
lea ecx, [esp + 0x1c]
call fcn.6012f410
xor eax, eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], eax
mov edx, dword [ebp + 0xc]
mov esi, dword [esp + 0x18]
lea ecx, [esp + 0x44]
push ecx
push edx
push esi
mov byte [esp + 0x1b8], 0xa
call fcn.6012f4f0
mov ecx, dword [ebp + 0x10]
mov ebx, eax
add esp, 0xc
lea eax, [esp + 0x44]
push eax
call fcn.6012f4a0
lea ecx, [esp + 0x44]
call fcn.6010a7a0
lea eax, [esi - 0x10]
or edx, 0xffffffff
mov byte [esp + 0x1ac], 7
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test ebx, ebx
jl 0x6012fc79
test edx, edx
jg 0x6012fc13
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x20]
inc edi
cmp edi, eax
jb 0x6012fb40
mov esi, dword [esp + 0x24]
mov ebx, dword [esp + 0x1c]
mov ecx, dword [ebp + 0x10]
mov edx, dword [ecx + 4]
xor eax, eax
test edx, edx
sete al
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x58]
cmp eax, 0xffffffff
je 0x6012fd71
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
test eax, eax
je 0x6012fd6c
mov ecx, 0x50
xor eax, eax
lea edi, [esp + 0x5c]
mov dword [esp + 0x58], 0xffffffff
rep stosd dword es:[edi], eax
jmp 0x6012fd71
push 0x80070057
call fcn.601040a0
test edx, edx
jg 0x6012fc85
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
lea ecx, [esp + 0x58]
call fcn.6012f2d0
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
mov byte [esp + 0x1ac], 5
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x6012fcb4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
lea ecx, [esp + 0x34]
call fcn.6010a7a0
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
mov byte [esp + 0x1ac], 3
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x6012fce3
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x24]
mov byte [esp + 0x1ac], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x6012fd06
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
mov byte [esp + 0x1ac], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x6012fd2c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
mov dword [esp + 0x1ac], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x6012fd55
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, ebx
mov ecx, dword [esp + 0x1a4]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call fcn.601180b0
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
mov byte [esp + 0x1ac], 5
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x6012fd97
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
lea ecx, [esp + 0x34]
call fcn.6010a7a0
lea eax, [ebx - 0x10]
mov byte [esp + 0x1ac], 3
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x6012fdc2
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov byte [esp + 0x1ac], 1
lea eax, [esi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x6012fde1
mov ecx, dword [esi]
mov edx, dword [ecx]
push esi
call dword [edx + 4]
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
mov byte [esp + 0x1ac], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x6012fe07
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
mov dword [esp + 0x1ac], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x6012fe30
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x1a4]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x6012feab
lea ecx, [esp + 0x1c]
call fcn.601042d0
lea eax, [esi - 0x10]
mov byte [esp + 0x1ac], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x6012fe7f
mov ecx, dword [eax]
push eax
mov edx, dword [ecx]
call dword [edx + 4]
lea ecx, [esp + 0x10]
call fcn.601042d0
lea ecx, [esp + 0x14]
call fcn.601042d0
mov eax, 1
mov ecx, dword [esp + 0x1a4]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test eax, eax
jle 0x6012feb9
and eax, 0xffff
or eax, 0x80070000
lea ecx, [esp + 0x1c]
mov edi, eax
call fcn.601042d0
lea eax, [esi - 0x10]
mov byte [esp + 0x1ac], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x6012fee6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
lea ecx, [esp + 0x10]
call fcn.601042d0
lea ecx, [esp + 0x14]
call fcn.601042d0
mov ecx, dword [esp + 0x1a4]
mov eax, edi
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret