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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x44c
mov ebx, dword [0x76d154]
test ebx, ebx
je 0x475fd0
lea edx, [ebp - 0x41c]
mov dword [esp], 0x104
lea edi, [ebp - 0x214]
mov dword [esp + 4], edx
call dword [sym.imp.kernel32.dll_GetTempPathW]
sub esp, 8
mov ebx, eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x6c4
mov esi, dword fs:[0x18]
mov eax, dword [esi + 0x34]
mov dword [esp + 4], str.GetTempPathW_error__ld_n
mov dword [esp + 8], eax
xor eax, eax
test ebx, ebx
setne al
mov dword [esp], eax
call fcn.0045bef0
mov eax, 0x6c5
call fcn.0045b740
xor eax, eax
cmp ebx, 0x103
mov dword [esp + 4], 0x59813c
setbe al
mov dword [esp], eax
call fcn.0045bef0
lea edx, [ebp - 0x41c]
mov dword [esp + 0xc], edi
mov dword [esp], edx
mov dword [esp + 8], 0
mov dword [esp + 4], 0x59eac0
call dword [sym.imp.kernel32.dll_GetTempFileNameW]
sub esp, 0x10
mov ebx, eax
mov eax, 0x6c8
call fcn.0045b740
mov eax, dword [esi + 0x34]
mov dword [esp + 4], str.GetTempFileNameW_error__ld_n
mov dword [esp + 8], eax
xor eax, eax
test ebx, ebx
setne al
mov dword [esp], eax
call fcn.0045bef0
lea eax, [ebp - 0x434]
mov dword [esi + 0x34], 0xdeadbeef
mov dword [ebp - 0x434], 0x18
mov dword [ebp - 0x430], 0
mov dword [ebp - 0x42c], 0x10000000
mov dword [ebp - 0x428], 0
mov dword [ebp - 0x424], 0
mov dword [ebp - 0x420], 0
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 1
mov dword [esp + 8], 0
mov dword [esp + 4], 0x80000000
mov dword [esp], edi
call dword [0x76d154]
sub esp, 0x14
mov ebx, eax
mov eax, 0x6d2
call fcn.0045b740
xor eax, eax
cmp ebx, 0xffffffff
je 0x475fc0
mov dword [esp], eax
mov dword [esp + 4], str.CREATE_NEW_should_fail_if_file_exists_and_last_error_value_should_be_ERROR_FILE_EXISTS_n
mov esi, dword fs:[0x18]
call fcn.0045bef0
lea eax, [ebp - 0x434]
mov dword [esi + 0x34], 0xdeadbeef
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 2
mov dword [esp + 8], 1
mov dword [esp + 4], 0x80000000
mov dword [esp], edi
call dword [0x76d154]
sub esp, 0x14
mov ebx, eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x6d7
xor eax, eax
mov edx, dword [esi + 0x34]
cmp ebx, 0xffffffff
je 0x475945
xor eax, eax
cmp edx, 0xb7
sete al
mov dword [esp + 0xc], edx
mov dword [esp + 8], ebx
mov dword [esp], eax
mov dword [esp + 4], str.hFile__p__last_error__lu_n
mov esi, dword fs:[0x18]
call fcn.0045bef0
mov eax, dword [sym.imp.kernel32.dll_CloseHandle]
mov dword [esp], ebx
mov dword [ebp - 0x438], eax
call eax
lea eax, [ebp - 0x434]
mov dword [esi + 0x34], 0xdeadbeef
sub esp, 4
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 4
mov dword [esp + 8], 1
mov dword [esp + 4], 0x80000000
mov dword [esp], edi
call dword [0x76d154]
sub esp, 0x14
mov ebx, eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x6dd
xor eax, eax
mov edx, dword [esi + 0x34]
cmp ebx, 0xffffffff
je 0x4759d5
xor eax, eax
cmp edx, 0xb7
sete al
mov dword [esp + 0xc], edx
mov dword [esp + 8], ebx
mov dword [esp], eax
mov dword [esp + 4], str.hFile__p__last_error__lu_n
mov esi, dword fs:[0x18]
call fcn.0045bef0
mov dword [esp], ebx
mov eax, dword [ebp - 0x438]
call eax
mov eax, dword [sym.imp.kernel32.dll_DeleteFileW]
sub esp, 4
mov dword [esp], edi
mov dword [ebp - 0x444], eax
call eax
sub esp, 4
mov ebx, eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x6e2
mov eax, dword [esi + 0x34]
mov dword [esp], ebx
mov dword [esp + 8], eax
mov dword [esp + 4], str.DeleteFileW:_error__ld_n
call fcn.0045bef0
lea eax, [ebp - 0x434]
mov dword [esi + 0x34], 0xdeadbeef
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 4
mov dword [esp + 8], 1
mov dword [esp + 4], 0x80000000
mov dword [esp], edi
call dword [0x76d154]
sub esp, 0x14
mov ebx, eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x6e6
xor eax, eax
mov edx, dword [esi + 0x34]
cmp ebx, 0xffffffff
je 0x475a9a
xor eax, eax
test edx, edx
sete al
mov dword [esp + 0xc], edx
mov dword [esp + 8], ebx
mov dword [esp], eax
mov dword [esp + 4], str.hFile__p__last_error__lu_n
mov esi, dword fs:[0x18]
call fcn.0045bef0
mov dword [esp], ebx
mov eax, dword [ebp - 0x438]
call eax
sub esp, 4
mov dword [esp], edi
mov eax, dword [ebp - 0x444]
call eax
sub esp, 4
mov ebx, eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x6eb
mov eax, dword [esi + 0x34]
mov dword [esp], ebx
mov dword [esp + 8], eax
mov dword [esp + 4], str.DeleteFileW:_error__ld_n
call fcn.0045bef0
lea eax, [ebp - 0x434]
mov dword [esp + 0xc], 1
mov dword [esp + 0x10], eax
mov dword [esp + 8], 0
mov dword [esp + 4], 0x80000000
mov dword [esp], 0x59eabc
call dword [0x76d154]
sub esp, 0x14
mov ebx, eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x6ee
xor eax, eax
mov edx, dword [esi + 0x34]
cmp ebx, 0xffffffff
je 0x475fb0
mov dword [esp + 0xc], edx
mov dword [esp + 8], ebx
mov dword [esp], eax
mov dword [esp + 4], str.CreateFile2_____returned_ret_p_error_ld_n
call fcn.0045bef0
lea eax, [ebp - 0x434]
mov dword [ebp - 0x430], pe_nt_image_headers32
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 3
mov dword [esp + 8], 3
mov dword [esp + 4], 0
mov dword [esp], 0x59eaa8
call dword [0x76d154]
sub esp, 0x14
mov ebx, eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x6f4
xor eax, eax
mov edx, dword fs:[0x18]
mov ecx, dword [edx + 0x34]
cmp ebx, 0xffffffff
je 0x475fa0
mov dword [esp + 0xc], ecx
mov dword [esp + 8], ebx
mov dword [esp + 4], str.CreateFile2_on_invalid_VxD_name_returned_ret_p_error_ld_n
mov dword [esp], eax
call fcn.0045bef0
mov dword [esp + 4], 0
mov dword [esp], edi
call dword [sym.imp.kernel32.dll_CreateDirectoryW]
sub esp, 8
mov ebx, eax
mov eax, 0x6f8
call fcn.0045b740
xor eax, eax
cmp ebx, 1
mov dword [esp + 4], str.couldnt_create_temporary_directory_n
sete al
mov dword [esp], eax
mov esi, dword fs:[0x18]
call fcn.0045bef0
lea eax, [ebp - 0x434]
mov dword [ebp - 0x430], pe_nt_image_headers32
mov dword [ebp - 0x42c], 0x2000000
mov dword [esi + 0x34], 0xdeadbeef
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 4
mov dword [esp + 8], 0
mov dword [esp + 4], 0xc0000000
mov dword [esp], edi
call dword [0x76d154]
sub esp, 0x14
mov ebx, eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x6fd
mov eax, dword [esi + 0x34]
mov dword [esp + 4], str.CreateFile2_failed_with_FILE_FLAG_BACKUP_SEMANTICS_on_existing_directory__error:__ld_n
mov dword [esp + 8], eax
xor eax, eax
cmp ebx, 0xffffffff
setne al
mov dword [esp], eax
call fcn.0045bef0
mov dword [esp], ebx
mov eax, dword [ebp - 0x438]
call eax
sub esp, 4
mov dword [esp], edi
call dword [sym.imp.kernel32.dll_RemoveDirectoryW]
sub esp, 4
mov ebx, eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x701
mov eax, dword [esi + 0x34]
mov dword [esp + 4], str.DeleteFileW:_error__ld_n
mov dword [esp + 8], eax
mov dword [esp], ebx
call fcn.0045bef0
mov edx, 0x44000000
mov eax, pe_nt_image_headers32
mov dword [ebp - 0x428], 0
mov dword [ebp - 0x424], 0
mov dword [ebp - 0x420], 0
mov dword [ebp - 0x440], 0
mov dword [ebp - 0x430], eax
lea eax, [ebp - 0x434]
mov dword [ebp - 0x42c], edx
mov dword [ebp - 0x434], 0x18
mov dword [esi + 0x34], 0xdeadbeef
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 2
mov dword [esp + 8], 1
mov dword [esp + 4], 0xc0000000
mov dword [esp], edi
call dword [0x76d154]
sub esp, 0x14
mov ebx, eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x714
xor eax, eax
mov edx, dword [esi + 0x34]
cmp ebx, 0xffffffff
je 0x475d8b
xor eax, eax
test edx, edx
sete al
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], ebx
mov ecx, dword [ebp - 0x440]
mov dword [esp + 4], str._ld:_hFile__p__last_error__lu_n
mov dword [esp + 8], ecx
mov dword [esp], eax
call fcn.0045bef0
mov dword [esp + 0xc], 2
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_CreateIoCompletionPort]
sub esp, 0x10
cmp dword [ebp - 0x440], 1
mov dword [ebp - 0x43c], eax
je 0x475ef0
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x718
xor eax, eax
mov edx, dword fs:[0x18]
cmp dword [ebp - 0x43c], 0xffffffff
mov ecx, dword [edx + 0x34]
je 0x475e12
xor eax, eax
test ecx, ecx
sete al
mov dword [esp + 0x10], ecx
mov ecx, dword [ebp - 0x43c]
mov dword [esp], eax
mov dword [esp + 0xc], ecx
mov dword [esp + 8], 0
mov dword [esp + 4], str._ld:_CreateIoCompletionPort_returned__p__error__lu_n
call fcn.0045bef0
mov ecx, dword [ebp - 0x43c]
mov dword [esp], ecx
mov eax, dword [ebp - 0x438]
call eax
sub esp, 4
mov dword [esp], ebx
mov eax, dword [ebp - 0x438]
call eax
sub esp, 4
mov dword [esp], edi
mov eax, dword [ebp - 0x444]
call eax
sub esp, 4
mov ebx, eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x71f
xor eax, eax
mov edx, dword fs:[0x18]
mov ecx, dword [edx + 0x34]
test ebx, ebx
jne 0x475e94
xor eax, eax
cmp ecx, 2
sete al
mov dword [esp], eax
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 0
mov dword [esp + 4], str._ld:_unexpected_DeleteFileW_result__ret__ld_error__lu_n
call fcn.0045bef0
mov edx, pe_nt_image_headers32
mov eax, 0x44000000
mov dword [ebp - 0x428], 0
mov dword [ebp - 0x424], 0
mov dword [ebp - 0x420], 0
mov dword [ebp - 0x440], 1
jmp 0x475d1b
mov eax, 0x717
call fcn.0045b740
xor eax, eax
mov ecx, dword fs:[0x18]
mov edx, dword [ecx + 0x34]
mov ecx, dword [ebp - 0x43c]
test ecx, ecx
je 0x475ff0
mov dword [esp + 0x10], edx
mov esi, dword [ebp - 0x43c]
mov dword [esp], eax
mov dword [esp + 0xc], esi
mov dword [esp + 8], 1
mov dword [esp + 4], str._ld:_CreateIoCompletionPort_returned__p__error__lu_n
call fcn.0045bef0
mov dword [esp], esi
mov esi, dword [ebp - 0x438]
mov eax, esi
call eax
mov eax, esi
sub esp, 4
mov dword [esp], ebx
call eax
sub esp, 4
mov dword [esp], edi
mov eax, dword [ebp - 0x444]
call eax
sub esp, 4
mov ebx, eax
mov eax, 0x71e
call fcn.0045b740
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
mov dword [esp], ebx
mov dword [esp + 8], 1
mov dword [esp + 0xc], eax
mov dword [esp + 4], str._ld:_unexpected_DeleteFileW_failure__error__lu_n
call fcn.0045bef0
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
xor eax, eax
cmp ecx, 2
sete al
jmp 0x475bd1
xor eax, eax
cmp edx, 3
sete al
jmp 0x475b54
xor eax, eax
cmp dword [esi + 0x34], 0x50
sete al
jmp 0x4758d0
mov eax, 0x6bf
call fcn.0045b740
mov dword [esp], str.CreateFile2_is_missing_n
call fcn.0045bec0
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
xor eax, eax
cmp edx, 0x57
sete al
jmp 0x475f14