Function at 0x401dfc
Capabilities:
Check if file exists
Create directory
Delete file
Extract resource via kernel32 functions
Get common file path
Get file attributes
Write file on windows

Disassembly:
mov eax, 0x41c655
call fcn.0041c000
sub esp, 0x41c
mov eax, dword [0x426e88]
push ebx
push esi
push edi
mov ebx, ecx
xor edi, edi
push edi
lea ecx, [ebp - 0x41c]
mov dword [ebp - 0x10], eax
call fcn.00401710
mov dword [ebp - 4], edi
mov dword [ebp - 0x420], edi
call sub.msvcrt.dll_rand
push dword [ebx + 8]
mov esi, eax
push 0x1000
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
je 0x402086
cmp esi, edi
jne 0x401e56
mov esi, 0xdeadbeef
mov eax, dword [ebx + 8]
push eax
push esi
push 0x41d83c
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
je 0x402086
mov ecx, dword [ebx + 0x18]
cmp ecx, edi
je 0x401e80
push 1
call fcn.004016bb
mov dword [ebx + 0x18], edi
push 0x40c
call sub.msvcrt.dll_void____cdecl_operator_new_unsigned_int_
cmp eax, edi
pop ecx
je 0x401e9b
push dword [ebx + 8]
mov ecx, eax
call fcn.00401710
jmp 0x401e9d
xor eax, eax
cmp eax, edi
mov dword [ebx + 0x18], eax
jne 0x401eae
push str.Cannot_get_alloc_m_pszWorkFolder_n
jmp 0x40208b
push dword [ebx + 8]
call sub.msvcrt.dll_wcslen
pop ecx
mov ecx, dword [ebx + 8]
cmp word [ecx + eax*2 - 2], 0x5c
je 0x401ecf
mov ecx, dword [ebx + 0x18]
push 0x41d7f0
call fcn.0040141b
mov eax, dword [ebx + 0x18]
push dword [eax]
mov esi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
call esi
cmp eax, 0xffffffff
je 0x401ef9
test al, 0x10
je 0x401eee
mov ecx, ebx
call fcn.004019f1
jmp 0x401ef9
mov eax, dword [ebx + 0x18]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov eax, dword [ebx + 0x18]
push edi
push dword [eax]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x402072
mov eax, dword [ebx + 0x18]
push dword [eax]
call esi
cmp eax, 0xffffffff
je 0x402072
push str.CABFILE
push 0x41d7d8
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
cmp eax, edi
mov dword [ebp - 0x428], eax
jne 0x401f42
push str.Cannot_find_CABFILE_n
jmp 0x40208b
push eax
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, edi
jne 0x401f5f
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.LoadResource_error____X._n
jmp 0x40207e
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
cmp eax, edi
mov dword [ebp - 0x424], eax
jne 0x401f81
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.LockResource_error____X._n
jmp 0x40207e
mov eax, dword [ebx + 0x18]
push dword [eax]
lea ecx, [ebp - 0x41c]
call fcn.0040141b
push str.ePOPolicyMigration.cab
lea ecx, [ebp - 0x41c]
call fcn.0040141b
sub esp, 0x40c
mov edi, esp
mov ecx, 0x103
lea esi, [ebp - 0x41c]
push 0x41d70c
rep movsd dword es:[edi], dword [esi]
call sub.msvcrt.dll_wprintf
add esp, 0x410
xor esi, esi
push esi
push 0x80
push 2
push esi
push esi
push 0xc0000000
push dword [ebp - 0x41c]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x401ffb
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CreateFile_error____X._n
jmp 0x40207e
push dword [ebp - 0x428]
push esi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push esi
lea ecx, [ebp - 0x420]
push ecx
push eax
push dword [ebp - 0x424]
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
push 0x401971
push esi
push dword [ebp - 0x41c]
call dword [sym.imp.SETUPAPI.dll_SetupIterateCabinetW]
test eax, eax
setne bl
test bl, bl
jne 0x402054
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.SetupIterateCabinet_error____X._n
call sub.msvcrt.dll_wprintf
pop ecx
pop ecx
lea eax, [ebp - 0x418]
cmp dword [ebp - 0x41c], eax
je 0x40206e
push dword [ebp - 0x41c]
call sub.msvcrt.dll_free
pop ecx
mov al, bl
jmp 0x4020ad
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Cannot_create_work_folder__error:__X._n
call sub.msvcrt.dll_wprintf
pop ecx
jmp 0x402090
push str.Cannot_get_temp_path_n
call sub.msvcrt.dll_wprintf
lea eax, [ebp - 0x418]
cmp dword [ebp - 0x41c], eax
pop ecx
je 0x4020ab
push dword [ebp - 0x41c]
call sub.msvcrt.dll_free
pop ecx
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov ecx, dword [ebp - 0x10]
call fcn.0041c4f6
pop edi
pop esi
pop ebx
leave
ret