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

Disassembly:
push ebp
mov eax, 0x1664
mov ebp, esp
push edi
push esi
push ebx
call fcn.0057e5f0
sub esp, eax
lea ebx, [ebp - 0x1624]
mov dword [esp + 4], ebx
mov dword [esp], 0x104
call dword [sym.imp.kernel32.dll_GetTempPathW]
sub esp, 8
mov esi, eax
call fcn.0057d110
mov dword [eax], 0x589a87
mov dword [eax + 4], 0x2e1
xor eax, eax
test esi, esi
setne al
mov dword [esp + 4], str.temp_path_failed_n
mov dword [esp], eax
call fcn.00414890
cmp word [ebp - 0x1624], 0
mov edx, ebx
je 0x415931
lea esi, [esi]
nop
add edx, 2
cmp word [edx], 0
jne 0x415928
xor eax, eax
lea esi, [esi]
nop
movzx ecx, word [eax + 0x58a2d4]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x415938
xor eax, eax
lea edx, [ebp - 0x141c]
lea esi, [esi]
nop
movzx ecx, word [ebx + eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x415958
cmp word [ebp - 0x141c], 0
mov ecx, edx
je 0x415981
lea esi, [esi]
add ecx, 2
cmp word [ecx], 0
jne 0x415978
xor eax, eax
lea esi, [esi]
nop
movzx esi, word [eax + 0x58a2c8]
mov word [ecx + eax], si
add eax, 2
test si, si
jne 0x415988
xor eax, eax
lea esi, [ebp - 0x1214]
lea esi, [esi]
nop
movzx ecx, word [ebx + eax]
mov word [esi + eax], cx
add eax, 2
test cx, cx
jne 0x4159a8
cmp word [ebp - 0x1214], 0
mov ecx, esi
je 0x4159d1
lea esi, [esi]
add ecx, 2
cmp word [ecx], 0
jne 0x4159c8
xor eax, eax
lea esi, [esi]
nop
movzx edi, word [eax + 0x58a2bc]
mov word [ecx + eax], di
add eax, 2
test di, di
jne 0x4159d8
mov eax, dword [sym.imp.kernel32.dll_DeleteFileW]
mov dword [esp], esi
mov dword [ebp - 0x164c], eax
call eax
mov eax, dword [sym.imp.kernel32.dll_RemoveDirectoryW]
lea edx, [ebp - 0x141c]
sub esp, 4
mov dword [esp], edx
mov edi, eax
mov dword [ebp - 0x163c], eax
call eax
mov eax, edi
sub esp, 4
mov dword [esp], ebx
call eax
mov eax, dword [sym.imp.kernel32.dll_CreateDirectoryW]
sub esp, 4
mov dword [esp + 4], 0
mov dword [esp], ebx
mov dword [ebp - 0x1644], eax
call eax
sub esp, 8
mov edi, eax
call fcn.0057d110
mov dword [eax], 0x589a87
mov dword [eax + 4], 0x2ef
xor eax, eax
cmp edi, 1
sete al
mov dword [esp + 4], str.failed_to_create_directory_n
mov dword [esp], eax
call fcn.00414890
mov edx, dword [sym.imp.kernel32.dll_CreateFileW]
mov dword [esp], ebx
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0x42000000
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], 0
mov dword [esp + 8], 3
mov dword [esp + 4], 0x80100001
mov dword [ebp - 0x1648], edx
call edx
sub esp, 0x1c
mov edi, eax
mov dword [ebp - 0x1640], eax
call fcn.0057d110
mov dword [eax], 0x589a87
mov dword [eax + 4], 0x2f5
xor eax, eax
cmp edi, 0xffffffff
setne al
mov dword [esp + 4], str.failed_to_open_directory_n
mov dword [esp], eax
call fcn.00414890
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], 0
call dword [sym.imp.kernel32.dll_CreateEventW]
mov dword [ebp - 0x1628], eax
sub esp, 0x10
lea eax, [ebp - 0x1638]
mov dword [esp + 0x18], eax
lea eax, [ebp - 0x100c]
mov dword [esp], edi
mov dword [esp + 0x1c], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 1
mov dword [esp + 0xc], 1
mov dword [esp + 8], 0x1000
mov dword [esp + 4], eax
call dword [sym.imp.kernel32.dll_ReadDirectoryChangesW]
sub esp, 0x20
mov edi, eax
call fcn.0057d110
mov dword [eax], 0x589a87
mov dword [eax + 4], 0x2fc
xor eax, eax
cmp edi, 1
sete al
mov dword [esp + 4], str.should_return_true_n
mov dword [esp], eax
call fcn.00414890
mov ecx, dword [sym.imp.kernel32.dll_WaitForSingleObject]
mov dword [esp + 4], 0xa
mov eax, dword [ebp - 0x1628]
mov dword [esp], eax
mov dword [ebp - 0x1650], ecx
call ecx
sub esp, 8
mov edi, eax
call fcn.0057d110
mov dword [eax], 0x589a87
mov dword [eax + 4], 0x2ff
xor eax, eax
cmp edi, 0x102
sete al
mov dword [esp + 4], 0x589c87
mov dword [esp], eax
call fcn.00414890
lea edx, [ebp - 0x141c]
mov dword [esp + 4], 0
mov dword [esp], edx
mov eax, dword [ebp - 0x1644]
call eax
sub esp, 8
mov edi, eax
call fcn.0057d110
mov dword [eax], 0x589a87
mov dword [eax + 4], 0x302
xor eax, eax
cmp edi, 1
sete al
mov dword [esp + 4], str.failed_to_create_directory_n
mov dword [esp], eax
call fcn.00414890
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 2
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0xc0000000
mov dword [esp], esi
mov edx, dword [ebp - 0x1648]
call edx
sub esp, 0x1c
mov edi, eax
call fcn.0057d110
mov dword [eax], 0x589a87
mov dword [eax + 4], 0x305
xor eax, eax
cmp edi, 0xffffffff
setne al
mov dword [esp + 4], 0x589d13
mov dword [esp], eax
call fcn.00414890
call fcn.0057d110
mov dword [eax], 0x589a87
mov dword [eax + 4], 0x306
mov dword [esp], edi
mov edi, dword [sym.imp.kernel32.dll_CloseHandle]
call edi
sub esp, 4
mov dword [esp], eax
mov dword [esp + 4], str.failed_to_close_file_n
call fcn.00414890
mov dword [esp + 4], 0x3e8
mov eax, dword [ebp - 0x1628]
mov dword [esp], eax
mov ecx, dword [ebp - 0x1650]
call ecx
sub esp, 8
mov dword [ebp - 0x1644], eax
call fcn.0057d110
mov dword [eax], 0x589a87
mov dword [eax + 4], 0x309
xor eax, eax
mov dword [esp + 4], str.event_should_be_ready_n
mov ecx, dword [ebp - 0x1644]
test ecx, ecx
sete al
mov dword [esp], eax
call fcn.00414890
call fcn.0057d110
mov dword [eax], 0x589a87
mov dword [eax + 4], 0x30b
xor eax, eax
mov dword [esp + 4], str.ov.Internal_wrong_n
mov edx, dword [ebp - 0x1638]
test edx, edx
sete al
mov dword [esp], eax
call fcn.00414890
call fcn.0057d110
mov dword [eax], 0x589a87
mov dword [eax + 4], 0x30c
xor eax, eax
mov dword [esp + 4], str.ov.InternalHigh_wrong_n
cmp dword [ebp - 0x1634], 0x12
sete al
mov dword [esp], eax
call fcn.00414890
call fcn.0057d110
mov dword [eax], 0x589a87
mov dword [eax + 4], 0x30f
xor eax, eax
mov dword [esp + 4], str.offset_wrong_n
mov ecx, dword [ebp - 0x100c]
test ecx, ecx
sete al
mov dword [esp], eax
call fcn.00414890
call fcn.0057d110
mov dword [eax], 0x589a87
mov dword [eax + 4], 0x310
xor eax, eax
mov dword [esp + 4], str.action_wrong_n
cmp dword [ebp - 0x1008], 1
sete al
mov dword [esp], eax
call fcn.00414890
call fcn.0057d110
mov dword [eax], 0x589a87
mov dword [eax + 4], 0x311
xor eax, eax
mov dword [esp + 4], str.len_wrong_n
cmp dword [ebp - 0x1004], 6
sete al
mov dword [esp], eax
call fcn.00414890
call fcn.0057d110
mov dword [eax], 0x589a87
mov dword [eax + 4], 0x312
cmp dword [ebp - 0x1000], 0x6f0066
je 0x415ef8
mov eax, 1
xor eax, 1
mov dword [esp + 4], str.name_wrong_n
mov dword [esp], eax
call fcn.00414890
mov dword [esp], esi
mov eax, dword [ebp - 0x164c]
call eax
sub esp, 4
mov esi, eax
call fcn.0057d110
mov dword [eax], 0x589a87
mov dword [eax + 4], 0x315
xor eax, eax
cmp esi, 1
sete al
mov dword [esp + 4], str.failed_to_delete_file_n
mov dword [esp], eax
call fcn.00414890
lea edx, [ebp - 0x141c]
mov dword [esp], edx
mov eax, dword [ebp - 0x163c]
call eax
sub esp, 4
mov esi, eax
call fcn.0057d110
mov dword [eax], 0x589a87
mov dword [eax + 4], 0x318
xor eax, eax
cmp esi, 1
sete al
mov dword [esp + 4], str.failed_to_remove_directory_n
mov dword [esp], eax
call fcn.00414890
mov esi, dword [ebp - 0x1640]
mov dword [esp], esi
call edi
sub esp, 4
mov dword [esp], ebx
mov eax, dword [ebp - 0x163c]
call eax
sub esp, 4
mov ebx, eax
call fcn.0057d110
mov dword [eax], 0x589a87
mov dword [eax + 4], 0x31d
xor eax, eax
cmp ebx, 1
sete al
mov dword [esp + 4], str.failed_to_remove_directory_n
mov dword [esp], eax
call fcn.00414890
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
xor eax, eax
cmp word [ebp - 0xffc], 0x6f
jne 0x415e10
jmp 0x415e15