Function at 0x100517c0
Capabilities:
Delete directory
Delete file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10093a5e
mov eax, dword fs:[0]
push eax
sub esp, 0x50
push ebx
push esi
push edi
mov eax, dword [0x100c6270]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov edi, ecx
mov dword [ebp - 0x14], edi
test byte [0x100cb57c], 1
jne 0x10051826
or dword [0x100cb57c], 1
mov dword [ebp - 4], 0
mov ecx, 0x100cb560
call fcn.10011580
push 0x100a26c0
call fcn.10071957
add esp, 4
or esi, 0xffffffff
mov dword [ebp - 4], esi
jmp 0x10051829
or esi, 0xffffffff
mov ebx, dword [ebp + 0xc]
mov al, bl
and al, 1
movzx ecx, al
push ecx
lea ecx, [ebp - 0x28]
call fcn.1005dd00
mov dword [ebp - 4], 1
mov byte [ebp - 4], 2
mov ecx, edi
call fcn.1004e840
test al, al
jne 0x10051873
mov dword [ebp - 4], esi
lea ecx, [ebp - 0x28]
call fcn.1005dd90
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov edx, ebx
shr edx, 1
test dl, 1
je 0x100518a6
mov byte [ebp - 4], 3
mov ecx, edi
call fcn.1004eb30
mov dword [ebp - 4], 2
jmp 0x100518a6
mov ecx, edi
call fcn.1004ec50
test al, al
mov eax, dword [edi + 0x18]
push eax
je 0x100518ed
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
je 0x100518e0
mov dword [ebp - 4], esi
lea ecx, [ebp - 0x28]
call fcn.1005dd90
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
jmp 0x100519ca
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
jne 0x100518bf
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp esi, 0x91
jne 0x100519ca
cmp byte [ebp + 8], 0
je 0x10051a13
push 0xa
lea ecx, [ebp - 0x40]
call fcn.1000a6a0
mov byte [ebp - 4], 5
push 0
push 0
lea eax, [ebp - 0x40]
push eax
push 0x100cb560
mov ecx, edi
call fcn.10050a50
mov bl, 6
lea esp, [esp]
cmp dword [ebp - 0x38], 0
je 0x10051971
lea ecx, [ebp - 0x5c]
push ecx
lea ecx, [ebp - 0x40]
call fcn.100509b0
mov byte [ebp - 4], bl
mov edx, dword [ebp + 0xc]
push edx
push 1
lea ecx, [ebp - 0x5c]
call fcn.100517c0
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x5c]
call fcn.100115e0
jmp 0x10051940
mov eax, dword [edi + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
je 0x100519b0
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x40]
call fcn.1000ff90
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x28]
call fcn.1005dd90
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov dword [ebp - 0x18], esi
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x40]
call fcn.1000ff90
mov ebx, dword [ebp + 0xc]
cmp esi, 0x20
je 0x100519d4
cmp esi, 5
jne 0x10051a02
shr ebx, 1
test bl, 1
je 0x10051a02
push 1
lea eax, [ebp - 0x5c]
push eax
mov ecx, edi
call fcn.10051390
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x5c]
call fcn.1004f2e0
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x5c]
call fcn.100115e0
jmp 0x1005198b
cmp esi, 2
jne 0x10051a13
mov dword [ebp - 4], 0xffffffff
jmp 0x10051855
push 0
push 0x48b
push str..FilePath.cpp
push esi
call fcn.10010910
push str.While_deleting
lea ecx, [ebp + 8]
call fcn.10001fa0
mov byte [ebp - 4], 9
mov ecx, dword [ebp - 0x14]
add ecx, 0x18
push ecx
push eax
lea edx, [ebp + 0xc]
push edx
call fcn.1004e2e0
add esp, 0xc
mov byte [ebp - 4], 0xa
push eax
mov eax, dword [ebp - 0x1c]
push eax
call fcn.1004e500
push str.While_deleting
lea ecx, [ebp + 8]
call fcn.10001fa0
mov byte [ebp - 4], 0xb
mov ecx, dword [ebp - 0x14]
add ecx, 0x18
push ecx
push eax
lea edx, [ebp + 0xc]
push edx
call fcn.1004e2e0
add esp, 0xc
mov byte [ebp - 4], 0xc
mov eax, dword [eax]
push eax
push 0x493
push str..FilePath.cpp
mov ecx, dword [ebp - 0x20]
push ecx
call fcn.1004e5c0
int3