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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x5c
push ebx
push esi
push edi
mov edi, ecx
xor ebx, ebx
push edi
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x10], ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call fcn.0040fc58
cmp eax, 1
jne 0x40df08
lea ecx, [esp + 0xc]
call fcn.0040f7e0
lea esi, [edi + 0x38]
push dword [esi]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40e094
push ebx
push ecx
mov ecx, esp
push esi
call fcn.0040362d
lea ecx, [esp + 0x58]
call fcn.00410203
push ebx
push ecx
lea eax, [edi + 0x40]
mov ecx, esp
push eax
call fcn.0040362d
lea ecx, [esp + 0x40]
call fcn.00410203
mov dword [esp + 0x10], ebx
mov dword [esp + 0x14], ebx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], ebx
call fcn.0040fc58
mov ecx, dword [edi + 0x58]
cmp eax, 1
lea eax, [esp + 0x28]
jne 0x40dfa7
push 2
push dword [edi + 0x64]
push eax
call fcn.00413786
push eax
lea ecx, [esp + 0x1c]
call fcn.00402e93
lea ecx, [esp + 0x28]
call fcn.00403036
mov esi, dword [esp + 0x18]
lea ecx, [esp + 0x10]
push 0x1c800
push esi
call fcn.00402f91
mov eax, dword [esp + 0x1c]
lea ecx, [esi + 0x1c800]
add eax, 0xfffe3800
jmp 0x40dfe7
push 1
push dword [edi + 0x64]
push eax
call fcn.00413786
push eax
lea ecx, [esp + 0x1c]
call fcn.00402e93
lea ecx, [esp + 0x28]
call fcn.00403036
mov esi, dword [esp + 0x18]
lea ecx, [esp + 0x10]
push 0x12e00
push esi
call fcn.00402f91
mov eax, dword [esp + 0x1c]
lea ecx, [esi + 0x12e00]
add eax, 0xfffed200
push eax
push ecx
lea ecx, [esp + 0x28]
call fcn.00402f91
test esi, esi
jne 0x40e022
lea ecx, [esp + 0x20]
call fcn.00403036
lea ecx, [esp + 0x10]
call fcn.00403036
lea ecx, [esp + 0x38]
call fcn.0040feed
lea ecx, [esp + 0x50]
call fcn.0040feed
or ebx, 0xffffffff
jmp 0x40e2d5
push ecx
push ecx
lea ecx, [esp + 0x58]
call fcn.0040fdf0
test eax, eax
je 0x40e049
push ecx
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x58]
call fcn.0041013d
lea ecx, [esp + 0x50]
call fcn.00410125
push ecx
push ecx
lea ecx, [esp + 0x40]
call fcn.0040fdf0
test eax, eax
je 0x40e070
push ecx
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x40]
call fcn.0041013d
lea ecx, [esp + 0x38]
call fcn.00410125
lea ecx, [esp + 0x20]
call fcn.00403036
lea ecx, [esp + 0x10]
call fcn.00403036
lea ecx, [esp + 0x38]
call fcn.0040feed
lea ecx, [esp + 0x50]
call fcn.0040feed
lea esi, [edi + 0x3c]
push dword [esi]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40e115
push ebx
push ecx
mov ecx, esp
push esi
call fcn.0040362d
lea ecx, [esp + 0x58]
call fcn.00410203
mov ecx, dword [edi + 0x58]
lea eax, [esp + 0x20]
push 3
push dword [edi + 0x64]
push eax
call fcn.00413786
cmp dword [esp + 0x20], ebx
jne 0x40e0dc
lea ecx, [esp + 0x20]
call fcn.00403036
jmp 0x40e011
push ecx
push ecx
lea ecx, [esp + 0x58]
call fcn.0040fdf0
test eax, eax
je 0x40e103
push ecx
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x58]
call fcn.0041013d
lea ecx, [esp + 0x50]
call fcn.00410125
lea ecx, [esp + 0x20]
call fcn.00403036
lea ecx, [esp + 0x50]
call fcn.0040feed
mov ecx, edi
call fcn.0040dcb2
mov ecx, edi
call fcn.0040dc99
mov ecx, edi
call fcn.0040da5b
test eax, eax
jne 0x40e146
mov ecx, dword [esp + 0xc]
call fcn.0040f7b9
lea eax, [edi + 0x60]
push eax
lea eax, [edi + 0x5c]
push eax
push 4
jmp 0x40e270
push ecx
mov ecx, edi
call fcn.0040d9b6
test eax, eax
jne 0x40e16a
mov ecx, dword [esp + 0xc]
call fcn.0040f7b9
lea eax, [edi + 0x60]
push eax
lea eax, [edi + 0x5c]
push eax
push 6
jmp 0x40e270
call fcn.0040dc36
push str.SeDebugPrivilege
lea ecx, [esp + 0x14]
call fcn.004035e5
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov edx, esi
mov ecx, eax
call fcn.0040f619
mov ecx, dword [esp + 0x10]
mov esi, eax
call fcn.00405ea5
test esi, esi
jne 0x40e1b5
mov ecx, dword [esp + 0xc]
call fcn.0040f7b9
lea eax, [edi + 0x60]
push eax
lea eax, [edi + 0x5c]
push eax
push 3
jmp 0x40e270
mov ecx, dword [edi + 0x2c]
call fcn.00410cf6
test eax, eax
jne 0x40e1d9
mov ecx, dword [esp + 0xc]
call fcn.0040f7b9
lea eax, [edi + 0x60]
push eax
lea eax, [edi + 0x5c]
push eax
push 5
jmp 0x40e270
mov esi, dword [sym.imp.KERNEL32.dll_Sleep]
push 0x3e8
call esi
mov eax, dword [edi + 0x4c]
test eax, eax
je 0x40e22e
mov esi, ebx
cmp esi, eax
setb cl
call fcn.00405ca3
mov eax, dword [edi + 0x44]
lea ecx, [esp + 0x10]
lea eax, [eax + esi*4]
push eax
call fcn.0040362d
lea eax, [esp + 0x10]
push eax
call fcn.0040d508
mov ecx, dword [esp + 0x10]
call fcn.00405ea5
mov eax, dword [edi + 0x4c]
inc esi
mov dword [esp + 0x10], ebx
cmp esi, eax
jb 0x40e1f1
mov esi, dword [sym.imp.KERNEL32.dll_Sleep]
push 0x1f4
call esi
lea eax, [edi + 0x28]
push eax
lea ecx, [esp + 0x14]
call fcn.0040362d
lea eax, [esp + 0x10]
push eax
call fcn.0040d508
mov ecx, dword [esp + 0x10]
call fcn.00405ea5
push 0x1f4
call esi
push ecx
call fcn.0040d63b
test eax, eax
jne 0x40e294
lea eax, [edi + 0x60]
push eax
lea eax, [edi + 0x5c]
push eax
push 7
lea ecx, [esp + 0x34]
call fcn.00404b91
mov ecx, dword [edi + 0x64]
push eax
call fcn.00404f2b
lea ecx, [esp + 0x28]
call fcn.00404b6e
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x40e2d5
call fcn.0040fc58
cmp eax, 1
jne 0x40e2a7
mov ecx, dword [esp + 0xc]
call fcn.0040f7b9
lea eax, [edi + 0x60]
push eax
lea eax, [edi + 0x5c]
push eax
push ebx
lea ecx, [esp + 0x34]
call fcn.00404b91
mov ecx, dword [edi + 0x64]
push eax
call fcn.00404f2b
lea ecx, [esp + 0x28]
call fcn.00404b6e
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push 8
pop ebx
lea ecx, [esp + 0x18]
call fcn.00403036
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret