Function at 0x412460
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push 0xffffffffffffffff
push 0x46c210
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 8
mov eax, dword [0x4800d8]
push ebx
push ebp
push esi
mov ebp, ecx
mov dword [esp + 0x10], eax
lea ecx, [esp + 0x10]
push ecx
mov ecx, ebp
mov dword [esp + 0x20], 0
call fcn.0040a160
mov ebx, dword [esp + 0x10]
mov eax, dword [ebx - 8]
test eax, eax
jne 0x4124b1
mov eax, dword [0x4800dc]
lea edx, [ebx - 0xc]
cmp edx, eax
jmp 0x4124c8
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x4124fb
mov ecx, dword [0x4800dc]
lea eax, [ebx - 0xc]
cmp eax, ecx
je 0x41269f
lea esi, [ebx - 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x41269f
push esi
call fcn.00457c3f
add esp, 4
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 8]
mov dword fs:[0], ecx
add esp, 0x14
ret
mov ecx, dword [0x4800d8]
mov dword [esp + 0xc], ecx
mov byte [esp + 0x1c], 1
call fcn.004178f0
push 0x104
lea ecx, [esp + 0x10]
mov esi, eax
call fcn.004042d0
test eax, eax
je 0x41253d
mov edx, dword [esp + 0xc]
mov dword [edx - 8], 0x104
mov eax, dword [esp + 0xc]
mov byte [eax + 0x104], 0
mov eax, dword [esp + 0xc]
mov edx, dword [esi]
push edi
push ebx
push 0x104
push eax
push 0x4708d8
push 0x4713c0
push str.SETUP
mov ecx, esi
call dword [edx + 0x90]
lea ecx, [esp + 0x10]
call fcn.00404410
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ecx, dword [esp + 0x10]
mov dword [ecx - 8], eax
mov edx, dword [esp + 0x10]
mov byte [eax + edx], 0
call fcn.004178f0
mov edx, dword [eax]
lea esi, [ebp + 0x8c]
push esi
lea ecx, [esp + 0x14]
push ecx
mov ecx, eax
call dword [edx + 0xbc]
call fcn.004178f0
push 0x104
lea ecx, [esp + 0x14]
mov edi, eax
call fcn.004042d0
test eax, eax
je 0x4125cf
mov edx, dword [esp + 0x10]
mov dword [edx - 8], 0x104
mov eax, dword [esp + 0x10]
mov byte [eax + 0x104], 0
mov eax, dword [esp + 0x10]
mov edx, dword [edi]
push ebx
push 0x104
push eax
push 0x4708d8
push 0x4713bc
push str.SETUP
mov ecx, edi
call dword [edx + 0x90]
lea ecx, [esp + 0x10]
call fcn.00404410
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ecx, dword [esp + 0x10]
mov dword [ecx - 8], eax
mov edx, dword [esp + 0x10]
mov byte [eax + edx], 0
call fcn.004178f0
mov edx, dword [eax]
lea ecx, [ebp + 0x98]
push ecx
lea ecx, [esp + 0x14]
push ecx
mov ecx, eax
call dword [edx + 0xbc]
mov esi, dword [esi]
mov eax, dword [esi - 8]
test eax, eax
je 0x41264e
push 1
push esi
mov ecx, ebp
call fcn.00410060
test eax, eax
je 0x41264e
mov dword [ebp + 0xc4], 1
mov eax, dword [esp + 0x10]
mov ecx, dword [0x4800dc]
mov edi, dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
lea edx, [eax - 0xc]
cmp edx, ecx
je 0x41267f
add eax, 0xfffffff4
push eax
call edi
test eax, eax
jg 0x41267f
mov eax, dword [esp + 0x10]
add eax, 0xfffffff4
push eax
call fcn.00457c3f
add esp, 4
mov eax, dword [0x4800dc]
lea ecx, [ebx - 0xc]
cmp ecx, eax
je 0x41269e
lea esi, [ebx - 0xc]
push esi
call edi
test eax, eax
jg 0x41269e
push esi
call fcn.00457c3f
add esp, 4
pop edi
mov ecx, dword [esp + 0x14]
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x14
ret