Function at 0x40ddf0
Capabilities:
Check for peb ntglobalflag flag
Check if file exists
Delete file

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4aef68
mov eax, dword fs:[0]
push eax
sub esp, 0x70
mov eax, dword [0x4d25ac]
xor eax, esp
mov dword [esp + 0x68], eax
push ebx
push esi
push edi
mov eax, dword [0x4d25ac]
xor eax, esp
push eax
lea eax, [esp + 0x80]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov dword [esp + 0x30], ecx
mov dword [esp + 0x34], eax
mov eax, dword [ebp + 0xc]
lea ecx, [esp + 0x14]
push ecx
mov dword [esp + 0x30], edx
mov dword [esp + 0x14], eax
call fcn.00409fc0
lea edx, [esp + 0x14]
push edx
mov dword [esp + 0x8c], 0
call fcn.0040e0a0
mov esi, dword [esp + 0x20]
cmp esi, dword [esp + 0x24]
jbe 0x40de6e
call fcn.00492a5a
mov edi, dword [esp + 0x14]
mov dword [esp + 0x38], edi
mov ebx, esi
jmp 0x40de80
mov esi, dword [esp + 0x24]
cmp dword [esp + 0x20], esi
jbe 0x40de8f
call fcn.00492a5a
test edi, edi
je 0x40de99
cmp edi, dword [esp + 0x14]
je 0x40de9e
call fcn.00492a5a
cmp ebx, esi
je 0x40e008
test edi, edi
jne 0x40df4f
call fcn.00492a5a
xor eax, eax
cmp ebx, dword [eax + 0x10]
jb 0x40debf
call fcn.00492a5a
xor eax, eax
push 0xffffffffffffffff
mov word [esp + 0x48], ax
push eax
mov eax, ebx
lea ecx, [esp + 0x48]
mov dword [esp + 0x60], 7
mov dword [esp + 0x5c], 0
call fcn.00401c20
push 0xf
mov eax, str._searchplugins_
lea ecx, [esp + 0x44]
mov byte [esp + 0x8c], 1
call fcn.00403430
mov ecx, dword [esp + 0x34]
push 0
push ecx
or eax, 0xffffffff
lea esi, [esp + 0x48]
call fcn.00403510
mov eax, dword [esp + 0x44]
mov esi, 8
cmp dword [esp + 0x58], esi
jae 0x40df22
lea eax, [esp + 0x44]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
cmp eax, 1
jne 0x40dfcc
cmp byte [ebp + 0x10], 0
je 0x40df56
mov eax, dword [esp + 0x44]
cmp dword [esp + 0x58], esi
jae 0x40df46
lea eax, [esp + 0x44]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x40dfcc
mov eax, dword [edi]
jmp 0x40deb5
mov edx, dword [esp + 0x30]
mov eax, dword [esp + 0x10]
mov byte [edx], 1
cmp dword [eax + 0x14], 0
je 0x40dfcc
mov eax, dword [esp + 0x44]
cmp dword [esp + 0x58], esi
jae 0x40df75
lea eax, [esp + 0x44]
push eax
lea ecx, [esp + 0x60]
push ecx
call fcn.004055b0
add esp, 8
mov byte [esp + 0x88], 2
mov eax, dword [esp + 0x60]
cmp dword [esp + 0x74], esi
jae 0x40df99
lea eax, [esp + 0x60]
mov ecx, dword [esp + 0x10]
mov edi, dword [esp + 0x70]
push eax
mov eax, dword [ecx + 0x14]
call fcn.00403710
test eax, eax
jne 0x40dfb5
mov edx, dword [esp + 0x2c]
mov byte [edx], 1
cmp dword [esp + 0x74], esi
jb 0x40dfc8
mov eax, dword [esp + 0x60]
push eax
call fcn.00491101
add esp, 4
mov edi, dword [esp + 0x38]
mov byte [esp + 0x88], 0
cmp dword [esp + 0x58], esi
jb 0x40dfe7
mov ecx, dword [esp + 0x44]
push ecx
call fcn.00491101
add esp, 4
test edi, edi
jne 0x40e004
call fcn.00492a5a
xor eax, eax
cmp ebx, dword [eax + 0x10]
jb 0x40dffc
call fcn.00492a5a
add ebx, 0x1c
jmp 0x40de80
mov eax, dword [edi]
jmp 0x40dff2
mov esi, dword [esp + 0x20]
test esi, esi
je 0x40e05b
mov edi, dword [esp + 0x24]
cmp esi, edi
je 0x40e04e
add esi, 0x18
jmp 0x40e020
cmp dword [esi], 8
jb 0x40e031
mov edx, dword [esi - 0x14]
push edx
call fcn.00491101
add esp, 4
xor eax, eax
mov dword [esi], 7
mov dword [esi - 4], 0
mov word [esi - 0x14], ax
add esi, 0x1c
lea ecx, [esi - 0x18]
cmp ecx, edi
jne 0x40e020
mov edx, dword [esp + 0x20]
push edx
call fcn.00491101
add esp, 4
xor eax, eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x14]
push eax
call fcn.00491101
add esp, 4
mov ecx, dword [esp + 0x80]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x68]
xor ecx, esp
call fcn.0049110c
mov esp, ebp
pop ebp
ret 0xc