Function at 0x40d551
Capabilities:
Extract resource via kernel32 functions
Get common file path
Write file on windows

Disassembly:
push 0x224
mov eax, 0x446c44
call fcn.00429d79
mov eax, dword [ebp + 8]
push str.IMAGERES
push str.FTIMAGE
xor ebx, ebx
push ebx
mov dword [ebp - 0x230], eax
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov esi, eax
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
push esi
push ebx
mov edi, eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push edi
mov dword [ebp - 0x224], eax
call dword [sym.imp.KERNEL32.dll_LockResource]
push 0x103
mov dword [ebp - 0x228], eax
lea eax, [ebp - 0x11b]
push ebx
push eax
mov byte [ebp - 0x11c], bl
call fcn.0042a4a0
add esp, 0xc
lea eax, [ebp - 0x11c]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
jne 0x40d61d
push 0x2f
push str.Cannot_detect_the_path_to_the_temporary_folder.
lea ecx, [ebp - 0x138]
mov dword [ebp - 0x124], 0xf
mov dword [ebp - 0x128], ebx
mov byte [ebp - 0x138], bl
call fcn.0040366e
mov dword [ebp - 4], ebx
lea eax, [ebp - 0x138]
lea esi, [ebp - 0x1cc]
call fcn.00416a20
push 0x455268
mov eax, esi
push eax
call fcn.0042a64b
push 0xf
pop esi
lea eax, [ebp - 0x11c]
mov dword [ebp - 0x140], esi
mov dword [ebp - 0x144], ebx
mov byte [ebp - 0x154], bl
lea edi, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x40d63b
sub eax, edi
push eax
lea eax, [ebp - 0x11c]
push eax
lea ecx, [ebp - 0x154]
call fcn.0040366e
mov dword [ebp - 4], 1
mov ecx, dword [ebp - 0x144]
cmp ecx, ebx
je 0x40d695
cmp dword [ebp - 0x140], 0x10
mov eax, dword [ebp - 0x154]
jae 0x40d67d
lea eax, [ebp - 0x154]
cmp byte [eax + ecx - 1], 0x5c
je 0x40d695
push 0x44b3dc
lea eax, [ebp - 0x154]
push eax
call fcn.00402eb1
push str.Light_Installer_Ft_Image.png
lea eax, [ebp - 0x154]
push eax
call fcn.00402eb1
mov dword [ebp - 0x15c], esi
mov dword [ebp - 0x160], ebx
mov byte [ebp - 0x170], bl
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x214], ebx
mov dword [ebp - method.CHandleGuard.virtual_0], vtable.CHandleGuard.0
mov dword [ebp - 0x21c], ebx
mov dword [ebp - 0x218], eax
mov byte [ebp - 4], 3
cmp dword [ebp - 0x140], 0x10
mov eax, dword [ebp - 0x154]
jae 0x40d6f0
lea eax, [ebp - 0x154]
push eax
lea ecx, [ebp - 0x138]
mov dword [ebp - 0x124], esi
mov dword [ebp - 0x128], ebx
mov byte [ebp - 0x138], bl
call fcn.004036e3
lea eax, [ebp - 0x214]
push eax
lea edi, [ebp - 0x170]
lea eax, [ebp - 0x138]
mov byte [ebp - 4], 4
call fcn.00413cc3
pop ecx
neg al
sbb al, al
push ebx
inc al
push 1
lea ecx, [ebp - 0x138]
mov byte [ebp - 0x20d], al
mov byte [ebp - 4], 3
call fcn.00403a1b
cmp byte [ebp - 0x20d], bl
je 0x40d77e
push 0x1f
push str.Cannot_create_a_temporary_file.
lea ecx, [ebp - 0x138]
mov dword [ebp - 0x124], esi
mov dword [ebp - 0x128], ebx
mov byte [ebp - 0x138], bl
call fcn.0040366e
mov byte [ebp - 4], 5
jmp 0x40d5ff
mov eax, dword [ebp - 0x214]
push ebx
lea ecx, [ebp - 0x22c]
push ecx
push dword [ebp - 0x224]
mov dword [ebp - 0x21c], eax
push dword [ebp - 0x228]
mov dword [ebp - 0x22c], ebx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x40d7ef
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea edi, [ebp - 0x170]
call fcn.00413b8b
pop ecx
push 0x1f
push str.Cannot_create_a_temporary_file.
lea ecx, [ebp - 0x138]
mov dword [ebp - 0x124], esi
mov dword [ebp - 0x128], ebx
mov byte [ebp - 0x138], bl
call fcn.0040366e
mov byte [ebp - 4], 6
jmp 0x40d5ff
lea eax, [ebp - 0x170]
lea esi, [ebp - 0x220]
call fcn.004047a3
test al, al
jne 0x40d84d
push 0x1f
push str.Cannot_create_a_temporary_file.
lea ecx, [ebp - 0x18c]
mov dword [ebp - 0x178], 0xf
mov dword [ebp - 0x17c], ebx
mov byte [ebp - 0x18c], bl
call fcn.0040366e
lea eax, [ebp - 0x18c]
lea esi, [ebp - 0x20c]
mov byte [ebp - 4], 7
call fcn.00416a20
push 0x455268
mov eax, esi
jmp 0x40d617
mov eax, dword [ebp - 0x230]
mov eax, dword [eax + 0x198]
push 0xffffffffffffffff
push ebx
lea ecx, [ebp - 0x154]
push ecx
lea ecx, [eax + 0x6c]
call fcn.00403978
lea ecx, [ebp - 0x220]
mov byte [ebp - 4], 2
call fcn.004046c8
push ebx
push 1
lea ecx, [ebp - 0x170]
call fcn.00403a1b
push ebx
push 1
lea ecx, [ebp - 0x154]
call fcn.00403a1b
call fcn.00429dfc
ret 8