Function at 0x1002f630
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x10164d4c
mov eax, dword fs:[0]
push eax
sub esp, 0x8c0
mov eax, dword [0x10438fc0]
xor eax, esp
mov dword [esp + 0x8b8], eax
push ebx
push esi
push edi
mov eax, dword [0x10438fc0]
xor eax, esp
push eax
lea eax, [esp + 0x8d0]
mov dword fs:[0], eax
mov eax, dword [ebp + 0xc]
mov edi, ecx
mov dword [esp + 0x28], edi
cmp eax, 0x8004022d
je 0x1002f761
cmp eax, 0x80070020
je 0x1002f761
cmp eax, 0x80070005
jne 0x1002f746
xor ebx, ebx
push ebx
push ebx
push ebx
lea esi, [esp + 0x20]
mov dword [esp + 0x20], ebx
call fcn.100163a0
xor ecx, ecx
mov eax, esi
mov dword [esp + 0x8d8], 0x13
call fcn.1002f5b0
push ebx
push ebx
push ebx
lea esi, [esp + 0x24]
mov dword [esp + 0x24], ebx
call fcn.100163a0
mov byte [esp + 0x8d8], 0x14
mov eax, dword [edi + 4]
mov edi, dword [esp + 0x14]
push eax
push edi
mov edx, esi
call fcn.10016c90
mov esi, dword [esp + 0x20]
add esp, 8
push esi
push 0x80040263
push 0x1044ebe0
call fcn.10025150
mov dword [esp + 0x24], eax
cmp esi, ebx
je 0x1002f720
lea ecx, [esi - 0xc]
test ecx, ecx
je 0x1002f720
dec dword [esi - 0xc]
lea eax, [esi - 0xc]
jne 0x1002f720
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete___void__]
add esp, 4
cmp edi, ebx
je 0x1002f73d
lea edx, [edi - 0xc]
test edx, edx
je 0x1002f73d
dec dword [edi - 0xc]
lea eax, [edi - 0xc]
jne 0x1002f73d
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete___void__]
add esp, 4
mov eax, dword [esp + 0x24]
jmp 0x1002fc97
test eax, eax
jns 0x1002fc97
mov edi, dword [edi]
push edi
push eax
push 0x1044ebe0
call fcn.10025150
jmp 0x1002fc97
xor ebx, ebx
push ebx
push ebx
push ebx
lea esi, [esp + 0x2c]
mov dword [esp + 0x2c], ebx
call fcn.100163a0
mov eax, dword [ebp + 8]
dec eax
mov dword [esp + 0x8d8], ebx
cmp eax, 4
ja case.default.0x1002f787
jmp dword [eax*4 + 0x1002fdcc]
push ebx
push ebx
push ebx
lea esi, [esp + 0x20]
mov dword [ebp + 0xc], 0x80040216
mov dword [esp + 0x20], ebx
call fcn.100163a0
mov ebx, 1
mov ecx, ebx
mov eax, esi
mov byte [esp + 0x8d8], bl
call fcn.1002f5b0
mov eax, dword [edi]
push eax
mov eax, dword [esp + 0x18]
push eax
lea edx, [esp + 0x28]
call fcn.10016c90
add esp, 8
push 0
push 0
push 0
lea esi, [esp + 0x24]
mov dword [esp + 0x24], 0
call fcn.100163a0
mov byte [esp + 0x8d8], 2
mov eax, dword [edi]
push eax
push str._s..sr.lock
mov edx, esi
call fcn.10016c90
mov ecx, dword [edi + 4]
mov edx, dword [esp + 0x20]
mov byte [esp + 0x2a8], bl
add esp, 8
lea ebx, [esp + 0x4c]
mov dword [esp + 0x4c], 0xffffffff
call fcn.10023da0
mov byte [esp + 0x8d8], 3
jmp 0x1002f830
mov ecx, dword [esp + 0x4c]
cmp ecx, 0xffffffff
je 0x1002fc21
cmp byte [esp + 0x2a0], 0
je 0x1002f84b
mov al, 1
jmp 0x1002f860
lea edx, [esp + 0x50]
push edx
push ecx
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
mov ecx, dword [esp + 0x4c]
test eax, eax
setne al
mov byte [esp + 0x2a0], 0
test al, al
je 0x1002fc09
lea eax, [esp + 0x4aa]
push eax
lea ecx, [esp + 0x2a6]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
lea edx, [esp + 0x7c]
push edx
lea eax, [esp + 0x2a6]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatW]
lea ecx, [esp + 0x2a2]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x1002f830
push eax
lea edi, [esp + 0x80]
lea eax, [esp + 0x28]
call fcn.100164f0
lea edx, [esp + 0x24]
push edx
lea eax, [esp + 0x40]
push eax
mov byte [esp + 0x8e0], 4
call fcn.10090800
mov byte [esp + 0x8d8], 6
mov eax, dword [esp + 0x24]
test eax, eax
je 0x1002f8fb
lea ecx, [eax - 0xc]
test ecx, ecx
je 0x1002f8fb
add eax, 0xfffffff4
dec dword [eax]
jne 0x1002f8fb
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete___void__]
add esp, 4
mov esi, dword [esp + 0x40]
mov edx, dword [esp + 0x48]
mov edi, dword [edx + esi*4 - 0x14]
push 0
lea eax, [esp + 0x34]
call fcn.100164f0
mov byte [esp + 0x8d8], 7
mov eax, dword [esp + 0x48]
mov eax, dword [eax + esi*4 - 0x10]
mov edi, dword [sym.imp.MSVCR100.dll__wtol]
push eax
call edi
mov ecx, dword [esp + 0x4c]
mov esi, dword [ecx + esi*4 - 0xc]
push esi
mov dword [esp + 0x18], eax
call edi
add esp, 8
push 0
push 0
push 0
lea esi, [esp + 0x28]
mov edi, eax
mov dword [esp + 0x28], 0
call fcn.100163a0
mov edx, dword [esp + 0x28]
mov byte [esp + 0x8d8], 8
mov eax, dword [edx + 8]
mov ebx, dword [esp + 0x30]
test eax, eax
je 0x1002fb08
xor esi, esi
cmp ebx, esi
je 0x1002fb0a
push ebx
push eax
call dword [sym.imp.MSVCR100.dll__wcsicmp]
add esp, 8
cmp eax, esi
jne 0x1002fb0a
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [esp + 0x10], eax
jne 0x1002f9c4
mov eax, dword [esp + 0x1c]
cmp eax, esi
je 0x1002f9ba
lea ecx, [eax - 0xc]
test ecx, ecx
je 0x1002f9ba
add eax, 0xfffffff4
dec dword [eax]
jne 0x1002f9ba
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete___void__]
add esp, 4
lea edx, [ebx - 0xc]
test edx, edx
jmp 0x1002fbe0
push edi
push 1
push 0x410
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov dword [esp + 0x2c], eax
cmp eax, 0xffffffff
je 0x1002fabd
push 0x105
lea ecx, [esp + 0x6b8]
push ecx
push esi
push eax
call dword [sym.imp.PSAPI.DLL_GetModuleFileNameExW]
push esi
push esi
mov dword [esp + 0x18], esi
push esi
lea esi, [esp + 0x1c]
test eax, eax
je 0x1002fa6e
call fcn.100163a0
mov ecx, 4
mov eax, esi
mov byte [esp + 0x8d8], 9
call fcn.1002f5b0
lea edx, [esp + 0x6b4]
lea ecx, [esp + 0x34]
call fcn.100174f0
push eax
lea esi, [esp + 0x3c]
mov byte [esp + 0x8dc], 0xa
call fcn.100177a0
mov byte [esp + 0x8d8], 0xb
mov eax, dword [eax]
mov edx, dword [esp + 0x10]
push eax
push edi
push ebx
push edx
lea edx, [esp + 0x2c]
call fcn.10016c90
add esp, 0x10
mov eax, esi
call fcn.100164d0
lea eax, [esp + 0x34]
call fcn.100164d0
jmp 0x1002fa9c
call fcn.100163a0
mov ecx, 4
lea eax, [esp + 0x10]
mov byte [esp + 0x8d8], 0xc
call fcn.1002f5b0
mov eax, dword [esp + 0x10]
push edi
push ebx
push eax
lea edx, [esp + 0x28]
call fcn.10016c90
add esp, 0xc
lea eax, [esp + 0x10]
mov byte [esp + 0x8d8], 8
call fcn.100164d0
mov ecx, dword [esp + 0x2c]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x1002fbaa
push esi
push esi
mov dword [esp + 0x18], esi
push esi
lea esi, [esp + 0x1c]
call fcn.100163a0
mov ecx, 5
mov eax, esi
mov byte [esp + 0x8d8], 0xd
call fcn.1002f5b0
mov edx, dword [esp + 0x10]
push edi
push ebx
push edx
lea edx, [esp + 0x28]
call fcn.10016c90
add esp, 0xc
mov eax, esi
mov byte [esp + 0x8d8], 8
call fcn.100164d0
jmp 0x1002fbaa
xor esi, esi
push esi
push esi
mov dword [esp + 0x18], esi
push esi
cmp edi, esi
lea esi, [esp + 0x1c]
jle 0x1002fb58
call fcn.100163a0
mov ecx, 5
mov eax, esi
mov byte [esp + 0x8d8], 0xe
call fcn.1002f5b0
mov esi, dword [esp + 0x10]
push edi
push ebx
push esi
lea edx, [esp + 0x28]
call fcn.10016c90
add esp, 0xc
mov byte [esp + 0x8d8], 8
test esi, esi
je 0x1002fbaa
lea eax, [esi - 0xc]
test eax, eax
jmp 0x1002fb96
call fcn.100163a0
mov ecx, 6
lea eax, [esp + 0x10]
mov byte [esp + 0x8d8], 0xf
call fcn.1002f5b0
mov esi, dword [esp + 0x10]
push ebx
push esi
lea edx, [esp + 0x24]
call fcn.10016c90
add esp, 8
mov byte [esp + 0x8d8], 8
test esi, esi
je 0x1002fbaa
lea ecx, [esi - 0xc]
test ecx, ecx
je 0x1002fbaa
dec dword [esi - 0xc]
lea eax, [esi - 0xc]
jne 0x1002fbaa
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete___void__]
add esp, 4
mov esi, dword [esp + 0x1c]
lea edx, [esp + 0x20]
push edx
mov eax, esi
call fcn.10016730
test esi, esi
je 0x1002fbd7
lea eax, [esi - 0xc]
test eax, eax
je 0x1002fbd7
dec dword [esi - 0xc]
lea eax, [esi - 0xc]
jne 0x1002fbd7
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete___void__]
add esp, 4
test ebx, ebx
je 0x1002fbf3
lea ecx, [ebx - 0xc]
test ecx, ecx
je 0x1002fbf3
add ebx, 0xfffffff4
dec dword [ebx]
jne 0x1002fbf3
push ebx
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete___void__]
add esp, 4
lea ecx, [esp + 0x3c]
mov byte [esp + 0x8d8], 3
call fcn.10090920
jmp 0x1002f830
cmp ecx, 0xffffffff
je 0x1002fc21
push ecx
call dword [sym.imp.KERNEL32.dll_FindClose]
test eax, eax
je 0x1002fc21
mov dword [esp + 0x4c], 0xffffffff
mov eax, dword [esp + 0x18]
test eax, eax
je 0x1002fc41
lea edx, [eax - 0xc]
test edx, edx
je 0x1002fc41
add eax, 0xfffffff4
dec dword [eax]
jne 0x1002fc41
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete___void__]
add esp, 4
mov eax, dword [esp + 0x14]
test eax, eax
je 0x1002fc61
lea ecx, [eax - 0xc]
test ecx, ecx
je 0x1002fc61
add eax, 0xfffffff4
dec dword [eax]
jne 0x1002fc61
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete___void__]
add esp, 4
xor ebx, ebx
mov esi, dword [esp + 0x20]
mov edx, dword [ebp + 0xc]
push esi
push edx
push 0x1044ebe0
call fcn.10025150
mov edi, eax
cmp esi, ebx
je 0x1002fc95
lea eax, [esi - 0xc]
test eax, eax
je 0x1002fc95
dec dword [esi - 0xc]
lea eax, [esi - 0xc]
jne 0x1002fc95
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete___void__]
add esp, 4
mov eax, edi
mov ecx, dword [esp + 0x8d0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x8b8]
xor ecx, esp
call fcn.10148524
mov esp, ebp
pop ebp
ret 8
push ebx
push ebx
push ebx
lea esi, [esp + 0x20]
mov dword [ebp + 0xc], 0x8004022d
mov dword [esp + 0x20], ebx
call fcn.100163a0
mov ecx, 3
mov eax, esi
mov byte [esp + 0x8d8], 0x10
call fcn.1002f5b0
mov edx, dword [edi]
mov esi, dword [esp + 0x14]
push edx
push esi
lea edx, [esp + 0x28]
call fcn.10016c90
add esp, 8
cmp esi, ebx
je case.default.0x1002f787
lea eax, [esi - 0xc]
test eax, eax
je case.default.0x1002f787
dec dword [esi - 0xc]
lea eax, [esi - 0xc]
jne case.default.0x1002f787
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete___void__]
add esp, 4
jmp case.default.0x1002f787
push ebx
push ebx
push ebx
lea esi, [esp + 0x20]
mov dword [ebp + 0xc], 0x8004022d
mov dword [esp + 0x20], ebx
call fcn.100163a0
mov ecx, 3
mov eax, esi
mov byte [esp + 0x8d8], 0x11
call fcn.1002f5b0
mov ecx, dword [edi]
mov esi, dword [esp + 0x14]
push ecx
push esi
lea edx, [esp + 0x28]
call fcn.10016c90
add esp, 8
cmp esi, ebx
je case.default.0x1002f787
lea edx, [esi - 0xc]
test edx, edx
jmp 0x1002fd09
push ebx
push ebx
push ebx
lea esi, [esp + 0x20]
mov dword [ebp + 0xc], 0x8004022d
mov dword [esp + 0x20], ebx
call fcn.100163a0
mov ecx, 2
mov eax, esi
mov byte [esp + 0x8d8], 0x12
call fcn.1002f5b0
mov eax, dword [edi]
mov esi, dword [esp + 0x14]
push eax
push esi
lea edx, [esp + 0x28]
call fcn.10016c90
add esp, 8
cmp esi, ebx
je case.default.0x1002f787
lea ecx, [esi - 0xc]
test ecx, ecx
jmp 0x1002fd09