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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
mov ebx, dword fs:[0x18]
sub esp, 0xe98
mov edi, dword [sym.imp.kernel32.dll_GetLongPathNameW]
mov dword [ebx + 0x34], 0xdeadbeef
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], 0
mov dword [ebp - 0xe84], edi
call edi
sub esp, 0xc
mov esi, eax
mov eax, 0x4ed
call fcn.004e7d80
xor eax, eax
test esi, esi
mov dword [esp + 8], esi
sete al
mov dword [esp + 4], str.GetLongPathNameW_returned__ld_but_expected_0_n
mov dword [esp], eax
call fcn.004e88d0
call fcn.0057d110
mov dword [eax], 0x5e82d4
mov dword [eax + 4], 0x4ee
mov eax, dword [ebx + 0x34]
mov dword [esp + 4], str.GetLastError_returned__ld_but_expected_ERROR_INVALID_PARAMETER_n
mov dword [esp + 8], eax
xor eax, eax
cmp dword [ebx + 0x34], 0x57
sete al
mov dword [esp], eax
call fcn.004e88d0
xor eax, eax
mov dword [ebx + 0x34], 0xdeadbeef
mov word [ebp - 0xcee], ax
lea eax, [ebp - 0xcee]
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], eax
call edi
sub esp, 0xc
mov esi, eax
call fcn.0057d110
mov dword [eax], 0x5e82d4
mov dword [eax + 4], 0x4f3
xor eax, eax
test esi, esi
sete al
mov dword [esp + 8], esi
mov dword [esp], eax
mov dword [esp + 4], str.GetLongPathNameW_returned__ld_but_expected_0_n
call fcn.004e88d0
call fcn.0057d110
mov dword [eax], 0x5e82d4
mov dword [eax + 4], 0x4f4
mov eax, dword [ebx + 0x34]
mov dword [esp + 4], str.GetLastError_returned__ld_but_expected_ERROR_PATH_NOT_FOUND_n
mov dword [esp + 8], eax
xor eax, eax
cmp dword [ebx + 0x34], 3
lea ebx, [ebp - 0xe7e]
sete al
mov dword [esp], eax
call fcn.004e88d0
xor edx, edx
mov word [ebp - 0xe7e], dx
mov edx, ebx
lea esi, [esi]
nop
xor eax, eax
lea esi, [esi]
movzx ecx, word [eax + 0x5eaa34]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x4f1688
cmp word [ebp - 0xe7e], 0
je 0x4f1ca7
mov eax, ebx
lea esi, [esi]
nop
add eax, 2
cmp word [eax], 0
jne 0x4f16b0
sub eax, ebx
cmp eax, 0x18c
ja 0x4f16d8
mov edx, ebx
lea esi, [esi]
add edx, 2
cmp word [edx], 0
jne 0x4f16c8
jmp 0x4f1680
lea eax, [ebp - 0xae6]
mov dword [esp], 0x104
mov dword [esp + 4], eax
call dword [sym.imp.kernel32.dll_GetTempPathW]
xor eax, eax
sub esp, 8
lea esi, [esi]
movzx edx, word [eax + 0x5eaa28]
mov word [ebp + eax - 0x53e], dx
add eax, 2
test dx, dx
jne 0x4f16f8
cmp word [ebp - 0x53e], 0
lea edx, [ebp - 0x53e]
je 0x4f1729
nop
add edx, 2
cmp word [edx], 0
jne 0x4f1720
xor eax, eax
lea esi, [esi]
nop
movzx ecx, word [ebp + eax - 0xae6]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x4f1730
cmp word [ebp - 0x53e], 0
lea edx, [ebp - 0x53e]
je 0x4f1761
lea esi, [esi]
add edx, 2
cmp word [edx], 0
jne 0x4f1758
xor eax, eax
lea esi, [esi]
nop
movzx ecx, word [ebx + eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x4f1768
xor eax, eax
lea esi, [esi]
movzx edx, word [ebp + eax - 0x53e]
mov word [ebp + eax - 0x8de], dx
add eax, 2
test dx, dx
jne 0x4f1780
lea eax, [ebp - 0x53e]
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_CreateDirectoryW]
sub esp, 8
mov esi, eax
call fcn.0057d110
mov dword [eax], 0x5e82d4
mov dword [eax + 4], 0x505
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
mov dword [esp + 4], str.Could_not_create_the_temporary_directory_:__ld_n
mov dword [esp], esi
mov dword [esp + 8], eax
call fcn.004e88d0
cmp word [ebp - 0x53e], 0
lea edx, [ebp - 0x53e]
je 0x4f1801
lea esi, [esi]
nop
add edx, 2
cmp word [edx], 0
jne 0x4f17f8
xor eax, eax
lea esi, [esi]
nop
movzx ecx, word [eax + 0x5eaa24]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x4f1808
cmp word [ebp - 0x53e], 0
lea edx, [ebp - 0x53e]
je 0x4f1839
lea esi, [esi]
nop
add edx, 2
cmp word [edx], 0
jne 0x4f1830
xor eax, eax
lea esi, [esi]
nop
movzx ecx, word [ebx + eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x4f1840
lea eax, [ebp - 0x536]
mov esi, dword fs:[0x18]
mov dword [esi + 0x34], 0xdeadbeef
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], eax
mov eax, dword [ebp - 0xe84]
call eax
sub esp, 0xc
mov edi, eax
call fcn.0057d110
mov dword [eax], 0x5e82d4
mov dword [eax + 4], 0x50e
xor eax, eax
test edi, edi
sete al
mov dword [esp + 8], edi
mov dword [esp], eax
mov dword [esp + 4], 0x5e989c
call fcn.004e88d0
mov edi, dword [0x8f0770]
call fcn.0057d110
mov ecx, dword [eax + 0x10]
mov dword [eax + 0x14], 1
lea edx, [ecx + ecx]
xor ecx, ecx
test edi, edi
setne cl
or edx, ecx
mov dword [eax + 0x10], edx
jmp 0x4f191a
call fcn.0057d110
mov dword [eax], 0x5e82d4
mov dword [eax + 4], 0x510
mov eax, dword [esi + 0x34]
mov dword [esp + 4], 0x5e98b4
mov dword [esp + 8], eax
xor eax, eax
cmp dword [esi + 0x34], 3
sete al
mov dword [esp], eax
call fcn.004e88d0
call fcn.0057d110
shr dword [eax + 0x10], 1
call fcn.0057d110
mov edx, dword [eax + 0x14]
mov dword [eax + 0x14], 0
test edx, edx
jne 0x4f18e0
lea eax, [ebp - 0x53e]
mov edi, dword fs:[0x18]
mov dword [edi + 0x34], 0xdeadbeef
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], eax
mov eax, dword [ebp - 0xe84]
call eax
mov ecx, dword [0x8f0770]
sub esp, 0xc
mov esi, eax
mov dword [ebp - 0xe88], ecx
call fcn.0057d110
mov ecx, dword [eax + 0x10]
mov dword [eax + 0x14], 1
lea edx, [ecx + ecx]
mov ecx, dword [ebp - 0xe88]
test ecx, ecx
setne cl
movzx ecx, cl
or edx, ecx
mov dword [eax + 0x10], edx
jmp 0x4f19ff
call fcn.0057d110
mov dword [eax], 0x5e82d4
mov dword [eax + 4], 0x517
xor eax, eax
test esi, esi
sete al
mov dword [esp + 8], esi
mov dword [esp], eax
mov dword [esp + 4], 0x5e989c
call fcn.004e88d0
call fcn.0057d110
mov dword [eax], 0x5e82d4
mov dword [eax + 4], 0x518
mov eax, dword [edi + 0x34]
mov dword [esp + 4], 0x5e98b4
mov dword [esp + 8], eax
xor eax, eax
cmp dword [edi + 0x34], 2
sete al
mov dword [esp], eax
call fcn.004e88d0
call fcn.0057d110
shr dword [eax + 0x10], 1
call fcn.0057d110
mov edx, dword [eax + 0x14]
mov dword [eax + 0x14], 0
test edx, edx
jne 0x4f1998
lea eax, [ebp - 0x53e]
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], pe_nt_image_headers32
mov dword [esp + 0x10], 2
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0xc0000000
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_CreateFileW]
sub esp, 0x1c
mov esi, eax
call fcn.0057d110
mov dword [eax], 0x5e82d4
mov dword [eax + 4], 0x51e
mov edi, dword fs:[0x18]
mov eax, dword [edi + 0x34]
mov dword [esp + 4], str.Could_not_create_the_temporary_file_:__ld._n
mov dword [esp + 8], eax
xor eax, eax
cmp esi, 0xffffffff
setne al
mov dword [esp], eax
call fcn.004e88d0
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_CloseHandle]
lea eax, [ebp - 0x536]
mov dword [edi + 0x34], 0xdeadbeef
sub esp, 4
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], eax
mov eax, dword [ebp - 0xe84]
call eax
mov ecx, dword [0x8f0770]
sub esp, 0xc
mov esi, eax
mov dword [ebp - 0xe88], ecx
call fcn.0057d110
mov ecx, dword [eax + 0x10]
mov dword [eax + 0x14], 1
lea edx, [ecx + ecx]
mov ecx, dword [ebp - 0xe88]
test ecx, ecx
setne cl
movzx ecx, cl
or edx, ecx
mov dword [eax + 0x10], edx
jmp 0x4f1b67
call fcn.0057d110
mov dword [eax], 0x5e82d4
mov dword [eax + 4], 0x529
xor eax, eax
test esi, esi
sete al
mov dword [esp + 8], esi
mov dword [esp], eax
mov dword [esp + 4], 0x5e989c
call fcn.004e88d0
call fcn.0057d110
mov dword [eax], 0x5e82d4
mov dword [eax + 4], 0x52a
mov eax, dword [edi + 0x34]
mov dword [esp + 4], 0x5e98b4
mov dword [esp + 8], eax
xor eax, eax
cmp dword [edi + 0x34], 3
sete al
mov dword [esp], eax
call fcn.004e88d0
call fcn.0057d110
shr dword [eax + 0x10], 1
call fcn.0057d110
mov edx, dword [eax + 0x14]
mov dword [eax + 0x14], 0
test edx, edx
jne 0x4f1b00
lea eax, [ebp - 0xae6]
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], eax
mov eax, dword [ebp - 0xe84]
call eax
mov edx, ebx
sub esp, 0xc
mov ecx, eax
lea esi, [esi]
add edx, 2
cmp word [edx], 0
jne 0x4f1ba8
sub edx, ebx
mov eax, ebx
sar edx, 1
lea esi, [esi]
nop
add eax, 2
cmp word [eax], 0
jne 0x4f1bc0
sub eax, ebx
sar eax, 1
lea esi, [edx + eax + 5]
mov eax, dword fs:[0x18]
mov dword [eax + 0x34], 0xdeadbeef
lea eax, [ebp - 0x53e]
add esi, ecx
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], eax
mov eax, dword [ebp - 0xe84]
call eax
sub esp, 0xc
mov ebx, eax
call fcn.0057d110
mov dword [eax], 0x5e82d4
mov dword [eax + 4], 0x530
xor eax, eax
cmp esi, ebx
sete al
mov dword [esp + 0xc], ebx
mov dword [esp + 8], esi
mov dword [esp], eax
mov dword [esp + 4], str.Expected__ld__got__ld_n
call fcn.004e88d0
call fcn.0057d110
mov dword [eax], 0x5e82d4
mov dword [eax + 4], 0x536
lea eax, [ebp - 0x53e]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_DeleteFileW]
sub esp, 4
mov dword [esp], eax
mov dword [esp + 4], str.Could_not_delete_temporary_file_n
call fcn.004e88d0
call fcn.0057d110
mov dword [eax], 0x5e82d4
mov dword [eax + 4], 0x537
lea eax, [ebp - 0x8de]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_RemoveDirectoryW]
sub esp, 4
mov dword [esp + 4], str.Could_not_delete_temporary_directory_n
mov dword [esp], eax
call fcn.004e88d0
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov edx, ebx
jmp 0x4f1680