Function at 0x10540f8
Capabilities:
Delete directory
Delete file
Get common file path

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x21c
mov eax, dword [0x1072c48]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
xor esi, esi
push edi
mov dword [ebp - 0x218], ecx
mov dword [ebp - 0x210], esi
mov dword [ebp - 0x21c], esi
cmp ebx, esi
je 0x10541fb
push ebx
call fcn.010587c1
test eax, eax
je 0x10541b2
mov eax, ebx
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, si
jne 0x105413e
sub eax, edx
sar eax, 1
lea edi, [eax + 0xd]
xor ecx, ecx
push 2
pop edx
mov eax, edi
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call sub.msvcrt.dll_void____cdecl_operator_new___unsigned_int_
mov esi, eax
pop ecx
test esi, esi
jne 0x1054176
mov eax, 0x8007000e
jmp 0x105438a
push ebx
push edi
push esi
call fcn.01035811
mov ebx, eax
push esi
test ebx, ebx
jge 0x1054192
call sub.msvcrt.dll_void___cdecl_operator_delete___void__
pop ecx
mov eax, ebx
jmp 0x105438a
call fcn.01055e3d
push 0x1007490
push edi
push esi
call fcn.01035886
mov dword [ebp - 0x210], eax
test eax, eax
jge 0x10541fb
jmp 0x105437d
push ebx
call fcn.010561ca
test eax, eax
je 0x10541fb
mov eax, ebx
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, si
jne 0x10541c1
sub eax, edx
sar eax, 1
lea edi, [eax + 1]
xor ecx, ecx
push 2
pop edx
mov eax, edi
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call sub.msvcrt.dll_void____cdecl_operator_new___unsigned_int_
mov esi, eax
pop ecx
test esi, esi
je 0x105416c
push ebx
push edi
push esi
call fcn.01035811
and dword [ebp - 0x214], 0
mov edi, 0x104
test esi, esi
je 0x1054222
push esi
call fcn.010561ca
test eax, eax
jne 0x105421e
push esi
call sub.msvcrt.dll_void___cdecl_operator_delete___void__
pop ecx
xor esi, esi
test esi, esi
jne 0x1054293
push 0x208
call sub.msvcrt.dll_void____cdecl_operator_new___unsigned_int_
mov esi, eax
pop ecx
test esi, esi
je 0x105432c
mov ebx, dword [ebp - 0x218]
mov ecx, ebx
call fcn.01050800
test eax, eax
jl 0x1054287
push dword [ebx + 0x23c]
push edi
push esi
call fcn.01035811
test eax, eax
jl 0x1054287
push esi
call fcn.01055e3d
push 0x1007490
push edi
push esi
call fcn.01035886
push 1
push esi
mov ecx, ebx
call fcn.01052462
mov dword [ebp - 0x210], eax
mov dword [ebp - 0x21c], 1
jmp 0x1054299
mov dword [ebp - 0x210], 0x80004005
jmp 0x1054299
mov ebx, dword [ebp - 0x218]
cmp dword [ebp - 0x210], 0
jl 0x10542b4
push ebx
push 0x10540d4
push esi
call fcn.010652d2
mov dword [ebp - 0x210], eax
cmp dword [ebp - 0x210], 0xc00d1388
jne 0x10542cf
test esi, esi
je 0x1054317
push esi
call sub.msvcrt.dll_void___cdecl_operator_delete___void__
pop ecx
xor esi, esi
jmp 0x1054317
cmp dword [ebp - 0x210], 0x80040154
jne 0x105434a
push 0x103
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x1054317
push 0x1009000
push edi
lea eax, [ebp - 0x20c]
push eax
call fcn.01035886
push 0
push 1
lea eax, [ebp - 0x20c]
push eax
call fcn.01059baa
test eax, eax
jge 0x1054338
inc dword [ebp - 0x214]
cmp dword [ebp - 0x214], 2
jl 0x1054207
jmp 0x105434a
mov dword [ebp - 0x210], 0x8007000e
jmp 0x105434a
push ebx
push 0x10540d4
push esi
call fcn.010652d2
mov dword [ebp - 0x210], eax
cmp dword [ebp - 0x21c], 0
je 0x1054379
test esi, esi
je 0x1054384
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push 0x5c
push esi
call dword [sym.imp.msvcrt.dll_wcsrchr]
pop ecx
pop ecx
test eax, eax
je 0x1054372
xor ecx, ecx
mov word [eax], cx
push esi
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test esi, esi
je 0x1054384
push esi
call sub.msvcrt.dll_void___cdecl_operator_delete___void__
pop ecx
mov eax, dword [ebp - 0x210]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.01047464
leave
ret 4