Function at 0x40be10
Capabilities:
Delete directory
Delete file
Print debug messages

Disassembly:
sub esp, 0x30
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x44]
push edi
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
cmp dword [edi - 0xc], 0
jl 0x40c0e1
push 0x460bb0
push edi
call fcn.0043b5b7
add esp, 8
test eax, eax
je 0x40c0e1
sub eax, edi
sar eax, 1
cmp eax, 0xffffffff
je 0x40c0e1
cmp dword [edi - 0xc], 4
jl 0x40c0e1
push 0x45fcf4
push 1
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x50]
call fcn.004077d0
push eax
call fcn.004038a0
mov bl, al
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
add esp, 8
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40be99
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test bl, bl
je 0x40bee0
mov edi, dword [edi - 0xc]
add edi, 0xffffffff
push edi
lea ecx, [esp + 0x18]
push ecx
lea ecx, [esp + 0x4c]
call fcn.00407850
push eax
lea ecx, [esp + 0x48]
call fcn.004029d0
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40bedc
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edi, dword [esp + 0x44]
lea ecx, [esp + 0x28]
call fcn.004290bd
call fcn.0042190e
test eax, eax
jne 0x40befc
push 0x80004005
call fcn.00401350
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
push edi
lea ecx, [esp + 0x14]
add eax, 0x10
push 0x460bb4
push ecx
mov dword [esp + 0x1c], eax
call fcn.004016e0
mov edx, dword [esp + 0x1c]
add esp, 0xc
push 0
push edx
lea ecx, [esp + 0x30]
call fcn.0042914b
test eax, eax
je 0x40c0a8
mov ebp, dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea ecx, [esp + 0x28]
call fcn.00428dd2
lea ecx, [esp + 0x28]
mov dword [esp + 0x20], eax
call fcn.00429080
test eax, eax
jne 0x40c09d
mov eax, dword [esp + 0x28]
mov edx, dword [eax + 0x38]
push 0x10
lea ecx, [esp + 0x2c]
call edx
test eax, eax
je 0x40c019
call fcn.0042190e
test eax, eax
je 0x40bef2
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea ecx, [esp + 0x18]
add eax, 0x10
push ecx
lea ecx, [esp + 0x2c]
mov dword [esp + 0x18], eax
call fcn.004293db
mov edx, dword [eax]
push edx
push edi
lea eax, [esp + 0x1c]
push 0x460bc4
push eax
call fcn.004016e0
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
add esp, 0x10
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40bfd3
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov esi, dword [esp + 0x14]
push ecx
add esi, 0xfffffff0
mov dword [esp + 0x28], esp
mov ebx, esp
push esi
call fcn.00402470
add eax, 0x10
add esp, 4
mov dword [ebx], eax
call sym.QiyiInstaller.exe_RMDir
add esp, 4
lea ecx, [esi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c09d
mov ecx, dword [esi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push esi
call edx
jmp 0x40c09d
call fcn.0042190e
test eax, eax
je 0x40bef2
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea ecx, [esp + 0x1c]
add eax, 0x10
push ecx
lea ecx, [esp + 0x2c]
mov dword [esp + 0x18], eax
call fcn.004293db
mov edx, dword [eax]
push edx
push edi
lea eax, [esp + 0x1c]
push 0x460bc4
push eax
call fcn.004016e0
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff0
add esp, 0x10
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c07a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov esi, dword [esp + 0x14]
push esi
call ebp
lea eax, [esi - 0x10]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c09d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp dword [esp + 0x20], 0
jne 0x40bf3d
push edi
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
lea ecx, [esp + 0x28]
call fcn.00428d02
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c0d8
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x28]
call fcn.004290e3
lea eax, [edi - 0x10]
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c0fd
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x30
ret