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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4facce
mov eax, dword fs:[0]
push eax
sub esp, 0x180
mov eax, dword [0x537474]
xor eax, ebp
mov dword [ebp - 0x10], eax
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x170], ecx
mov byte [ebp - 0x114], 0
push 0x103
push 0
lea eax, [ebp - 0x113]
push eax
call fcn.0049d060
add esp, 0xc
lea ecx, [ebp - 0x114]
push ecx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
push 0
lea edx, [ebp - 0x114]
push edx
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectoryExA]
push 0x501b30
push 0x501b38
call fcn.0042aec0
mov ecx, eax
call fcn.0043e500
push eax
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov dword [ebp - 0x168], eax
cmp dword [ebp - 0x168], 0
jne 0x42f123
jmp 0x42f340
mov eax, dword [ebp - 0x168]
push eax
call fcn.0042aec0
mov ecx, eax
call fcn.0043e500
push eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 0x178], eax
mov ecx, dword [ebp - 0x178]
push ecx
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [ebp - 0x184], eax
mov edx, dword [ebp - 0x168]
push edx
call fcn.0042aec0
mov ecx, eax
call fcn.0043e500
push eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov dword [ebp - 0x180], eax
lea eax, [ebp - 0x114]
add eax, 0xffffffff
mov dword [ebp - 0x164], eax
mov ecx, dword [ebp - 0x164]
mov dl, byte [ecx + 1]
mov byte [ebp - 0x15d], dl
add dword [ebp - 0x164], 1
cmp byte [ebp - 0x15d], 0
jne 0x42f185
mov edi, dword [ebp - 0x164]
mov eax, dword [0x501b40]
mov dword [edi], eax
mov ecx, dword [0x501b44]
mov dword [edi + 4], ecx
mov dx, word [0x501b48]
mov word [edi + 8], dx
lea eax, [ebp - 0x114]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x42f21c
lea ecx, [ebp - 0x114]
push ecx
lea edx, [ebp - 0x12c]
push edx
call fcn.00402380
add esp, 8
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x12c]
call fcn.004046f0
push eax
mov ecx, dword [ebp - 0x170]
call fcn.0042f800
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x12c]
call fcn.00404b60
push 0
push 0x80
push 1
push 0
push 1
push 0x40000000
lea eax, [ebp - 0x114]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x16c], eax
cmp dword [ebp - 0x16c], 0xffffffff
je 0x42f285
mov dword [ebp - 0x17c], 0
push 0
lea ecx, [ebp - 0x17c]
push ecx
mov edx, dword [ebp - 0x180]
push edx
mov eax, dword [ebp - 0x184]
push eax
mov ecx, dword [ebp - 0x16c]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edx, dword [ebp - 0x16c]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x15c]
push eax
call fcn.0042aec0
mov ecx, eax
call fcn.0043e950
mov dword [ebp - 0x188], eax
mov ecx, dword [ebp - 0x188]
mov dword [ebp - 0x18c], ecx
mov dword [ebp - 4], 1
mov ecx, dword [ebp - 0x18c]
call fcn.00403340
push eax
lea edx, [ebp - 0x144]
push edx
call fcn.00402380
add esp, 8
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x15c]
call fcn.00404f10
cmp dword [ebp - 0x170], 0
je 0x42f2f5
mov eax, dword [ebp - 0x170]
add eax, 8
mov dword [ebp - 0x174], eax
jmp 0x42f2ff
mov dword [ebp - 0x174], 0
mov ecx, dword [ebp - 0x174]
push ecx
lea edx, [ebp - 0x114]
push edx
lea ecx, [ebp - 0x144]
call fcn.004046f0
push eax
call fcn.00414780
add esp, 0xc
lea eax, [ebp - 0x114]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x144]
call fcn.00404b60
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00497ebf
mov esp, ebp
pop ebp
ret