Function at 0x40d3e0
Capabilities:
Create directory
Delete directory
Delete file

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x5c
mov dword [esp + 8], 0x180
mov dword [esp + 4], 0x8101
mov dword [esp], 0x45ac30
call dword [sym.imp.msvcrt.dll__open]
test eax, eax
js 0x40dd70
lea esi, [ebp - 0x3c]
mov dword [esp], eax
mov dword [esp + 4], esi
mov dword [ebp - 0x50], eax
call dword [sym.imp.msvcrt.dll__fstat]
mov dword [esp + 4], 0x866
mov dword [esp], 0x45a2c0
mov edi, eax
call fcn.0044c860
mov ebx, dword [sym.imp.msvcrt.dll__errno]
call ebx
mov eax, dword [eax]
mov dword [esp + 4], str.fstat_failed:_errno_d_n
mov dword [esp + 8], eax
xor eax, eax
test edi, edi
sete al
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp + 4], 0x867
mov dword [esp], 0x45a2c0
call fcn.0044c860
movzx ecx, word [ebp - 0x36]
mov dword [esp + 4], str.bad_format___06o_n
mov eax, ecx
mov dword [esp + 8], ecx
and ax, 0xf000
cmp ax, 0x8000
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp + 4], 0x868
mov dword [esp], 0x45a2c0
call fcn.0044c860
movzx ecx, word [ebp - 0x36]
mov dword [esp + 4], str.bad_st_mode___06o_n
mov eax, ecx
mov dword [esp + 8], ecx
and ax, 0x1ff
cmp ax, 0x1b6
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp + 4], 0x869
mov dword [esp], 0x45a2c0
call fcn.0044c860
mov eax, dword [ebp - 0x3c]
mov dword [esp + 4], str.st_dev_is__d__expected_0_n
test eax, eax
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp + 4], 0x86a
mov dword [esp], 0x45a2c0
call fcn.0044c860
mov ecx, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x3c]
mov dword [esp + 4], str.st_dev___d__and_st_rdev___d__differ_n
cmp ecx, eax
mov dword [esp + 8], eax
sete al
mov dword [esp + 0xc], ecx
movzx eax, al
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp + 4], 0x86b
mov dword [esp], 0x45a2c0
call fcn.0044c860
movsx ecx, word [ebp - 0x34]
mov dword [esp + 4], str.st_nlink_is__d__expected_1_n
cmp cx, 1
mov dword [esp + 8], ecx
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp + 4], 0x86c
mov dword [esp], 0x45a2c0
call fcn.0044c860
mov eax, dword [ebp - 0x28]
mov dword [esp + 4], str.st_size_is__d__expected_0_n
test eax, eax
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0044cad0
mov edi, dword [sym.imp.msvcrt.dll__stat]
mov dword [esp + 4], esi
mov dword [esp], 0x45ac30
call edi
mov dword [esp + 4], 0x86f
mov dword [esp], 0x45a2c0
mov dword [ebp - 0x4c], eax
call fcn.0044c860
call ebx
mov ecx, dword [ebp - 0x4c]
mov eax, dword [eax]
mov dword [esp + 4], str.stat_failed:_errno_d_n
mov dword [esp + 8], eax
xor eax, eax
test ecx, ecx
sete al
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp + 4], 0x870
mov dword [esp], 0x45a2c0
call fcn.0044c860
movzx ecx, word [ebp - 0x36]
mov dword [esp + 4], str.bad_format___06o_n
mov eax, ecx
mov dword [esp + 8], ecx
and ax, 0xf000
cmp ax, 0x8000
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp + 4], 0x871
mov dword [esp], 0x45a2c0
call fcn.0044c860
movzx ecx, word [ebp - 0x36]
mov dword [esp + 4], str.bad_st_mode___06o_n
mov eax, ecx
mov dword [esp + 8], ecx
and ax, 0x1ff
cmp ax, 0x1b6
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp + 4], 0x872
mov dword [esp], 0x45a2c0
call fcn.0044c860
mov ecx, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x3c]
mov dword [esp + 4], str.st_dev___d__and_st_rdev___d__differ_n
cmp ecx, eax
mov dword [esp + 8], eax
sete al
mov dword [esp + 0xc], ecx
movzx eax, al
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp + 4], 0x873
mov dword [esp], 0x45a2c0
call fcn.0044c860
movsx ecx, word [ebp - 0x34]
mov dword [esp + 4], str.st_nlink_is__d__expected_1_n
cmp cx, 1
mov dword [esp + 8], ecx
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp + 4], 0x874
mov dword [esp], 0x45a2c0
call fcn.0044c860
mov eax, dword [ebp - 0x28]
mov dword [esp + 4], str.st_size_is__d__expected_0_n
test eax, eax
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0044cad0
call ebx
mov dword [eax], 0xdeadbeef
mov dword [esp + 4], esi
mov dword [esp], 0x45ad07
call edi
mov dword [esp + 4], 0x878
mov dword [esp], 0x45a2c0
mov dword [ebp - 0x4c], eax
call fcn.0044c860
mov eax, dword [ebp - 0x4c]
mov dword [esp + 4], str.stat_returned__d_n
cmp eax, 0xffffffff
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp + 4], 0x879
mov dword [esp], 0x45a2c0
call fcn.0044c860
call ebx
mov ecx, dword [eax]
mov dword [ebp - 0x4c], ecx
call ebx
mov ecx, dword [ebp - 0x4c]
mov dword [esp + 4], 0x45a2ee
mov dword [esp + 8], ecx
cmp dword [eax], 2
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0044cad0
mov edx, dword [ebp - 0x50]
mov dword [esp], edx
call dword [sym.imp.msvcrt.dll__close]
mov dword [esp], 0x45ac30
call dword [sym.imp.msvcrt.dll_remove]
mov dword [esp + 4], 0xa
mov dword [esp], 0
call dword [sym.imp.msvcrt.dll__dup2]
test eax, eax
je 0x40dc72
mov dword [esp + 4], 0x892
mov dword [esp], 0x45a2c0
call fcn.0044c860
call ebx
mov eax, dword [eax]
mov dword [esp], str._dup2_failed_with_errno__d_n
mov dword [esp + 4], eax
call fcn.0044cbc0
lea eax, [ebp - 0x44]
mov dword [esp + 8], 0x8000
mov dword [esp + 4], 0x400
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll__pipe]
test eax, eax
jne 0x40dd40
mov eax, dword [ebp - 0x44]
mov dword [esp + 4], esi
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll__fstat]
mov dword [esp + 4], 0x898
mov dword [esp], 0x45a2c0
mov dword [ebp - 0x4c], eax
call fcn.0044c860
call ebx
mov edx, dword [ebp - 0x4c]
mov eax, dword [eax]
mov dword [esp + 4], str.fstat_pipe__failed:_errno_d_n
mov dword [esp + 8], eax
xor eax, eax
test edx, edx
sete al
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp + 4], 0x899
mov dword [esp], 0x45a2c0
call fcn.0044c860
movzx edx, word [ebp - 0x36]
mov dword [esp + 4], str.bad_st_mode_06o_n
cmp dx, 0x1000
mov dword [esp + 8], edx
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp + 4], 0x89a
mov dword [esp], 0x45a2c0
call fcn.0044c860
mov edx, dword [ebp - 0x44]
mov eax, dword [ebp - 0x3c]
mov dword [esp + 4], str.st_dev_is__d__expected__d_n
cmp edx, eax
mov dword [esp + 8], eax
sete al
mov dword [esp + 0xc], edx
movzx eax, al
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp + 4], 0x89b
mov dword [esp], 0x45a2c0
call fcn.0044c860
mov edx, dword [ebp - 0x44]
mov eax, dword [ebp - 0x2c]
mov dword [esp + 4], str.st_rdev_is__d__expected__d_n
cmp edx, eax
mov dword [esp + 8], eax
sete al
mov dword [esp + 0xc], edx
movzx eax, al
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp + 4], 0x89c
mov dword [esp], 0x45a2c0
call fcn.0044c860
movsx edx, word [ebp - 0x34]
mov dword [esp + 4], str.st_nlink_is__d__expected_1_n
cmp dx, 1
mov dword [esp + 8], edx
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0044cad0
mov edx, dword [sym.imp.msvcrt.dll__close]
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x4c], edx
mov dword [esp], eax
call edx
mov eax, dword [ebp - 0x40]
mov edx, dword [ebp - 0x4c]
mov dword [esp], eax
call edx
mov dword [esp], 0x45ac30
call dword [sym.imp.msvcrt.dll__mkdir]
test eax, eax
jne 0x40dd10
mov dword [esp + 4], esi
mov dword [esp], str.stat.tst
call edi
mov dword [esp + 4], 0x8a7
mov dword [esp], 0x45a2c0
mov dword [ebp - 0x4c], eax
call fcn.0044c860
call ebx
mov edx, dword [ebp - 0x4c]
mov eax, dword [eax]
mov dword [esp + 4], str.stat_directory__failed:_errno_d_n
mov dword [esp + 8], eax
xor eax, eax
test edx, edx
sete al
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp + 4], 0x8a8
mov dword [esp], 0x45a2c0
call fcn.0044c860
movzx edx, word [ebp - 0x36]
mov dword [esp + 4], str.bad_format___06o_n
mov eax, edx
mov dword [esp + 8], edx
and ax, 0xf000
cmp ax, 0x4000
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp + 4], 0x8a9
mov dword [esp], 0x45a2c0
call fcn.0044c860
movzx edx, word [ebp - 0x36]
mov dword [esp + 4], str.bad_st_mode___06o_n
mov eax, edx
mov dword [esp + 8], edx
and ax, 0x1ff
cmp ax, 0x1ff
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp + 4], 0x8aa
mov dword [esp], 0x45a2c0
call fcn.0044c860
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x3c]
mov dword [esp + 4], str.st_dev___d__and_st_rdev___d__differ_n
cmp edx, eax
mov dword [esp + 8], eax
sete al
mov dword [esp + 0xc], edx
movzx eax, al
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp + 4], 0x8ab
mov dword [esp], 0x45a2c0
call fcn.0044c860
movsx edx, word [ebp - 0x34]
mov dword [esp + 4], str.st_nlink_is__d__expected_1_n
cmp dx, 1
mov dword [esp + 8], edx
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0044cad0
call ebx
mov dword [eax], 0xdeadbeef
mov dword [esp + 4], esi
mov dword [esp], str.stat.tst_
call edi
mov dword [esp + 4], 0x8af
mov dword [esp], 0x45a2c0
mov dword [ebp - 0x4c], eax
call fcn.0044c860
mov eax, dword [ebp - 0x4c]
mov dword [esp + 4], str.stat_returned__d_n
cmp eax, 0xffffffff
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp + 4], 0x8b0
mov dword [esp], 0x45a2c0
call fcn.0044c860
call ebx
mov edx, dword [eax]
mov dword [ebp - 0x4c], edx
call ebx
mov edx, dword [ebp - 0x4c]
mov dword [esp + 4], 0x45a2ee
mov dword [esp + 8], edx
cmp dword [eax], 2
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp], 0x45ac30
call dword [sym.imp.msvcrt.dll__rmdir]
call ebx
mov dword [eax], 0xdeadbeef
mov dword [esp + 4], esi
mov dword [esp], 0x45aecd
call edi
mov dword [esp + 4], 0x8b8
mov dword [esp], 0x45a2c0
mov dword [ebp - 0x4c], eax
call fcn.0044c860
mov eax, dword [ebp - 0x4c]
mov dword [esp + 4], str.stat_returned__d_n
cmp eax, 0xffffffff
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp + 4], 0x8b9
mov dword [esp], 0x45a2c0
call fcn.0044c860
call ebx
mov edx, dword [eax]
mov dword [ebp - 0x4c], edx
call ebx
mov edx, dword [ebp - 0x4c]
mov dword [esp + 4], 0x45a2ee
mov dword [esp + 8], edx
cmp dword [eax], 2
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp + 4], esi
mov dword [esp], 0x45aed0
call edi
mov dword [esp + 4], 0x8bc
mov dword [esp], 0x45a2c0
mov ebx, eax
call fcn.0044c860
xor eax, eax
test ebx, ebx
mov dword [esp + 8], ebx
sete al
mov dword [esp + 4], str.stat_returned__d_n
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp + 4], 0x8bd
mov dword [esp], 0x45a2c0
call fcn.0044c860
mov eax, dword [ebp - 0x3c]
mov dword [esp + 4], str.st_dev___d_n
cmp eax, 2
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp + 4], 0x8be
mov dword [esp], 0x45a2c0
call fcn.0044c860
mov eax, dword [ebp - 0x2c]
mov dword [esp + 4], str.st_rdev___d_n
cmp eax, 2
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0044cad0
add esp, 0x5c
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 4], esi
mov dword [esp], 0xa
call dword [sym.imp.msvcrt.dll__fstat]
mov dword [esp + 4], 0x885
mov dword [esp], 0x45a2c0
mov dword [ebp - 0x4c], eax
call fcn.0044c860
call ebx
mov edx, dword [ebp - 0x4c]
mov eax, dword [eax]
mov dword [esp + 4], str.fstat_stdin__failed:_errno_d_n
mov dword [esp + 8], eax
xor eax, eax
test edx, edx
sete al
mov dword [esp], eax
call fcn.0044cad0
movzx eax, word [ebp - 0x36]
and ax, 0xf000
cmp ax, 0x2000
je 0x40ddb0
mov dword [esp + 4], 0x88e
mov dword [esp], 0x45a2c0
call fcn.0044c860
movzx eax, word [ebp - 0x36]
mov dword [esp], str.stdin_is_not_a_char_device__st_mode_06o_n
mov dword [esp + 4], eax
call fcn.0044cbc0
mov dword [esp], 0xa
call dword [sym.imp.msvcrt.dll__close]
jmp 0x40d7f8
mov dword [esp + 4], 0x8b4
mov dword [esp], 0x45a2c0
call fcn.0044c860
call ebx
mov eax, dword [eax]
mov dword [esp], str.mkdir_failed_with_errno__d_n
mov dword [esp + 4], eax
call fcn.0044cbc0
jmp 0x40db3b
mov dword [esp + 4], 0x8a1
mov dword [esp], 0x45a2c0
call fcn.0044c860
call ebx
mov eax, dword [eax]
mov dword [esp], str.pipe_failed_with_errno__d_n
mov dword [esp + 4], eax
call fcn.0044cbc0
jmp 0x40d962
mov dword [esp + 4], 0x87f
lea esi, [ebp - 0x3c]
mov dword [esp], 0x45a2c0
call fcn.0044c860
mov ebx, dword [sym.imp.msvcrt.dll__errno]
call ebx
mov eax, dword [eax]
mov dword [esp], str.open_failed_with_errno__d_n
mov dword [esp + 4], eax
call fcn.0044cbc0
mov edi, dword [sym.imp.msvcrt.dll__stat]
jmp 0x40d7b3
mov dword [esp + 4], 0x888
mov dword [esp], 0x45a2c0
call fcn.0044c860
movzx edx, word [ebp - 0x36]
mov dword [esp + 4], str.bad_st_mode_06o_n
cmp dx, 0x2000
mov dword [esp + 8], edx
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp + 4], 0x889
mov dword [esp], 0x45a2c0
call fcn.0044c860
mov eax, dword [ebp - 0x3c]
mov dword [esp + 4], str.st_dev_is__d__expected_10_n
cmp eax, 0xa
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp + 4], 0x88a
mov dword [esp], 0x45a2c0
call fcn.0044c860
mov eax, dword [ebp - 0x2c]
mov dword [esp + 4], str.st_rdev_is__d__expected_10_n
cmp eax, 0xa
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp + 4], 0x88b
mov dword [esp], 0x45a2c0
call fcn.0044c860
movsx edx, word [ebp - 0x34]
mov dword [esp + 4], str.st_nlink_is__d__expected_1_n
cmp dx, 1
mov dword [esp + 8], edx
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0044cad0
jmp 0x40dcf6