Function at 0x402900
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4171d8
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push ebx
push esi
push edi
mov eax, dword [0x41fea0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 4], 3
call fcn.00402b80
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x40294b
push 0x80004005
call fcn.00401670
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 8]
or edi, 0xffffffff
mov byte [ebp - 4], 4
cmp dword [eax - 0xc], 0
jl 0x40298f
push 0x4182a0
push eax
call fcn.004072df
add esp, 8
test eax, eax
je 0x40298f
sub eax, dword [ebp + 8]
test eax, eax
jle 0x40298f
lea eax, [ebp + 8]
push eax
lea ecx, [ebp - 0x10]
call fcn.00401210
jmp 0x4029fa
lea eax, [ebp - 0x18]
push eax
call fcn.00401940
lea ecx, [ebp + 8]
mov byte [ebp - 4], 5
push ecx
push eax
lea eax, [ebp - 0x1c]
push eax
call fcn.004012c0
add esp, 0x10
push eax
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 6
call fcn.00401210
mov edx, dword [ebp - 0x1c]
mov ecx, edi
add edx, 0xfffffff0
mov byte [ebp - 4], 5
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4029da
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x18]
mov ecx, edi
add edx, 0xfffffff0
mov byte [ebp - 4], 4
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4029fa
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [ebp - 0x10]
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
mov ebx, 1
test eax, eax
jne 0x402a43
mov dword [ebp - 0x14], eax
mov ecx, ebx
sub ecx, dword [esi - 4]
mov eax, dword [esi - 8]
or eax, ecx
jge 0x402a29
push 0
lea ecx, [ebp - 0x10]
call fcn.00402dc0
mov esi, dword [ebp - 0x10]
push 0x4182a4
lea eax, [ebp - 0x14]
push esi
push eax
call fcn.0040757d
push dword [ebp - 0x14]
call fcn.00407442
add esp, 0x10
mov eax, dword [esi - 8]
mov ecx, ebx
sub ecx, dword [esi - 4]
or eax, ecx
jge 0x402a5c
push 0
lea ecx, [ebp - 0x10]
call fcn.00402dc0
mov esi, dword [ebp - 0x10]
mov edx, dword [ebp + 0x14]
mov ecx, ebx
mov dword [ebp - 0x18], edx
sub ecx, dword [edx - 4]
mov eax, dword [edx - 8]
or eax, ecx
jge 0x402a7e
push 0
lea ecx, [ebp + 0x14]
call fcn.00402dc0
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x18], eax
mov edx, dword [ebp + 0x10]
mov ecx, ebx
mov dword [ebp - 0x1c], edx
sub ecx, dword [edx - 4]
mov eax, dword [edx - 8]
or eax, ecx
jge 0x402aa0
push 0
lea ecx, [ebp + 0x10]
call fcn.00402dc0
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp + 0xc]
sub ebx, dword [eax - 4]
mov ecx, dword [eax - 8]
or ecx, ebx
jge 0x402aba
push 0
lea ecx, [ebp + 0xc]
call fcn.00402dc0
mov eax, dword [ebp + 0xc]
push esi
push dword [ebp - 0x18]
push dword [ebp - 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
add esi, 0xfffffff0
mov byte [ebp - 4], 3
mov ebx, eax
mov edx, edi
lea ecx, [esi + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x402ae7
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp + 8]
mov ecx, edi
add edx, 0xfffffff0
mov byte [ebp - 4], 2
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x402b07
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp + 0xc]
mov ecx, edi
add edx, 0xfffffff0
mov byte [ebp - 4], 1
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x402b27
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp + 0x10]
mov ecx, edi
add edx, 0xfffffff0
mov byte [ebp - 4], 0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x402b47
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp + 0x14]
add edx, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea eax, [edx + 0xc]
lock xadd dword [eax], edi
dec edi
test edi, edi
jg 0x402b68
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret