Function at 0x402980
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x413ce3
mov eax, dword fs:[0]
push eax
sub esp, 0x12c
mov eax, dword [section..data]
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 ebx, ecx
mov esi, dword [ebp + 8]
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0x134], 0x80004005
test esi, esi
je 0x402c21
test edi, edi
je 0x402c21
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x402c21
push edi
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
test eax, eax
je 0x402c21
push esi
lea ecx, [ebp - 0x14]
mov dword [ebp - 0x14], 0
call fcn.00402d60
mov dword [ebp - 4], 0
push 0x5c
push dword [ebp - 0x14]
mov dword [ebp - 0x1c], 0
call fcn.00406453
add esp, 8
test eax, eax
jne 0x402a22
or eax, 0xffffffff
jmp 0x402a27
sub eax, dword [ebp - 0x14]
sar eax, 1
inc eax
lea ecx, [ebp - 0x14]
push eax
lea eax, [ebp - 0x1c]
push eax
call fcn.00402f20
mov byte [ebp - 4], 1
push 0x5c
push dword [ebp - 0x14]
mov dword [ebp - 0x18], 0
call fcn.00406453
add esp, 8
test eax, eax
jne 0x402a56
or eax, 0xffffffff
jmp 0x402a5b
sub eax, dword [ebp - 0x14]
sar eax, 1
inc eax
lea ecx, [ebp - 0x14]
push eax
lea eax, [ebp - 0x18]
push eax
call fcn.00402f50
push edi
mov ecx, ebx
mov byte [ebp - 4], 2
call fcn.00401ff0
mov ecx, dword [ebx]
mov eax, dword [ecx - 0xc]
test eax, eax
js 0x402c45
cmp eax, eax
jg 0x402c45
cmp word [ecx + eax*2], 0x5c
je 0x402a99
push ecx
mov ecx, ebx
call fcn.00402ec0
lea eax, [ebp - 0x28]
mov dword [ebp - 0x28], 0
push eax
push 0xffffffffffffffff
push 0x4028b0
push 0x402890
push 0x402840
push 0x4027f0
push 0x4027c0
xorps xmm0, xmm0
push 0x4027b0
push 0x4027a0
movq qword [ebp - 0x24], xmm0
call dword [sym.imp.Cabinet.dll_FDICreate]
mov edi, dword [ebp - 0x1c]
add esp, 0x24
mov esi, dword [ebp - 0x18]
mov dword [ebp - 0x138], eax
test eax, eax
je 0x402bc3
push 0x84
lea eax, [ebp - 0xac]
push 0
push eax
call fcn.004067c0
add esp, 0xc
lea eax, [ebp - 0xa8]
lea ecx, [ebp - 0xac]
mov dword [ebp - 0xac], eax
push 3
push esi
call fcn.00403270
push 0x84
lea eax, [ebp - 0x130]
mov byte [ebp - 4], 3
push 0
push eax
call fcn.004067c0
add esp, 0xc
lea eax, [ebp - 0x12c]
lea ecx, [ebp - 0x130]
mov dword [ebp - 0x130], eax
push 3
push edi
call fcn.00403270
push ebx
mov ebx, dword [ebp - 0x138]
push 0
push 0x402900
push 0
push dword [ebp - 0xac]
push dword [ebp - 0x130]
push ebx
call dword [sym.imp.Cabinet.dll_FDICopy]
xor edx, edx
mov ecx, 0x80004005
test eax, eax
push ebx
cmovne ecx, edx
mov dword [ebp - 0x134], ecx
call dword [sym.imp.Cabinet.dll_FDIDestroy]
mov eax, dword [ebp - 0x130]
lea ecx, [ebp - 0x12c]
add esp, 0x20
cmp eax, ecx
je 0x402baa
push eax
call fcn.00405e92
add esp, 4
mov eax, dword [ebp - 0xac]
lea ecx, [ebp - 0xa8]
cmp eax, ecx
je 0x402bc3
push eax
call fcn.00405e92
add esp, 4
lea edx, [esi - 0x10]
mov byte [ebp - 4], 1
or esi, 0xffffffff
lea ecx, [edx + 0xc]
mov eax, esi
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x402be3
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
add edi, 0xfffffff0
mov byte [ebp - 4], 0
mov ecx, esi
lea eax, [edi + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x402c00
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x14]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], esi
dec esi
test esi, esi
jg 0x402c21
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x134]
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.00405c41
mov esp, ebp
pop ebp
ret 8
push 0x80070057
call fcn.00401030
int3