Function at 0x410749
Capabilities:
Create directory
Delete file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa8
mov eax, dword [ebp + 8]
mov eax, dword [eax + 4]
mov dword [esp], eax
call dbg.rootpath
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x80]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
mov eax, dword [sym.imp.msvcrt.dll__stati64]
call eax
test eax, eax
jns 0x41079b
mov eax, dword [sym.imp.msvcrt.dll__errno]
call eax
mov eax, dword [eax]
mov dword [esp], eax
call sym._strerror
mov edx, dword [ebp + 0x18]
mov dword [edx], eax
mov eax, 0xffffffff
jmp 0x410aad
cmp dword [ebp + 0x14], 0
jns 0x4107a8
mov eax, 0x1ff
jmp 0x4107ad
mov eax, 0x1b6
mov dword [ebp - 0x14], eax
mov eax, dword [ebp + 8]
movzx eax, word [eax + 0xe]
movzx eax, ax
mov edx, dword [ebp - 0x14]
not edx
or eax, edx
and dword [ebp + 0x14], eax
mov dword [esp + 8], 1
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call dbg.estrpath
mov dword [ebp - 0x18], eax
cmp dword [ebp + 0x14], 0
jns 0x4108e6
mov eax, dword [ebp + 0x10]
and eax, 0xffffffbf
test eax, eax
je 0x410813
mov eax, dword [ebp + 0x18]
mov dword [eax], str.permission_denied
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
call sym._free
mov eax, 0xffffffff
jmp 0x410aad
lea eax, [parent.st_ctime]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
mov eax, dword [sym.imp.msvcrt.dll__stati64]
call eax
test eax, eax
jns 0x410839
mov eax, dword [sym.imp.msvcrt.dll__errno]
call eax
mov eax, dword [eax]
cmp eax, 2
je 0x410857
mov eax, dword [ebp + 0x18]
mov dword [eax], str.file_or_directory_already_exists
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
call sym._free
mov eax, 0xffffffff
jmp 0x410aad
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
call sym._mkdir
test eax, eax
jns 0x410891
mov eax, dword [sym.imp.msvcrt.dll__errno]
call eax
mov eax, dword [eax]
mov dword [esp], eax
call sym._strerror
mov edx, dword [ebp + 0x18]
mov dword [edx], eax
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
call sym._free
mov eax, 0xffffffff
jmp 0x410aad
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
call dbg.opendir
mov edx, dword [ebp + 8]
mov dword [edx + 0x40], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x40]
test eax, eax
jne 0x4109d8
mov eax, dword [sym.imp.msvcrt.dll__errno]
call eax
mov eax, dword [eax]
mov dword [esp], eax
call sym._strerror
mov edx, dword [ebp + 0x18]
mov dword [edx], eax
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
call sym._remove
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
call sym._free
mov eax, 0xffffffff
jmp 0x410aad
mov dword [ebp - 0xc], 0x500
mov eax, dword [ebp + 0x10]
and eax, 3
cmp eax, 3
je 0x41092f
cmp eax, 3
jg 0x410910
cmp eax, 2
je 0x410923
cmp eax, 2
jg 0x410910
test eax, eax
je 0x41092f
cmp eax, 1
je 0x410929
mov eax, dword [ebp + 0x18]
mov dword [eax], str.programmer_error
mov eax, 0xffffffff
jmp 0x410aad
or dword [ebp - 0xc], 2
jmp 0x410930
or dword [ebp - 0xc], 1
jmp 0x410930
nop
mov eax, dword [ebp + 0x10]
and eax, 0x10
test eax, eax
je 0x410941
or dword [ebp - 0xc], 0x200
or dword [ebp - 0xc], 0x8000
mov eax, dword [ebp + 0x14]
and eax, 0x1ff
mov dword [esp + 8], eax
mov eax, dword [ebp - 0xc]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
call sym._open
mov edx, dword [ebp + 8]
mov dword [edx + 0x48], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x48]
test eax, eax
jns 0x4109d8
mov eax, dword [0x52a760]
test eax, eax
je 0x4109ad
mov eax, dword [ebp + 0x14]
and eax, 0x1ff
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0xc]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x18]
mov dword [esp + 8], eax
mov dword [esp + 4], str.create__s__0x_x__0_o__failed_n
mov dword [esp], 2
call dbg.fprint
mov eax, dword [sym.imp.msvcrt.dll__errno]
call eax
mov eax, dword [eax]
mov dword [esp], eax
call sym._strerror
mov edx, dword [ebp + 0x18]
mov dword [edx], eax
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
call sym._free
mov eax, 0xffffffff
jmp 0x410aad
mov eax, dword [ebp + 8]
mov eax, dword [eax + 4]
mov dword [ebp - 0x1c], eax
mov dword [esp + 8], 1
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call dbg.estrpath
mov edx, dword [ebp + 8]
mov dword [edx + 4], eax
mov eax, dword [ebp + 0x18]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call dbg.fidstat
test eax, eax
jns 0x410a94
mov eax, dword [ebp - 0x18]
mov dword [esp + 8], eax
mov dword [esp + 4], str.stat_after_create_on__s_failed_n
mov dword [esp], 2
call dbg.fprint
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
call sym._remove
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
call sym._free
mov eax, dword [ebp + 8]
mov edx, dword [ebp - 0x1c]
mov dword [eax + 4], edx
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x48]
test eax, eax
js 0x410a75
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x48]
mov dword [esp], eax
call sym._close
mov eax, dword [ebp + 8]
mov dword [eax + 0x48], 0xffffffff
jmp 0x410a8d
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x40]
mov dword [esp], eax
call dbg.closedir
mov eax, dword [ebp + 8]
mov dword [eax + 0x40], 0
mov eax, 0xffffffff
jmp 0x410aad
mov eax, dword [ebp + 8]
mov edx, dword [ebp + 0x10]
mov dword [eax + 0x3c], edx
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call sym._free
mov eax, 0
leave
ret