Function at 0x40c017
Capabilities:
Acquire debug privileges
Check if file exists

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x34
push ebx
push esi
push edi
mov edi, ecx
xor ebx, ebx
push edi
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x10], ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call fcn.0040d780
cmp eax, 1
jne 0x40c04d
lea ecx, [esp + 0xc]
call fcn.0040d39c
lea esi, [edi + 0x38]
push dword [esi]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40c0ed
push ebx
push ecx
mov ecx, esp
push esi
call fcn.004033f3
lea ecx, [esp + 0x30]
call fcn.0040dd2b
call fcn.0040d780
mov ecx, dword [edi + 0x54]
cmp eax, 1
lea eax, [esp + 0x10]
jne 0x40c088
push 2
jmp 0x40c08a
push 1
push dword [edi + 0x60]
push eax
call fcn.00410ce2
push eax
lea ecx, [esp + 0x24]
call fcn.00402c65
lea ecx, [esp + 0x10]
call fcn.00402dff
cmp dword [esp + 0x20], ebx
jne 0x40c0bd
lea ecx, [esp + 0x28]
call fcn.0040da15
or ebx, 0xffffffff
jmp 0x40c32e
push ecx
push ecx
lea ecx, [esp + 0x30]
call fcn.0040d918
test eax, eax
je 0x40c0e4
push ecx
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x30]
call fcn.0040dc65
lea ecx, [esp + 0x28]
call fcn.0040dc4d
lea ecx, [esp + 0x28]
call fcn.0040da15
lea esi, [edi + 0x3c]
push dword [esi]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40c16e
push ebx
push ecx
mov ecx, esp
push esi
call fcn.004033f3
lea ecx, [esp + 0x30]
call fcn.0040dd2b
mov ecx, dword [edi + 0x54]
lea eax, [esp + 0x10]
push 3
push dword [edi + 0x60]
push eax
call fcn.00410ce2
cmp dword [esp + 0x10], ebx
jne 0x40c135
lea ecx, [esp + 0x10]
call fcn.00402dff
jmp 0x40c0ac
push ecx
push ecx
lea ecx, [esp + 0x30]
call fcn.0040d918
test eax, eax
je 0x40c15c
push ecx
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x30]
call fcn.0040dc65
lea ecx, [esp + 0x28]
call fcn.0040dc4d
lea ecx, [esp + 0x10]
call fcn.00402dff
lea ecx, [esp + 0x28]
call fcn.0040da15
mov ecx, edi
call fcn.0040bdf7
mov ecx, edi
call fcn.0040bdde
mov ecx, edi
call fcn.0040bba0
test eax, eax
jne 0x40c19f
mov ecx, dword [esp + 0xc]
call fcn.0040d375
lea eax, [edi + 0x5c]
push eax
lea eax, [edi + 0x58]
push eax
push 4
jmp 0x40c2c9
push ecx
mov ecx, edi
call fcn.0040bafb
test eax, eax
jne 0x40c1c3
mov ecx, dword [esp + 0xc]
call fcn.0040d375
lea eax, [edi + 0x5c]
push eax
lea eax, [edi + 0x58]
push eax
push 6
jmp 0x40c2c9
call fcn.0040bd7b
push str.SeDebugPrivilege
lea ecx, [esp + 0x14]
call fcn.004033ab
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov edx, esi
mov ecx, eax
call fcn.0040d3ca
mov ecx, dword [esp + 0x10]
mov esi, eax
call fcn.004058fb
test esi, esi
jne 0x40c20e
mov ecx, dword [esp + 0xc]
call fcn.0040d375
lea eax, [edi + 0x5c]
push eax
lea eax, [edi + 0x58]
push eax
push 3
jmp 0x40c2c9
mov ecx, dword [edi + 0x2c]
call fcn.0040e7e1
test eax, eax
jne 0x40c232
mov ecx, dword [esp + 0xc]
call fcn.0040d375
lea eax, [edi + 0x5c]
push eax
lea eax, [edi + 0x58]
push eax
push 5
jmp 0x40c2c9
mov esi, dword [sym.imp.KERNEL32.dll_Sleep]
push 0x3e8
call esi
mov eax, dword [edi + 0x48]
test eax, eax
je 0x40c287
mov esi, ebx
cmp esi, eax
setb cl
call fcn.004056f9
mov eax, dword [edi + 0x40]
lea ecx, [esp + 0x10]
lea eax, [eax + esi*4]
push eax
call fcn.004033f3
lea eax, [esp + 0x10]
push eax
call fcn.0040b64d
mov ecx, dword [esp + 0x10]
call fcn.004058fb
mov eax, dword [edi + 0x48]
inc esi
mov dword [esp + 0x10], ebx
cmp esi, eax
jb 0x40c24a
mov esi, dword [sym.imp.KERNEL32.dll_Sleep]
push 0x1f4
call esi
lea eax, [edi + 0x28]
push eax
lea ecx, [esp + 0x14]
call fcn.004033f3
lea eax, [esp + 0x10]
push eax
call fcn.0040b64d
mov ecx, dword [esp + 0x10]
call fcn.004058fb
push 0x1f4
call esi
push ecx
call fcn.0040b780
test eax, eax
jne 0x40c2ed
lea eax, [edi + 0x5c]
push eax
lea eax, [edi + 0x58]
push eax
push 7
lea ecx, [esp + 0x1c]
call fcn.004046da
mov ecx, dword [edi + 0x60]
push eax
call fcn.00404a3d
lea ecx, [esp + 0x10]
call fcn.004046b7
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x40c32e
call fcn.0040d780
cmp eax, 1
jne 0x40c300
mov ecx, dword [esp + 0xc]
call fcn.0040d375
lea eax, [edi + 0x5c]
push eax
lea eax, [edi + 0x58]
push eax
push ebx
lea ecx, [esp + 0x1c]
call fcn.004046da
mov ecx, dword [edi + 0x60]
push eax
call fcn.00404a3d
lea ecx, [esp + 0x10]
call fcn.004046b7
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push 8
pop ebx
lea ecx, [esp + 0x20]
call fcn.00402dff
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret