Function at 0x402630
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x417178
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], 2
call fcn.00402b80
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x40267b
push 0x80004005
call fcn.00401670
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x14], eax
push dword [ebp + 0x14]
lea eax, [ebp - 0x14]
mov byte [ebp - 4], 3
push 0x4182a8
push eax
call fcn.00401870
add esp, 0xc
call fcn.00402b80
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x4026bc
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 ebx, 0xffffffff
mov byte [ebp - 4], 4
cmp dword [eax - 0xc], 0
jl 0x402700
push 0x4182a0
push eax
call fcn.004072df
add esp, 8
test eax, eax
je 0x402700
sub eax, dword [ebp + 8]
test eax, eax
jle 0x402700
lea eax, [ebp + 8]
push eax
lea ecx, [ebp - 0x10]
call fcn.00401210
jmp 0x40276b
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, ebx
add edx, 0xfffffff0
mov byte [ebp - 4], 5
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40274b
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x18]
mov ecx, ebx
add edx, 0xfffffff0
mov byte [ebp - 4], 4
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40276b
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 edx, 1
test eax, eax
jne 0x4027b9
mov dword [ebp - 0x18], eax
mov ecx, edx
sub ecx, dword [esi - 4]
mov eax, dword [esi - 8]
or eax, ecx
jge 0x40279a
push 0
lea ecx, [ebp - 0x10]
call fcn.00402dc0
mov esi, dword [ebp - 0x10]
push 0x4182a4
lea eax, [ebp - 0x18]
push esi
push eax
call fcn.0040757d
push dword [ebp - 0x18]
call fcn.00407442
add esp, 0x10
mov edx, 1
mov eax, dword [esi - 8]
mov ecx, edx
sub ecx, dword [esi - 4]
or eax, ecx
jge 0x4027d7
push 0
lea ecx, [ebp - 0x10]
call fcn.00402dc0
mov esi, dword [ebp - 0x10]
mov edx, 1
mov edi, dword [ebp - 0x14]
mov ecx, edx
sub ecx, dword [edi - 4]
mov eax, dword [edi - 8]
or eax, ecx
jge 0x4027f8
push 0
lea ecx, [ebp - 0x14]
call fcn.00402dc0
mov edi, dword [ebp - 0x14]
mov edx, 1
mov eax, dword [ebp + 0x10]
mov ecx, edx
mov dword [ebp - 0x1c], eax
sub ecx, dword [eax - 4]
mov eax, dword [eax - 8]
or eax, ecx
jge 0x40281f
push 0
lea ecx, [ebp + 0x10]
call fcn.00402dc0
mov eax, dword [ebp + 0x10]
mov edx, 1
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp + 0xc]
sub edx, dword [eax - 4]
mov ecx, dword [eax - 8]
or ecx, edx
jge 0x402839
push 0
lea ecx, [ebp + 0xc]
call fcn.00402dc0
mov eax, dword [ebp + 0xc]
push esi
push edi
push dword [ebp - 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
add esi, 0xfffffff0
mov dword [ebp - 0x1c], eax
mov byte [ebp - 4], 3
mov edx, ebx
lea ecx, [esi + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x402865
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
add edi, 0xfffffff0
mov byte [ebp - 4], 2
mov ecx, ebx
lea eax, [edi + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x402882
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp + 8]
mov ecx, ebx
add edx, 0xfffffff0
mov byte [ebp - 4], 1
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4028a2
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp + 0xc]
mov ecx, ebx
add edx, 0xfffffff0
mov byte [ebp - 4], 0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4028c2
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp + 0x10]
add edx, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea eax, [edx + 0xc]
lock xadd dword [eax], ebx
dec ebx
test ebx, ebx
jg 0x4028e3
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret