Function at 0x422f4c
Capabilities:
Check if file exists
Delete directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4577e8
mov eax, dword fs:[0]
push eax
sub esp, 0xa0
push ebx
push esi
push edi
mov eax, dword [0x46a008]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x34], edi
mov eax, dword [ebp + 0xc]
xorps xmm0, xmm0
push 8
movlpd qword [ebp - 0x74], xmm0
mov dword [ebp - 0x6c], 0
mov byte [eax], 1
mov dword [ebp - 0x68], 0
mov dword [ebp - 0x64], 0
mov dword [ebp - 0x60], 0
mov dword [ebp - 0x5c], 0
mov dword [ebp - 0x58], 0
mov dword [ebp - 0x54], 0
mov word [ebp - 0x50], 0
mov dword [ebp - 0x4c], 0
call fcn.00448381
xor ecx, ecx
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x48], 0
add esp, 4
mov dword [ebp - 0x44], 3
mov word [eax], cx
mov ebx, dword [ebp + 8]
push ecx
mov dword [ebp - 4], ecx
lea ecx, [ebp - 0x74]
push dword [ebx]
call fcn.0040d4f0
test al, al
je 0x4232d7
mov eax, dword [edi + 0x48]
cmp eax, 2
je 0x423441
mov edx, 2
test eax, eax
jne 0x422f61
mov ecx, dword [ebx]
mov edx, dword [ebx + 4]
lea esi, [ecx + edx*2]
cmp esi, ecx
je 0x422dfd
nop word [eax + eax]
movzx eax, word [esi - 2]
sub esi, 2
cmp eax, 0x5c
je 0x422f09
cmp eax, 0x2f
je 0x422f09
cmp esi, ecx
jne 0x422de0
or esi, 0xffffffff
inc esi
cmp esi, edx
cmova esi, edx
xor ecx, ecx
mov edx, 2
lea eax, [esi + 1]
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00448381
mov edi, eax
mov dword [ebp - 0x2c], esi
mov eax, dword [ebp + 8]
lea ebx, [esi + esi]
push ebx
mov dword [ebp - 0x30], edi
mov dword [ebp - 0x28], esi
push dword [eax]
mov dword [ebp - 0x38], ebx
push edi
call fcn.00449190
xor eax, eax
mov word [edi + ebx], ax
mov byte [ebp - 4], 1
xor ecx, ecx
mov edi, dword [ebp - 0x48]
mov edx, 2
mov ebx, dword [ebp - 0x4c]
add esi, edi
lea eax, [esi + 1]
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00448381
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x1c], esi
mov esi, dword [ebp - 0x38]
push esi
push dword [ebp - 0x30]
mov dword [ebp - 0x24], eax
push eax
call fcn.00449190
mov eax, dword [ebp - 0x24]
lea ecx, [edi*2 + 2]
push ecx
add eax, esi
push ebx
push eax
call fcn.00449190
mov byte [ebp - 4], 3
push dword [ebp - 0x30]
call fcn.0044824b
mov edi, dword [ebp - 0x34]
add esp, 0x30
mov eax, dword [ebp - 0x5c]
xor esi, esi
mov ecx, dword [ebp - 0x58]
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x3c]
cmp byte [edi + 0x3b], 0
push eax
lea eax, [edi + 0xd8]
mov dword [ebp - 0x10], ecx
mov ecx, dword [edi + 0x50]
cmove eax, esi
cmp byte [edi + 0xcb], 0
push eax
lea eax, [edi + 0xc0]
mov edx, dword [ecx]
cmove eax, esi
push eax
push dword [edi + 0x74]
lea eax, [ebp - 0x74]
push eax
mov esi, dword [ebp - 0x24]
lea eax, [ebp - 0x14]
push eax
push esi
push ecx
call dword [edx + 0x14]
mov ebx, eax
test ebx, ebx
jne 0x422ff9
mov eax, dword [ebp - 0x3c]
cmp eax, 5
ja case.default.0x422f02
jmp dword [eax*4 + 0x423464]
sub esi, ecx
sar esi, 1
jmp 0x422e00
push esi
mov ebx, 0x80004004
call fcn.0044824b
add esp, 4
jmp 0x423443
mov dword [edi + 0x48], 2
push esi
xor ebx, ebx
call fcn.0044824b
add esp, 4
jmp 0x423443
mov dword [edi + 0x48], 1
jmp case.0x422f02.0
mov dword [edi + 0x48], 3
push esi
mov byte [ebp - 4], 0
call fcn.0044824b
mov ebx, dword [ebp + 8]
add esp, 4
mov edx, 2
mov eax, dword [edi + 0x48]
cmp eax, 3
jne 0x423013
mov ecx, ebx
call fcn.0041b450
test al, al
jne 0x423007
push str.Cannot_create_file_with_auto_name
lea ecx, [ebp - 0x24]
call fcn.0040a460
push 0x460370
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 4
call fcn.0040a730
push dword [ebx + 4]
lea ecx, [ebp - 0x24]
call fcn.0040a3c0
mov eax, dword [ebx + 4]
mov edi, dword [ebp - 0x24]
mov esi, dword [ebp - 0x20]
lea eax, [eax*2 + 2]
push eax
push dword [ebx]
lea eax, [edi + esi*2]
push eax
call fcn.00449190
mov eax, dword [ebp - 0x34]
add esp, 0xc
add esi, dword [ebx + 4]
mov dword [ebp - 0x20], esi
mov eax, dword [eax + 0x50]
push edi
push eax
mov ecx, dword [eax]
call dword [ecx + 0x1c]
push edi
mov ebx, eax
call fcn.0044824b
add esp, 4
test ebx, ebx
jne 0x423443
mov ebx, 0x80004005
jmp 0x423443
mov ebx, 0x80004005
push esi
call fcn.0044824b
add esp, 4
jmp 0x423443
mov byte [edi + 0x174], 1
jmp 0x42343b
cmp eax, 4
jne 0x42323c
mov esi, dword [ebx + 4]
xor ecx, ecx
lea eax, [esi + 1]
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00448381
mov ecx, dword [ebx + 4]
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x1c], esi
lea ecx, [ecx*2 + 2]
push ecx
push dword [ebx]
push eax
call fcn.00449190
add esp, 0x10
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 5
call fcn.0041b450
mov esi, dword [ebp - 0x24]
test al, al
jne 0x4230e9
push str.Cannot_create_file_with_auto_name
lea ecx, [ebp - 0x18]
call fcn.0040a460
push 0x460370
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 6
call fcn.0040a730
push dword [ebx + 4]
lea ecx, [ebp - 0x18]
call fcn.0040a3c0
mov eax, dword [ebx + 4]
mov edi, dword [ebp - 0x18]
mov esi, dword [ebp - 0x14]
lea eax, [eax*2 + 2]
push eax
push dword [ebx]
lea eax, [edi + esi*2]
push eax
call fcn.00449190
mov eax, dword [ebp - 0x34]
add esp, 0xc
add esi, dword [ebx + 4]
mov dword [ebp - 0x14], esi
mov eax, dword [eax + 0x50]
push edi
push eax
mov ecx, dword [eax]
call dword [ecx + 0x1c]
push edi
mov esi, eax
call fcn.0044824b
add esp, 4
mov ebx, 0x80004005
test esi, esi
cmovne ebx, esi
push dword [ebp - 0x24]
call fcn.0044824b
add esp, 4
jmp 0x423443
mov ecx, dword [ebx]
mov edx, esi
call fcn.0040c900
test al, al
jne 0x42322e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jne 0x42310d
mov esi, 0x80004005
jmp 0x423118
jle 0x423118
movzx esi, si
or esi, 0x80070000
push str.Cannot_rename_existing_file
lea ecx, [ebp - 0x18]
call fcn.0040a460
mov byte [ebp - 4], 7
test esi, esi
je 0x423185
push 0x460370
lea ecx, [ebp - 0x18]
call fcn.0040a730
mov edx, esi
lea ecx, [ebp - 0x30]
call fcn.0040c6e0
mov byte [ebp - 4], 8
lea ecx, [ebp - 0x18]
push dword [ebp - 0x2c]
call fcn.0040a3c0
mov eax, dword [ebp - 0x18]
mov edx, dword [ebp - 0x2c]
mov esi, dword [ebp - 0x14]
lea ecx, [eax + esi*2]
lea eax, [edx*2 + 2]
push eax
push dword [ebp - 0x30]
push ecx
call fcn.00449190
add esi, dword [ebp - 0x2c]
mov byte [ebp - 4], 7
push dword [ebp - 0x30]
mov dword [ebp - 0x14], esi
call fcn.0044824b
add esp, 0x10
push 0x460370
lea ecx, [ebp - 0x18]
call fcn.0040a730
mov edi, dword [ebp - 0x20]
lea ecx, [ebp - 0x18]
push edi
call fcn.0040a3c0
mov esi, dword [ebp - 0x14]
lea eax, [edi*2 + 2]
push eax
mov eax, dword [ebp - 0x18]
push dword [ebp - 0x24]
lea eax, [eax + esi*2]
push eax
call fcn.00449190
add esp, 0xc
lea ecx, [ebp - 0x18]
add esi, edi
mov dword [ebp - 0x14], esi
push 0x460370
call fcn.0040a730
push dword [ebx + 4]
lea ecx, [ebp - 0x18]
call fcn.0040a3c0
mov eax, dword [ebx + 4]
mov edi, dword [ebp - 0x18]
mov esi, dword [ebp - 0x14]
lea eax, [eax*2 + 2]
push eax
push dword [ebx]
lea eax, [edi + esi*2]
push eax
call fcn.00449190
mov eax, dword [ebp - 0x34]
add esp, 0xc
add esi, dword [ebx + 4]
mov dword [ebp - 0x14], esi
mov eax, dword [eax + 0x50]
push edi
push eax
mov ecx, dword [eax]
call dword [ecx + 0x1c]
push edi
mov ebx, eax
call fcn.0044824b
add esp, 4
test ebx, ebx
jne 0x42321e
mov ebx, 0x80004005
push dword [ebp - 0x24]
call fcn.0044824b
add esp, 4
jmp 0x423443
push esi
call fcn.0044824b
add esp, 4
jmp 0x42343b
mov eax, dword [ebp - 0x54]
mov ecx, dword [ebx]
shr eax, 4
test al, 1
je 0x4232a4
cmp byte [0x899ce9], 0
jne 0x423279
mov edx, ecx
lea ecx, [ebp - 0x30]
call fcn.0040aa30
push dword [eax]
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
push dword [ebp - 0x30]
mov esi, eax
call fcn.0044824b
add esp, 4
test esi, esi
je 0x423288
jmp 0x42343b
push ecx
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
jne 0x42343b
push ebx
push str.Cannot_delete_output_folder
mov ecx, edi
call fcn.004225b0
mov ebx, eax
test ebx, ebx
jne 0x423443
jmp 0x423441
call fcn.0040de00
test al, al
je 0x42343b
mov ecx, dword [ebx]
call fcn.0040ce40
test al, al
jne 0x42343b
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x42343b
push ebx
push str.Cannot_delete_output_file
jmp 0x42328e
mov esi, dword [ebx]
mov ecx, esi
call fcn.0040e900
mov dword [ebp + 8], eax
test eax, eax
js 0x42343b
cmp word [esi + eax*2 + 2], 0
je 0x42343b
mov esi, dword [ebx + 4]
xor ecx, ecx
mov edx, 2
lea eax, [esi + 1]
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00448381
mov ecx, dword [ebx + 4]
mov edi, eax
mov dword [ebp - 0x30], edi
mov dword [ebp - 0x2c], esi
mov dword [ebp - 0x28], esi
lea ecx, [ecx*2 + 2]
push ecx
push dword [ebx]
push edi
call fcn.00449190
add esp, 0x10
mov eax, dword [ebp + 8]
mov byte [ebp - 4], 9
cmp eax, esi
jae 0x423348
xor ecx, ecx
mov dword [ebp - 0x2c], eax
mov word [edi + eax*2], cx
xorps xmm0, xmm0
mov dword [ebp - 0xa4], 0
push 8
movlpd qword [ebp - 0xac], xmm0
mov dword [ebp - 0xa0], 0
mov dword [ebp - 0x9c], 0
mov dword [ebp - 0x98], 0
mov dword [ebp - 0x94], 0
mov dword [ebp - 0x90], 0
mov dword [ebp - 0x8c], 0
mov word [ebp - 0x88], 0
mov dword [ebp - 0x84], 0
call fcn.00448381
xor ecx, ecx
mov dword [ebp - 0x84], eax
mov dword [ebp - 0x80], 0
add esp, 4
mov dword [ebp - 0x7c], 3
mov word [eax], cx
push ecx
push edi
lea ecx, [ebp - 0xac]
mov byte [ebp - 4], 0xa
call fcn.0040d4f0
test al, al
je 0x423427
test byte [ebp - 0x8c], 1
je 0x423427
mov esi, dword [ebp - 0x8c]
and esi, 0xfffffffe
cmp byte [0x899ce9], 0
jne 0x42341f
mov edx, edi
lea ecx, [ebp - 0x24]
call fcn.0040aa30
push esi
push dword [eax]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push dword [ebp - 0x24]
call fcn.0044824b
add esp, 4
jmp 0x423427
push esi
push edi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push dword [ebp - 0x84]
call fcn.0044824b
push edi
call fcn.0044824b
add esp, 8
mov eax, dword [ebp + 0xc]
mov byte [eax], 0
xor ebx, ebx
push dword [ebp - 0x4c]
call fcn.0044824b
add esp, 4
mov eax, ebx
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