Function at 0x10040840
Capabilities:
Delete directory
Delete file
Enumerate files on windows
Get common file path

Disassembly:
push ebp
lea ebp, [esp - 0x45c]
sub esp, 0x45c
push 0xffffffffffffffff
push 0x10085d95
mov eax, dword fs:[0]
push eax
sub esp, 0x28
mov eax, dword [0x100c6034]
xor eax, ebp
mov dword [ebp + 0x458], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x28], edx
mov esi, ecx
mov dword [ebp - 0x2c], esi
mov eax, dword [esi]
cmp dword [eax - 0xc], 0
je 0x10040da7
push 0x104
lea eax, [ebp + 0x250]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
push dword [esi]
lea eax, [ebp + 0x250]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x10040da7
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [ebp + 0x250]
push eax
call ebx
test eax, eax
jle 0x10040920
cmp word [str.temp], 0
mov ecx, str.temp
mov edi, dword [esi]
mov esi, edi
je 0x1004090d
nop dword [eax]
movzx edx, word [esi]
test dx, dx
je 0x1004090d
mov ax, word [ecx]
or edx, 0x20
or ax, 0x20
cmp dx, ax
je 0x10040901
lea edi, [esi + 2]
mov ecx, str.temp
jmp 0x10040904
add ecx, 2
add esi, 2
cmp word [ecx], 0
jne 0x100408e0
xor eax, eax
cmp word [edi], ax
cmovne eax, edi
test eax, eax
je 0x10040da7
mov esi, dword [ebp - 0x2c]
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 4], 0
lea eax, [ebp - 0x20]
mov ecx, dword [ebp - 0x28]
mov edx, 0x3b
push eax
mov ecx, dword [ecx]
call fcn.1003f390
push 0x250
lea eax, [ebp]
push 0
push eax
call fcn.1005e790
add esp, 0x10
lea ecx, [ebp - 0x30]
push esi
call fcn.1002c320
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x30]
push 2
push 0x100a4f48
call fcn.1002ae70
lea eax, [ebp]
push eax
push dword [ebp - 0x30]
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
or edi, 0xffffffff
mov dword [ebp - 0x28], eax
cmp eax, edi
je 0x10040d41
lea eax, [ebp + 0x2c]
push eax
call ebx
test eax, eax
jle 0x10040d41
test byte [ebp], 0x10
mov ebx, dword [ebp - 0x20]
jne 0x10040b1e
push esi
lea ecx, [ebp - 0x10]
call fcn.1002c320
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x10]
push 1
push 0x100a5d9c
call fcn.1002ae70
lea ecx, [ebp + 0x2c]
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x100409d0
sub ecx, edx
lea eax, [ebp + 0x2c]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x10]
call fcn.1002ae70
test ebx, ebx
sete al
mov dword [ebp - 0x18], eax
test ebx, ebx
je 0x10040af3
xor edi, edi
test ebx, ebx
je 0x10040af0
mov ebx, dword [ebp - 0x1c]
add ebx, 4
nop dword [eax]
mov esi, dword [ebx]
call fcn.10029330
test eax, eax
je 0x10040dca
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [ebp - 0x24], eax
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x24]
push esi
call fcn.1002b120
test al, al
jne 0x10040a69
test esi, esi
jne 0x10040a45
xor ecx, ecx
jmp 0x10040a5f
mov ecx, esi
lea edx, [ecx + 2]
nop word [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10040a50
sub ecx, edx
sar ecx, 1
push ecx
push esi
lea ecx, [ebp - 0x24]
call fcn.1002b490
mov byte [ebp - 4], 4
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x10040dca
mov ecx, dword [ebp - 0x24]
mov edx, ecx
nop dword [eax]
mov si, word [edx]
cmp si, word [eax]
jne 0x10040aa6
test si, si
je 0x10040aa2
mov si, word [edx + 2]
cmp si, word [eax + 2]
jne 0x10040aa6
add edx, 4
add eax, 4
test si, si
jne 0x10040a80
xor eax, eax
jmp 0x10040aab
sbb eax, eax
or eax, 1
mov edx, dword [ebp - 0x18]
test eax, eax
movzx edx, dl
mov eax, 1
cmove edx, eax
mov dword [ebp - 0x18], edx
mov byte [ebp - 4], 2
lea edx, [ecx - 0x10]
or eax, 0xffffffff
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x10040ada
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
inc edi
add ebx, 8
cmp edi, dword [ebp - 0x20]
jb 0x10040a10
mov eax, dword [ebp - 0x18]
mov ebx, dword [ebp - 0x20]
mov esi, dword [ebp - 0x2c]
or edi, 0xffffffff
test al, al
je 0x10040b00
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov byte [ebp - 4], 1
mov eax, edi
mov edx, dword [ebp - 0x10]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x10040b1e
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea eax, [ebp]
push eax
push dword [ebp - 0x28]
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
je 0x10040d35
test byte [ebp], 0x10
jne 0x10040cf9
push esi
lea ecx, [ebp - 0x10]
call fcn.1002c320
mov byte [ebp - 4], 7
lea eax, [ebp - 0x24]
push 1
push eax
lea ecx, [ebp - 0x10]
call fcn.1002c4a0
mov byte [ebp - 4], 8
mov ecx, 0x100a5d9c
mov eax, dword [eax]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x10040b89
test dx, dx
je 0x10040b85
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x10040b89
add eax, 4
add ecx, 4
test dx, dx
jne 0x10040b63
xor esi, esi
jmp 0x10040b8e
sbb esi, esi
or esi, 1
mov byte [ebp - 4], 7
mov eax, edi
mov edx, dword [ebp - 0x24]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x10040bac
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
test esi, esi
je 0x10040bbf
push 1
push 0x100a5d9c
lea ecx, [ebp - 0x10]
call fcn.1002ae70
lea ecx, [ebp + 0x2c]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10040bc5
sub ecx, edx
lea eax, [ebp + 0x2c]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x10]
call fcn.1002ae70
test ebx, ebx
sete al
mov byte [ebp - 0x11], al
test ebx, ebx
je 0x10040cce
xor edi, edi
test ebx, ebx
je 0x10040ccb
mov ebx, dword [ebp - 0x1c]
add ebx, 4
mov esi, dword [ebx]
call fcn.10029330
test eax, eax
je 0x10040dca
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [ebp - 0x18], eax
mov byte [ebp - 4], 0xa
lea ecx, [ebp - 0x18]
push esi
call fcn.1002b120
test al, al
jne 0x10040c59
test esi, esi
jne 0x10040c36
xor eax, eax
jmp 0x10040c4f
mov eax, esi
lea edx, [eax + 2]
nop dword [eax + eax]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x10040c40
sub eax, edx
sar eax, 1
push eax
push esi
lea ecx, [ebp - 0x18]
call fcn.1002b490
mov byte [ebp - 4], 0xb
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x10040dca
mov ecx, dword [ebp - 0x18]
mov edx, ecx
nop dword [eax]
mov si, word [edx]
cmp si, word [eax]
jne 0x10040c96
test si, si
je 0x10040c92
mov si, word [edx + 2]
cmp si, word [eax + 2]
jne 0x10040c96
add edx, 4
add eax, 4
test si, si
jne 0x10040c70
xor eax, eax
jmp 0x10040c9b
sbb eax, eax
or eax, 1
test eax, eax
je 0x10040d15
mov byte [ebp - 4], 7
lea edx, [ecx - 0x10]
or eax, 0xffffffff
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x10040cbb
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
inc edi
add ebx, 8
cmp edi, dword [ebp - 0x20]
jb 0x10040c01
mov al, byte [ebp - 0x11]
or edi, 0xffffffff
test al, al
je 0x10040cdb
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov byte [ebp - 4], 1
mov eax, edi
mov edx, dword [ebp - 0x10]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x10040cf9
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea eax, [ebp]
push eax
push dword [ebp - 0x28]
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
je 0x10040d35
mov ebx, dword [ebp - 0x20]
mov esi, dword [ebp - 0x2c]
jmp 0x10040b33
mov byte [ebp - 4], 7
or edi, 0xffffffff
lea edx, [ecx - 0x10]
mov eax, edi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x10040cd2
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x10040cd2
push dword [ebp - 0x28]
call dword [sym.imp.KERNEL32.dll_FindClose]
mov esi, dword [ebp - 0x2c]
push dword [esi]
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
mov byte [ebp - 4], 0
mov edx, dword [ebp - 0x30]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], edi
dec edi
test edi, edi
jg 0x10040d65
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x10040d99
push 0x10028d30
push dword [eax - 4]
lea esi, [eax - 4]
push 8
push eax
call fcn.1005cc8d
mov eax, dword [esi]
lea eax, [eax*8 + 4]
push eax
push esi
call fcn.1005cdf7
add esp, 8
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x20], 0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x458]
xor ecx, ebp
call fcn.1005c4e7
lea esp, [ebp + 0x45c]
pop ebp
ret
push 0x80004005
call fcn.100269b0
int3