Function at 0x40de40
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 0x4c3c5c
mov eax, dword fs:[0]
push eax
sub esp, 0x1e0
mov eax, dword [0x509380]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
xorps xmm0, xmm0
mov dword [ebp - 0x120], 0
movups xmmword [ebp - 0x130], xmm0
mov dword [ebp - 0x11c], 0xf
mov byte [ebp - 0x130], 0
mov ecx, dword [edi + 0x6fc]
mov dword [ebp - 4], 0
test ecx, ecx
je 0x40df71
mov eax, dword [ecx]
lea edx, [ebp - 0x1ec]
push edx
mov eax, dword [eax + 0x38]
call eax
mov ecx, eax
mov byte [ebp - 4], 1
call sym.Install.exe_public:_wchar_t_const____thiscall_DuiLib::CDuiString::operator_wchar_t_const__void_const
push eax
lea eax, [ebp - 0x148]
push eax
call fcn.00401530
mov esi, eax
add esp, 8
lea eax, [ebp - 0x130]
cmp eax, esi
je 0x40df0d
mov ecx, eax
call fcn.00402c10
movups xmm0, xmmword [esi]
movups xmmword [ebp - 0x130], xmm0
movq xmm0, qword [esi + 0x10]
movq qword [ebp - 0x120], xmm0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0xf
mov byte [esi], 0
mov ecx, dword [ebp - 0x134]
cmp ecx, 0xf
jbe 0x40df47
mov edx, dword [ebp - 0x148]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x40df3d
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40e43a
push ecx
push edx
call fcn.0049ce1b
add esp, 8
lea ecx, [ebp - 0x1ec]
mov dword [ebp - 0x138], 0
mov dword [ebp - 0x134], 0xf
mov byte [ebp - 0x148], 0
mov byte [ebp - 4], 0
call sym.Install.exe_public:_void___thiscall_DuiLib::CDuiString::destructor_void_
mov eax, dword [edi + 0x710]
lea esi, [edi + 0x710]
mov ecx, dword [esi + 4]
cmp eax, ecx
je 0x40df94
push esi
push ecx
push eax
call fcn.00403140
mov eax, dword [esi]
add esp, 0xc
mov dword [esi + 4], eax
cmp dword [ebp - 0x11c], 0xf
lea eax, [ebp - 0x130]
mov ecx, edi
cmova eax, dword [ebp - 0x130]
push eax
call fcn.0040d840
mov esi, dword [esi]
cmp esi, dword [edi + 0x714]
je 0x40e064
nop
cmp dword [esi + 0x14], 0xf
mov eax, esi
jbe 0x40dfca
mov eax, dword [esi]
push eax
lea eax, [ebp - 0x148]
push eax
call fcn.00401700
add esp, 8
lea eax, [ebp - 0x148]
cmp dword [ebp - 0x134], 7
cmova eax, dword [ebp - 0x148]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40e015
cmp dword [ebp - 0x134], 7
lea eax, [ebp - 0x148]
mov ecx, edi
cmova eax, dword [ebp - 0x148]
push eax
call fcn.0040dc30
mov ecx, dword [ebp - 0x134]
cmp ecx, 7
jbe 0x40e055
mov edx, dword [ebp - 0x148]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x40e04b
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40e43a
push ecx
push edx
call fcn.0049ce1b
add esp, 8
add esi, 0x18
cmp esi, dword [edi + 0x714]
jne 0x40dfc0
cmp dword [ebp - 0x11c], 0xf
lea eax, [ebp - 0x130]
mov ecx, edi
cmova eax, dword [ebp - 0x130]
push eax
call fcn.0040d840
mov eax, dword [edi + 0x710]
lea esi, [edi + 0x710]
mov ecx, dword [esi + 4]
cmp eax, ecx
je 0x40e0a3
push esi
push ecx
push eax
call fcn.00403140
mov eax, dword [esi]
add esp, 0xc
mov dword [esi + 4], eax
cmp dword [ebp - 0x11c], 0xf
lea eax, [ebp - 0x130]
mov esi, dword [sym.imp.SHELL32.dll_SHCreateDirectoryExA]
cmova eax, dword [ebp - 0x130]
push 0
push eax
push 0
call esi
push 0x104
lea eax, [ebp - 0x114]
push 0
push eax
call fcn.0049e980
add esp, 0xc
lea eax, [ebp - 0x114]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
push 0
lea eax, [ebp - 0x114]
push eax
push 0
call esi
mov eax, dword [0x50cc44]
test eax, eax
jne 0x40e13d
push 0x44
call fcn.0049cdeb
mov esi, eax
add esp, 4
mov dword [ebp - 0x164], esi
mov byte [ebp - 4], 2
test esi, esi
je 0x40e132
push 0x44
push 0
push esi
call fcn.0049e980
add esp, 0xc
mov ecx, esi
call fcn.0040a600
jmp 0x40e134
xor eax, eax
mov byte [ebp - 4], 0
mov dword [0x50cc44], eax
push str.DATA
push str.7ZDATA
mov ecx, eax
call sym.Install.exe_public:_wchar_t_const____thiscall_DuiLib::CDuiString::operator_wchar_t_const__void_const
push eax
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov dword [ebp - 0x118], eax
test eax, eax
je 0x40e3e9
mov eax, dword [0x50cc44]
test eax, eax
jne 0x40e1a7
push 0x44
call fcn.0049cdeb
mov esi, eax
add esp, 4
mov dword [ebp - 0x164], esi
mov byte [ebp - 4], 3
test esi, esi
je 0x40e19c
push 0x44
push 0
push esi
call fcn.0049e980
add esp, 0xc
mov ecx, esi
call fcn.0040a600
jmp 0x40e19e
xor eax, eax
mov byte [ebp - 4], 0
mov dword [0x50cc44], eax
push dword [ebp - 0x118]
mov ecx, eax
call sym.Install.exe_public:_wchar_t_const____thiscall_DuiLib::CDuiString::operator_wchar_t_const__void_const
push eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [ebp - 0x164], eax
mov eax, dword [0x50cc44]
test eax, eax
jne 0x40e20c
push 0x44
call fcn.0049cdeb
mov esi, eax
add esp, 4
mov dword [ebp - 0x168], esi
mov byte [ebp - 4], 4
test esi, esi
je 0x40e201
push 0x44
push 0
push esi
call fcn.0049e980
add esp, 0xc
mov ecx, esi
call fcn.0040a600
jmp 0x40e203
xor eax, eax
mov byte [ebp - 4], 0
mov dword [0x50cc44], eax
push dword [ebp - 0x118]
mov ecx, eax
call sym.Install.exe_public:_wchar_t_const____thiscall_DuiLib::CDuiString::operator_wchar_t_const__void_const
push eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
lea edx, [ebp - 0x114]
mov dword [ebp - 0x168], eax
dec edx
nop dword [eax]
mov cl, byte [edx + 1]
lea edx, [edx + 1]
test cl, cl
jne 0x40e230
mov eax, dword [str.7zData.7z]
mov dword [edx], eax
mov eax, dword [0x4c68f0]
mov dword [edx + 4], eax
mov ax, word [0x4c68f4]
mov word [edx + 8], ax
lea eax, [ebp - 0x114]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x40e2d6
lea eax, [ebp - 0x114]
push eax
lea eax, [ebp - 0x148]
push eax
call fcn.00401700
add esp, 8
lea eax, [ebp - 0x148]
cmp dword [ebp - 0x134], 7
mov ecx, edi
cmova eax, dword [ebp - 0x148]
push eax
call fcn.0040dc30
mov ecx, dword [ebp - 0x134]
cmp ecx, 7
jbe 0x40e2d6
mov edx, dword [ebp - 0x148]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x40e2cc
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40e43f
push ecx
push edx
call fcn.0049ce1b
add esp, 8
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 esi, eax
cmp esi, 0xffffffff
je 0x40e329
push 0
lea eax, [ebp - 0x118]
mov dword [ebp - 0x118], 0
push eax
push dword [ebp - 0x168]
push dword [ebp - 0x164]
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x11c], 0xf
lea eax, [ebp - 0x130]
cmova eax, dword [ebp - 0x130]
push eax
lea eax, [ebp - 0x160]
push eax
call fcn.00401700
lea eax, [edi + 0x6e0]
mov byte [ebp - 4], 5
neg edi
lea ecx, [ebp - 0x114]
sbb edi, edi
and edi, eax
cmp dword [ebp - 0x14c], 7
push edi
lea eax, [ebp - 0x160]
cmova eax, dword [ebp - 0x160]
push ecx
push eax
call fcn.00403860
add esp, 0x14
lea eax, [ebp - 0x114]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov ecx, dword [ebp - 0x14c]
cmp ecx, 7
jbe 0x40e3cc
mov edx, dword [ebp - 0x160]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x40e3c2
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40e444
push ecx
push edx
call fcn.0049ce1b
add esp, 8
xor eax, eax
mov dword [ebp - 0x150], 0
mov dword [ebp - 0x14c], 7
mov word [ebp - 0x160], ax
mov ecx, dword [ebp - 0x11c]
cmp ecx, 0xf
jbe 0x40e41f
mov edx, dword [ebp - 0x130]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x40e415
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40e444
push ecx
push edx
call fcn.0049ce1b
add esp, 8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0049cd8d
mov esp, ebp
pop ebp
ret
call fcn.004a746a
call fcn.004a746a
call fcn.004a746a
int3