Function at 0x4081d0
Capabilities:
Create directory
Delete directory
Delete file
Get common file path
Get file attributes

Disassembly:
push edi
lea edi, [esp + 8]
and esp, 0xfffffff8
push dword [edi - 4]
push ebp
mov ebp, esp
push edi
push esi
lea eax, [ebp - 0x218]
push ebx
lea ebx, [ebp - 0x420]
sub esp, 0x458
mov dword [esp + 4], eax
mov dword [esp], 0x104
call dword [sym.imp.kernel32.dll_GetTempPathW]
lea eax, [ebp - 0x218]
sub esp, 8
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetTempFileNameW]
sub esp, 0x10
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_DeleteFileW]
mov eax, dword [sym.imp.oleaut32.dll_SysAllocString]
sub esp, 4
mov dword [esp], ebx
mov dword [ebp - 0x440], eax
call eax
mov dword [ebp - 0x438], eax
mov edi, eax
mov eax, dword [0x448004]
sub esp, 4
mov edx, dword [eax]
mov dword [esp + 8], 0
mov dword [esp + 4], edi
mov dword [esp], eax
call dword [edx + 0x50]
sub esp, 0xc
mov esi, eax
mov eax, 0x29f
call fcn.00406da0
xor eax, eax
cmp esi, 0x80004003
mov dword [esp + 8], esi
sete al
mov dword [esp + 4], str.Unexpected_hr__lx._n
mov dword [esp], eax
call fcn.004077c0
mov eax, dword [0x448004]
lea ecx, [ebp - 0x42c]
mov edx, dword [eax]
mov dword [esp + 8], ecx
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [edx + 0x50]
sub esp, 0xc
mov esi, eax
mov eax, 0x2a1
call fcn.00406da0
xor eax, eax
cmp esi, 0x80070057
mov dword [esp + 8], esi
sete al
mov dword [esp + 4], str.Unexpected_hr__lx._n
mov dword [esp], eax
call fcn.004077c0
mov eax, dword [0x448004]
mov dword [ebp - 0x42c], 0xdeadbeef
lea ecx, [ebp - 0x42c]
mov edx, dword [eax]
mov dword [esp + 8], ecx
mov dword [esp + 4], edi
mov dword [esp], eax
call dword [edx + 0x50]
sub esp, 0xc
mov esi, eax
mov eax, 0x2a5
call fcn.00406da0
mov dword [esp + 4], str.file___NULL_n
xor eax, eax
mov edx, dword [ebp - 0x42c]
test edx, edx
sete al
mov dword [esp], eax
call fcn.004077c0
mov eax, 0x2a6
call fcn.00406da0
xor eax, eax
cmp esi, 0x800a0035
mov dword [esp + 8], esi
sete al
mov dword [esp + 4], str.Unexpected_hr__lx._n
mov dword [esp], eax
call fcn.004077c0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 1
mov dword [esp + 0x10], 1
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0x40000000
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_CreateFileW]
sub esp, 0x1c
cmp eax, 0xffffffff
je 0x408c08
mov dword [esp], eax
lea edi, [ebp - 0x428]
call dword [sym.imp.kernel32.dll_CloseHandle]
mov eax, dword [0x448004]
lea ecx, [ebp - 0x42c]
sub esp, 4
mov edx, dword [eax]
mov dword [esp + 8], ecx
mov ecx, dword [ebp - 0x438]
mov dword [esp], eax
mov dword [esp + 4], ecx
call dword [edx + 0x50]
sub esp, 0xc
mov esi, eax
mov eax, 0x2b1
call fcn.00406da0
xor eax, eax
test esi, esi
mov dword [esp + 8], esi
sete al
mov dword [esp + 4], str.Unexpected_hr__lx._n
mov dword [esp], eax
call fcn.004077c0
mov eax, dword [ebp - 0x42c]
mov edx, dword [eax]
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [edx + 0x40]
sub esp, 8
mov esi, eax
mov eax, 0x2b4
call fcn.00406da0
xor eax, eax
cmp esi, 0x80004003
mov dword [esp + 8], esi
sete al
mov dword [esp + 4], str.Unexpected_hr__lx._n
mov dword [esp], eax
call fcn.004077c0
mov eax, dword [ebp - 0x42c]
fldz
fstp qword [ebp - 0x428]
mov edx, dword [eax]
mov dword [esp + 4], edi
mov dword [esp], eax
call dword [edx + 0x40]
sub esp, 8
mov esi, eax
mov eax, 0x2b8
call fcn.00406da0
xor eax, eax
test esi, esi
mov dword [esp + 8], esi
sete al
mov dword [esp + 4], str.Unexpected_hr__lx._n
mov dword [esp], eax
call fcn.004077c0
mov eax, 0x2b9
call fcn.00406da0
fld qword [ebp - 0x428]
xor eax, eax
mov dword [esp + 4], str.got__f_n
fst qword [esp + 8]
fldz
fxch st(1)
fcompi st(1)
fstp st(0)
seta al
mov dword [esp], eax
call fcn.004077c0
mov eax, dword [ebp - 0x42c]
mov edx, dword [eax]
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [edx + 0x44]
sub esp, 8
mov esi, eax
mov eax, 0x2bc
call fcn.00406da0
xor eax, eax
cmp esi, 0x80004003
mov dword [esp + 8], esi
sete al
mov dword [esp + 4], str.Unexpected_hr__lx._n
mov dword [esp], eax
call fcn.004077c0
mov eax, dword [ebp - 0x42c]
fldz
fstp qword [ebp - 0x428]
mov edx, dword [eax]
mov dword [esp + 4], edi
lea edi, [ebp - 0x430]
mov dword [esp], eax
call dword [edx + 0x44]
sub esp, 8
mov esi, eax
mov eax, 0x2c0
call fcn.00406da0
xor eax, eax
test esi, esi
mov dword [esp + 8], esi
sete al
mov dword [esp + 4], str.Unexpected_hr__lx._n
mov dword [esp], eax
call fcn.004077c0
mov eax, 0x2c1
call fcn.00406da0
fld qword [ebp - 0x428]
xor eax, eax
mov dword [esp + 4], str.got__f_n
fst qword [esp + 8]
fldz
fxch st(1)
fcompi st(1)
fstp st(0)
seta al
mov dword [esp], eax
call fcn.004077c0
mov eax, dword [ebp - 0x42c]
mov edx, dword [eax]
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [edx + 0x1c]
sub esp, 8
mov esi, eax
mov eax, 0x2c4
call fcn.00406da0
xor eax, eax
cmp esi, 0x80004003
mov dword [esp + 8], esi
sete al
mov dword [esp + 4], str.Unexpected_hr__lx._n
mov dword [esp], eax
call fcn.004077c0
mov eax, dword [ebp - 0x42c]
lea ecx, [ebp - 0x434]
mov edx, dword [eax]
mov dword [esp + 4], ecx
mov dword [esp], eax
call dword [edx + 0x1c]
sub esp, 8
mov esi, eax
mov eax, 0x2c7
call fcn.00406da0
xor eax, eax
test esi, esi
mov dword [esp + 8], esi
sete al
mov dword [esp + 4], str.Unexpected_hr__lx._n
mov dword [esp], eax
call fcn.004077c0
mov eax, 0x2c8
call fcn.00406da0
mov eax, dword [ebp - 0x434]
call fcn.00406fa0
mov dword [esp + 4], ebx
mov esi, eax
mov eax, dword [ebp - 0x434]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_lstrcmpiW]
sub esp, 8
test eax, eax
sete al
mov dword [esp + 8], esi
movzx eax, al
mov dword [esp + 4], str.got__s_n
mov dword [esp], eax
call fcn.004077c0
mov eax, dword [ebp - 0x434]
mov dword [esp], eax
mov eax, dword [sym.imp.oleaut32.dll_SysFreeString]
mov dword [ebp - 0x43c], eax
call eax
mov eax, dword [ebp - 0x42c]
sub esp, 4
mov edx, dword [eax]
mov dword [esp + 4], edi
mov dword [esp], eax
call dword [edx + 0x38]
mov ecx, dword [sym.imp.kernel32.dll_GetFileAttributesW]
sub esp, 8
mov edi, eax
mov dword [esp], ebx
mov dword [ebp - 0x448], ecx
call ecx
and eax, 0xc37
sub esp, 4
mov esi, eax
mov eax, 0x2d1
call fcn.00406da0
xor eax, eax
test edi, edi
mov dword [esp + 8], edi
sete al
mov dword [esp + 4], str.Unexpected_hr__lx._n
mov dword [esp], eax
call fcn.004077c0
mov eax, 0x2d2
call fcn.00406da0
mov eax, dword [ebp - 0x430]
mov dword [esp + 0xc], esi
mov dword [esp + 4], str.Unexpected_flags__x__expected__lx._n
cmp eax, esi
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.004077c0
mov eax, dword [ebp - 0x42c]
mov edx, esi
or edx, 1
mov edi, dword [eax]
mov dword [esp + 4], edx
mov dword [ebp - 0x444], edx
mov dword [esp], eax
call dword [edi + 0x3c]
sub esp, 8
mov edi, eax
mov eax, 0x2d5
call fcn.00406da0
xor eax, eax
test edi, edi
mov dword [esp + 8], edi
sete al
mov dword [esp + 4], str.Unexpected_hr__lx._n
mov dword [esp], eax
call fcn.004077c0
mov dword [esp], ebx
mov ecx, dword [ebp - 0x448]
call ecx
and eax, 0xc37
sub esp, 4
mov edi, eax
mov eax, 0x2d7
call fcn.00406da0
mov edx, dword [ebp - 0x444]
xor eax, eax
mov dword [esp + 8], edi
mov dword [esp + 4], str.Unexpected_flags__lx__expected__lx_n
cmp edx, edi
mov dword [esp + 0xc], edx
sete al
mov dword [esp], eax
call fcn.004077c0
mov eax, dword [ebp - 0x42c]
lea ecx, [ebp - 0x430]
mov edx, dword [eax]
mov dword [esp + 4], ecx
mov dword [esp], eax
call dword [edx + 0x38]
sub esp, 8
mov dword [ebp - 0x444], eax
mov eax, 0x2da
call fcn.00406da0
mov edx, dword [ebp - 0x444]
xor eax, eax
mov dword [esp + 4], str.Unexpected_hr__lx._n
test edx, edx
mov dword [esp + 8], edx
sete al
mov dword [esp], eax
call fcn.004077c0
mov eax, 0x2db
call fcn.00406da0
mov eax, dword [ebp - 0x430]
mov dword [esp + 0xc], edi
mov dword [esp + 4], str.Unexpected_flags__x__expected__lx._n
cmp eax, edi
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.004077c0
mov eax, dword [ebp - 0x42c]
mov edx, dword [eax]
mov dword [esp + 4], esi
mov dword [esp], eax
call dword [edx + 0x3c]
sub esp, 8
mov edi, eax
mov eax, 0x2de
call fcn.00406da0
xor eax, eax
test edi, edi
mov dword [esp + 8], edi
sete al
mov dword [esp + 4], str.Unexpected_hr__lx._n
mov dword [esp], eax
call fcn.004077c0
mov dword [esp], ebx
mov ecx, dword [ebp - 0x448]
call ecx
and eax, 0xc37
sub esp, 4
mov edi, eax
mov eax, 0x2e0
call fcn.00406da0
xor eax, eax
cmp esi, edi
mov dword [esp + 0xc], esi
sete al
mov dword [esp + 8], edi
lea edi, [ebp - 0x430]
mov dword [esp], eax
mov dword [esp + 4], str.Unexpected_flags__lx__expected__lx._n
call fcn.004077c0
mov eax, dword [ebp - 0x42c]
mov edx, dword [eax]
mov dword [esp + 4], edi
mov dword [esp], eax
call dword [edx + 0x38]
sub esp, 8
mov edi, eax
mov eax, 0x2e3
call fcn.00406da0
xor eax, eax
test edi, edi
mov dword [esp + 8], edi
sete al
mov dword [esp + 4], str.Unexpected_hr__lx._n
lea edi, [ebp - 0x218]
mov dword [esp], eax
call fcn.004077c0
mov eax, 0x2e4
call fcn.00406da0
mov eax, dword [ebp - 0x430]
mov dword [esp + 0xc], esi
mov dword [esp + 4], str.Unexpected_flags__x__expected__lx._n
cmp eax, esi
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.004077c0
mov eax, dword [ebp - 0x42c]
mov edx, dword [eax]
mov dword [esp + 4], edi
mov dword [esp], eax
call dword [edx + 0x4c]
sub esp, 8
mov esi, eax
mov eax, 0x2e7
call fcn.00406da0
xor eax, eax
test esi, esi
mov dword [esp + 8], esi
sete al
mov dword [esp + 4], str.Unexpected_hr__lx._n
mov dword [esp], eax
call fcn.004077c0
mov eax, 0x2e8
call fcn.00406da0
movzx edx, word [ebp - 0x218]
mov dword [esp + 4], str.V_VT_size____d__expected_VT_I4_n
cmp dx, 3
mov dword [esp + 8], edx
sete al
movzx eax, al
mov dword [esp], eax
call fcn.004077c0
mov eax, 0x2e9
call fcn.00406da0
mov eax, dword [ebp - 0x210]
mov dword [esp + 4], str.V_I4_size____ld__expected_0_n
test eax, eax
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.004077c0
mov eax, dword [ebp - 0x42c]
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
mov eax, dword [0x448004]
sub esp, 4
mov edx, dword [eax]
mov dword [esp + 8], 0
mov ecx, dword [ebp - 0x438]
mov dword [esp], eax
mov dword [esp + 4], ecx
call dword [edx + 0x5c]
mov esi, eax
sub esp, 0xc
mov eax, 0x2ed
call fcn.00406da0
cmp esi, 0x800a0046
je 0x408b78
mov eax, dword [0x448050]
test eax, eax
je 0x408b48
mov dword [esp + 8], esi
mov dword [esp + 4], str.Unexpected_hr__lx._n
mov dword [esp], 0
call fcn.004077c0
test esi, esi
jne 0x408b94
mov eax, dword [0x448004]
mov edx, dword [eax]
mov dword [esp + 8], 1
mov edi, dword [ebp - 0x438]
mov dword [esp], eax
mov dword [esp + 4], edi
call dword [edx + 0x5c]
sub esp, 0xc
mov esi, eax
mov eax, 0x2f3
call fcn.00406da0
xor eax, eax
cmp esi, 0x800a0035
mov dword [esp + 8], esi
sete al
mov dword [esp + 4], str.Unexpected_hr__lx._n
mov dword [esp], eax
call fcn.004077c0
mov dword [esp], edi
mov eax, dword [ebp - 0x43c]
call eax
mov edx, ebx
sub esp, 4
cmp word [ebp - 0x420], 0
je 0x408a69
lea esi, [esi]
add edx, 2
cmp word [edx], 0
jne 0x408a60
xor eax, eax
lea esi, [esi]
nop
movzx ecx, word [eax + 0x41b94c]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x408a70
mov dword [esp], ebx
mov dword [esp + 4], 0
call dword [sym.imp.kernel32.dll_CreateDirectoryW]
sub esp, 8
mov esi, eax
mov eax, 0x2fa
call fcn.00406da0
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
mov dword [esp + 8], esi
mov dword [esp], esi
mov dword [esp + 0xc], eax
mov dword [esp + 4], str.Unexpected_retval__d__error__ld._n
call fcn.004077c0
mov dword [esp], ebx
mov eax, dword [ebp - 0x440]
call eax
lea ecx, [ebp - 0x42c]
mov esi, eax
mov eax, dword [0x448004]
sub esp, 4
mov edx, dword [eax]
mov dword [esp + 8], ecx
mov dword [esp + 4], esi
mov dword [esp], eax
call dword [edx + 0x50]
sub esp, 0xc
mov edi, eax
mov eax, 0x2fe
call fcn.00406da0
xor eax, eax
cmp edi, 0x800a0035
mov dword [esp + 8], edi
sete al
mov dword [esp + 4], str.Unexpected_hr__lx._n
mov dword [esp], eax
call fcn.004077c0
mov dword [esp], esi
mov eax, dword [ebp - 0x43c]
call eax
sub esp, 4
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_RemoveDirectoryW]
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
lea esp, [edi - 8]
pop edi
ret
test esi, esi
jne 0x408be8
mov dword [esp + 8], 0
mov dword [esp + 4], str.Unexpected_hr__lx._n
mov dword [esp], 1
call fcn.004077c0
jmp 0x4089f3
mov dword [esp + 8], 0x800a0046
mov dword [esp + 4], str.Unexpected_hr__lx._n
mov dword [esp], 1
call fcn.004077c0
mov eax, dword [0x448004]
mov edx, dword [eax]
mov dword [esp + 8], 1
mov ecx, dword [ebp - 0x438]
mov dword [esp], eax
mov dword [esp + 4], ecx
call dword [edx + 0x5c]
sub esp, 0xc
mov esi, eax
mov eax, 0x2f0
call fcn.00406da0
xor eax, eax
test esi, esi
mov dword [esp + 8], esi
sete al
mov dword [esp + 4], str.Unexpected_hr__lx._n
mov dword [esp], eax
call fcn.004077c0
jmp 0x4089f3
mov dword [esp + 8], esi
mov dword [esp + 4], str.Unexpected_hr__lx._n
mov dword [esp], 0
call fcn.004077c0
jmp 0x408b94
mov eax, 0x2aa
call fcn.00406da0
mov dword [esp], str.Cant_create_temporary_file_n
call fcn.004072e0
mov eax, dword [ebp - 0x438]
mov dword [esp], eax
call dword [sym.imp.oleaut32.dll_SysFreeString]
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
lea esp, [edi - 8]
pop edi
ret