Function at 0x414570
Capabilities:
Check if file exists

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4733b6
mov eax, dword fs:[0]
push eax
sub esp, 0x270
mov eax, dword [0x475280]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push 0
mov eax, dword [ebp + 0x14]
push eax
call fcn.004167c0
mov ecx, dword [ebp + 0x10]
mov dword [ecx], 0
mov dword [ecx + 4], 0
mov edx, dword [ebp + 8]
push edx
push 0x104
lea eax, [ebp - 0x218]
push eax
call fcn.004117b0
test eax, eax
jl 0x4145dd
mov dword [ebp - 0x240], 1
jmp 0x4145e7
mov dword [ebp - 0x240], 0
push 0x40227c
push 0x104
lea ecx, [ebp - 0x218]
push ecx
call fcn.00411810
test eax, eax
jl 0x41460d
mov dword [ebp - 0x244], 1
jmp 0x414617
mov dword [ebp - 0x244], 0
lea edx, [ebp - 0x218]
push edx
push 0
push 0x1f0003
call dword [sym.imp.KERNEL32.dll_OpenSemaphoreW]
mov dword [ebp - 0x248], eax
lea eax, [ebp - 0x248]
push eax
lea ecx, [ebp - 0x220]
call fcn.004167e0
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x220]
call fcn.004158f0
movzx ecx, al
test ecx, ecx
jne 0x41471e
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x414674
mov byte [ebp - 0x219], 1
jmp 0x41467b
mov byte [ebp - 0x219], 0
movzx edx, byte [ebp - 0x219]
push edx
call fcn.00411700
movzx eax, al
test eax, eax
je 0x4146e0
push 0
call fcn.00414560
mov dword [ebp - 0x27c], eax
xor ecx, ecx
je 0x4146b5
push 0
push 0x402218
push 0xc8
mov edx, dword [ebp + 4]
push edx
call fcn.00413b70
mov dword [ebp - 0x24c], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x220]
call fcn.004149c0
mov eax, dword [ebp - 0x24c]
jmp 0x4149a4
xor ecx, ecx
jne 0x414660
push 0x402218
push 0xc9
mov edx, dword [ebp + 4]
push edx
call fcn.00413bb0
mov dword [ebp - 0x250], eax
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x220]
call fcn.004149c0
mov eax, dword [ebp - 0x250]
jmp 0x4149a4
mov dword [ebp - 0x23c], 0
mov dword [ebp - 0x238], 0
lea eax, [ebp - 0x23c]
push eax
lea ecx, [ebp - 0x220]
call fcn.004158d0
push eax
call fcn.004141f0
push eax
call fcn.00414560
mov dword [ebp - 0x228], eax
cmp dword [ebp - 0x228], 0
jge 0x4147b2
mov ecx, dword [ebp - 0x228]
mov dword [ebp - 0x22c], ecx
mov edx, dword [ebp - 0x22c]
push edx
push 0x402218
push 0xcf
mov eax, dword [ebp + 4]
push eax
call fcn.00413b70
mov ecx, dword [ebp - 0x22c]
mov dword [ebp - 0x254], ecx
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x220]
call fcn.004149c0
mov eax, dword [ebp - 0x254]
jmp 0x4149a4
xor eax, eax
jne 0x414732
movzx ecx, byte [ebp + 0xc]
test ecx, ecx
je 0x41492a
push 0x402284
push 0x104
lea edx, [ebp - 0x218]
push edx
call fcn.00411810
test eax, eax
jl 0x4147ec
mov dword [ebp - 0x258], 1
jmp 0x4147f6
mov dword [ebp - 0x258], 0
lea eax, [ebp - 0x218]
push eax
push 0
push 0x1f0003
call dword [sym.imp.KERNEL32.dll_OpenSemaphoreW]
mov dword [ebp - 0x25c], eax
lea ecx, [ebp - 0x25c]
push ecx
lea ecx, [ebp - 0x224]
call fcn.004167e0
mov byte [ebp - 4], 1
push 0
lea edx, [ebp - 0x224]
push edx
call fcn.00416810
movzx eax, al
test eax, eax
je 0x414880
push 0x402218
push 0xd5
mov ecx, dword [ebp + 4]
push ecx
call fcn.00413bb0
mov dword [ebp - 0x260], eax
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x224]
call fcn.004149c0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x220]
call fcn.004149c0
mov eax, dword [ebp - 0x260]
jmp 0x4149a4
xor edx, edx
jne 0x414826
lea eax, [ebp - 0x238]
push eax
lea ecx, [ebp - 0x224]
call fcn.004158d0
push eax
call fcn.004141f0
push eax
call fcn.00414560
mov dword [ebp - 0x230], eax
cmp dword [ebp - 0x230], 0
jge 0x414913
mov ecx, dword [ebp - 0x230]
mov dword [ebp - 0x234], ecx
mov edx, dword [ebp - 0x234]
push edx
push 0x402218
push 0xd7
mov eax, dword [ebp + 4]
push eax
call fcn.00413b70
mov ecx, dword [ebp - 0x234]
mov dword [ebp - 0x264], ecx
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x224]
call fcn.004149c0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x220]
call fcn.004149c0
mov eax, dword [ebp - 0x264]
jmp 0x4149a4
xor eax, eax
jne 0x414884
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x224]
call fcn.004149c0
mov eax, dword [ebp - 0x238]
cdq
mov cl, 0x1f
call fcn.004731c0
mov dword [ebp - 0x270], eax
mov dword [ebp - 0x26c], edx
mov eax, dword [ebp - 0x23c]
cdq
mov dword [ebp - 0x278], eax
mov dword [ebp - 0x274], edx
push 1
mov ecx, dword [ebp + 0x14]
push ecx
call fcn.004167c0
mov edx, dword [ebp - 0x270]
or edx, dword [ebp - 0x278]
mov eax, dword [ebp - 0x26c]
or eax, dword [ebp - 0x274]
mov ecx, dword [ebp + 0x10]
mov dword [ecx], edx
mov dword [ecx + 4], eax
mov dword [ebp - 0x268], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x220]
call fcn.004149c0
mov eax, dword [ebp - 0x268]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00471d10
mov esp, ebp
pop ebp
ret 0x10